From 6a4444fcf4b04db0ef332d11902741762f0a39b0 Mon Sep 17 00:00:00 2001 From: Tony Tang Date: Thu, 14 Jul 2022 11:22:48 -0400 Subject: [PATCH 01/27] feat: copy preview Change Streams API (#1309) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#1304) * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * feat: Copy preview Change Streams API to java client Co-authored-by: WhiteSource Renovate Co-authored-by: Owl Bot --- .../bigtable/data/v2/stub/BigtableStub.java | 16 + .../data/v2/stub/BigtableStubSettings.java | 78 + .../data/v2/stub/GrpcBigtableStub.java | 78 + .../com/google/bigtable/v2/BigtableGrpc.java | 234 + .../com/google/bigtable/v2/BigtableProto.java | 458 +- .../com/google/bigtable/v2/DataProto.java | 54 +- .../v2/ListChangeStreamPartitionsRequest.java | 855 ++ ...hangeStreamPartitionsRequestOrBuilder.java | 89 + .../ListChangeStreamPartitionsResponse.java | 726 ++ ...angeStreamPartitionsResponseOrBuilder.java | 60 + .../bigtable/v2/ReadChangeStreamRequest.java | 2495 +++++ .../v2/ReadChangeStreamRequestOrBuilder.java | 308 + .../bigtable/v2/ReadChangeStreamResponse.java | 8471 +++++++++++++++++ .../v2/ReadChangeStreamResponseOrBuilder.java | 132 + .../bigtable/v2/StreamContinuationToken.java | 884 ++ .../v2/StreamContinuationTokenOrBuilder.java | 85 + .../bigtable/v2/StreamContinuationTokens.java | 929 ++ .../v2/StreamContinuationTokensOrBuilder.java | 76 + .../google/bigtable/v2/StreamPartition.java | 712 ++ .../bigtable/v2/StreamPartitionOrBuilder.java | 63 + .../proto/google/bigtable/v2/bigtable.proto | 246 + .../main/proto/google/bigtable/v2/data.proto | 27 + 22 files changed, 16940 insertions(+), 136 deletions(-) create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java index a27d6a5f07..a3ab3f3951 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java @@ -22,12 +22,16 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; +import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; +import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; @@ -73,6 +77,18 @@ public UnaryCallable pingAndWarmCallabl throw new UnsupportedOperationException("Not implemented: readModifyWriteRowCallable()"); } + public ServerStreamingCallable< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listChangeStreamPartitionsCallable()"); + } + + public ServerStreamingCallable + readChangeStreamCallable() { + throw new UnsupportedOperationException("Not implemented: readChangeStreamCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java index 2c12935b45..5c77a08132 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java @@ -35,12 +35,16 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; +import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; +import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; @@ -83,6 +87,11 @@ public class BigtableStubSettings extends StubSettings { private final UnaryCallSettings pingAndWarmSettings; private final UnaryCallSettings readModifyWriteRowSettings; + private final ServerStreamingCallSettings< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsSettings; + private final ServerStreamingCallSettings + readChangeStreamSettings; /** Returns the object with the settings used for calls to readRows. */ public ServerStreamingCallSettings readRowsSettings() { @@ -122,6 +131,19 @@ public UnaryCallSettings pingAndWarmSet return readModifyWriteRowSettings; } + /** Returns the object with the settings used for calls to listChangeStreamPartitions. */ + public ServerStreamingCallSettings< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsSettings() { + return listChangeStreamPartitionsSettings; + } + + /** Returns the object with the settings used for calls to readChangeStream. */ + public ServerStreamingCallSettings + readChangeStreamSettings() { + return readChangeStreamSettings; + } + public BigtableStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -203,6 +225,9 @@ protected BigtableStubSettings(Builder settingsBuilder) throws IOException { checkAndMutateRowSettings = settingsBuilder.checkAndMutateRowSettings().build(); pingAndWarmSettings = settingsBuilder.pingAndWarmSettings().build(); readModifyWriteRowSettings = settingsBuilder.readModifyWriteRowSettings().build(); + listChangeStreamPartitionsSettings = + settingsBuilder.listChangeStreamPartitionsSettings().build(); + readChangeStreamSettings = settingsBuilder.readChangeStreamSettings().build(); } /** Builder for BigtableStubSettings. */ @@ -221,6 +246,12 @@ public static class Builder extends StubSettings.Builder readModifyWriteRowSettings; + private final ServerStreamingCallSettings.Builder< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsSettings; + private final ServerStreamingCallSettings.Builder< + ReadChangeStreamRequest, ReadChangeStreamResponse> + readChangeStreamSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -241,6 +272,10 @@ public static class Builder extends StubSettings.BuildernewArrayList())); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -294,6 +329,22 @@ public static class Builder extends StubSettings.Builder>of( @@ -331,6 +384,8 @@ protected Builder(BigtableStubSettings settings) { checkAndMutateRowSettings = settings.checkAndMutateRowSettings.toBuilder(); pingAndWarmSettings = settings.pingAndWarmSettings.toBuilder(); readModifyWriteRowSettings = settings.readModifyWriteRowSettings.toBuilder(); + listChangeStreamPartitionsSettings = settings.listChangeStreamPartitionsSettings.toBuilder(); + readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -389,6 +444,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listChangeStreamPartitionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + + builder + .readChangeStreamSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params")); + return builder; } @@ -448,6 +513,19 @@ public UnaryCallSettings.Builder mutateRowS return readModifyWriteRowSettings; } + /** Returns the builder for the settings used for calls to listChangeStreamPartitions. */ + public ServerStreamingCallSettings.Builder< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsSettings() { + return listChangeStreamPartitionsSettings; + } + + /** Returns the builder for the settings used for calls to readChangeStream. */ + public ServerStreamingCallSettings.Builder + readChangeStreamSettings() { + return readChangeStreamSettings; + } + @Override public BigtableStubSettings build() throws IOException { return new BigtableStubSettings(this); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java index 3c4c967408..b2c219bb3f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java @@ -28,18 +28,23 @@ import com.google.api.pathtemplate.PathTemplate; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; +import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; +import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.PingAndWarmRequest; import com.google.bigtable.v2.PingAndWarmResponse; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.ReadRowsResponse; import com.google.bigtable.v2.SampleRowKeysRequest; import com.google.bigtable.v2.SampleRowKeysResponse; +import com.google.common.collect.ImmutableMap; import com.google.longrunning.stub.GrpcOperationsStub; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -122,6 +127,30 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(ReadModifyWriteRowResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.bigtable.v2.Bigtable/ListChangeStreamPartitions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListChangeStreamPartitionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListChangeStreamPartitionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + readChangeStreamMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.bigtable.v2.Bigtable/ReadChangeStream") + .setRequestMarshaller( + ProtoUtils.marshaller(ReadChangeStreamRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReadChangeStreamResponse.getDefaultInstance())) + .build(); + private final ServerStreamingCallable readRowsCallable; private final ServerStreamingCallable sampleRowKeysCallable; @@ -132,6 +161,11 @@ public class GrpcBigtableStub extends BigtableStub { private final UnaryCallable pingAndWarmCallable; private final UnaryCallable readModifyWriteRowCallable; + private final ServerStreamingCallable< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsCallable; + private final ServerStreamingCallable + readChangeStreamCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -298,6 +332,29 @@ protected GrpcBigtableStub( return builder.build(); }) .build(); + GrpcCallSettings + listChangeStreamPartitionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listChangeStreamPartitionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("table_name", String.valueOf(request.getTableName())); + return params.build(); + }) + .build(); + GrpcCallSettings + readChangeStreamTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(readChangeStreamMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("table_name", String.valueOf(request.getTableName())); + return params.build(); + }) + .build(); this.readRowsCallable = callableFactory.createServerStreamingCallable( @@ -324,6 +381,14 @@ protected GrpcBigtableStub( readModifyWriteRowTransportSettings, settings.readModifyWriteRowSettings(), clientContext); + this.listChangeStreamPartitionsCallable = + callableFactory.createServerStreamingCallable( + listChangeStreamPartitionsTransportSettings, + settings.listChangeStreamPartitionsSettings(), + clientContext); + this.readChangeStreamCallable = + callableFactory.createServerStreamingCallable( + readChangeStreamTransportSettings, settings.readChangeStreamSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -371,6 +436,19 @@ public UnaryCallable pingAndWarmCallabl return readModifyWriteRowCallable; } + @Override + public ServerStreamingCallable< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + listChangeStreamPartitionsCallable() { + return listChangeStreamPartitionsCallable; + } + + @Override + public ServerStreamingCallable + readChangeStreamCallable() { + return readChangeStreamCallable; + } + @Override public final void close() { try { diff --git a/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java b/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java index e6eaad7197..f1cfa5c841 100644 --- a/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java +++ b/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java @@ -334,6 +334,100 @@ private BigtableGrpc() {} return getReadModifyWriteRowMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.ListChangeStreamPartitionsRequest, + com.google.bigtable.v2.ListChangeStreamPartitionsResponse> + getListChangeStreamPartitionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListChangeStreamPartitions", + requestType = com.google.bigtable.v2.ListChangeStreamPartitionsRequest.class, + responseType = com.google.bigtable.v2.ListChangeStreamPartitionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.ListChangeStreamPartitionsRequest, + com.google.bigtable.v2.ListChangeStreamPartitionsResponse> + getListChangeStreamPartitionsMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.ListChangeStreamPartitionsRequest, + com.google.bigtable.v2.ListChangeStreamPartitionsResponse> + getListChangeStreamPartitionsMethod; + if ((getListChangeStreamPartitionsMethod = BigtableGrpc.getListChangeStreamPartitionsMethod) + == null) { + synchronized (BigtableGrpc.class) { + if ((getListChangeStreamPartitionsMethod = BigtableGrpc.getListChangeStreamPartitionsMethod) + == null) { + BigtableGrpc.getListChangeStreamPartitionsMethod = + getListChangeStreamPartitionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListChangeStreamPartitions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ListChangeStreamPartitionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ListChangeStreamPartitionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BigtableMethodDescriptorSupplier("ListChangeStreamPartitions")) + .build(); + } + } + } + return getListChangeStreamPartitionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.v2.ReadChangeStreamRequest, + com.google.bigtable.v2.ReadChangeStreamResponse> + getReadChangeStreamMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ReadChangeStream", + requestType = com.google.bigtable.v2.ReadChangeStreamRequest.class, + responseType = com.google.bigtable.v2.ReadChangeStreamResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.bigtable.v2.ReadChangeStreamRequest, + com.google.bigtable.v2.ReadChangeStreamResponse> + getReadChangeStreamMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.v2.ReadChangeStreamRequest, + com.google.bigtable.v2.ReadChangeStreamResponse> + getReadChangeStreamMethod; + if ((getReadChangeStreamMethod = BigtableGrpc.getReadChangeStreamMethod) == null) { + synchronized (BigtableGrpc.class) { + if ((getReadChangeStreamMethod = BigtableGrpc.getReadChangeStreamMethod) == null) { + BigtableGrpc.getReadChangeStreamMethod = + getReadChangeStreamMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReadChangeStream")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ReadChangeStreamRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.v2.ReadChangeStreamResponse.getDefaultInstance())) + .setSchemaDescriptor(new BigtableMethodDescriptorSupplier("ReadChangeStream")) + .build(); + } + } + } + return getReadChangeStreamMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static BigtableStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -496,6 +590,42 @@ public void readModifyWriteRow( getReadModifyWriteRowMethod(), responseObserver); } + /** + * + * + *
+     * NOTE: This API is not generally available. Users must be allowlisted.
+     * Returns the current list of partitions that make up the table's
+     * change stream. The union of partitions will cover the entire keyspace.
+     * Partitions can be read with `ReadChangeStream`.
+     * 
+ */ + public void listChangeStreamPartitions( + com.google.bigtable.v2.ListChangeStreamPartitionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListChangeStreamPartitionsMethod(), responseObserver); + } + + /** + * + * + *
+     * NOTE: This API is not generally available. Users must be allowlisted.
+     * Reads changes from a table's change stream. Changes will
+     * reflect both user-initiated mutations and mutations that are caused by
+     * garbage collection.
+     * 
+ */ + public void readChangeStream( + com.google.bigtable.v2.ReadChangeStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReadChangeStreamMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -544,6 +674,20 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.bigtable.v2.ReadModifyWriteRowRequest, com.google.bigtable.v2.ReadModifyWriteRowResponse>( this, METHODID_READ_MODIFY_WRITE_ROW))) + .addMethod( + getListChangeStreamPartitionsMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.bigtable.v2.ListChangeStreamPartitionsRequest, + com.google.bigtable.v2.ListChangeStreamPartitionsResponse>( + this, METHODID_LIST_CHANGE_STREAM_PARTITIONS))) + .addMethod( + getReadChangeStreamMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.bigtable.v2.ReadChangeStreamRequest, + com.google.bigtable.v2.ReadChangeStreamResponse>( + this, METHODID_READ_CHANGE_STREAM))) .build(); } } @@ -688,6 +832,46 @@ public void readModifyWriteRow( request, responseObserver); } + + /** + * + * + *
+     * NOTE: This API is not generally available. Users must be allowlisted.
+     * Returns the current list of partitions that make up the table's
+     * change stream. The union of partitions will cover the entire keyspace.
+     * Partitions can be read with `ReadChangeStream`.
+     * 
+ */ + public void listChangeStreamPartitions( + com.google.bigtable.v2.ListChangeStreamPartitionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getListChangeStreamPartitionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * NOTE: This API is not generally available. Users must be allowlisted.
+     * Reads changes from a table's change stream. Changes will
+     * reflect both user-initiated mutations and mutations that are caused by
+     * garbage collection.
+     * 
+ */ + public void readChangeStream( + com.google.bigtable.v2.ReadChangeStreamRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getReadChangeStreamMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -813,6 +997,39 @@ public com.google.bigtable.v2.ReadModifyWriteRowResponse readModifyWriteRow( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReadModifyWriteRowMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * NOTE: This API is not generally available. Users must be allowlisted.
+     * Returns the current list of partitions that make up the table's
+     * change stream. The union of partitions will cover the entire keyspace.
+     * Partitions can be read with `ReadChangeStream`.
+     * 
+ */ + public java.util.Iterator + listChangeStreamPartitions( + com.google.bigtable.v2.ListChangeStreamPartitionsRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getListChangeStreamPartitionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * NOTE: This API is not generally available. Users must be allowlisted.
+     * Reads changes from a table's change stream. Changes will
+     * reflect both user-initiated mutations and mutations that are caused by
+     * garbage collection.
+     * 
+ */ + public java.util.Iterator readChangeStream( + com.google.bigtable.v2.ReadChangeStreamRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getReadChangeStreamMethod(), getCallOptions(), request); + } } /** @@ -903,6 +1120,8 @@ protected BigtableFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_CHECK_AND_MUTATE_ROW = 4; private static final int METHODID_PING_AND_WARM = 5; private static final int METHODID_READ_MODIFY_WRITE_ROW = 6; + private static final int METHODID_LIST_CHANGE_STREAM_PARTITIONS = 7; + private static final int METHODID_READ_CHANGE_STREAM = 8; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -963,6 +1182,19 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_CHANGE_STREAM_PARTITIONS: + serviceImpl.listChangeStreamPartitions( + (com.google.bigtable.v2.ListChangeStreamPartitionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.bigtable.v2.ListChangeStreamPartitionsResponse>) + responseObserver); + break; + case METHODID_READ_CHANGE_STREAM: + serviceImpl.readChangeStream( + (com.google.bigtable.v2.ReadChangeStreamRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1032,6 +1264,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCheckAndMutateRowMethod()) .addMethod(getPingAndWarmMethod()) .addMethod(getReadModifyWriteRowMethod()) + .addMethod(getListChangeStreamPartitionsMethod()) + .addMethod(getReadChangeStreamMethod()) .build(); } } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java index 2e7276b4de..e37fe2f8bb 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java @@ -95,6 +95,42 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -110,136 +146,197 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032\030google/api/routing.proto\032\035go" + "ogle/bigtable/v2/data.proto\032\036google/prot" - + "obuf/wrappers.proto\032\027google/rpc/status.p" - + "roto\"\326\001\n\017ReadRowsRequest\022>\n\ntable_name\030\001" - + " \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.c" - + "om/Table\022\026\n\016app_profile_id\030\005 \001(\t\022(\n\004rows" - + "\030\002 \001(\0132\032.google.bigtable.v2.RowSet\022-\n\006fi" - + "lter\030\003 \001(\0132\035.google.bigtable.v2.RowFilte" - + "r\022\022\n\nrows_limit\030\004 \001(\003\"\370\002\n\020ReadRowsRespon" - + "se\022>\n\006chunks\030\001 \003(\0132..google.bigtable.v2." - + "ReadRowsResponse.CellChunk\022\034\n\024last_scann" - + "ed_row_key\030\002 \001(\014\032\205\002\n\tCellChunk\022\017\n\007row_ke" - + "y\030\001 \001(\014\0221\n\013family_name\030\002 \001(\0132\034.google.pr" - + "otobuf.StringValue\022.\n\tqualifier\030\003 \001(\0132\033." - + "google.protobuf.BytesValue\022\030\n\020timestamp_" - + "micros\030\004 \001(\003\022\016\n\006labels\030\005 \003(\t\022\r\n\005value\030\006 " - + "\001(\014\022\022\n\nvalue_size\030\007 \001(\005\022\023\n\treset_row\030\010 \001" - + "(\010H\000\022\024\n\ncommit_row\030\t \001(\010H\000B\014\n\nrow_status" - + "\"n\n\024SampleRowKeysRequest\022>\n\ntable_name\030\001" - + " \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.c" - + "om/Table\022\026\n\016app_profile_id\030\002 \001(\t\">\n\025Samp" - + "leRowKeysResponse\022\017\n\007row_key\030\001 \001(\014\022\024\n\014of" - + "fset_bytes\030\002 \001(\003\"\266\001\n\020MutateRowRequest\022>\n" - + "\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin" - + ".googleapis.com/Table\022\026\n\016app_profile_id\030" - + "\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0224\n\tmutations" - + "\030\003 \003(\0132\034.google.bigtable.v2.MutationB\003\340A" - + "\002\"\023\n\021MutateRowResponse\"\376\001\n\021MutateRowsReq" - + "uest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtab" - + "leadmin.googleapis.com/Table\022\026\n\016app_prof" - + "ile_id\030\003 \001(\t\022A\n\007entries\030\002 \003(\0132+.google.b" - + "igtable.v2.MutateRowsRequest.EntryB\003\340A\002\032" - + "N\n\005Entry\022\017\n\007row_key\030\001 \001(\014\0224\n\tmutations\030\002" - + " \003(\0132\034.google.bigtable.v2.MutationB\003\340A\002\"" - + "\217\001\n\022MutateRowsResponse\022=\n\007entries\030\001 \003(\0132" - + ",.google.bigtable.v2.MutateRowsResponse." - + "Entry\032:\n\005Entry\022\r\n\005index\030\001 \001(\003\022\"\n\006status\030" - + "\002 \001(\0132\022.google.rpc.Status\"\256\002\n\030CheckAndMu" - + "tateRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372" - + "A$\n\"bigtableadmin.googleapis.com/Table\022\026" - + "\n\016app_profile_id\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B" - + "\003\340A\002\0227\n\020predicate_filter\030\006 \001(\0132\035.google." - + "bigtable.v2.RowFilter\0224\n\016true_mutations\030" - + "\004 \003(\0132\034.google.bigtable.v2.Mutation\0225\n\017f" - + "alse_mutations\030\005 \003(\0132\034.google.bigtable.v" - + "2.Mutation\"6\n\031CheckAndMutateRowResponse\022" - + "\031\n\021predicate_matched\030\001 \001(\010\"i\n\022PingAndWar" - + "mRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%bigtable" - + "admin.googleapis.com/Instance\022\026\n\016app_pro" - + "file_id\030\002 \001(\t\"\025\n\023PingAndWarmResponse\"\306\001\n" - + "\031ReadModifyWriteRowRequest\022>\n\ntable_name" - + "\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis" - + ".com/Table\022\026\n\016app_profile_id\030\004 \001(\t\022\024\n\007ro" - + "w_key\030\002 \001(\014B\003\340A\002\022;\n\005rules\030\003 \003(\0132\'.google" - + ".bigtable.v2.ReadModifyWriteRuleB\003\340A\002\"B\n" - + "\032ReadModifyWriteRowResponse\022$\n\003row\030\001 \001(\013" - + "2\027.google.bigtable.v2.Row2\260\024\n\010Bigtable\022\233" - + "\002\n\010ReadRows\022#.google.bigtable.v2.ReadRow" - + "sRequest\032$.google.bigtable.v2.ReadRowsRe" - + "sponse\"\301\001\202\323\344\223\002>\"9/v2/{table_name=project" - + "s/*/instances/*/tables/*}:readRows:\001*\212\323\344" - + "\223\002N\022:\n\ntable_name\022,{table_name=projects/" - + "*/instances/*/tables/*}\022\020\n\016app_profile_i" - + "d\332A\ntable_name\332A\031table_name,app_profile_" - + "id0\001\022\254\002\n\rSampleRowKeys\022(.google.bigtable" - + ".v2.SampleRowKeysRequest\032).google.bigtab" - + "le.v2.SampleRowKeysResponse\"\303\001\202\323\344\223\002@\022>/v" - + "2/{table_name=projects/*/instances/*/tab" - + "les/*}:sampleRowKeys\212\323\344\223\002N\022:\n\ntable_name" - + "\022,{table_name=projects/*/instances/*/tab" - + "les/*}\022\020\n\016app_profile_id\332A\ntable_name\332A\031" - + "table_name,app_profile_id0\001\022\301\002\n\tMutateRo" - + "w\022$.google.bigtable.v2.MutateRowRequest\032" - + "%.google.bigtable.v2.MutateRowResponse\"\346" - + "\001\202\323\344\223\002?\":/v2/{table_name=projects/*/inst" - + "ances/*/tables/*}:mutateRow:\001*\212\323\344\223\002N\022:\n\n" - + "table_name\022,{table_name=projects/*/insta" - + "nces/*/tables/*}\022\020\n\016app_profile_id\332A\034tab" - + "le_name,row_key,mutations\332A+table_name,r" - + "ow_key,mutations,app_profile_id\022\263\002\n\nMuta" - + "teRows\022%.google.bigtable.v2.MutateRowsRe" - + "quest\032&.google.bigtable.v2.MutateRowsRes" - + "ponse\"\323\001\202\323\344\223\002@\";/v2/{table_name=projects" - + "/*/instances/*/tables/*}:mutateRows:\001*\212\323" - + "\344\223\002N\022:\n\ntable_name\022,{table_name=projects" - + "/*/instances/*/tables/*}\022\020\n\016app_profile_" - + "id\332A\022table_name,entries\332A!table_name,ent" - + "ries,app_profile_id0\001\022\255\003\n\021CheckAndMutate" - + "Row\022,.google.bigtable.v2.CheckAndMutateR" - + "owRequest\032-.google.bigtable.v2.CheckAndM" - + "utateRowResponse\"\272\002\202\323\344\223\002G\"B/v2/{table_na" - + "me=projects/*/instances/*/tables/*}:chec" - + "kAndMutateRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{t" - + "able_name=projects/*/instances/*/tables/" - + "*}\022\020\n\016app_profile_id\332ABtable_name,row_ke" - + "y,predicate_filter,true_mutations,false_" - + "mutations\332AQtable_name,row_key,predicate" - + "_filter,true_mutations,false_mutations,a" - + "pp_profile_id\022\356\001\n\013PingAndWarm\022&.google.b" - + "igtable.v2.PingAndWarmRequest\032\'.google.b" - + "igtable.v2.PingAndWarmResponse\"\215\001\202\323\344\223\002+\"" - + "&/v2/{name=projects/*/instances/*}:ping:" - + "\001*\212\323\344\223\0029\022%\n\004name\022\035{name=projects/*/insta" - + "nces/*}\022\020\n\016app_profile_id\332A\004name\332A\023name," - + "app_profile_id\022\335\002\n\022ReadModifyWriteRow\022-." - + "google.bigtable.v2.ReadModifyWriteRowReq" - + "uest\032..google.bigtable.v2.ReadModifyWrit" - + "eRowResponse\"\347\001\202\323\344\223\002H\"C/v2/{table_name=p" - + "rojects/*/instances/*/tables/*}:readModi" - + "fyWriteRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{tabl" - + "e_name=projects/*/instances/*/tables/*}\022" - + "\020\n\016app_profile_id\332A\030table_name,row_key,r" - + "ules\332A\'table_name,row_key,rules,app_prof" - + "ile_id\032\333\002\312A\027bigtable.googleapis.com\322A\275\002h" - + "ttps://www.googleapis.com/auth/bigtable." - + "data,https://www.googleapis.com/auth/big" - + "table.data.readonly,https://www.googleap" - + "is.com/auth/cloud-bigtable.data,https://" - + "www.googleapis.com/auth/cloud-bigtable.d" - + "ata.readonly,https://www.googleapis.com/" - + "auth/cloud-platform,https://www.googleap" - + "is.com/auth/cloud-platform.read-onlyB\353\002\n" - + "\026com.google.bigtable.v2B\rBigtableProtoP\001" - + "Z:google.golang.org/genproto/googleapis/" - + "bigtable/v2;bigtable\252\002\030Google.Cloud.Bigt" - + "able.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Goo" - + "gle::Cloud::Bigtable::V2\352A\\\n\"bigtableadm" - + "in.googleapis.com/Table\0226projects/{proje" - + "ct}/instances/{instance}/tables/{table}\352" - + "AP\n%bigtableadmin.googleapis.com/Instanc" - + "e\022\'projects/{project}/instances/{instanc" - + "e}b\006proto3" + + "obuf/duration.proto\032\037google/protobuf/tim" + + "estamp.proto\032\036google/protobuf/wrappers.p" + + "roto\032\027google/rpc/status.proto\"\326\001\n\017ReadRo" + + "wsRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"b" + + "igtableadmin.googleapis.com/Table\022\026\n\016app" + + "_profile_id\030\005 \001(\t\022(\n\004rows\030\002 \001(\0132\032.google" + + ".bigtable.v2.RowSet\022-\n\006filter\030\003 \001(\0132\035.go" + + "ogle.bigtable.v2.RowFilter\022\022\n\nrows_limit" + + "\030\004 \001(\003\"\370\002\n\020ReadRowsResponse\022>\n\006chunks\030\001 " + + "\003(\0132..google.bigtable.v2.ReadRowsRespons" + + "e.CellChunk\022\034\n\024last_scanned_row_key\030\002 \001(" + + "\014\032\205\002\n\tCellChunk\022\017\n\007row_key\030\001 \001(\014\0221\n\013fami" + + "ly_name\030\002 \001(\0132\034.google.protobuf.StringVa" + + "lue\022.\n\tqualifier\030\003 \001(\0132\033.google.protobuf" + + ".BytesValue\022\030\n\020timestamp_micros\030\004 \001(\003\022\016\n" + + "\006labels\030\005 \003(\t\022\r\n\005value\030\006 \001(\014\022\022\n\nvalue_si" + + "ze\030\007 \001(\005\022\023\n\treset_row\030\010 \001(\010H\000\022\024\n\ncommit_" + + "row\030\t \001(\010H\000B\014\n\nrow_status\"n\n\024SampleRowKe" + + "ysRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"b" + + "igtableadmin.googleapis.com/Table\022\026\n\016app" + + "_profile_id\030\002 \001(\t\">\n\025SampleRowKeysRespon" + + "se\022\017\n\007row_key\030\001 \001(\014\022\024\n\014offset_bytes\030\002 \001(" + + "\003\"\266\001\n\020MutateRowRequest\022>\n\ntable_name\030\001 \001" + + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com" + + "/Table\022\026\n\016app_profile_id\030\004 \001(\t\022\024\n\007row_ke" + + "y\030\002 \001(\014B\003\340A\002\0224\n\tmutations\030\003 \003(\0132\034.google" + + ".bigtable.v2.MutationB\003\340A\002\"\023\n\021MutateRowR" + + "esponse\"\376\001\n\021MutateRowsRequest\022>\n\ntable_n" + + "ame\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googlea" + + "pis.com/Table\022\026\n\016app_profile_id\030\003 \001(\t\022A\n" + + "\007entries\030\002 \003(\0132+.google.bigtable.v2.Muta" + + "teRowsRequest.EntryB\003\340A\002\032N\n\005Entry\022\017\n\007row" + + "_key\030\001 \001(\014\0224\n\tmutations\030\002 \003(\0132\034.google.b" + + "igtable.v2.MutationB\003\340A\002\"\217\001\n\022MutateRowsR" + + "esponse\022=\n\007entries\030\001 \003(\0132,.google.bigtab" + + "le.v2.MutateRowsResponse.Entry\032:\n\005Entry\022" + + "\r\n\005index\030\001 \001(\003\022\"\n\006status\030\002 \001(\0132\022.google." + + "rpc.Status\"\256\002\n\030CheckAndMutateRowRequest\022" + + ">\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadm" + + "in.googleapis.com/Table\022\026\n\016app_profile_i" + + "d\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0227\n\020predica" + + "te_filter\030\006 \001(\0132\035.google.bigtable.v2.Row" + + "Filter\0224\n\016true_mutations\030\004 \003(\0132\034.google." + + "bigtable.v2.Mutation\0225\n\017false_mutations\030" + + "\005 \003(\0132\034.google.bigtable.v2.Mutation\"6\n\031C" + + "heckAndMutateRowResponse\022\031\n\021predicate_ma" + + "tched\030\001 \001(\010\"i\n\022PingAndWarmRequest\022;\n\004nam" + + "e\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin.googleapi" + + "s.com/Instance\022\026\n\016app_profile_id\030\002 \001(\t\"\025" + + "\n\023PingAndWarmResponse\"\306\001\n\031ReadModifyWrit" + + "eRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n" + + "\"bigtableadmin.googleapis.com/Table\022\026\n\016a" + + "pp_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A" + + "\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v2.Re" + + "adModifyWriteRuleB\003\340A\002\"B\n\032ReadModifyWrit" + + "eRowResponse\022$\n\003row\030\001 \001(\0132\027.google.bigta" + + "ble.v2.Row\"{\n!ListChangeStreamPartitions" + + "Request\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"big" + + "tableadmin.googleapis.com/Table\022\026\n\016app_p" + + "rofile_id\030\002 \001(\t\"\\\n\"ListChangeStreamParti" + + "tionsResponse\0226\n\tpartition\030\001 \001(\0132#.googl" + + "e.bigtable.v2.StreamPartition\"\233\003\n\027ReadCh" + + "angeStreamRequest\022>\n\ntable_name\030\001 \001(\tB*\340" + + "A\002\372A$\n\"bigtableadmin.googleapis.com/Tabl" + + "e\022\026\n\016app_profile_id\030\002 \001(\t\0226\n\tpartition\030\003" + + " \001(\0132#.google.bigtable.v2.StreamPartitio" + + "n\0220\n\nstart_time\030\004 \001(\0132\032.google.protobuf." + + "TimestampH\000\022K\n\023continuation_tokens\030\006 \001(\013" + + "2,.google.bigtable.v2.StreamContinuation" + + "TokensH\000\022,\n\010end_time\030\005 \001(\0132\032.google.prot" + + "obuf.Timestamp\0225\n\022heartbeat_duration\030\007 \001" + + "(\0132\031.google.protobuf.DurationB\014\n\nstart_f" + + "rom\"\327\t\n\030ReadChangeStreamResponse\022N\n\013data" + + "_change\030\001 \001(\01327.google.bigtable.v2.ReadC" + + "hangeStreamResponse.DataChangeH\000\022K\n\thear" + + "tbeat\030\002 \001(\01326.google.bigtable.v2.ReadCha" + + "ngeStreamResponse.HeartbeatH\000\022P\n\014close_s" + + "tream\030\003 \001(\01328.google.bigtable.v2.ReadCha" + + "ngeStreamResponse.CloseStreamH\000\032\364\001\n\rMuta" + + "tionChunk\022X\n\nchunk_info\030\001 \001(\0132D.google.b" + + "igtable.v2.ReadChangeStreamResponse.Muta" + + "tionChunk.ChunkInfo\022.\n\010mutation\030\002 \001(\0132\034." + + "google.bigtable.v2.Mutation\032Y\n\tChunkInfo" + + "\022\032\n\022chunked_value_size\030\001 \001(\005\022\034\n\024chunked_" + + "value_offset\030\002 \001(\005\022\022\n\nlast_chunk\030\003 \001(\010\032\274" + + "\003\n\nDataChange\022J\n\004type\030\001 \001(\0162<.google.big" + + "table.v2.ReadChangeStreamResponse.DataCh" + + "ange.Type\022\031\n\021source_cluster_id\030\002 \001(\t\022\017\n\007" + + "row_key\030\003 \001(\014\0224\n\020commit_timestamp\030\004 \001(\0132" + + "\032.google.protobuf.Timestamp\022\022\n\ntiebreake" + + "r\030\005 \001(\005\022J\n\006chunks\030\006 \003(\0132:.google.bigtabl" + + "e.v2.ReadChangeStreamResponse.MutationCh" + + "unk\022\014\n\004done\030\010 \001(\010\022\r\n\005token\030\t \001(\t\0221\n\rlow_" + + "watermark\030\n \001(\0132\032.google.protobuf.Timest" + + "amp\"P\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004USE" + + "R\020\001\022\026\n\022GARBAGE_COLLECTION\020\002\022\020\n\014CONTINUAT" + + "ION\020\003\032\207\001\n\tHeartbeat\022G\n\022continuation_toke" + + "n\030\001 \001(\0132+.google.bigtable.v2.StreamConti" + + "nuationToken\0221\n\rlow_watermark\030\002 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\032{\n\013CloseStream\022\"" + + "\n\006status\030\001 \001(\0132\022.google.rpc.Status\022H\n\023co" + + "ntinuation_tokens\030\002 \003(\0132+.google.bigtabl" + + "e.v2.StreamContinuationTokenB\017\n\rstream_r" + + "ecord2\252\030\n\010Bigtable\022\233\002\n\010ReadRows\022#.google" + + ".bigtable.v2.ReadRowsRequest\032$.google.bi" + + "gtable.v2.ReadRowsResponse\"\301\001\202\323\344\223\002>\"9/v2" + + "/{table_name=projects/*/instances/*/tabl" + + "es/*}:readRows:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{" + + "table_name=projects/*/instances/*/tables" + + "/*}\022\020\n\016app_profile_id\332A\ntable_name\332A\031tab" + + "le_name,app_profile_id0\001\022\254\002\n\rSampleRowKe" + + "ys\022(.google.bigtable.v2.SampleRowKeysReq" + + "uest\032).google.bigtable.v2.SampleRowKeysR" + + "esponse\"\303\001\202\323\344\223\002@\022>/v2/{table_name=projec" + + "ts/*/instances/*/tables/*}:sampleRowKeys" + + "\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=projec" + + "ts/*/instances/*/tables/*}\022\020\n\016app_profil" + + "e_id\332A\ntable_name\332A\031table_name,app_profi" + + "le_id0\001\022\301\002\n\tMutateRow\022$.google.bigtable." + + "v2.MutateRowRequest\032%.google.bigtable.v2" + + ".MutateRowResponse\"\346\001\202\323\344\223\002?\":/v2/{table_" + + "name=projects/*/instances/*/tables/*}:mu" + + "tateRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_n" + + "ame=projects/*/instances/*/tables/*}\022\020\n\016" + + "app_profile_id\332A\034table_name,row_key,muta" + + "tions\332A+table_name,row_key,mutations,app" + + "_profile_id\022\263\002\n\nMutateRows\022%.google.bigt" + + "able.v2.MutateRowsRequest\032&.google.bigta" + + "ble.v2.MutateRowsResponse\"\323\001\202\323\344\223\002@\";/v2/" + + "{table_name=projects/*/instances/*/table" + + "s/*}:mutateRows:\001*\212\323\344\223\002N\022:\n\ntable_name\022," + + "{table_name=projects/*/instances/*/table" + + "s/*}\022\020\n\016app_profile_id\332A\022table_name,entr" + + "ies\332A!table_name,entries,app_profile_id0" + + "\001\022\255\003\n\021CheckAndMutateRow\022,.google.bigtabl" + + "e.v2.CheckAndMutateRowRequest\032-.google.b" + + "igtable.v2.CheckAndMutateRowResponse\"\272\002\202" + + "\323\344\223\002G\"B/v2/{table_name=projects/*/instan" + + "ces/*/tables/*}:checkAndMutateRow:\001*\212\323\344\223" + + "\002N\022:\n\ntable_name\022,{table_name=projects/*" + + "/instances/*/tables/*}\022\020\n\016app_profile_id" + + "\332ABtable_name,row_key,predicate_filter,t" + + "rue_mutations,false_mutations\332AQtable_na" + + "me,row_key,predicate_filter,true_mutatio" + + "ns,false_mutations,app_profile_id\022\356\001\n\013Pi" + + "ngAndWarm\022&.google.bigtable.v2.PingAndWa" + + "rmRequest\032\'.google.bigtable.v2.PingAndWa" + + "rmResponse\"\215\001\202\323\344\223\002+\"&/v2/{name=projects/" + + "*/instances/*}:ping:\001*\212\323\344\223\0029\022%\n\004name\022\035{n" + + "ame=projects/*/instances/*}\022\020\n\016app_profi" + + "le_id\332A\004name\332A\023name,app_profile_id\022\335\002\n\022R" + + "eadModifyWriteRow\022-.google.bigtable.v2.R" + + "eadModifyWriteRowRequest\032..google.bigtab" + + "le.v2.ReadModifyWriteRowResponse\"\347\001\202\323\344\223\002" + + "H\"C/v2/{table_name=projects/*/instances/" + + "*/tables/*}:readModifyWriteRow:\001*\212\323\344\223\002N\022" + + ":\n\ntable_name\022,{table_name=projects/*/in" + + "stances/*/tables/*}\022\020\n\016app_profile_id\332A\030" + + "table_name,row_key,rules\332A\'table_name,ro" + + "w_key,rules,app_profile_id\022\216\002\n\032ListChang" + + "eStreamPartitions\0225.google.bigtable.v2.L" + + "istChangeStreamPartitionsRequest\0326.googl" + + "e.bigtable.v2.ListChangeStreamPartitions" + + "Response\"\177\202\323\344\223\002P\"K/v2/{table_name=projec" + + "ts/*/instances/*/tables/*}:listChangeStr" + + "eamPartitions:\001*\332A\ntable_name\332A\031table_na" + + "me,app_profile_id0\001\022\346\001\n\020ReadChangeStream" + + "\022+.google.bigtable.v2.ReadChangeStreamRe" + + "quest\032,.google.bigtable.v2.ReadChangeStr" + + "eamResponse\"u\202\323\344\223\002F\"A/v2/{table_name=pro" + + "jects/*/instances/*/tables/*}:readChange" + + "Stream:\001*\332A\ntable_name\332A\031table_name,app_" + + "profile_id0\001\032\333\002\312A\027bigtable.googleapis.co" + + "m\322A\275\002https://www.googleapis.com/auth/big" + + "table.data,https://www.googleapis.com/au" + + "th/bigtable.data.readonly,https://www.go" + + "ogleapis.com/auth/cloud-bigtable.data,ht" + + "tps://www.googleapis.com/auth/cloud-bigt" + + "able.data.readonly,https://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/cloud-platform.read-on" + + "lyB\353\002\n\026com.google.bigtable.v2B\rBigtableP" + + "rotoP\001Z:google.golang.org/genproto/googl" + + "eapis/bigtable/v2;bigtable\252\002\030Google.Clou" + + "d.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\V2" + + "\352\002\033Google::Cloud::Bigtable::V2\352A\\\n\"bigta" + + "bleadmin.googleapis.com/Table\0226projects/" + + "{project}/instances/{instance}/tables/{t" + + "able}\352AP\n%bigtableadmin.googleapis.com/I" + + "nstance\022\'projects/{project}/instances/{i" + + "nstance}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -251,6 +348,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.api.RoutingProto.getDescriptor(), com.google.bigtable.v2.DataProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), }); @@ -400,6 +499,103 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Row", }); + internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor, + new java.lang.String[] { + "TableName", "AppProfileId", + }); + internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor, + new java.lang.String[] { + "Partition", + }); + internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor, + new java.lang.String[] { + "TableName", + "AppProfileId", + "Partition", + "StartTime", + "ContinuationTokens", + "EndTime", + "HeartbeatDuration", + "StartFrom", + }); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor, + new java.lang.String[] { + "DataChange", "Heartbeat", "CloseStream", "StreamRecord", + }); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor = + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor, + new java.lang.String[] { + "ChunkInfo", "Mutation", + }); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor = + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor + .getNestedTypes() + .get(0); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor, + new java.lang.String[] { + "ChunkedValueSize", "ChunkedValueOffset", "LastChunk", + }); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor = + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor + .getNestedTypes() + .get(1); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor, + new java.lang.String[] { + "Type", + "SourceClusterId", + "RowKey", + "CommitTimestamp", + "Tiebreaker", + "Chunks", + "Done", + "Token", + "LowWatermark", + }); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor = + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor + .getNestedTypes() + .get(2); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor, + new java.lang.String[] { + "ContinuationToken", "LowWatermark", + }); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor = + internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor + .getNestedTypes() + .get(3); + internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor, + new java.lang.String[] { + "Status", "ContinuationTokens", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); @@ -418,6 +614,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.api.RoutingProto.getDescriptor(); com.google.bigtable.v2.DataProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java index ba55154653..e236dc1456 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/DataProto.java @@ -103,6 +103,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_bigtable_v2_ReadModifyWriteRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_StreamPartition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -182,12 +194,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tation\"\200\001\n\023ReadModifyWriteRule\022\023\n\013family" + "_name\030\001 \001(\t\022\030\n\020column_qualifier\030\002 \001(\014\022\026\n" + "\014append_value\030\003 \001(\014H\000\022\032\n\020increment_amoun" - + "t\030\004 \001(\003H\000B\006\n\004ruleB\265\001\n\026com.google.bigtabl" - + "e.v2B\tDataProtoP\001Z:google.golang.org/gen" - + "proto/googleapis/bigtable/v2;bigtable\252\002\030" - + "Google.Cloud.Bigtable.V2\312\002\030Google\\Cloud\\" - + "Bigtable\\V2\352\002\033Google::Cloud::Bigtable::V" - + "2b\006proto3" + + "t\030\004 \001(\003H\000B\006\n\004rule\"B\n\017StreamPartition\022/\n\t" + + "row_range\030\001 \001(\0132\034.google.bigtable.v2.Row" + + "Range\"W\n\030StreamContinuationTokens\022;\n\006tok" + + "ens\030\001 \003(\0132+.google.bigtable.v2.StreamCon" + + "tinuationToken\"`\n\027StreamContinuationToke" + + "n\0226\n\tpartition\030\001 \001(\0132#.google.bigtable.v" + + "2.StreamPartition\022\r\n\005token\030\002 \001(\tB\265\001\n\026com" + + ".google.bigtable.v2B\tDataProtoP\001Z:google" + + ".golang.org/genproto/googleapis/bigtable" + + "/v2;bigtable\252\002\030Google.Cloud.Bigtable.V2\312" + + "\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::Clo" + + "ud::Bigtable::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -367,6 +385,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "FamilyName", "ColumnQualifier", "AppendValue", "IncrementAmount", "Rule", }); + internal_static_google_bigtable_v2_StreamPartition_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_StreamPartition_descriptor, + new java.lang.String[] { + "RowRange", + }); + internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor, + new java.lang.String[] { + "Tokens", + }); + internal_static_google_bigtable_v2_StreamContinuationToken_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_StreamContinuationToken_descriptor, + new java.lang.String[] { + "Partition", "Token", + }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java new file mode 100644 index 0000000000..38beeb41dd --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java @@ -0,0 +1,855 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * Request message for Bigtable.ListChangeStreamPartitions.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsRequest} + */ +public final class ListChangeStreamPartitionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ListChangeStreamPartitionsRequest) + ListChangeStreamPartitionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListChangeStreamPartitionsRequest.newBuilder() to construct. + private ListChangeStreamPartitionsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListChangeStreamPartitionsRequest() { + tableName_ = ""; + appProfileId_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new ListChangeStreamPartitionsRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListChangeStreamPartitionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 18: + { + String s = input.readStringRequireUtf8(); + + appProfileId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsRequest.class, Builder.class); + } + + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private volatile Object tableName_; + /** + * + * + *
+   * Required. The unique name of the table from which to get change stream
+   * partitions. Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tableName. + */ + @Override + public String getTableName() { + Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The unique name of the table from which to get change stream
+   * partitions. Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tableName. + */ + @Override + public com.google.protobuf.ByteString getTableNameBytes() { + Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + private volatile Object appProfileId_; + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + @Override + public String getAppProfileId() { + Object ref = appProfileId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } + } + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + @Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ListChangeStreamPartitionsRequest)) { + return super.equals(obj); + } + ListChangeStreamPartitionsRequest other = (ListChangeStreamPartitionsRequest) obj; + + if (!getTableName().equals(other.getTableName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ListChangeStreamPartitionsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ListChangeStreamPartitionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ListChangeStreamPartitionsRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ListChangeStreamPartitionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ListChangeStreamPartitionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ListChangeStreamPartitionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ListChangeStreamPartitionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ListChangeStreamPartitionsRequest 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 ListChangeStreamPartitionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ListChangeStreamPartitionsRequest 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 ListChangeStreamPartitionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ListChangeStreamPartitionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ListChangeStreamPartitionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * Request message for Bigtable.ListChangeStreamPartitions.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ListChangeStreamPartitionsRequest) + ListChangeStreamPartitionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsRequest.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ListChangeStreamPartitionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + tableName_ = ""; + + appProfileId_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + } + + @Override + public ListChangeStreamPartitionsRequest getDefaultInstanceForType() { + return ListChangeStreamPartitionsRequest.getDefaultInstance(); + } + + @Override + public ListChangeStreamPartitionsRequest build() { + ListChangeStreamPartitionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public ListChangeStreamPartitionsRequest buildPartial() { + ListChangeStreamPartitionsRequest result = new ListChangeStreamPartitionsRequest(this); + result.tableName_ = tableName_; + result.appProfileId_ = appProfileId_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ListChangeStreamPartitionsRequest) { + return mergeFrom((ListChangeStreamPartitionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ListChangeStreamPartitionsRequest other) { + if (other == ListChangeStreamPartitionsRequest.getDefaultInstance()) return this; + if (!other.getTableName().isEmpty()) { + tableName_ = other.tableName_; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ListChangeStreamPartitionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ListChangeStreamPartitionsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private Object tableName_ = ""; + /** + * + * + *
+     * Required. The unique name of the table from which to get change stream
+     * partitions. Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tableName. + */ + public String getTableName() { + Object ref = tableName_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+     * Required. The unique name of the table from which to get change stream
+     * partitions. Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tableName. + */ + public com.google.protobuf.ByteString getTableNameBytes() { + Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The unique name of the table from which to get change stream
+     * partitions. Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tableName to set. + * @return This builder for chaining. + */ + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + + tableName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique name of the table from which to get change stream
+     * partitions. Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTableName() { + + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique name of the table from which to get change stream
+     * partitions. Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tableName to set. + * @return This builder for chaining. + */ + public Builder setTableNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tableName_ = value; + onChanged(); + return this; + } + + private Object appProfileId_ = ""; + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + public String getAppProfileId() { + Object ref = appProfileId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(String value) { + if (value == null) { + throw new NullPointerException(); + } + + appProfileId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + + appProfileId_ = getDefaultInstance().getAppProfileId(); + onChanged(); + return this; + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + appProfileId_ = value; + onChanged(); + return this; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ListChangeStreamPartitionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ListChangeStreamPartitionsRequest) + private static final ListChangeStreamPartitionsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ListChangeStreamPartitionsRequest(); + } + + public static ListChangeStreamPartitionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public ListChangeStreamPartitionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListChangeStreamPartitionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public ListChangeStreamPartitionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java new file mode 100644 index 0000000000..741730e983 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +public interface ListChangeStreamPartitionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ListChangeStreamPartitionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique name of the table from which to get change stream
+   * partitions. Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tableName. + */ + String getTableName(); + /** + * + * + *
+   * Required. The unique name of the table from which to get change stream
+   * partitions. Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tableName. + */ + com.google.protobuf.ByteString getTableNameBytes(); + + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + String getAppProfileId(); + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java new file mode 100644 index 0000000000..fd684952e7 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java @@ -0,0 +1,726 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * Response message for Bigtable.ListChangeStreamPartitions.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsResponse} + */ +public final class ListChangeStreamPartitionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ListChangeStreamPartitionsResponse) + ListChangeStreamPartitionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListChangeStreamPartitionsResponse.newBuilder() to construct. + private ListChangeStreamPartitionsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListChangeStreamPartitionsResponse() {} + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new ListChangeStreamPartitionsResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListChangeStreamPartitionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.v2.StreamPartition.Builder subBuilder = null; + if (partition_ != null) { + subBuilder = partition_.toBuilder(); + } + partition_ = + input.readMessage( + com.google.bigtable.v2.StreamPartition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partition_); + partition_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsResponse.class, Builder.class); + } + + public static final int PARTITION_FIELD_NUMBER = 1; + private com.google.bigtable.v2.StreamPartition partition_; + /** + * + * + *
+   * A partition of the change stream.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return Whether the partition field is set. + */ + @Override + public boolean hasPartition() { + return partition_ != null; + } + /** + * + * + *
+   * A partition of the change stream.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return The partition. + */ + @Override + public com.google.bigtable.v2.StreamPartition getPartition() { + return partition_ == null + ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() + : partition_; + } + /** + * + * + *
+   * A partition of the change stream.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + @Override + public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { + return getPartition(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (partition_ != null) { + output.writeMessage(1, getPartition()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPartition()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ListChangeStreamPartitionsResponse)) { + return super.equals(obj); + } + ListChangeStreamPartitionsResponse other = (ListChangeStreamPartitionsResponse) obj; + + if (hasPartition() != other.hasPartition()) return false; + if (hasPartition()) { + if (!getPartition().equals(other.getPartition())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPartition()) { + hash = (37 * hash) + PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getPartition().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ListChangeStreamPartitionsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ListChangeStreamPartitionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ListChangeStreamPartitionsResponse parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ListChangeStreamPartitionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ListChangeStreamPartitionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ListChangeStreamPartitionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ListChangeStreamPartitionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ListChangeStreamPartitionsResponse 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 ListChangeStreamPartitionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ListChangeStreamPartitionsResponse 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 ListChangeStreamPartitionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ListChangeStreamPartitionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ListChangeStreamPartitionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * Response message for Bigtable.ListChangeStreamPartitions.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ListChangeStreamPartitionsResponse) + ListChangeStreamPartitionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsResponse.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ListChangeStreamPartitionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + if (partitionBuilder_ == null) { + partition_ = null; + } else { + partition_ = null; + partitionBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + } + + @Override + public ListChangeStreamPartitionsResponse getDefaultInstanceForType() { + return ListChangeStreamPartitionsResponse.getDefaultInstance(); + } + + @Override + public ListChangeStreamPartitionsResponse build() { + ListChangeStreamPartitionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public ListChangeStreamPartitionsResponse buildPartial() { + ListChangeStreamPartitionsResponse result = new ListChangeStreamPartitionsResponse(this); + if (partitionBuilder_ == null) { + result.partition_ = partition_; + } else { + result.partition_ = partitionBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ListChangeStreamPartitionsResponse) { + return mergeFrom((ListChangeStreamPartitionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ListChangeStreamPartitionsResponse other) { + if (other == ListChangeStreamPartitionsResponse.getDefaultInstance()) return this; + if (other.hasPartition()) { + mergePartition(other.getPartition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ListChangeStreamPartitionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ListChangeStreamPartitionsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.bigtable.v2.StreamPartition partition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.StreamPartition, + com.google.bigtable.v2.StreamPartition.Builder, + com.google.bigtable.v2.StreamPartitionOrBuilder> + partitionBuilder_; + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return Whether the partition field is set. + */ + public boolean hasPartition() { + return partitionBuilder_ != null || partition_ != null; + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return The partition. + */ + public com.google.bigtable.v2.StreamPartition getPartition() { + if (partitionBuilder_ == null) { + return partition_ == null + ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() + : partition_; + } else { + return partitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { + if (partitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partition_ = value; + onChanged(); + } else { + partitionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder builderForValue) { + if (partitionBuilder_ == null) { + partition_ = builderForValue.build(); + onChanged(); + } else { + partitionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { + if (partitionBuilder_ == null) { + if (partition_ != null) { + partition_ = + com.google.bigtable.v2.StreamPartition.newBuilder(partition_) + .mergeFrom(value) + .buildPartial(); + } else { + partition_ = value; + } + onChanged(); + } else { + partitionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder clearPartition() { + if (partitionBuilder_ == null) { + partition_ = null; + onChanged(); + } else { + partition_ = null; + partitionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { + + onChanged(); + return getPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { + if (partitionBuilder_ != null) { + return partitionBuilder_.getMessageOrBuilder(); + } else { + return partition_ == null + ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() + : partition_; + } + } + /** + * + * + *
+     * A partition of the change stream.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.StreamPartition, + com.google.bigtable.v2.StreamPartition.Builder, + com.google.bigtable.v2.StreamPartitionOrBuilder> + getPartitionFieldBuilder() { + if (partitionBuilder_ == null) { + partitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.StreamPartition, + com.google.bigtable.v2.StreamPartition.Builder, + com.google.bigtable.v2.StreamPartitionOrBuilder>( + getPartition(), getParentForChildren(), isClean()); + partition_ = null; + } + return partitionBuilder_; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ListChangeStreamPartitionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ListChangeStreamPartitionsResponse) + private static final ListChangeStreamPartitionsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ListChangeStreamPartitionsResponse(); + } + + public static ListChangeStreamPartitionsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public ListChangeStreamPartitionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListChangeStreamPartitionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public ListChangeStreamPartitionsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java new file mode 100644 index 0000000000..630816f767 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +public interface ListChangeStreamPartitionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ListChangeStreamPartitionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A partition of the change stream.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return Whether the partition field is set. + */ + boolean hasPartition(); + /** + * + * + *
+   * A partition of the change stream.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return The partition. + */ + com.google.bigtable.v2.StreamPartition getPartition(); + /** + * + * + *
+   * A partition of the change stream.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java new file mode 100644 index 0000000000..14d0d9024e --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java @@ -0,0 +1,2495 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * Request message for Bigtable.ReadChangeStream.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamRequest} + */ +public final class ReadChangeStreamRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamRequest) + ReadChangeStreamRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadChangeStreamRequest.newBuilder() to construct. + private ReadChangeStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReadChangeStreamRequest() { + tableName_ = ""; + appProfileId_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new ReadChangeStreamRequest(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadChangeStreamRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 18: + { + String s = input.readStringRequireUtf8(); + + appProfileId_ = s; + break; + } + case 26: + { + StreamPartition.Builder subBuilder = null; + if (partition_ != null) { + subBuilder = partition_.toBuilder(); + } + partition_ = input.readMessage(StreamPartition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partition_); + partition_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startFromCase_ == 4) { + subBuilder = ((com.google.protobuf.Timestamp) startFrom_).toBuilder(); + } + startFrom_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) startFrom_); + startFrom_ = subBuilder.buildPartial(); + } + startFromCase_ = 4; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + StreamContinuationTokens.Builder subBuilder = null; + if (startFromCase_ == 6) { + subBuilder = ((StreamContinuationTokens) startFrom_).toBuilder(); + } + startFrom_ = input.readMessage(StreamContinuationTokens.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((StreamContinuationTokens) startFrom_); + startFrom_ = subBuilder.buildPartial(); + } + startFromCase_ = 6; + break; + } + case 58: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (heartbeatDuration_ != null) { + subBuilder = heartbeatDuration_.toBuilder(); + } + heartbeatDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(heartbeatDuration_); + heartbeatDuration_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized(ReadChangeStreamRequest.class, Builder.class); + } + + private int startFromCase_ = 0; + private Object startFrom_; + + public enum StartFromCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { + START_TIME(4), + CONTINUATION_TOKENS(6), + STARTFROM_NOT_SET(0); + private final int value; + + private StartFromCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static StartFromCase valueOf(int value) { + return forNumber(value); + } + + public static StartFromCase forNumber(int value) { + switch (value) { + case 4: + return START_TIME; + case 6: + return CONTINUATION_TOKENS; + case 0: + return STARTFROM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StartFromCase getStartFromCase() { + return StartFromCase.forNumber(startFromCase_); + } + + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private volatile Object tableName_; + /** + * + * + *
+   * Required. The unique name of the table from which to read a change stream.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tableName. + */ + @Override + public String getTableName() { + Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The unique name of the table from which to read a change stream.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tableName. + */ + @Override + public com.google.protobuf.ByteString getTableNameBytes() { + Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; + private volatile Object appProfileId_; + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + @Override + public String getAppProfileId() { + Object ref = appProfileId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } + } + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + @Override + public com.google.protobuf.ByteString getAppProfileIdBytes() { + Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_FIELD_NUMBER = 3; + private StreamPartition partition_; + /** + * + * + *
+   * The partition to read changes from.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + * + * @return Whether the partition field is set. + */ + @Override + public boolean hasPartition() { + return partition_ != null; + } + /** + * + * + *
+   * The partition to read changes from.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + * + * @return The partition. + */ + @Override + public StreamPartition getPartition() { + return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + } + /** + * + * + *
+   * The partition to read changes from.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + @Override + public StreamPartitionOrBuilder getPartitionOrBuilder() { + return getPartition(); + } + + public static final int START_TIME_FIELD_NUMBER = 4; + /** + * + * + *
+   * Start reading the stream at the specified timestamp. This timestamp must
+   * be within the change stream retention period, less than or equal to the
+   * current time, and after change stream creation, whichever is greater.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + @Override + public boolean hasStartTime() { + return startFromCase_ == 4; + } + /** + * + * + *
+   * Start reading the stream at the specified timestamp. This timestamp must
+   * be within the change stream retention period, less than or equal to the
+   * current time, and after change stream creation, whichever is greater.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + @Override + public com.google.protobuf.Timestamp getStartTime() { + if (startFromCase_ == 4) { + return (com.google.protobuf.Timestamp) startFrom_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
+   * Start reading the stream at the specified timestamp. This timestamp must
+   * be within the change stream retention period, less than or equal to the
+   * current time, and after change stream creation, whichever is greater.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + @Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startFromCase_ == 4) { + return (com.google.protobuf.Timestamp) startFrom_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int CONTINUATION_TOKENS_FIELD_NUMBER = 6; + /** + * + * + *
+   * Tokens that describe how to resume reading a stream where reading
+   * previously left off. If specified, changes will be read starting at the
+   * the position. Tokens are delivered on the stream as part of `Heartbeat`
+   * and `CloseStream` messages.
+   * If a single token is provided, the token’s partition must exactly match
+   * the request’s partition. If multiple tokens are provided, as in the case
+   * of a partition merge, the union of the token partitions must exactly
+   * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+   * returned.
+   * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * + * @return Whether the continuationTokens field is set. + */ + @Override + public boolean hasContinuationTokens() { + return startFromCase_ == 6; + } + /** + * + * + *
+   * Tokens that describe how to resume reading a stream where reading
+   * previously left off. If specified, changes will be read starting at the
+   * the position. Tokens are delivered on the stream as part of `Heartbeat`
+   * and `CloseStream` messages.
+   * If a single token is provided, the token’s partition must exactly match
+   * the request’s partition. If multiple tokens are provided, as in the case
+   * of a partition merge, the union of the token partitions must exactly
+   * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+   * returned.
+   * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * + * @return The continuationTokens. + */ + @Override + public StreamContinuationTokens getContinuationTokens() { + if (startFromCase_ == 6) { + return (StreamContinuationTokens) startFrom_; + } + return StreamContinuationTokens.getDefaultInstance(); + } + /** + * + * + *
+   * Tokens that describe how to resume reading a stream where reading
+   * previously left off. If specified, changes will be read starting at the
+   * the position. Tokens are delivered on the stream as part of `Heartbeat`
+   * and `CloseStream` messages.
+   * If a single token is provided, the token’s partition must exactly match
+   * the request’s partition. If multiple tokens are provided, as in the case
+   * of a partition merge, the union of the token partitions must exactly
+   * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+   * returned.
+   * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + @Override + public StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { + if (startFromCase_ == 6) { + return (StreamContinuationTokens) startFrom_; + } + return StreamContinuationTokens.getDefaultInstance(); + } + + public static final int END_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * If specified, OK will be returned when the stream advances beyond
+   * this time. Otherwise, changes will be continuously delivered on the stream.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + @Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * If specified, OK will be returned when the stream advances beyond
+   * this time. Otherwise, changes will be continuously delivered on the stream.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + @Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * If specified, OK will be returned when the stream advances beyond
+   * this time. Otherwise, changes will be continuously delivered on the stream.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + @Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int HEARTBEAT_DURATION_FIELD_NUMBER = 7; + private com.google.protobuf.Duration heartbeatDuration_; + /** + * + * + *
+   * If specified, the duration between `Heartbeat` messages on the stream.
+   * Otherwise, defaults to 5 seconds.
+   * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + * + * @return Whether the heartbeatDuration field is set. + */ + @Override + public boolean hasHeartbeatDuration() { + return heartbeatDuration_ != null; + } + /** + * + * + *
+   * If specified, the duration between `Heartbeat` messages on the stream.
+   * Otherwise, defaults to 5 seconds.
+   * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + * + * @return The heartbeatDuration. + */ + @Override + public com.google.protobuf.Duration getHeartbeatDuration() { + return heartbeatDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatDuration_; + } + /** + * + * + *
+   * If specified, the duration between `Heartbeat` messages on the stream.
+   * Otherwise, defaults to 5 seconds.
+   * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + @Override + public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { + return getHeartbeatDuration(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); + } + if (partition_ != null) { + output.writeMessage(3, getPartition()); + } + if (startFromCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Timestamp) startFrom_); + } + if (endTime_ != null) { + output.writeMessage(5, getEndTime()); + } + if (startFromCase_ == 6) { + output.writeMessage(6, (StreamContinuationTokens) startFrom_); + } + if (heartbeatDuration_ != null) { + output.writeMessage(7, getHeartbeatDuration()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); + } + if (partition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPartition()); + } + if (startFromCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.protobuf.Timestamp) startFrom_); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + if (startFromCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (StreamContinuationTokens) startFrom_); + } + if (heartbeatDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getHeartbeatDuration()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ReadChangeStreamRequest)) { + return super.equals(obj); + } + ReadChangeStreamRequest other = (ReadChangeStreamRequest) obj; + + if (!getTableName().equals(other.getTableName())) return false; + if (!getAppProfileId().equals(other.getAppProfileId())) return false; + if (hasPartition() != other.hasPartition()) return false; + if (hasPartition()) { + if (!getPartition().equals(other.getPartition())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasHeartbeatDuration() != other.hasHeartbeatDuration()) return false; + if (hasHeartbeatDuration()) { + if (!getHeartbeatDuration().equals(other.getHeartbeatDuration())) return false; + } + if (!getStartFromCase().equals(other.getStartFromCase())) return false; + switch (startFromCase_) { + case 4: + if (!getStartTime().equals(other.getStartTime())) return false; + break; + case 6: + if (!getContinuationTokens().equals(other.getContinuationTokens())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAppProfileId().hashCode(); + if (hasPartition()) { + hash = (37 * hash) + PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getPartition().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasHeartbeatDuration()) { + hash = (37 * hash) + HEARTBEAT_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeatDuration().hashCode(); + } + switch (startFromCase_) { + case 4: + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + break; + case 6: + hash = (37 * hash) + CONTINUATION_TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getContinuationTokens().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ReadChangeStreamRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ReadChangeStreamRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ReadChangeStreamRequest parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ReadChangeStreamRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ReadChangeStreamRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ReadChangeStreamRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ReadChangeStreamRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ReadChangeStreamRequest 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 ReadChangeStreamRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ReadChangeStreamRequest 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 ReadChangeStreamRequest parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ReadChangeStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ReadChangeStreamRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * Request message for Bigtable.ReadChangeStream.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamRequest) + ReadChangeStreamRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized(ReadChangeStreamRequest.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadChangeStreamRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + tableName_ = ""; + + appProfileId_ = ""; + + if (partitionBuilder_ == null) { + partition_ = null; + } else { + partition_ = null; + partitionBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (heartbeatDurationBuilder_ == null) { + heartbeatDuration_ = null; + } else { + heartbeatDuration_ = null; + heartbeatDurationBuilder_ = null; + } + startFromCase_ = 0; + startFrom_ = null; + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + } + + @Override + public ReadChangeStreamRequest getDefaultInstanceForType() { + return ReadChangeStreamRequest.getDefaultInstance(); + } + + @Override + public ReadChangeStreamRequest build() { + ReadChangeStreamRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public ReadChangeStreamRequest buildPartial() { + ReadChangeStreamRequest result = new ReadChangeStreamRequest(this); + result.tableName_ = tableName_; + result.appProfileId_ = appProfileId_; + if (partitionBuilder_ == null) { + result.partition_ = partition_; + } else { + result.partition_ = partitionBuilder_.build(); + } + if (startFromCase_ == 4) { + if (startTimeBuilder_ == null) { + result.startFrom_ = startFrom_; + } else { + result.startFrom_ = startTimeBuilder_.build(); + } + } + if (startFromCase_ == 6) { + if (continuationTokensBuilder_ == null) { + result.startFrom_ = startFrom_; + } else { + result.startFrom_ = continuationTokensBuilder_.build(); + } + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (heartbeatDurationBuilder_ == null) { + result.heartbeatDuration_ = heartbeatDuration_; + } else { + result.heartbeatDuration_ = heartbeatDurationBuilder_.build(); + } + result.startFromCase_ = startFromCase_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ReadChangeStreamRequest) { + return mergeFrom((ReadChangeStreamRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ReadChangeStreamRequest other) { + if (other == ReadChangeStreamRequest.getDefaultInstance()) return this; + if (!other.getTableName().isEmpty()) { + tableName_ = other.tableName_; + onChanged(); + } + if (!other.getAppProfileId().isEmpty()) { + appProfileId_ = other.appProfileId_; + onChanged(); + } + if (other.hasPartition()) { + mergePartition(other.getPartition()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasHeartbeatDuration()) { + mergeHeartbeatDuration(other.getHeartbeatDuration()); + } + switch (other.getStartFromCase()) { + case START_TIME: + { + mergeStartTime(other.getStartTime()); + break; + } + case CONTINUATION_TOKENS: + { + mergeContinuationTokens(other.getContinuationTokens()); + break; + } + case STARTFROM_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ReadChangeStreamRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ReadChangeStreamRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int startFromCase_ = 0; + private Object startFrom_; + + public StartFromCase getStartFromCase() { + return StartFromCase.forNumber(startFromCase_); + } + + public Builder clearStartFrom() { + startFromCase_ = 0; + startFrom_ = null; + onChanged(); + return this; + } + + private Object tableName_ = ""; + /** + * + * + *
+     * Required. The unique name of the table from which to read a change stream.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tableName. + */ + public String getTableName() { + Object ref = tableName_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+     * Required. The unique name of the table from which to read a change stream.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tableName. + */ + public com.google.protobuf.ByteString getTableNameBytes() { + Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The unique name of the table from which to read a change stream.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tableName to set. + * @return This builder for chaining. + */ + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + + tableName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique name of the table from which to read a change stream.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTableName() { + + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique name of the table from which to read a change stream.
+     * Values are of the form
+     * `projects/<project>/instances/<instance>/tables/<table>`.
+     * Change streaming must be enabled on the table.
+     * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tableName to set. + * @return This builder for chaining. + */ + public Builder setTableNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tableName_ = value; + onChanged(); + return this; + } + + private Object appProfileId_ = ""; + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + public String getAppProfileId() { + Object ref = appProfileId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + appProfileId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + public com.google.protobuf.ByteString getAppProfileIdBytes() { + Object ref = appProfileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + appProfileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @param value The appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileId(String value) { + if (value == null) { + throw new NullPointerException(); + } + + appProfileId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAppProfileId() { + + appProfileId_ = getDefaultInstance().getAppProfileId(); + onChanged(); + return this; + } + /** + * + * + *
+     * This value specifies routing for replication. If not specified, the
+     * "default" application profile will be used.
+     * Single cluster routing must be configured on the profile.
+     * 
+ * + * string app_profile_id = 2; + * + * @param value The bytes for appProfileId to set. + * @return This builder for chaining. + */ + public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + appProfileId_ = value; + onChanged(); + return this; + } + + private StreamPartition partition_; + private com.google.protobuf.SingleFieldBuilderV3< + StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder> + partitionBuilder_; + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + * + * @return Whether the partition field is set. + */ + public boolean hasPartition() { + return partitionBuilder_ != null || partition_ != null; + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + * + * @return The partition. + */ + public StreamPartition getPartition() { + if (partitionBuilder_ == null) { + return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + } else { + return partitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + public Builder setPartition(StreamPartition value) { + if (partitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partition_ = value; + onChanged(); + } else { + partitionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + public Builder setPartition(StreamPartition.Builder builderForValue) { + if (partitionBuilder_ == null) { + partition_ = builderForValue.build(); + onChanged(); + } else { + partitionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + public Builder mergePartition(StreamPartition value) { + if (partitionBuilder_ == null) { + if (partition_ != null) { + partition_ = StreamPartition.newBuilder(partition_).mergeFrom(value).buildPartial(); + } else { + partition_ = value; + } + onChanged(); + } else { + partitionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + public Builder clearPartition() { + if (partitionBuilder_ == null) { + partition_ = null; + onChanged(); + } else { + partition_ = null; + partitionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + public StreamPartition.Builder getPartitionBuilder() { + + onChanged(); + return getPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + public StreamPartitionOrBuilder getPartitionOrBuilder() { + if (partitionBuilder_ != null) { + return partitionBuilder_.getMessageOrBuilder(); + } else { + return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + } + } + /** + * + * + *
+     * The partition to read changes from.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder> + getPartitionFieldBuilder() { + if (partitionBuilder_ == null) { + partitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder>( + getPartition(), getParentForChildren(), isClean()); + partition_ = null; + } + return partitionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + @Override + public boolean hasStartTime() { + return startFromCase_ == 4; + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + @Override + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + if (startFromCase_ == 4) { + return (com.google.protobuf.Timestamp) startFrom_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (startFromCase_ == 4) { + return startTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startFrom_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + startFromCase_ = 4; + return this; + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startFrom_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + startFromCase_ = 4; + return this; + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startFromCase_ == 4 + && startFrom_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + startFrom_ = + com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) startFrom_) + .mergeFrom(value) + .buildPartial(); + } else { + startFrom_ = value; + } + onChanged(); + } else { + if (startFromCase_ == 4) { + startTimeBuilder_.mergeFrom(value); + } else { + startTimeBuilder_.setMessage(value); + } + } + startFromCase_ = 4; + return this; + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + if (startFromCase_ == 4) { + startFromCase_ = 0; + startFrom_ = null; + onChanged(); + } + } else { + if (startFromCase_ == 4) { + startFromCase_ = 0; + startFrom_ = null; + } + startTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + @Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if ((startFromCase_ == 4) && (startTimeBuilder_ != null)) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + if (startFromCase_ == 4) { + return (com.google.protobuf.Timestamp) startFrom_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
+     * Start reading the stream at the specified timestamp. This timestamp must
+     * be within the change stream retention period, less than or equal to the
+     * current time, and after change stream creation, whichever is greater.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + if (!(startFromCase_ == 4)) { + startFrom_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) startFrom_, getParentForChildren(), isClean()); + startFrom_ = null; + } + startFromCase_ = 4; + onChanged(); + ; + return startTimeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + StreamContinuationTokens, + StreamContinuationTokens.Builder, + StreamContinuationTokensOrBuilder> + continuationTokensBuilder_; + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * + * @return Whether the continuationTokens field is set. + */ + @Override + public boolean hasContinuationTokens() { + return startFromCase_ == 6; + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * + * @return The continuationTokens. + */ + @Override + public StreamContinuationTokens getContinuationTokens() { + if (continuationTokensBuilder_ == null) { + if (startFromCase_ == 6) { + return (StreamContinuationTokens) startFrom_; + } + return StreamContinuationTokens.getDefaultInstance(); + } else { + if (startFromCase_ == 6) { + return continuationTokensBuilder_.getMessage(); + } + return StreamContinuationTokens.getDefaultInstance(); + } + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + public Builder setContinuationTokens(StreamContinuationTokens value) { + if (continuationTokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startFrom_ = value; + onChanged(); + } else { + continuationTokensBuilder_.setMessage(value); + } + startFromCase_ = 6; + return this; + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + public Builder setContinuationTokens(StreamContinuationTokens.Builder builderForValue) { + if (continuationTokensBuilder_ == null) { + startFrom_ = builderForValue.build(); + onChanged(); + } else { + continuationTokensBuilder_.setMessage(builderForValue.build()); + } + startFromCase_ = 6; + return this; + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + public Builder mergeContinuationTokens(StreamContinuationTokens value) { + if (continuationTokensBuilder_ == null) { + if (startFromCase_ == 6 && startFrom_ != StreamContinuationTokens.getDefaultInstance()) { + startFrom_ = + StreamContinuationTokens.newBuilder((StreamContinuationTokens) startFrom_) + .mergeFrom(value) + .buildPartial(); + } else { + startFrom_ = value; + } + onChanged(); + } else { + if (startFromCase_ == 6) { + continuationTokensBuilder_.mergeFrom(value); + } else { + continuationTokensBuilder_.setMessage(value); + } + } + startFromCase_ = 6; + return this; + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + public Builder clearContinuationTokens() { + if (continuationTokensBuilder_ == null) { + if (startFromCase_ == 6) { + startFromCase_ = 0; + startFrom_ = null; + onChanged(); + } + } else { + if (startFromCase_ == 6) { + startFromCase_ = 0; + startFrom_ = null; + } + continuationTokensBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + public StreamContinuationTokens.Builder getContinuationTokensBuilder() { + return getContinuationTokensFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + @Override + public StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { + if ((startFromCase_ == 6) && (continuationTokensBuilder_ != null)) { + return continuationTokensBuilder_.getMessageOrBuilder(); + } else { + if (startFromCase_ == 6) { + return (StreamContinuationTokens) startFrom_; + } + return StreamContinuationTokens.getDefaultInstance(); + } + } + /** + * + * + *
+     * Tokens that describe how to resume reading a stream where reading
+     * previously left off. If specified, changes will be read starting at the
+     * the position. Tokens are delivered on the stream as part of `Heartbeat`
+     * and `CloseStream` messages.
+     * If a single token is provided, the token’s partition must exactly match
+     * the request’s partition. If multiple tokens are provided, as in the case
+     * of a partition merge, the union of the token partitions must exactly
+     * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+     * returned.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + StreamContinuationTokens, + StreamContinuationTokens.Builder, + StreamContinuationTokensOrBuilder> + getContinuationTokensFieldBuilder() { + if (continuationTokensBuilder_ == null) { + if (!(startFromCase_ == 6)) { + startFrom_ = StreamContinuationTokens.getDefaultInstance(); + } + continuationTokensBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + StreamContinuationTokens, + StreamContinuationTokens.Builder, + StreamContinuationTokensOrBuilder>( + (StreamContinuationTokens) startFrom_, getParentForChildren(), isClean()); + startFrom_ = null; + } + startFromCase_ = 6; + onChanged(); + ; + return continuationTokensBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * If specified, OK will be returned when the stream advances beyond
+     * this time. Otherwise, changes will be continuously delivered on the stream.
+     * This value is inclusive and will be truncated to microsecond granularity.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Duration heartbeatDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + heartbeatDurationBuilder_; + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + * + * @return Whether the heartbeatDuration field is set. + */ + public boolean hasHeartbeatDuration() { + return heartbeatDurationBuilder_ != null || heartbeatDuration_ != null; + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + * + * @return The heartbeatDuration. + */ + public com.google.protobuf.Duration getHeartbeatDuration() { + if (heartbeatDurationBuilder_ == null) { + return heartbeatDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatDuration_; + } else { + return heartbeatDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + public Builder setHeartbeatDuration(com.google.protobuf.Duration value) { + if (heartbeatDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartbeatDuration_ = value; + onChanged(); + } else { + heartbeatDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + public Builder setHeartbeatDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (heartbeatDurationBuilder_ == null) { + heartbeatDuration_ = builderForValue.build(); + onChanged(); + } else { + heartbeatDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + public Builder mergeHeartbeatDuration(com.google.protobuf.Duration value) { + if (heartbeatDurationBuilder_ == null) { + if (heartbeatDuration_ != null) { + heartbeatDuration_ = + com.google.protobuf.Duration.newBuilder(heartbeatDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + heartbeatDuration_ = value; + } + onChanged(); + } else { + heartbeatDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + public Builder clearHeartbeatDuration() { + if (heartbeatDurationBuilder_ == null) { + heartbeatDuration_ = null; + onChanged(); + } else { + heartbeatDuration_ = null; + heartbeatDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + public com.google.protobuf.Duration.Builder getHeartbeatDurationBuilder() { + + onChanged(); + return getHeartbeatDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { + if (heartbeatDurationBuilder_ != null) { + return heartbeatDurationBuilder_.getMessageOrBuilder(); + } else { + return heartbeatDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : heartbeatDuration_; + } + } + /** + * + * + *
+     * If specified, the duration between `Heartbeat` messages on the stream.
+     * Otherwise, defaults to 5 seconds.
+     * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getHeartbeatDurationFieldBuilder() { + if (heartbeatDurationBuilder_ == null) { + heartbeatDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getHeartbeatDuration(), getParentForChildren(), isClean()); + heartbeatDuration_ = null; + } + return heartbeatDurationBuilder_; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamRequest) + private static final ReadChangeStreamRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ReadChangeStreamRequest(); + } + + public static ReadChangeStreamRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public ReadChangeStreamRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadChangeStreamRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public ReadChangeStreamRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java new file mode 100644 index 0000000000..c62293965a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java @@ -0,0 +1,308 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +public interface ReadChangeStreamRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique name of the table from which to read a change stream.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tableName. + */ + String getTableName(); + /** + * + * + *
+   * Required. The unique name of the table from which to read a change stream.
+   * Values are of the form
+   * `projects/<project>/instances/<instance>/tables/<table>`.
+   * Change streaming must be enabled on the table.
+   * 
+ * + * + * string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tableName. + */ + com.google.protobuf.ByteString getTableNameBytes(); + + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The appProfileId. + */ + String getAppProfileId(); + /** + * + * + *
+   * This value specifies routing for replication. If not specified, the
+   * "default" application profile will be used.
+   * Single cluster routing must be configured on the profile.
+   * 
+ * + * string app_profile_id = 2; + * + * @return The bytes for appProfileId. + */ + com.google.protobuf.ByteString getAppProfileIdBytes(); + + /** + * + * + *
+   * The partition to read changes from.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + * + * @return Whether the partition field is set. + */ + boolean hasPartition(); + /** + * + * + *
+   * The partition to read changes from.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + * + * @return The partition. + */ + StreamPartition getPartition(); + /** + * + * + *
+   * The partition to read changes from.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 3; + */ + StreamPartitionOrBuilder getPartitionOrBuilder(); + + /** + * + * + *
+   * Start reading the stream at the specified timestamp. This timestamp must
+   * be within the change stream retention period, less than or equal to the
+   * current time, and after change stream creation, whichever is greater.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Start reading the stream at the specified timestamp. This timestamp must
+   * be within the change stream retention period, less than or equal to the
+   * current time, and after change stream creation, whichever is greater.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Start reading the stream at the specified timestamp. This timestamp must
+   * be within the change stream retention period, less than or equal to the
+   * current time, and after change stream creation, whichever is greater.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Tokens that describe how to resume reading a stream where reading
+   * previously left off. If specified, changes will be read starting at the
+   * the position. Tokens are delivered on the stream as part of `Heartbeat`
+   * and `CloseStream` messages.
+   * If a single token is provided, the token’s partition must exactly match
+   * the request’s partition. If multiple tokens are provided, as in the case
+   * of a partition merge, the union of the token partitions must exactly
+   * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+   * returned.
+   * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * + * @return Whether the continuationTokens field is set. + */ + boolean hasContinuationTokens(); + /** + * + * + *
+   * Tokens that describe how to resume reading a stream where reading
+   * previously left off. If specified, changes will be read starting at the
+   * the position. Tokens are delivered on the stream as part of `Heartbeat`
+   * and `CloseStream` messages.
+   * If a single token is provided, the token’s partition must exactly match
+   * the request’s partition. If multiple tokens are provided, as in the case
+   * of a partition merge, the union of the token partitions must exactly
+   * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+   * returned.
+   * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + * + * @return The continuationTokens. + */ + StreamContinuationTokens getContinuationTokens(); + /** + * + * + *
+   * Tokens that describe how to resume reading a stream where reading
+   * previously left off. If specified, changes will be read starting at the
+   * the position. Tokens are delivered on the stream as part of `Heartbeat`
+   * and `CloseStream` messages.
+   * If a single token is provided, the token’s partition must exactly match
+   * the request’s partition. If multiple tokens are provided, as in the case
+   * of a partition merge, the union of the token partitions must exactly
+   * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be
+   * returned.
+   * 
+ * + * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; + */ + StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder(); + + /** + * + * + *
+   * If specified, OK will be returned when the stream advances beyond
+   * this time. Otherwise, changes will be continuously delivered on the stream.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * If specified, OK will be returned when the stream advances beyond
+   * this time. Otherwise, changes will be continuously delivered on the stream.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * If specified, OK will be returned when the stream advances beyond
+   * this time. Otherwise, changes will be continuously delivered on the stream.
+   * This value is inclusive and will be truncated to microsecond granularity.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * If specified, the duration between `Heartbeat` messages on the stream.
+   * Otherwise, defaults to 5 seconds.
+   * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + * + * @return Whether the heartbeatDuration field is set. + */ + boolean hasHeartbeatDuration(); + /** + * + * + *
+   * If specified, the duration between `Heartbeat` messages on the stream.
+   * Otherwise, defaults to 5 seconds.
+   * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + * + * @return The heartbeatDuration. + */ + com.google.protobuf.Duration getHeartbeatDuration(); + /** + * + * + *
+   * If specified, the duration between `Heartbeat` messages on the stream.
+   * Otherwise, defaults to 5 seconds.
+   * 
+ * + * .google.protobuf.Duration heartbeat_duration = 7; + */ + com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder(); + + public ReadChangeStreamRequest.StartFromCase getStartFromCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java new file mode 100644 index 0000000000..757cebfca6 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java @@ -0,0 +1,8471 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * Response message for Bigtable.ReadChangeStream.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse} + */ +public final class ReadChangeStreamResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse) + ReadChangeStreamResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadChangeStreamResponse.newBuilder() to construct. + private ReadChangeStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReadChangeStreamResponse() {} + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new ReadChangeStreamResponse(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReadChangeStreamResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + DataChange.Builder subBuilder = null; + if (streamRecordCase_ == 1) { + subBuilder = ((DataChange) streamRecord_).toBuilder(); + } + streamRecord_ = input.readMessage(DataChange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((DataChange) streamRecord_); + streamRecord_ = subBuilder.buildPartial(); + } + streamRecordCase_ = 1; + break; + } + case 18: + { + Heartbeat.Builder subBuilder = null; + if (streamRecordCase_ == 2) { + subBuilder = ((Heartbeat) streamRecord_).toBuilder(); + } + streamRecord_ = input.readMessage(Heartbeat.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((Heartbeat) streamRecord_); + streamRecord_ = subBuilder.buildPartial(); + } + streamRecordCase_ = 2; + break; + } + case 26: + { + CloseStream.Builder subBuilder = null; + if (streamRecordCase_ == 3) { + subBuilder = ((CloseStream) streamRecord_).toBuilder(); + } + streamRecord_ = input.readMessage(CloseStream.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((CloseStream) streamRecord_); + streamRecord_ = subBuilder.buildPartial(); + } + streamRecordCase_ = 3; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized(ReadChangeStreamResponse.class, Builder.class); + } + + public interface MutationChunkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If set, then the mutation is a `SetCell` with a chunked value across
+     * multiple messages.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + * + * @return Whether the chunkInfo field is set. + */ + boolean hasChunkInfo(); + /** + * + * + *
+     * If set, then the mutation is a `SetCell` with a chunked value across
+     * multiple messages.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + * + * @return The chunkInfo. + */ + MutationChunk.ChunkInfo getChunkInfo(); + /** + * + * + *
+     * If set, then the mutation is a `SetCell` with a chunked value across
+     * multiple messages.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + MutationChunk.ChunkInfoOrBuilder getChunkInfoOrBuilder(); + + /** + * + * + *
+     * If this is a continuation of a chunked message (`chunked_value_offset` >
+     * 0), ignore all fields except the `SetCell`'s value and merge it with
+     * the previous message by concatenating the value fields.
+     * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + * + * @return Whether the mutation field is set. + */ + boolean hasMutation(); + /** + * + * + *
+     * If this is a continuation of a chunked message (`chunked_value_offset` >
+     * 0), ignore all fields except the `SetCell`'s value and merge it with
+     * the previous message by concatenating the value fields.
+     * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + * + * @return The mutation. + */ + Mutation getMutation(); + /** + * + * + *
+     * If this is a continuation of a chunked message (`chunked_value_offset` >
+     * 0), ignore all fields except the `SetCell`'s value and merge it with
+     * the previous message by concatenating the value fields.
+     * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + MutationOrBuilder getMutationOrBuilder(); + } + /** + * + * + *
+   * A partial or complete mutation.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} + */ + public static final class MutationChunk extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + MutationChunkOrBuilder { + private static final long serialVersionUID = 0L; + // Use MutationChunk.newBuilder() to construct. + private MutationChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MutationChunk() {} + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new MutationChunk(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MutationChunk( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ChunkInfo.Builder subBuilder = null; + if (chunkInfo_ != null) { + subBuilder = chunkInfo_.toBuilder(); + } + chunkInfo_ = input.readMessage(ChunkInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(chunkInfo_); + chunkInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + Mutation.Builder subBuilder = null; + if (mutation_ != null) { + subBuilder = mutation_.toBuilder(); + } + mutation_ = input.readMessage(Mutation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mutation_); + mutation_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable + .ensureFieldAccessorsInitialized(MutationChunk.class, Builder.class); + } + + public interface ChunkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The total value size of all the chunks that make up the `SetCell`.
+       * 
+ * + * int32 chunked_value_size = 1; + * + * @return The chunkedValueSize. + */ + int getChunkedValueSize(); + + /** + * + * + *
+       * The byte offset of this chunk into the total value size of the
+       * mutation.
+       * 
+ * + * int32 chunked_value_offset = 2; + * + * @return The chunkedValueOffset. + */ + int getChunkedValueOffset(); + + /** + * + * + *
+       * When true, this is the last chunk of a chunked `SetCell`.
+       * 
+ * + * bool last_chunk = 3; + * + * @return The lastChunk. + */ + boolean getLastChunk(); + } + /** + * + * + *
+     * Information about the chunking of this mutation.
+     * Only `SetCell` mutations can be chunked, and all chunks for a `SetCell`
+     * will be delivered contiguously with no other mutation types interleaved.
+     * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} + */ + public static final class ChunkInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + ChunkInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChunkInfo.newBuilder() to construct. + private ChunkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChunkInfo() {} + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new ChunkInfo(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChunkInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + chunkedValueSize_ = input.readInt32(); + break; + } + case 16: + { + chunkedValueOffset_ = input.readInt32(); + break; + } + case 24: + { + lastChunk_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized(ChunkInfo.class, Builder.class); + } + + public static final int CHUNKED_VALUE_SIZE_FIELD_NUMBER = 1; + private int chunkedValueSize_; + /** + * + * + *
+       * The total value size of all the chunks that make up the `SetCell`.
+       * 
+ * + * int32 chunked_value_size = 1; + * + * @return The chunkedValueSize. + */ + @Override + public int getChunkedValueSize() { + return chunkedValueSize_; + } + + public static final int CHUNKED_VALUE_OFFSET_FIELD_NUMBER = 2; + private int chunkedValueOffset_; + /** + * + * + *
+       * The byte offset of this chunk into the total value size of the
+       * mutation.
+       * 
+ * + * int32 chunked_value_offset = 2; + * + * @return The chunkedValueOffset. + */ + @Override + public int getChunkedValueOffset() { + return chunkedValueOffset_; + } + + public static final int LAST_CHUNK_FIELD_NUMBER = 3; + private boolean lastChunk_; + /** + * + * + *
+       * When true, this is the last chunk of a chunked `SetCell`.
+       * 
+ * + * bool last_chunk = 3; + * + * @return The lastChunk. + */ + @Override + public boolean getLastChunk() { + return lastChunk_; + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (chunkedValueSize_ != 0) { + output.writeInt32(1, chunkedValueSize_); + } + if (chunkedValueOffset_ != 0) { + output.writeInt32(2, chunkedValueOffset_); + } + if (lastChunk_ != false) { + output.writeBool(3, lastChunk_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (chunkedValueSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, chunkedValueSize_); + } + if (chunkedValueOffset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, chunkedValueOffset_); + } + if (lastChunk_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, lastChunk_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ChunkInfo)) { + return super.equals(obj); + } + ChunkInfo other = (ChunkInfo) obj; + + if (getChunkedValueSize() != other.getChunkedValueSize()) return false; + if (getChunkedValueOffset() != other.getChunkedValueOffset()) return false; + if (getLastChunk() != other.getLastChunk()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNKED_VALUE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getChunkedValueSize(); + hash = (37 * hash) + CHUNKED_VALUE_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getChunkedValueOffset(); + hash = (37 * hash) + LAST_CHUNK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLastChunk()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ChunkInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ChunkInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ChunkInfo parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ChunkInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ChunkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ChunkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ChunkInfo parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ChunkInfo 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 ChunkInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ChunkInfo 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 ChunkInfo parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ChunkInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ChunkInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Information about the chunking of this mutation.
+       * Only `SetCell` mutations can be chunked, and all chunks for a `SetCell`
+       * will be delivered contiguously with no other mutation types interleaved.
+       * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + ChunkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized(ChunkInfo.class, Builder.class); + } + + // Construct using + // com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + chunkedValueSize_ = 0; + + chunkedValueOffset_ = 0; + + lastChunk_ = false; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; + } + + @Override + public ChunkInfo getDefaultInstanceForType() { + return ChunkInfo.getDefaultInstance(); + } + + @Override + public ChunkInfo build() { + ChunkInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public ChunkInfo buildPartial() { + ChunkInfo result = new ChunkInfo(this); + result.chunkedValueSize_ = chunkedValueSize_; + result.chunkedValueOffset_ = chunkedValueOffset_; + result.lastChunk_ = lastChunk_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ChunkInfo) { + return mergeFrom((ChunkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ChunkInfo other) { + if (other == ChunkInfo.getDefaultInstance()) return this; + if (other.getChunkedValueSize() != 0) { + setChunkedValueSize(other.getChunkedValueSize()); + } + if (other.getChunkedValueOffset() != 0) { + setChunkedValueOffset(other.getChunkedValueOffset()); + } + if (other.getLastChunk() != false) { + setLastChunk(other.getLastChunk()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ChunkInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ChunkInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int chunkedValueSize_; + /** + * + * + *
+         * The total value size of all the chunks that make up the `SetCell`.
+         * 
+ * + * int32 chunked_value_size = 1; + * + * @return The chunkedValueSize. + */ + @Override + public int getChunkedValueSize() { + return chunkedValueSize_; + } + /** + * + * + *
+         * The total value size of all the chunks that make up the `SetCell`.
+         * 
+ * + * int32 chunked_value_size = 1; + * + * @param value The chunkedValueSize to set. + * @return This builder for chaining. + */ + public Builder setChunkedValueSize(int value) { + + chunkedValueSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The total value size of all the chunks that make up the `SetCell`.
+         * 
+ * + * int32 chunked_value_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearChunkedValueSize() { + + chunkedValueSize_ = 0; + onChanged(); + return this; + } + + private int chunkedValueOffset_; + /** + * + * + *
+         * The byte offset of this chunk into the total value size of the
+         * mutation.
+         * 
+ * + * int32 chunked_value_offset = 2; + * + * @return The chunkedValueOffset. + */ + @Override + public int getChunkedValueOffset() { + return chunkedValueOffset_; + } + /** + * + * + *
+         * The byte offset of this chunk into the total value size of the
+         * mutation.
+         * 
+ * + * int32 chunked_value_offset = 2; + * + * @param value The chunkedValueOffset to set. + * @return This builder for chaining. + */ + public Builder setChunkedValueOffset(int value) { + + chunkedValueOffset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The byte offset of this chunk into the total value size of the
+         * mutation.
+         * 
+ * + * int32 chunked_value_offset = 2; + * + * @return This builder for chaining. + */ + public Builder clearChunkedValueOffset() { + + chunkedValueOffset_ = 0; + onChanged(); + return this; + } + + private boolean lastChunk_; + /** + * + * + *
+         * When true, this is the last chunk of a chunked `SetCell`.
+         * 
+ * + * bool last_chunk = 3; + * + * @return The lastChunk. + */ + @Override + public boolean getLastChunk() { + return lastChunk_; + } + /** + * + * + *
+         * When true, this is the last chunk of a chunked `SetCell`.
+         * 
+ * + * bool last_chunk = 3; + * + * @param value The lastChunk to set. + * @return This builder for chaining. + */ + public Builder setLastChunk(boolean value) { + + lastChunk_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * When true, this is the last chunk of a chunked `SetCell`.
+         * 
+ * + * bool last_chunk = 3; + * + * @return This builder for chaining. + */ + public Builder clearLastChunk() { + + lastChunk_ = false; + onChanged(); + return this; + } + + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + private static final ChunkInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ChunkInfo(); + } + + public static ChunkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public ChunkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChunkInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public ChunkInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CHUNK_INFO_FIELD_NUMBER = 1; + private ChunkInfo chunkInfo_; + /** + * + * + *
+     * If set, then the mutation is a `SetCell` with a chunked value across
+     * multiple messages.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + * + * @return Whether the chunkInfo field is set. + */ + @Override + public boolean hasChunkInfo() { + return chunkInfo_ != null; + } + /** + * + * + *
+     * If set, then the mutation is a `SetCell` with a chunked value across
+     * multiple messages.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + * + * @return The chunkInfo. + */ + @Override + public ChunkInfo getChunkInfo() { + return chunkInfo_ == null ? ChunkInfo.getDefaultInstance() : chunkInfo_; + } + /** + * + * + *
+     * If set, then the mutation is a `SetCell` with a chunked value across
+     * multiple messages.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + @Override + public ChunkInfoOrBuilder getChunkInfoOrBuilder() { + return getChunkInfo(); + } + + public static final int MUTATION_FIELD_NUMBER = 2; + private Mutation mutation_; + /** + * + * + *
+     * If this is a continuation of a chunked message (`chunked_value_offset` >
+     * 0), ignore all fields except the `SetCell`'s value and merge it with
+     * the previous message by concatenating the value fields.
+     * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + * + * @return Whether the mutation field is set. + */ + @Override + public boolean hasMutation() { + return mutation_ != null; + } + /** + * + * + *
+     * If this is a continuation of a chunked message (`chunked_value_offset` >
+     * 0), ignore all fields except the `SetCell`'s value and merge it with
+     * the previous message by concatenating the value fields.
+     * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + * + * @return The mutation. + */ + @Override + public Mutation getMutation() { + return mutation_ == null ? Mutation.getDefaultInstance() : mutation_; + } + /** + * + * + *
+     * If this is a continuation of a chunked message (`chunked_value_offset` >
+     * 0), ignore all fields except the `SetCell`'s value and merge it with
+     * the previous message by concatenating the value fields.
+     * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + @Override + public MutationOrBuilder getMutationOrBuilder() { + return getMutation(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (chunkInfo_ != null) { + output.writeMessage(1, getChunkInfo()); + } + if (mutation_ != null) { + output.writeMessage(2, getMutation()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (chunkInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getChunkInfo()); + } + if (mutation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMutation()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof MutationChunk)) { + return super.equals(obj); + } + MutationChunk other = (MutationChunk) obj; + + if (hasChunkInfo() != other.hasChunkInfo()) return false; + if (hasChunkInfo()) { + if (!getChunkInfo().equals(other.getChunkInfo())) return false; + } + if (hasMutation() != other.hasMutation()) return false; + if (hasMutation()) { + if (!getMutation().equals(other.getMutation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasChunkInfo()) { + hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getChunkInfo().hashCode(); + } + if (hasMutation()) { + hash = (37 * hash) + MUTATION_FIELD_NUMBER; + hash = (53 * hash) + getMutation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static MutationChunk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static MutationChunk parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static MutationChunk parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static MutationChunk parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static MutationChunk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static MutationChunk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static MutationChunk parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static MutationChunk 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 MutationChunk parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static MutationChunk 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 MutationChunk parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static MutationChunk parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(MutationChunk prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A partial or complete mutation.
+     * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.MutationChunk} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + MutationChunkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable + .ensureFieldAccessorsInitialized(MutationChunk.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + if (chunkInfoBuilder_ == null) { + chunkInfo_ = null; + } else { + chunkInfo_ = null; + chunkInfoBuilder_ = null; + } + if (mutationBuilder_ == null) { + mutation_ = null; + } else { + mutation_ = null; + mutationBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; + } + + @Override + public MutationChunk getDefaultInstanceForType() { + return MutationChunk.getDefaultInstance(); + } + + @Override + public MutationChunk build() { + MutationChunk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public MutationChunk buildPartial() { + MutationChunk result = new MutationChunk(this); + if (chunkInfoBuilder_ == null) { + result.chunkInfo_ = chunkInfo_; + } else { + result.chunkInfo_ = chunkInfoBuilder_.build(); + } + if (mutationBuilder_ == null) { + result.mutation_ = mutation_; + } else { + result.mutation_ = mutationBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof MutationChunk) { + return mergeFrom((MutationChunk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(MutationChunk other) { + if (other == MutationChunk.getDefaultInstance()) return this; + if (other.hasChunkInfo()) { + mergeChunkInfo(other.getChunkInfo()); + } + if (other.hasMutation()) { + mergeMutation(other.getMutation()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + MutationChunk parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (MutationChunk) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private ChunkInfo chunkInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + ChunkInfo, ChunkInfo.Builder, ChunkInfoOrBuilder> + chunkInfoBuilder_; + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + * + * @return Whether the chunkInfo field is set. + */ + public boolean hasChunkInfo() { + return chunkInfoBuilder_ != null || chunkInfo_ != null; + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + * + * @return The chunkInfo. + */ + public ChunkInfo getChunkInfo() { + if (chunkInfoBuilder_ == null) { + return chunkInfo_ == null ? ChunkInfo.getDefaultInstance() : chunkInfo_; + } else { + return chunkInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + public Builder setChunkInfo(ChunkInfo value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkInfo_ = value; + onChanged(); + } else { + chunkInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + public Builder setChunkInfo(ChunkInfo.Builder builderForValue) { + if (chunkInfoBuilder_ == null) { + chunkInfo_ = builderForValue.build(); + onChanged(); + } else { + chunkInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + public Builder mergeChunkInfo(ChunkInfo value) { + if (chunkInfoBuilder_ == null) { + if (chunkInfo_ != null) { + chunkInfo_ = ChunkInfo.newBuilder(chunkInfo_).mergeFrom(value).buildPartial(); + } else { + chunkInfo_ = value; + } + onChanged(); + } else { + chunkInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + public Builder clearChunkInfo() { + if (chunkInfoBuilder_ == null) { + chunkInfo_ = null; + onChanged(); + } else { + chunkInfo_ = null; + chunkInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + public ChunkInfo.Builder getChunkInfoBuilder() { + + onChanged(); + return getChunkInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + public ChunkInfoOrBuilder getChunkInfoOrBuilder() { + if (chunkInfoBuilder_ != null) { + return chunkInfoBuilder_.getMessageOrBuilder(); + } else { + return chunkInfo_ == null ? ChunkInfo.getDefaultInstance() : chunkInfo_; + } + } + /** + * + * + *
+       * If set, then the mutation is a `SetCell` with a chunked value across
+       * multiple messages.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + ChunkInfo, ChunkInfo.Builder, ChunkInfoOrBuilder> + getChunkInfoFieldBuilder() { + if (chunkInfoBuilder_ == null) { + chunkInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + ChunkInfo, ChunkInfo.Builder, ChunkInfoOrBuilder>( + getChunkInfo(), getParentForChildren(), isClean()); + chunkInfo_ = null; + } + return chunkInfoBuilder_; + } + + private Mutation mutation_; + private com.google.protobuf.SingleFieldBuilderV3< + Mutation, Mutation.Builder, MutationOrBuilder> + mutationBuilder_; + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + * + * @return Whether the mutation field is set. + */ + public boolean hasMutation() { + return mutationBuilder_ != null || mutation_ != null; + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + * + * @return The mutation. + */ + public Mutation getMutation() { + if (mutationBuilder_ == null) { + return mutation_ == null ? Mutation.getDefaultInstance() : mutation_; + } else { + return mutationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + public Builder setMutation(Mutation value) { + if (mutationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mutation_ = value; + onChanged(); + } else { + mutationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + public Builder setMutation(Mutation.Builder builderForValue) { + if (mutationBuilder_ == null) { + mutation_ = builderForValue.build(); + onChanged(); + } else { + mutationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + public Builder mergeMutation(Mutation value) { + if (mutationBuilder_ == null) { + if (mutation_ != null) { + mutation_ = Mutation.newBuilder(mutation_).mergeFrom(value).buildPartial(); + } else { + mutation_ = value; + } + onChanged(); + } else { + mutationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + public Builder clearMutation() { + if (mutationBuilder_ == null) { + mutation_ = null; + onChanged(); + } else { + mutation_ = null; + mutationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + public Mutation.Builder getMutationBuilder() { + + onChanged(); + return getMutationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + public MutationOrBuilder getMutationOrBuilder() { + if (mutationBuilder_ != null) { + return mutationBuilder_.getMessageOrBuilder(); + } else { + return mutation_ == null ? Mutation.getDefaultInstance() : mutation_; + } + } + /** + * + * + *
+       * If this is a continuation of a chunked message (`chunked_value_offset` >
+       * 0), ignore all fields except the `SetCell`'s value and merge it with
+       * the previous message by concatenating the value fields.
+       * 
+ * + * .google.bigtable.v2.Mutation mutation = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Mutation, Mutation.Builder, MutationOrBuilder> + getMutationFieldBuilder() { + if (mutationBuilder_ == null) { + mutationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + Mutation, Mutation.Builder, MutationOrBuilder>( + getMutation(), getParentForChildren(), isClean()); + mutation_ = null; + } + return mutationBuilder_; + } + + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + private static final MutationChunk DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new MutationChunk(); + } + + public static MutationChunk getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public MutationChunk parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MutationChunk(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public MutationChunk getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataChangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse.DataChange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The type of the mutation.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+     * The type of the mutation.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return The type. + */ + DataChange.Type getType(); + + /** + * + * + *
+     * The cluster where the mutation was applied.
+     * Not set when `type` is `GARBAGE_COLLECTION`.
+     * 
+ * + * string source_cluster_id = 2; + * + * @return The sourceClusterId. + */ + String getSourceClusterId(); + /** + * + * + *
+     * The cluster where the mutation was applied.
+     * Not set when `type` is `GARBAGE_COLLECTION`.
+     * 
+ * + * string source_cluster_id = 2; + * + * @return The bytes for sourceClusterId. + */ + com.google.protobuf.ByteString getSourceClusterIdBytes(); + + /** + * + * + *
+     * The row key for all mutations that are part of this `DataChange`.
+     * If the `DataChange` is chunked across multiple messages, then this field
+     * will only be set for the first message.
+     * 
+ * + * bytes row_key = 3; + * + * @return The rowKey. + */ + com.google.protobuf.ByteString getRowKey(); + + /** + * + * + *
+     * The timestamp at which the mutation was applied on the Bigtable server.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + * + * @return Whether the commitTimestamp field is set. + */ + boolean hasCommitTimestamp(); + /** + * + * + *
+     * The timestamp at which the mutation was applied on the Bigtable server.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + * + * @return The commitTimestamp. + */ + com.google.protobuf.Timestamp getCommitTimestamp(); + /** + * + * + *
+     * The timestamp at which the mutation was applied on the Bigtable server.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder(); + + /** + * + * + *
+     * A value that lets stream consumers reconstruct Bigtable's
+     * conflict resolution semantics.
+     * https://cloud.google.com/bigtable/docs/writes#conflict-resolution
+     * In the event that the same row key, column family, column qualifier,
+     * timestamp are modified on different clusters at the same
+     * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the
+     * one chosen for the eventually consistent state of the system.
+     * 
+ * + * int32 tiebreaker = 5; + * + * @return The tiebreaker. + */ + int getTiebreaker(); + + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + java.util.List getChunksList(); + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + MutationChunk getChunks(int index); + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + int getChunksCount(); + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + java.util.List getChunksOrBuilderList(); + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + MutationChunkOrBuilder getChunksOrBuilder(int index); + + /** + * + * + *
+     * When true, indicates that the entire `DataChange` has been read
+     * and the client can safely process the message.
+     * 
+ * + * bool done = 8; + * + * @return The done. + */ + boolean getDone(); + + /** + * + * + *
+     * An encoded position for this stream's partition to restart reading from.
+     * This token is for the StreamPartition from the request.
+     * 
+ * + * string token = 9; + * + * @return The token. + */ + String getToken(); + /** + * + * + *
+     * An encoded position for this stream's partition to restart reading from.
+     * This token is for the StreamPartition from the request.
+     * 
+ * + * string token = 9; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); + + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + * + * @return Whether the lowWatermark field is set. + */ + boolean hasLowWatermark(); + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + * + * @return The lowWatermark. + */ + com.google.protobuf.Timestamp getLowWatermark(); + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder(); + } + /** + * + * + *
+   * A message corresponding to one or more mutations to the partition
+   * being streamed. A single logical `DataChange` message may also be split
+   * across a sequence of multiple individual messages. Messages other than
+   * the first in a sequence will only have the `type` and `chunks` fields
+   * populated, with the final message in the sequence also containing `done`
+   * set to true.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.DataChange} + */ + public static final class DataChange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.DataChange) + DataChangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataChange.newBuilder() to construct. + private DataChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataChange() { + type_ = 0; + sourceClusterId_ = ""; + rowKey_ = com.google.protobuf.ByteString.EMPTY; + chunks_ = java.util.Collections.emptyList(); + token_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new DataChange(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataChange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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; + case 8: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 18: + { + String s = input.readStringRequireUtf8(); + + sourceClusterId_ = s; + break; + } + case 26: + { + rowKey_ = input.readBytes(); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (commitTimestamp_ != null) { + subBuilder = commitTimestamp_.toBuilder(); + } + commitTimestamp_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commitTimestamp_); + commitTimestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + tiebreaker_ = input.readInt32(); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + chunks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + chunks_.add(input.readMessage(MutationChunk.parser(), extensionRegistry)); + break; + } + case 64: + { + done_ = input.readBool(); + break; + } + case 74: + { + String s = input.readStringRequireUtf8(); + + token_ = s; + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lowWatermark_ != null) { + subBuilder = lowWatermark_.toBuilder(); + } + lowWatermark_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lowWatermark_); + lowWatermark_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + chunks_ = java.util.Collections.unmodifiableList(chunks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable + .ensureFieldAccessorsInitialized(DataChange.class, Builder.class); + } + + /** + * + * + *
+     * The type of mutation.
+     * 
+ * + * Protobuf enum {@code google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * The type is unspecified.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * A user-initiated mutation.
+       * 
+ * + * USER = 1; + */ + USER(1), + /** + * + * + *
+       * A system-initiated mutation as part of garbage collection.
+       * https://cloud.google.com/bigtable/docs/garbage-collection
+       * 
+ * + * GARBAGE_COLLECTION = 2; + */ + GARBAGE_COLLECTION(2), + /** + * + * + *
+       * This is a continuation of a multi-message change.
+       * 
+ * + * CONTINUATION = 3; + */ + CONTINUATION(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * The type is unspecified.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * A user-initiated mutation.
+       * 
+ * + * USER = 1; + */ + public static final int USER_VALUE = 1; + /** + * + * + *
+       * A system-initiated mutation as part of garbage collection.
+       * https://cloud.google.com/bigtable/docs/garbage-collection
+       * 
+ * + * GARBAGE_COLLECTION = 2; + */ + public static final int GARBAGE_COLLECTION_VALUE = 2; + /** + * + * + *
+       * This is a continuation of a multi-message change.
+       * 
+ * + * CONTINUATION = 3; + */ + public static final int CONTINUATION_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return USER; + case 2: + return GARBAGE_COLLECTION; + case 3: + return CONTINUATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return DataChange.getDescriptor().getEnumTypes().get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * + * + *
+     * The type of the mutation.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of the mutation.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return The type. + */ + @Override + public Type getType() { + @SuppressWarnings("deprecation") + Type result = Type.valueOf(type_); + return result == null ? Type.UNRECOGNIZED : result; + } + + public static final int SOURCE_CLUSTER_ID_FIELD_NUMBER = 2; + private volatile Object sourceClusterId_; + /** + * + * + *
+     * The cluster where the mutation was applied.
+     * Not set when `type` is `GARBAGE_COLLECTION`.
+     * 
+ * + * string source_cluster_id = 2; + * + * @return The sourceClusterId. + */ + @Override + public String getSourceClusterId() { + Object ref = sourceClusterId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + sourceClusterId_ = s; + return s; + } + } + /** + * + * + *
+     * The cluster where the mutation was applied.
+     * Not set when `type` is `GARBAGE_COLLECTION`.
+     * 
+ * + * string source_cluster_id = 2; + * + * @return The bytes for sourceClusterId. + */ + @Override + public com.google.protobuf.ByteString getSourceClusterIdBytes() { + Object ref = sourceClusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + sourceClusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROW_KEY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString rowKey_; + /** + * + * + *
+     * The row key for all mutations that are part of this `DataChange`.
+     * If the `DataChange` is chunked across multiple messages, then this field
+     * will only be set for the first message.
+     * 
+ * + * bytes row_key = 3; + * + * @return The rowKey. + */ + @Override + public com.google.protobuf.ByteString getRowKey() { + return rowKey_; + } + + public static final int COMMIT_TIMESTAMP_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp commitTimestamp_; + /** + * + * + *
+     * The timestamp at which the mutation was applied on the Bigtable server.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + * + * @return Whether the commitTimestamp field is set. + */ + @Override + public boolean hasCommitTimestamp() { + return commitTimestamp_ != null; + } + /** + * + * + *
+     * The timestamp at which the mutation was applied on the Bigtable server.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + * + * @return The commitTimestamp. + */ + @Override + public com.google.protobuf.Timestamp getCommitTimestamp() { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } + /** + * + * + *
+     * The timestamp at which the mutation was applied on the Bigtable server.
+     * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + @Override + public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { + return getCommitTimestamp(); + } + + public static final int TIEBREAKER_FIELD_NUMBER = 5; + private int tiebreaker_; + /** + * + * + *
+     * A value that lets stream consumers reconstruct Bigtable's
+     * conflict resolution semantics.
+     * https://cloud.google.com/bigtable/docs/writes#conflict-resolution
+     * In the event that the same row key, column family, column qualifier,
+     * timestamp are modified on different clusters at the same
+     * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the
+     * one chosen for the eventually consistent state of the system.
+     * 
+ * + * int32 tiebreaker = 5; + * + * @return The tiebreaker. + */ + @Override + public int getTiebreaker() { + return tiebreaker_; + } + + public static final int CHUNKS_FIELD_NUMBER = 6; + private java.util.List chunks_; + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + @Override + public java.util.List getChunksList() { + return chunks_; + } + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + @Override + public java.util.List getChunksOrBuilderList() { + return chunks_; + } + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + @Override + public int getChunksCount() { + return chunks_.size(); + } + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + @Override + public MutationChunk getChunks(int index) { + return chunks_.get(index); + } + /** + * + * + *
+     * The mutations associated with this change to the partition.
+     * May contain complete mutations or chunks of a multi-message chunked
+     * `DataChange` record.
+     * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + */ + @Override + public MutationChunkOrBuilder getChunksOrBuilder(int index) { + return chunks_.get(index); + } + + public static final int DONE_FIELD_NUMBER = 8; + private boolean done_; + /** + * + * + *
+     * When true, indicates that the entire `DataChange` has been read
+     * and the client can safely process the message.
+     * 
+ * + * bool done = 8; + * + * @return The done. + */ + @Override + public boolean getDone() { + return done_; + } + + public static final int TOKEN_FIELD_NUMBER = 9; + private volatile Object token_; + /** + * + * + *
+     * An encoded position for this stream's partition to restart reading from.
+     * This token is for the StreamPartition from the request.
+     * 
+ * + * string token = 9; + * + * @return The token. + */ + @Override + public String getToken() { + Object ref = token_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + * + * + *
+     * An encoded position for this stream's partition to restart reading from.
+     * This token is for the StreamPartition from the request.
+     * 
+ * + * string token = 9; + * + * @return The bytes for token. + */ + @Override + public com.google.protobuf.ByteString getTokenBytes() { + Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOW_WATERMARK_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp lowWatermark_; + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + * + * @return Whether the lowWatermark field is set. + */ + @Override + public boolean hasLowWatermark() { + return lowWatermark_ != null; + } + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + * + * @return The lowWatermark. + */ + @Override + public com.google.protobuf.Timestamp getLowWatermark() { + return lowWatermark_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lowWatermark_; + } + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + @Override + public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { + return getLowWatermark(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ != Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceClusterId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceClusterId_); + } + if (!rowKey_.isEmpty()) { + output.writeBytes(3, rowKey_); + } + if (commitTimestamp_ != null) { + output.writeMessage(4, getCommitTimestamp()); + } + if (tiebreaker_ != 0) { + output.writeInt32(5, tiebreaker_); + } + for (int i = 0; i < chunks_.size(); i++) { + output.writeMessage(6, chunks_.get(i)); + } + if (done_ != false) { + output.writeBool(8, done_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, token_); + } + if (lowWatermark_ != null) { + output.writeMessage(10, getLowWatermark()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceClusterId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceClusterId_); + } + if (!rowKey_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, rowKey_); + } + if (commitTimestamp_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCommitTimestamp()); + } + if (tiebreaker_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, tiebreaker_); + } + for (int i = 0; i < chunks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, chunks_.get(i)); + } + if (done_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, done_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, token_); + } + if (lowWatermark_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLowWatermark()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof DataChange)) { + return super.equals(obj); + } + DataChange other = (DataChange) obj; + + if (type_ != other.type_) return false; + if (!getSourceClusterId().equals(other.getSourceClusterId())) return false; + if (!getRowKey().equals(other.getRowKey())) return false; + if (hasCommitTimestamp() != other.hasCommitTimestamp()) return false; + if (hasCommitTimestamp()) { + if (!getCommitTimestamp().equals(other.getCommitTimestamp())) return false; + } + if (getTiebreaker() != other.getTiebreaker()) return false; + if (!getChunksList().equals(other.getChunksList())) return false; + if (getDone() != other.getDone()) return false; + if (!getToken().equals(other.getToken())) return false; + if (hasLowWatermark() != other.hasLowWatermark()) return false; + if (hasLowWatermark()) { + if (!getLowWatermark().equals(other.getLowWatermark())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + SOURCE_CLUSTER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSourceClusterId().hashCode(); + hash = (37 * hash) + ROW_KEY_FIELD_NUMBER; + hash = (53 * hash) + getRowKey().hashCode(); + if (hasCommitTimestamp()) { + hash = (37 * hash) + COMMIT_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getCommitTimestamp().hashCode(); + } + hash = (37 * hash) + TIEBREAKER_FIELD_NUMBER; + hash = (53 * hash) + getTiebreaker(); + if (getChunksCount() > 0) { + hash = (37 * hash) + CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getChunksList().hashCode(); + } + hash = (37 * hash) + DONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDone()); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (hasLowWatermark()) { + hash = (37 * hash) + LOW_WATERMARK_FIELD_NUMBER; + hash = (53 * hash) + getLowWatermark().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static DataChange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static DataChange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static DataChange parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static DataChange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static DataChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static DataChange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static DataChange parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static DataChange 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 DataChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static DataChange 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 DataChange parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static DataChange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(DataChange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A message corresponding to one or more mutations to the partition
+     * being streamed. A single logical `DataChange` message may also be split
+     * across a sequence of multiple individual messages. Messages other than
+     * the first in a sequence will only have the `type` and `chunks` fields
+     * populated, with the final message in the sequence also containing `done`
+     * set to true.
+     * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.DataChange} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.DataChange) + DataChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable + .ensureFieldAccessorsInitialized(DataChange.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChunksFieldBuilder(); + } + } + + @Override + public Builder clear() { + super.clear(); + type_ = 0; + + sourceClusterId_ = ""; + + rowKey_ = com.google.protobuf.ByteString.EMPTY; + + if (commitTimestampBuilder_ == null) { + commitTimestamp_ = null; + } else { + commitTimestamp_ = null; + commitTimestampBuilder_ = null; + } + tiebreaker_ = 0; + + if (chunksBuilder_ == null) { + chunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + chunksBuilder_.clear(); + } + done_ = false; + + token_ = ""; + + if (lowWatermarkBuilder_ == null) { + lowWatermark_ = null; + } else { + lowWatermark_ = null; + lowWatermarkBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; + } + + @Override + public DataChange getDefaultInstanceForType() { + return DataChange.getDefaultInstance(); + } + + @Override + public DataChange build() { + DataChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public DataChange buildPartial() { + DataChange result = new DataChange(this); + int from_bitField0_ = bitField0_; + result.type_ = type_; + result.sourceClusterId_ = sourceClusterId_; + result.rowKey_ = rowKey_; + if (commitTimestampBuilder_ == null) { + result.commitTimestamp_ = commitTimestamp_; + } else { + result.commitTimestamp_ = commitTimestampBuilder_.build(); + } + result.tiebreaker_ = tiebreaker_; + if (chunksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + chunks_ = java.util.Collections.unmodifiableList(chunks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.chunks_ = chunks_; + } else { + result.chunks_ = chunksBuilder_.build(); + } + result.done_ = done_; + result.token_ = token_; + if (lowWatermarkBuilder_ == null) { + result.lowWatermark_ = lowWatermark_; + } else { + result.lowWatermark_ = lowWatermarkBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof DataChange) { + return mergeFrom((DataChange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(DataChange other) { + if (other == DataChange.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getSourceClusterId().isEmpty()) { + sourceClusterId_ = other.sourceClusterId_; + onChanged(); + } + if (other.getRowKey() != com.google.protobuf.ByteString.EMPTY) { + setRowKey(other.getRowKey()); + } + if (other.hasCommitTimestamp()) { + mergeCommitTimestamp(other.getCommitTimestamp()); + } + if (other.getTiebreaker() != 0) { + setTiebreaker(other.getTiebreaker()); + } + if (chunksBuilder_ == null) { + if (!other.chunks_.isEmpty()) { + if (chunks_.isEmpty()) { + chunks_ = other.chunks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChunksIsMutable(); + chunks_.addAll(other.chunks_); + } + onChanged(); + } + } else { + if (!other.chunks_.isEmpty()) { + if (chunksBuilder_.isEmpty()) { + chunksBuilder_.dispose(); + chunksBuilder_ = null; + chunks_ = other.chunks_; + bitField0_ = (bitField0_ & ~0x00000001); + chunksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChunksFieldBuilder() + : null; + } else { + chunksBuilder_.addAllMessages(other.chunks_); + } + } + } + if (other.getDone() != false) { + setDone(other.getDone()); + } + if (!other.getToken().isEmpty()) { + token_ = other.token_; + onChanged(); + } + if (other.hasLowWatermark()) { + mergeLowWatermark(other.getLowWatermark()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + DataChange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (DataChange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int type_ = 0; + /** + * + * + *
+       * The type of the mutation.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return The enum numeric value on the wire for type. + */ + @Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+       * The type of the mutation.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The type of the mutation.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return The type. + */ + @Override + public Type getType() { + @SuppressWarnings("deprecation") + Type result = Type.valueOf(type_); + return result == null ? Type.UNRECOGNIZED : result; + } + /** + * + * + *
+       * The type of the mutation.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The type of the mutation.
+       * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private Object sourceClusterId_ = ""; + /** + * + * + *
+       * The cluster where the mutation was applied.
+       * Not set when `type` is `GARBAGE_COLLECTION`.
+       * 
+ * + * string source_cluster_id = 2; + * + * @return The sourceClusterId. + */ + public String getSourceClusterId() { + Object ref = sourceClusterId_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + sourceClusterId_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+       * The cluster where the mutation was applied.
+       * Not set when `type` is `GARBAGE_COLLECTION`.
+       * 
+ * + * string source_cluster_id = 2; + * + * @return The bytes for sourceClusterId. + */ + public com.google.protobuf.ByteString getSourceClusterIdBytes() { + Object ref = sourceClusterId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + sourceClusterId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The cluster where the mutation was applied.
+       * Not set when `type` is `GARBAGE_COLLECTION`.
+       * 
+ * + * string source_cluster_id = 2; + * + * @param value The sourceClusterId to set. + * @return This builder for chaining. + */ + public Builder setSourceClusterId(String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceClusterId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The cluster where the mutation was applied.
+       * Not set when `type` is `GARBAGE_COLLECTION`.
+       * 
+ * + * string source_cluster_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearSourceClusterId() { + + sourceClusterId_ = getDefaultInstance().getSourceClusterId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The cluster where the mutation was applied.
+       * Not set when `type` is `GARBAGE_COLLECTION`.
+       * 
+ * + * string source_cluster_id = 2; + * + * @param value The bytes for sourceClusterId to set. + * @return This builder for chaining. + */ + public Builder setSourceClusterIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceClusterId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString rowKey_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+       * The row key for all mutations that are part of this `DataChange`.
+       * If the `DataChange` is chunked across multiple messages, then this field
+       * will only be set for the first message.
+       * 
+ * + * bytes row_key = 3; + * + * @return The rowKey. + */ + @Override + public com.google.protobuf.ByteString getRowKey() { + return rowKey_; + } + /** + * + * + *
+       * The row key for all mutations that are part of this `DataChange`.
+       * If the `DataChange` is chunked across multiple messages, then this field
+       * will only be set for the first message.
+       * 
+ * + * bytes row_key = 3; + * + * @param value The rowKey to set. + * @return This builder for chaining. + */ + public Builder setRowKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + rowKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The row key for all mutations that are part of this `DataChange`.
+       * If the `DataChange` is chunked across multiple messages, then this field
+       * will only be set for the first message.
+       * 
+ * + * bytes row_key = 3; + * + * @return This builder for chaining. + */ + public Builder clearRowKey() { + + rowKey_ = getDefaultInstance().getRowKey(); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp commitTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + commitTimestampBuilder_; + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + * + * @return Whether the commitTimestamp field is set. + */ + public boolean hasCommitTimestamp() { + return commitTimestampBuilder_ != null || commitTimestamp_ != null; + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + * + * @return The commitTimestamp. + */ + public com.google.protobuf.Timestamp getCommitTimestamp() { + if (commitTimestampBuilder_ == null) { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } else { + return commitTimestampBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) { + if (commitTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitTimestamp_ = value; + onChanged(); + } else { + commitTimestampBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (commitTimestampBuilder_ == null) { + commitTimestamp_ = builderForValue.build(); + onChanged(); + } else { + commitTimestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) { + if (commitTimestampBuilder_ == null) { + if (commitTimestamp_ != null) { + commitTimestamp_ = + com.google.protobuf.Timestamp.newBuilder(commitTimestamp_) + .mergeFrom(value) + .buildPartial(); + } else { + commitTimestamp_ = value; + } + onChanged(); + } else { + commitTimestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + public Builder clearCommitTimestamp() { + if (commitTimestampBuilder_ == null) { + commitTimestamp_ = null; + onChanged(); + } else { + commitTimestamp_ = null; + commitTimestampBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() { + + onChanged(); + return getCommitTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { + if (commitTimestampBuilder_ != null) { + return commitTimestampBuilder_.getMessageOrBuilder(); + } else { + return commitTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitTimestamp_; + } + } + /** + * + * + *
+       * The timestamp at which the mutation was applied on the Bigtable server.
+       * 
+ * + * .google.protobuf.Timestamp commit_timestamp = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCommitTimestampFieldBuilder() { + if (commitTimestampBuilder_ == null) { + commitTimestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCommitTimestamp(), getParentForChildren(), isClean()); + commitTimestamp_ = null; + } + return commitTimestampBuilder_; + } + + private int tiebreaker_; + /** + * + * + *
+       * A value that lets stream consumers reconstruct Bigtable's
+       * conflict resolution semantics.
+       * https://cloud.google.com/bigtable/docs/writes#conflict-resolution
+       * In the event that the same row key, column family, column qualifier,
+       * timestamp are modified on different clusters at the same
+       * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the
+       * one chosen for the eventually consistent state of the system.
+       * 
+ * + * int32 tiebreaker = 5; + * + * @return The tiebreaker. + */ + @Override + public int getTiebreaker() { + return tiebreaker_; + } + /** + * + * + *
+       * A value that lets stream consumers reconstruct Bigtable's
+       * conflict resolution semantics.
+       * https://cloud.google.com/bigtable/docs/writes#conflict-resolution
+       * In the event that the same row key, column family, column qualifier,
+       * timestamp are modified on different clusters at the same
+       * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the
+       * one chosen for the eventually consistent state of the system.
+       * 
+ * + * int32 tiebreaker = 5; + * + * @param value The tiebreaker to set. + * @return This builder for chaining. + */ + public Builder setTiebreaker(int value) { + + tiebreaker_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A value that lets stream consumers reconstruct Bigtable's
+       * conflict resolution semantics.
+       * https://cloud.google.com/bigtable/docs/writes#conflict-resolution
+       * In the event that the same row key, column family, column qualifier,
+       * timestamp are modified on different clusters at the same
+       * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the
+       * one chosen for the eventually consistent state of the system.
+       * 
+ * + * int32 tiebreaker = 5; + * + * @return This builder for chaining. + */ + public Builder clearTiebreaker() { + + tiebreaker_ = 0; + onChanged(); + return this; + } + + private java.util.List chunks_ = java.util.Collections.emptyList(); + + private void ensureChunksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + chunks_ = new java.util.ArrayList(chunks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + MutationChunk, MutationChunk.Builder, MutationChunkOrBuilder> + chunksBuilder_; + + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public java.util.List getChunksList() { + if (chunksBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunks_); + } else { + return chunksBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public int getChunksCount() { + if (chunksBuilder_ == null) { + return chunks_.size(); + } else { + return chunksBuilder_.getCount(); + } + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public MutationChunk getChunks(int index) { + if (chunksBuilder_ == null) { + return chunks_.get(index); + } else { + return chunksBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder setChunks(int index, MutationChunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunksIsMutable(); + chunks_.set(index, value); + onChanged(); + } else { + chunksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder setChunks(int index, MutationChunk.Builder builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.set(index, builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder addChunks(MutationChunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunksIsMutable(); + chunks_.add(value); + onChanged(); + } else { + chunksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder addChunks(int index, MutationChunk value) { + if (chunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunksIsMutable(); + chunks_.add(index, value); + onChanged(); + } else { + chunksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder addChunks(MutationChunk.Builder builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder addChunks(int index, MutationChunk.Builder builderForValue) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(index, builderForValue.build()); + onChanged(); + } else { + chunksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder addAllChunks(Iterable values) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunks_); + onChanged(); + } else { + chunksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder clearChunks() { + if (chunksBuilder_ == null) { + chunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + chunksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public Builder removeChunks(int index) { + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.remove(index); + onChanged(); + } else { + chunksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public MutationChunk.Builder getChunksBuilder(int index) { + return getChunksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public MutationChunkOrBuilder getChunksOrBuilder(int index) { + if (chunksBuilder_ == null) { + return chunks_.get(index); + } else { + return chunksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public java.util.List getChunksOrBuilderList() { + if (chunksBuilder_ != null) { + return chunksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(chunks_); + } + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public MutationChunk.Builder addChunksBuilder() { + return getChunksFieldBuilder().addBuilder(MutationChunk.getDefaultInstance()); + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public MutationChunk.Builder addChunksBuilder(int index) { + return getChunksFieldBuilder().addBuilder(index, MutationChunk.getDefaultInstance()); + } + /** + * + * + *
+       * The mutations associated with this change to the partition.
+       * May contain complete mutations or chunks of a multi-message chunked
+       * `DataChange` record.
+       * 
+ * + * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; + * + */ + public java.util.List getChunksBuilderList() { + return getChunksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + MutationChunk, MutationChunk.Builder, MutationChunkOrBuilder> + getChunksFieldBuilder() { + if (chunksBuilder_ == null) { + chunksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + MutationChunk, MutationChunk.Builder, MutationChunkOrBuilder>( + chunks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + chunks_ = null; + } + return chunksBuilder_; + } + + private boolean done_; + /** + * + * + *
+       * When true, indicates that the entire `DataChange` has been read
+       * and the client can safely process the message.
+       * 
+ * + * bool done = 8; + * + * @return The done. + */ + @Override + public boolean getDone() { + return done_; + } + /** + * + * + *
+       * When true, indicates that the entire `DataChange` has been read
+       * and the client can safely process the message.
+       * 
+ * + * bool done = 8; + * + * @param value The done to set. + * @return This builder for chaining. + */ + public Builder setDone(boolean value) { + + done_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * When true, indicates that the entire `DataChange` has been read
+       * and the client can safely process the message.
+       * 
+ * + * bool done = 8; + * + * @return This builder for chaining. + */ + public Builder clearDone() { + + done_ = false; + onChanged(); + return this; + } + + private Object token_ = ""; + /** + * + * + *
+       * An encoded position for this stream's partition to restart reading from.
+       * This token is for the StreamPartition from the request.
+       * 
+ * + * string token = 9; + * + * @return The token. + */ + public String getToken() { + Object ref = token_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+       * An encoded position for this stream's partition to restart reading from.
+       * This token is for the StreamPartition from the request.
+       * 
+ * + * string token = 9; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An encoded position for this stream's partition to restart reading from.
+       * This token is for the StreamPartition from the request.
+       * 
+ * + * string token = 9; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(String value) { + if (value == null) { + throw new NullPointerException(); + } + + token_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * An encoded position for this stream's partition to restart reading from.
+       * This token is for the StreamPartition from the request.
+       * 
+ * + * string token = 9; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * An encoded position for this stream's partition to restart reading from.
+       * This token is for the StreamPartition from the request.
+       * 
+ * + * string token = 9; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + token_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lowWatermark_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lowWatermarkBuilder_; + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + * + * @return Whether the lowWatermark field is set. + */ + public boolean hasLowWatermark() { + return lowWatermarkBuilder_ != null || lowWatermark_ != null; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + * + * @return The lowWatermark. + */ + public com.google.protobuf.Timestamp getLowWatermark() { + if (lowWatermarkBuilder_ == null) { + return lowWatermark_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lowWatermark_; + } else { + return lowWatermarkBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + public Builder setLowWatermark(com.google.protobuf.Timestamp value) { + if (lowWatermarkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lowWatermark_ = value; + onChanged(); + } else { + lowWatermarkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + public Builder setLowWatermark(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lowWatermarkBuilder_ == null) { + lowWatermark_ = builderForValue.build(); + onChanged(); + } else { + lowWatermarkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + public Builder mergeLowWatermark(com.google.protobuf.Timestamp value) { + if (lowWatermarkBuilder_ == null) { + if (lowWatermark_ != null) { + lowWatermark_ = + com.google.protobuf.Timestamp.newBuilder(lowWatermark_) + .mergeFrom(value) + .buildPartial(); + } else { + lowWatermark_ = value; + } + onChanged(); + } else { + lowWatermarkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + public Builder clearLowWatermark() { + if (lowWatermarkBuilder_ == null) { + lowWatermark_ = null; + onChanged(); + } else { + lowWatermark_ = null; + lowWatermarkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + public com.google.protobuf.Timestamp.Builder getLowWatermarkBuilder() { + + onChanged(); + return getLowWatermarkFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { + if (lowWatermarkBuilder_ != null) { + return lowWatermarkBuilder_.getMessageOrBuilder(); + } else { + return lowWatermark_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lowWatermark_; + } + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLowWatermarkFieldBuilder() { + if (lowWatermarkBuilder_ == null) { + lowWatermarkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLowWatermark(), getParentForChildren(), isClean()); + lowWatermark_ = null; + } + return lowWatermarkBuilder_; + } + + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.DataChange) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.DataChange) + private static final DataChange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new DataChange(); + } + + public static DataChange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public DataChange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataChange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public DataChange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HeartbeatOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A token that can be provided to a subsequent `ReadChangeStream` call
+     * to pick up reading at the current stream position.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * + * @return Whether the continuationToken field is set. + */ + boolean hasContinuationToken(); + /** + * + * + *
+     * A token that can be provided to a subsequent `ReadChangeStream` call
+     * to pick up reading at the current stream position.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * + * @return The continuationToken. + */ + StreamContinuationToken getContinuationToken(); + /** + * + * + *
+     * A token that can be provided to a subsequent `ReadChangeStream` call
+     * to pick up reading at the current stream position.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder(); + + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + * + * @return Whether the lowWatermark field is set. + */ + boolean hasLowWatermark(); + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + * + * @return The lowWatermark. + */ + com.google.protobuf.Timestamp getLowWatermark(); + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder(); + } + /** + * + * + *
+   * A periodic message with information that can be used to checkpoint
+   * the state of a stream.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} + */ + public static final class Heartbeat extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + HeartbeatOrBuilder { + private static final long serialVersionUID = 0L; + // Use Heartbeat.newBuilder() to construct. + private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Heartbeat() {} + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new Heartbeat(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Heartbeat( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + StreamContinuationToken.Builder subBuilder = null; + if (continuationToken_ != null) { + subBuilder = continuationToken_.toBuilder(); + } + continuationToken_ = + input.readMessage(StreamContinuationToken.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(continuationToken_); + continuationToken_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lowWatermark_ != null) { + subBuilder = lowWatermark_.toBuilder(); + } + lowWatermark_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lowWatermark_); + lowWatermark_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized(Heartbeat.class, Builder.class); + } + + public static final int CONTINUATION_TOKEN_FIELD_NUMBER = 1; + private StreamContinuationToken continuationToken_; + /** + * + * + *
+     * A token that can be provided to a subsequent `ReadChangeStream` call
+     * to pick up reading at the current stream position.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * + * @return Whether the continuationToken field is set. + */ + @Override + public boolean hasContinuationToken() { + return continuationToken_ != null; + } + /** + * + * + *
+     * A token that can be provided to a subsequent `ReadChangeStream` call
+     * to pick up reading at the current stream position.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * + * @return The continuationToken. + */ + @Override + public StreamContinuationToken getContinuationToken() { + return continuationToken_ == null + ? StreamContinuationToken.getDefaultInstance() + : continuationToken_; + } + /** + * + * + *
+     * A token that can be provided to a subsequent `ReadChangeStream` call
+     * to pick up reading at the current stream position.
+     * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + @Override + public StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { + return getContinuationToken(); + } + + public static final int LOW_WATERMARK_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp lowWatermark_; + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + * + * @return Whether the lowWatermark field is set. + */ + @Override + public boolean hasLowWatermark() { + return lowWatermark_ != null; + } + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + * + * @return The lowWatermark. + */ + @Override + public com.google.protobuf.Timestamp getLowWatermark() { + return lowWatermark_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lowWatermark_; + } + /** + * + * + *
+     * A commit timestamp that is lower than or equal to any timestamp for a
+     * record that will be delivered in the future on the stream. For an example
+     * usage see https://beam.apache.org/documentation/basics/#watermarks
+     * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + @Override + public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { + return getLowWatermark(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (continuationToken_ != null) { + output.writeMessage(1, getContinuationToken()); + } + if (lowWatermark_ != null) { + output.writeMessage(2, getLowWatermark()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (continuationToken_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContinuationToken()); + } + if (lowWatermark_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLowWatermark()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof Heartbeat)) { + return super.equals(obj); + } + Heartbeat other = (Heartbeat) obj; + + if (hasContinuationToken() != other.hasContinuationToken()) return false; + if (hasContinuationToken()) { + if (!getContinuationToken().equals(other.getContinuationToken())) return false; + } + if (hasLowWatermark() != other.hasLowWatermark()) return false; + if (hasLowWatermark()) { + if (!getLowWatermark().equals(other.getLowWatermark())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContinuationToken()) { + hash = (37 * hash) + CONTINUATION_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getContinuationToken().hashCode(); + } + if (hasLowWatermark()) { + hash = (37 * hash) + LOW_WATERMARK_FIELD_NUMBER; + hash = (53 * hash) + getLowWatermark().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static Heartbeat parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static Heartbeat parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static Heartbeat parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static Heartbeat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static Heartbeat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static Heartbeat parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static Heartbeat parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static Heartbeat 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 Heartbeat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static Heartbeat 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 Heartbeat parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static Heartbeat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(Heartbeat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A periodic message with information that can be used to checkpoint
+     * the state of a stream.
+     * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.Heartbeat} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + HeartbeatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized(Heartbeat.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + if (continuationTokenBuilder_ == null) { + continuationToken_ = null; + } else { + continuationToken_ = null; + continuationTokenBuilder_ = null; + } + if (lowWatermarkBuilder_ == null) { + lowWatermark_ = null; + } else { + lowWatermark_ = null; + lowWatermarkBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; + } + + @Override + public Heartbeat getDefaultInstanceForType() { + return Heartbeat.getDefaultInstance(); + } + + @Override + public Heartbeat build() { + Heartbeat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public Heartbeat buildPartial() { + Heartbeat result = new Heartbeat(this); + if (continuationTokenBuilder_ == null) { + result.continuationToken_ = continuationToken_; + } else { + result.continuationToken_ = continuationTokenBuilder_.build(); + } + if (lowWatermarkBuilder_ == null) { + result.lowWatermark_ = lowWatermark_; + } else { + result.lowWatermark_ = lowWatermarkBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof Heartbeat) { + return mergeFrom((Heartbeat) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(Heartbeat other) { + if (other == Heartbeat.getDefaultInstance()) return this; + if (other.hasContinuationToken()) { + mergeContinuationToken(other.getContinuationToken()); + } + if (other.hasLowWatermark()) { + mergeLowWatermark(other.getLowWatermark()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Heartbeat parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (Heartbeat) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private StreamContinuationToken continuationToken_; + private com.google.protobuf.SingleFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder> + continuationTokenBuilder_; + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * + * @return Whether the continuationToken field is set. + */ + public boolean hasContinuationToken() { + return continuationTokenBuilder_ != null || continuationToken_ != null; + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + * + * @return The continuationToken. + */ + public StreamContinuationToken getContinuationToken() { + if (continuationTokenBuilder_ == null) { + return continuationToken_ == null + ? StreamContinuationToken.getDefaultInstance() + : continuationToken_; + } else { + return continuationTokenBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + public Builder setContinuationToken(StreamContinuationToken value) { + if (continuationTokenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + continuationToken_ = value; + onChanged(); + } else { + continuationTokenBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + public Builder setContinuationToken(StreamContinuationToken.Builder builderForValue) { + if (continuationTokenBuilder_ == null) { + continuationToken_ = builderForValue.build(); + onChanged(); + } else { + continuationTokenBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + public Builder mergeContinuationToken(StreamContinuationToken value) { + if (continuationTokenBuilder_ == null) { + if (continuationToken_ != null) { + continuationToken_ = + StreamContinuationToken.newBuilder(continuationToken_) + .mergeFrom(value) + .buildPartial(); + } else { + continuationToken_ = value; + } + onChanged(); + } else { + continuationTokenBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + public Builder clearContinuationToken() { + if (continuationTokenBuilder_ == null) { + continuationToken_ = null; + onChanged(); + } else { + continuationToken_ = null; + continuationTokenBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + public StreamContinuationToken.Builder getContinuationTokenBuilder() { + + onChanged(); + return getContinuationTokenFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + public StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { + if (continuationTokenBuilder_ != null) { + return continuationTokenBuilder_.getMessageOrBuilder(); + } else { + return continuationToken_ == null + ? StreamContinuationToken.getDefaultInstance() + : continuationToken_; + } + } + /** + * + * + *
+       * A token that can be provided to a subsequent `ReadChangeStream` call
+       * to pick up reading at the current stream position.
+       * 
+ * + * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder> + getContinuationTokenFieldBuilder() { + if (continuationTokenBuilder_ == null) { + continuationTokenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder>( + getContinuationToken(), getParentForChildren(), isClean()); + continuationToken_ = null; + } + return continuationTokenBuilder_; + } + + private com.google.protobuf.Timestamp lowWatermark_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lowWatermarkBuilder_; + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + * + * @return Whether the lowWatermark field is set. + */ + public boolean hasLowWatermark() { + return lowWatermarkBuilder_ != null || lowWatermark_ != null; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + * + * @return The lowWatermark. + */ + public com.google.protobuf.Timestamp getLowWatermark() { + if (lowWatermarkBuilder_ == null) { + return lowWatermark_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lowWatermark_; + } else { + return lowWatermarkBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + public Builder setLowWatermark(com.google.protobuf.Timestamp value) { + if (lowWatermarkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lowWatermark_ = value; + onChanged(); + } else { + lowWatermarkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + public Builder setLowWatermark(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lowWatermarkBuilder_ == null) { + lowWatermark_ = builderForValue.build(); + onChanged(); + } else { + lowWatermarkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + public Builder mergeLowWatermark(com.google.protobuf.Timestamp value) { + if (lowWatermarkBuilder_ == null) { + if (lowWatermark_ != null) { + lowWatermark_ = + com.google.protobuf.Timestamp.newBuilder(lowWatermark_) + .mergeFrom(value) + .buildPartial(); + } else { + lowWatermark_ = value; + } + onChanged(); + } else { + lowWatermarkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + public Builder clearLowWatermark() { + if (lowWatermarkBuilder_ == null) { + lowWatermark_ = null; + onChanged(); + } else { + lowWatermark_ = null; + lowWatermarkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + public com.google.protobuf.Timestamp.Builder getLowWatermarkBuilder() { + + onChanged(); + return getLowWatermarkFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { + if (lowWatermarkBuilder_ != null) { + return lowWatermarkBuilder_.getMessageOrBuilder(); + } else { + return lowWatermark_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lowWatermark_; + } + } + /** + * + * + *
+       * A commit timestamp that is lower than or equal to any timestamp for a
+       * record that will be delivered in the future on the stream. For an example
+       * usage see https://beam.apache.org/documentation/basics/#watermarks
+       * 
+ * + * .google.protobuf.Timestamp low_watermark = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLowWatermarkFieldBuilder() { + if (lowWatermarkBuilder_ == null) { + lowWatermarkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLowWatermark(), getParentForChildren(), isClean()); + lowWatermark_ = null; + } + return lowWatermarkBuilder_; + } + + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) + private static final Heartbeat DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new Heartbeat(); + } + + public static Heartbeat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public Heartbeat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Heartbeat(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public Heartbeat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CloseStreamOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The status of the stream.
+     * 
+ * + * .google.rpc.Status status = 1; + * + * @return Whether the status field is set. + */ + boolean hasStatus(); + /** + * + * + *
+     * The status of the stream.
+     * 
+ * + * .google.rpc.Status status = 1; + * + * @return The status. + */ + com.google.rpc.Status getStatus(); + /** + * + * + *
+     * The status of the stream.
+     * 
+ * + * .google.rpc.Status status = 1; + */ + com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + java.util.List getContinuationTokensList(); + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + StreamContinuationToken getContinuationTokens(int index); + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + int getContinuationTokensCount(); + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + java.util.List getContinuationTokensOrBuilderList(); + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index); + } + /** + * + * + *
+   * A message indicating that the client should stop reading from the stream.
+   * If status is OK and `continuation_tokens` is empty, the stream has finished
+   * (for example if there was an `end_time` specified).
+   * If `continuation_tokens` is present, then a change in partitioning requires
+   * the client to open a new stream for each token to resume reading.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.CloseStream} + */ + public static final class CloseStream extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + CloseStreamOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloseStream.newBuilder() to construct. + private CloseStream(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloseStream() { + continuationTokens_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new CloseStream(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloseStream( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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; + case 10: + { + com.google.rpc.Status.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + continuationTokens_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + continuationTokens_.add( + input.readMessage(StreamContinuationToken.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + continuationTokens_ = java.util.Collections.unmodifiableList(continuationTokens_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable + .ensureFieldAccessorsInitialized(CloseStream.class, Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private com.google.rpc.Status status_; + /** + * + * + *
+     * The status of the stream.
+     * 
+ * + * .google.rpc.Status status = 1; + * + * @return Whether the status field is set. + */ + @Override + public boolean hasStatus() { + return status_ != null; + } + /** + * + * + *
+     * The status of the stream.
+     * 
+ * + * .google.rpc.Status status = 1; + * + * @return The status. + */ + @Override + public com.google.rpc.Status getStatus() { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + /** + * + * + *
+     * The status of the stream.
+     * 
+ * + * .google.rpc.Status status = 1; + */ + @Override + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int CONTINUATION_TOKENS_FIELD_NUMBER = 2; + private java.util.List continuationTokens_; + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + @Override + public java.util.List getContinuationTokensList() { + return continuationTokens_; + } + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + @Override + public java.util.List + getContinuationTokensOrBuilderList() { + return continuationTokens_; + } + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + @Override + public int getContinuationTokensCount() { + return continuationTokens_.size(); + } + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + @Override + public StreamContinuationToken getContinuationTokens(int index) { + return continuationTokens_.get(index); + } + /** + * + * + *
+     * If non-empty, contains the information needed to start reading the new
+     * partition(s) that contain segments of this partition's row range.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + @Override + public StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index) { + return continuationTokens_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (status_ != null) { + output.writeMessage(1, getStatus()); + } + for (int i = 0; i < continuationTokens_.size(); i++) { + output.writeMessage(2, continuationTokens_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStatus()); + } + for (int i = 0; i < continuationTokens_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, continuationTokens_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof CloseStream)) { + return super.equals(obj); + } + CloseStream other = (CloseStream) obj; + + if (hasStatus() != other.hasStatus()) return false; + if (hasStatus()) { + if (!getStatus().equals(other.getStatus())) return false; + } + if (!getContinuationTokensList().equals(other.getContinuationTokensList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + if (getContinuationTokensCount() > 0) { + hash = (37 * hash) + CONTINUATION_TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getContinuationTokensList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static CloseStream parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static CloseStream parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static CloseStream parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static CloseStream parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static CloseStream parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static CloseStream parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static CloseStream parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static CloseStream 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 CloseStream parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static CloseStream 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 CloseStream parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static CloseStream parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(CloseStream prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A message indicating that the client should stop reading from the stream.
+     * If status is OK and `continuation_tokens` is empty, the stream has finished
+     * (for example if there was an `end_time` specified).
+     * If `continuation_tokens` is present, then a change in partitioning requires
+     * the client to open a new stream for each token to resume reading.
+     * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse.CloseStream} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + CloseStreamOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable + .ensureFieldAccessorsInitialized(CloseStream.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContinuationTokensFieldBuilder(); + } + } + + @Override + public Builder clear() { + super.clear(); + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + if (continuationTokensBuilder_ == null) { + continuationTokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + continuationTokensBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; + } + + @Override + public CloseStream getDefaultInstanceForType() { + return CloseStream.getDefaultInstance(); + } + + @Override + public CloseStream build() { + CloseStream result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public CloseStream buildPartial() { + CloseStream result = new CloseStream(this); + int from_bitField0_ = bitField0_; + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + if (continuationTokensBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + continuationTokens_ = java.util.Collections.unmodifiableList(continuationTokens_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.continuationTokens_ = continuationTokens_; + } else { + result.continuationTokens_ = continuationTokensBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof CloseStream) { + return mergeFrom((CloseStream) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(CloseStream other) { + if (other == CloseStream.getDefaultInstance()) return this; + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (continuationTokensBuilder_ == null) { + if (!other.continuationTokens_.isEmpty()) { + if (continuationTokens_.isEmpty()) { + continuationTokens_ = other.continuationTokens_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContinuationTokensIsMutable(); + continuationTokens_.addAll(other.continuationTokens_); + } + onChanged(); + } + } else { + if (!other.continuationTokens_.isEmpty()) { + if (continuationTokensBuilder_.isEmpty()) { + continuationTokensBuilder_.dispose(); + continuationTokensBuilder_ = null; + continuationTokens_ = other.continuationTokens_; + bitField0_ = (bitField0_ & ~0x00000001); + continuationTokensBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContinuationTokensFieldBuilder() + : null; + } else { + continuationTokensBuilder_.addAllMessages(other.continuationTokens_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + CloseStream parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (CloseStream) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.rpc.Status status_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + statusBuilder_; + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + * + * @return Whether the status field is set. + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + * + * @return The status. + */ + public com.google.rpc.Status getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder setStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder mergeStatus(com.google.rpc.Status value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public com.google.rpc.Status.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; + } + } + /** + * + * + *
+       * The status of the stream.
+       * 
+ * + * .google.rpc.Status status = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); + status_ = null; + } + return statusBuilder_; + } + + private java.util.List continuationTokens_ = + java.util.Collections.emptyList(); + + private void ensureContinuationTokensIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + continuationTokens_ = + new java.util.ArrayList(continuationTokens_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder> + continuationTokensBuilder_; + + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public java.util.List getContinuationTokensList() { + if (continuationTokensBuilder_ == null) { + return java.util.Collections.unmodifiableList(continuationTokens_); + } else { + return continuationTokensBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public int getContinuationTokensCount() { + if (continuationTokensBuilder_ == null) { + return continuationTokens_.size(); + } else { + return continuationTokensBuilder_.getCount(); + } + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public StreamContinuationToken getContinuationTokens(int index) { + if (continuationTokensBuilder_ == null) { + return continuationTokens_.get(index); + } else { + return continuationTokensBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder setContinuationTokens(int index, StreamContinuationToken value) { + if (continuationTokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContinuationTokensIsMutable(); + continuationTokens_.set(index, value); + onChanged(); + } else { + continuationTokensBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder setContinuationTokens( + int index, StreamContinuationToken.Builder builderForValue) { + if (continuationTokensBuilder_ == null) { + ensureContinuationTokensIsMutable(); + continuationTokens_.set(index, builderForValue.build()); + onChanged(); + } else { + continuationTokensBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder addContinuationTokens(StreamContinuationToken value) { + if (continuationTokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContinuationTokensIsMutable(); + continuationTokens_.add(value); + onChanged(); + } else { + continuationTokensBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder addContinuationTokens(int index, StreamContinuationToken value) { + if (continuationTokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContinuationTokensIsMutable(); + continuationTokens_.add(index, value); + onChanged(); + } else { + continuationTokensBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder addContinuationTokens(StreamContinuationToken.Builder builderForValue) { + if (continuationTokensBuilder_ == null) { + ensureContinuationTokensIsMutable(); + continuationTokens_.add(builderForValue.build()); + onChanged(); + } else { + continuationTokensBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder addContinuationTokens( + int index, StreamContinuationToken.Builder builderForValue) { + if (continuationTokensBuilder_ == null) { + ensureContinuationTokensIsMutable(); + continuationTokens_.add(index, builderForValue.build()); + onChanged(); + } else { + continuationTokensBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder addAllContinuationTokens(Iterable values) { + if (continuationTokensBuilder_ == null) { + ensureContinuationTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, continuationTokens_); + onChanged(); + } else { + continuationTokensBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder clearContinuationTokens() { + if (continuationTokensBuilder_ == null) { + continuationTokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + continuationTokensBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public Builder removeContinuationTokens(int index) { + if (continuationTokensBuilder_ == null) { + ensureContinuationTokensIsMutable(); + continuationTokens_.remove(index); + onChanged(); + } else { + continuationTokensBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public StreamContinuationToken.Builder getContinuationTokensBuilder(int index) { + return getContinuationTokensFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index) { + if (continuationTokensBuilder_ == null) { + return continuationTokens_.get(index); + } else { + return continuationTokensBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public java.util.List + getContinuationTokensOrBuilderList() { + if (continuationTokensBuilder_ != null) { + return continuationTokensBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(continuationTokens_); + } + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public StreamContinuationToken.Builder addContinuationTokensBuilder() { + return getContinuationTokensFieldBuilder() + .addBuilder(StreamContinuationToken.getDefaultInstance()); + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public StreamContinuationToken.Builder addContinuationTokensBuilder(int index) { + return getContinuationTokensFieldBuilder() + .addBuilder(index, StreamContinuationToken.getDefaultInstance()); + } + /** + * + * + *
+       * If non-empty, contains the information needed to start reading the new
+       * partition(s) that contain segments of this partition's row range.
+       * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; + */ + public java.util.List getContinuationTokensBuilderList() { + return getContinuationTokensFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder> + getContinuationTokensFieldBuilder() { + if (continuationTokensBuilder_ == null) { + continuationTokensBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder>( + continuationTokens_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + continuationTokens_ = null; + } + return continuationTokensBuilder_; + } + + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + private static final CloseStream DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new CloseStream(); + } + + public static CloseStream getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public CloseStream parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloseStream(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public CloseStream getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int streamRecordCase_ = 0; + private Object streamRecord_; + + public enum StreamRecordCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { + DATA_CHANGE(1), + HEARTBEAT(2), + CLOSE_STREAM(3), + STREAMRECORD_NOT_SET(0); + private final int value; + + private StreamRecordCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @Deprecated + public static StreamRecordCase valueOf(int value) { + return forNumber(value); + } + + public static StreamRecordCase forNumber(int value) { + switch (value) { + case 1: + return DATA_CHANGE; + case 2: + return HEARTBEAT; + case 3: + return CLOSE_STREAM; + case 0: + return STREAMRECORD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StreamRecordCase getStreamRecordCase() { + return StreamRecordCase.forNumber(streamRecordCase_); + } + + public static final int DATA_CHANGE_FIELD_NUMBER = 1; + /** + * + * + *
+   * A mutation to the partition.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * + * @return Whether the dataChange field is set. + */ + @Override + public boolean hasDataChange() { + return streamRecordCase_ == 1; + } + /** + * + * + *
+   * A mutation to the partition.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * + * @return The dataChange. + */ + @Override + public DataChange getDataChange() { + if (streamRecordCase_ == 1) { + return (DataChange) streamRecord_; + } + return DataChange.getDefaultInstance(); + } + /** + * + * + *
+   * A mutation to the partition.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + @Override + public DataChangeOrBuilder getDataChangeOrBuilder() { + if (streamRecordCase_ == 1) { + return (DataChange) streamRecord_; + } + return DataChange.getDefaultInstance(); + } + + public static final int HEARTBEAT_FIELD_NUMBER = 2; + /** + * + * + *
+   * A periodic heartbeat message.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * + * @return Whether the heartbeat field is set. + */ + @Override + public boolean hasHeartbeat() { + return streamRecordCase_ == 2; + } + /** + * + * + *
+   * A periodic heartbeat message.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * + * @return The heartbeat. + */ + @Override + public Heartbeat getHeartbeat() { + if (streamRecordCase_ == 2) { + return (Heartbeat) streamRecord_; + } + return Heartbeat.getDefaultInstance(); + } + /** + * + * + *
+   * A periodic heartbeat message.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + @Override + public HeartbeatOrBuilder getHeartbeatOrBuilder() { + if (streamRecordCase_ == 2) { + return (Heartbeat) streamRecord_; + } + return Heartbeat.getDefaultInstance(); + } + + public static final int CLOSE_STREAM_FIELD_NUMBER = 3; + /** + * + * + *
+   * An indication that the stream should be closed.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * + * @return Whether the closeStream field is set. + */ + @Override + public boolean hasCloseStream() { + return streamRecordCase_ == 3; + } + /** + * + * + *
+   * An indication that the stream should be closed.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * + * @return The closeStream. + */ + @Override + public CloseStream getCloseStream() { + if (streamRecordCase_ == 3) { + return (CloseStream) streamRecord_; + } + return CloseStream.getDefaultInstance(); + } + /** + * + * + *
+   * An indication that the stream should be closed.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + @Override + public CloseStreamOrBuilder getCloseStreamOrBuilder() { + if (streamRecordCase_ == 3) { + return (CloseStream) streamRecord_; + } + return CloseStream.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (streamRecordCase_ == 1) { + output.writeMessage(1, (DataChange) streamRecord_); + } + if (streamRecordCase_ == 2) { + output.writeMessage(2, (Heartbeat) streamRecord_); + } + if (streamRecordCase_ == 3) { + output.writeMessage(3, (CloseStream) streamRecord_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (streamRecordCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, (DataChange) streamRecord_); + } + if (streamRecordCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, (Heartbeat) streamRecord_); + } + if (streamRecordCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, (CloseStream) streamRecord_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof ReadChangeStreamResponse)) { + return super.equals(obj); + } + ReadChangeStreamResponse other = (ReadChangeStreamResponse) obj; + + if (!getStreamRecordCase().equals(other.getStreamRecordCase())) return false; + switch (streamRecordCase_) { + case 1: + if (!getDataChange().equals(other.getDataChange())) return false; + break; + case 2: + if (!getHeartbeat().equals(other.getHeartbeat())) return false; + break; + case 3: + if (!getCloseStream().equals(other.getCloseStream())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (streamRecordCase_) { + case 1: + hash = (37 * hash) + DATA_CHANGE_FIELD_NUMBER; + hash = (53 * hash) + getDataChange().hashCode(); + break; + case 2: + hash = (37 * hash) + HEARTBEAT_FIELD_NUMBER; + hash = (53 * hash) + getHeartbeat().hashCode(); + break; + case 3: + hash = (37 * hash) + CLOSE_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getCloseStream().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static ReadChangeStreamResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ReadChangeStreamResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ReadChangeStreamResponse parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ReadChangeStreamResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ReadChangeStreamResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static ReadChangeStreamResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static ReadChangeStreamResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ReadChangeStreamResponse 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 ReadChangeStreamResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static ReadChangeStreamResponse 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 ReadChangeStreamResponse parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static ReadChangeStreamResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(ReadChangeStreamResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * Response message for Bigtable.ReadChangeStream.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.ReadChangeStreamResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse) + ReadChangeStreamResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized(ReadChangeStreamResponse.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + streamRecordCase_ = 0; + streamRecord_ = null; + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + } + + @Override + public ReadChangeStreamResponse getDefaultInstanceForType() { + return ReadChangeStreamResponse.getDefaultInstance(); + } + + @Override + public ReadChangeStreamResponse build() { + ReadChangeStreamResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public ReadChangeStreamResponse buildPartial() { + ReadChangeStreamResponse result = new ReadChangeStreamResponse(this); + if (streamRecordCase_ == 1) { + if (dataChangeBuilder_ == null) { + result.streamRecord_ = streamRecord_; + } else { + result.streamRecord_ = dataChangeBuilder_.build(); + } + } + if (streamRecordCase_ == 2) { + if (heartbeatBuilder_ == null) { + result.streamRecord_ = streamRecord_; + } else { + result.streamRecord_ = heartbeatBuilder_.build(); + } + } + if (streamRecordCase_ == 3) { + if (closeStreamBuilder_ == null) { + result.streamRecord_ = streamRecord_; + } else { + result.streamRecord_ = closeStreamBuilder_.build(); + } + } + result.streamRecordCase_ = streamRecordCase_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof ReadChangeStreamResponse) { + return mergeFrom((ReadChangeStreamResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(ReadChangeStreamResponse other) { + if (other == ReadChangeStreamResponse.getDefaultInstance()) return this; + switch (other.getStreamRecordCase()) { + case DATA_CHANGE: + { + mergeDataChange(other.getDataChange()); + break; + } + case HEARTBEAT: + { + mergeHeartbeat(other.getHeartbeat()); + break; + } + case CLOSE_STREAM: + { + mergeCloseStream(other.getCloseStream()); + break; + } + case STREAMRECORD_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + ReadChangeStreamResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (ReadChangeStreamResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int streamRecordCase_ = 0; + private Object streamRecord_; + + public StreamRecordCase getStreamRecordCase() { + return StreamRecordCase.forNumber(streamRecordCase_); + } + + public Builder clearStreamRecord() { + streamRecordCase_ = 0; + streamRecord_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + DataChange, DataChange.Builder, DataChangeOrBuilder> + dataChangeBuilder_; + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * + * @return Whether the dataChange field is set. + */ + @Override + public boolean hasDataChange() { + return streamRecordCase_ == 1; + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * + * @return The dataChange. + */ + @Override + public DataChange getDataChange() { + if (dataChangeBuilder_ == null) { + if (streamRecordCase_ == 1) { + return (DataChange) streamRecord_; + } + return DataChange.getDefaultInstance(); + } else { + if (streamRecordCase_ == 1) { + return dataChangeBuilder_.getMessage(); + } + return DataChange.getDefaultInstance(); + } + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + public Builder setDataChange(DataChange value) { + if (dataChangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamRecord_ = value; + onChanged(); + } else { + dataChangeBuilder_.setMessage(value); + } + streamRecordCase_ = 1; + return this; + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + public Builder setDataChange(DataChange.Builder builderForValue) { + if (dataChangeBuilder_ == null) { + streamRecord_ = builderForValue.build(); + onChanged(); + } else { + dataChangeBuilder_.setMessage(builderForValue.build()); + } + streamRecordCase_ = 1; + return this; + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + public Builder mergeDataChange(DataChange value) { + if (dataChangeBuilder_ == null) { + if (streamRecordCase_ == 1 && streamRecord_ != DataChange.getDefaultInstance()) { + streamRecord_ = + DataChange.newBuilder((DataChange) streamRecord_).mergeFrom(value).buildPartial(); + } else { + streamRecord_ = value; + } + onChanged(); + } else { + if (streamRecordCase_ == 1) { + dataChangeBuilder_.mergeFrom(value); + } else { + dataChangeBuilder_.setMessage(value); + } + } + streamRecordCase_ = 1; + return this; + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + public Builder clearDataChange() { + if (dataChangeBuilder_ == null) { + if (streamRecordCase_ == 1) { + streamRecordCase_ = 0; + streamRecord_ = null; + onChanged(); + } + } else { + if (streamRecordCase_ == 1) { + streamRecordCase_ = 0; + streamRecord_ = null; + } + dataChangeBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + public DataChange.Builder getDataChangeBuilder() { + return getDataChangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + @Override + public DataChangeOrBuilder getDataChangeOrBuilder() { + if ((streamRecordCase_ == 1) && (dataChangeBuilder_ != null)) { + return dataChangeBuilder_.getMessageOrBuilder(); + } else { + if (streamRecordCase_ == 1) { + return (DataChange) streamRecord_; + } + return DataChange.getDefaultInstance(); + } + } + /** + * + * + *
+     * A mutation to the partition.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + DataChange, DataChange.Builder, DataChangeOrBuilder> + getDataChangeFieldBuilder() { + if (dataChangeBuilder_ == null) { + if (!(streamRecordCase_ == 1)) { + streamRecord_ = DataChange.getDefaultInstance(); + } + dataChangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + DataChange, DataChange.Builder, DataChangeOrBuilder>( + (DataChange) streamRecord_, getParentForChildren(), isClean()); + streamRecord_ = null; + } + streamRecordCase_ = 1; + onChanged(); + ; + return dataChangeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + Heartbeat, Heartbeat.Builder, HeartbeatOrBuilder> + heartbeatBuilder_; + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * + * @return Whether the heartbeat field is set. + */ + @Override + public boolean hasHeartbeat() { + return streamRecordCase_ == 2; + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * + * @return The heartbeat. + */ + @Override + public Heartbeat getHeartbeat() { + if (heartbeatBuilder_ == null) { + if (streamRecordCase_ == 2) { + return (Heartbeat) streamRecord_; + } + return Heartbeat.getDefaultInstance(); + } else { + if (streamRecordCase_ == 2) { + return heartbeatBuilder_.getMessage(); + } + return Heartbeat.getDefaultInstance(); + } + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + public Builder setHeartbeat(Heartbeat value) { + if (heartbeatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamRecord_ = value; + onChanged(); + } else { + heartbeatBuilder_.setMessage(value); + } + streamRecordCase_ = 2; + return this; + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + public Builder setHeartbeat(Heartbeat.Builder builderForValue) { + if (heartbeatBuilder_ == null) { + streamRecord_ = builderForValue.build(); + onChanged(); + } else { + heartbeatBuilder_.setMessage(builderForValue.build()); + } + streamRecordCase_ = 2; + return this; + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + public Builder mergeHeartbeat(Heartbeat value) { + if (heartbeatBuilder_ == null) { + if (streamRecordCase_ == 2 && streamRecord_ != Heartbeat.getDefaultInstance()) { + streamRecord_ = + Heartbeat.newBuilder((Heartbeat) streamRecord_).mergeFrom(value).buildPartial(); + } else { + streamRecord_ = value; + } + onChanged(); + } else { + if (streamRecordCase_ == 2) { + heartbeatBuilder_.mergeFrom(value); + } else { + heartbeatBuilder_.setMessage(value); + } + } + streamRecordCase_ = 2; + return this; + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + public Builder clearHeartbeat() { + if (heartbeatBuilder_ == null) { + if (streamRecordCase_ == 2) { + streamRecordCase_ = 0; + streamRecord_ = null; + onChanged(); + } + } else { + if (streamRecordCase_ == 2) { + streamRecordCase_ = 0; + streamRecord_ = null; + } + heartbeatBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + public Heartbeat.Builder getHeartbeatBuilder() { + return getHeartbeatFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + @Override + public HeartbeatOrBuilder getHeartbeatOrBuilder() { + if ((streamRecordCase_ == 2) && (heartbeatBuilder_ != null)) { + return heartbeatBuilder_.getMessageOrBuilder(); + } else { + if (streamRecordCase_ == 2) { + return (Heartbeat) streamRecord_; + } + return Heartbeat.getDefaultInstance(); + } + } + /** + * + * + *
+     * A periodic heartbeat message.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + Heartbeat, Heartbeat.Builder, HeartbeatOrBuilder> + getHeartbeatFieldBuilder() { + if (heartbeatBuilder_ == null) { + if (!(streamRecordCase_ == 2)) { + streamRecord_ = Heartbeat.getDefaultInstance(); + } + heartbeatBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + Heartbeat, Heartbeat.Builder, HeartbeatOrBuilder>( + (Heartbeat) streamRecord_, getParentForChildren(), isClean()); + streamRecord_ = null; + } + streamRecordCase_ = 2; + onChanged(); + ; + return heartbeatBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + CloseStream, CloseStream.Builder, CloseStreamOrBuilder> + closeStreamBuilder_; + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * + * @return Whether the closeStream field is set. + */ + @Override + public boolean hasCloseStream() { + return streamRecordCase_ == 3; + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * + * @return The closeStream. + */ + @Override + public CloseStream getCloseStream() { + if (closeStreamBuilder_ == null) { + if (streamRecordCase_ == 3) { + return (CloseStream) streamRecord_; + } + return CloseStream.getDefaultInstance(); + } else { + if (streamRecordCase_ == 3) { + return closeStreamBuilder_.getMessage(); + } + return CloseStream.getDefaultInstance(); + } + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + public Builder setCloseStream(CloseStream value) { + if (closeStreamBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamRecord_ = value; + onChanged(); + } else { + closeStreamBuilder_.setMessage(value); + } + streamRecordCase_ = 3; + return this; + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + public Builder setCloseStream(CloseStream.Builder builderForValue) { + if (closeStreamBuilder_ == null) { + streamRecord_ = builderForValue.build(); + onChanged(); + } else { + closeStreamBuilder_.setMessage(builderForValue.build()); + } + streamRecordCase_ = 3; + return this; + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + public Builder mergeCloseStream(CloseStream value) { + if (closeStreamBuilder_ == null) { + if (streamRecordCase_ == 3 && streamRecord_ != CloseStream.getDefaultInstance()) { + streamRecord_ = + CloseStream.newBuilder((CloseStream) streamRecord_).mergeFrom(value).buildPartial(); + } else { + streamRecord_ = value; + } + onChanged(); + } else { + if (streamRecordCase_ == 3) { + closeStreamBuilder_.mergeFrom(value); + } else { + closeStreamBuilder_.setMessage(value); + } + } + streamRecordCase_ = 3; + return this; + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + public Builder clearCloseStream() { + if (closeStreamBuilder_ == null) { + if (streamRecordCase_ == 3) { + streamRecordCase_ = 0; + streamRecord_ = null; + onChanged(); + } + } else { + if (streamRecordCase_ == 3) { + streamRecordCase_ = 0; + streamRecord_ = null; + } + closeStreamBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + public CloseStream.Builder getCloseStreamBuilder() { + return getCloseStreamFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + @Override + public CloseStreamOrBuilder getCloseStreamOrBuilder() { + if ((streamRecordCase_ == 3) && (closeStreamBuilder_ != null)) { + return closeStreamBuilder_.getMessageOrBuilder(); + } else { + if (streamRecordCase_ == 3) { + return (CloseStream) streamRecord_; + } + return CloseStream.getDefaultInstance(); + } + } + /** + * + * + *
+     * An indication that the stream should be closed.
+     * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + CloseStream, CloseStream.Builder, CloseStreamOrBuilder> + getCloseStreamFieldBuilder() { + if (closeStreamBuilder_ == null) { + if (!(streamRecordCase_ == 3)) { + streamRecord_ = CloseStream.getDefaultInstance(); + } + closeStreamBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + CloseStream, CloseStream.Builder, CloseStreamOrBuilder>( + (CloseStream) streamRecord_, getParentForChildren(), isClean()); + streamRecord_ = null; + } + streamRecordCase_ = 3; + onChanged(); + ; + return closeStreamBuilder_; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadChangeStreamResponse) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse) + private static final ReadChangeStreamResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new ReadChangeStreamResponse(); + } + + public static ReadChangeStreamResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public ReadChangeStreamResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReadChangeStreamResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public ReadChangeStreamResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java new file mode 100644 index 0000000000..96f0b11d26 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java @@ -0,0 +1,132 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/bigtable.proto + +package com.google.bigtable.v2; + +public interface ReadChangeStreamResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadChangeStreamResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A mutation to the partition.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * + * @return Whether the dataChange field is set. + */ + boolean hasDataChange(); + /** + * + * + *
+   * A mutation to the partition.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + * + * @return The dataChange. + */ + ReadChangeStreamResponse.DataChange getDataChange(); + /** + * + * + *
+   * A mutation to the partition.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; + */ + ReadChangeStreamResponse.DataChangeOrBuilder getDataChangeOrBuilder(); + + /** + * + * + *
+   * A periodic heartbeat message.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * + * @return Whether the heartbeat field is set. + */ + boolean hasHeartbeat(); + /** + * + * + *
+   * A periodic heartbeat message.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + * + * @return The heartbeat. + */ + ReadChangeStreamResponse.Heartbeat getHeartbeat(); + /** + * + * + *
+   * A periodic heartbeat message.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; + */ + ReadChangeStreamResponse.HeartbeatOrBuilder getHeartbeatOrBuilder(); + + /** + * + * + *
+   * An indication that the stream should be closed.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * + * @return Whether the closeStream field is set. + */ + boolean hasCloseStream(); + /** + * + * + *
+   * An indication that the stream should be closed.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + * + * @return The closeStream. + */ + ReadChangeStreamResponse.CloseStream getCloseStream(); + /** + * + * + *
+   * An indication that the stream should be closed.
+   * 
+ * + * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; + */ + ReadChangeStreamResponse.CloseStreamOrBuilder getCloseStreamOrBuilder(); + + public ReadChangeStreamResponse.StreamRecordCase getStreamRecordCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java new file mode 100644 index 0000000000..5ecb0facf6 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationToken.java @@ -0,0 +1,884 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * The information required to continue reading the data from a
+ * `StreamPartition` from where a previous read left off.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.StreamContinuationToken} + */ +public final class StreamContinuationToken extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamContinuationToken) + StreamContinuationTokenOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamContinuationToken.newBuilder() to construct. + private StreamContinuationToken(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamContinuationToken() { + token_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new StreamContinuationToken(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamContinuationToken( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + StreamPartition.Builder subBuilder = null; + if (partition_ != null) { + subBuilder = partition_.toBuilder(); + } + partition_ = input.readMessage(StreamPartition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(partition_); + partition_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + String s = input.readStringRequireUtf8(); + + token_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 DataProto.internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable + .ensureFieldAccessorsInitialized(StreamContinuationToken.class, Builder.class); + } + + public static final int PARTITION_FIELD_NUMBER = 1; + private StreamPartition partition_; + /** + * + * + *
+   * The partition that this token applies to.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return Whether the partition field is set. + */ + @Override + public boolean hasPartition() { + return partition_ != null; + } + /** + * + * + *
+   * The partition that this token applies to.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return The partition. + */ + @Override + public StreamPartition getPartition() { + return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + } + /** + * + * + *
+   * The partition that this token applies to.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + @Override + public StreamPartitionOrBuilder getPartitionOrBuilder() { + return getPartition(); + } + + public static final int TOKEN_FIELD_NUMBER = 2; + private volatile Object token_; + /** + * + * + *
+   * An encoded position in the stream to restart reading from.
+   * 
+ * + * string token = 2; + * + * @return The token. + */ + @Override + public String getToken() { + Object ref = token_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + * + * + *
+   * An encoded position in the stream to restart reading from.
+   * 
+ * + * string token = 2; + * + * @return The bytes for token. + */ + @Override + public com.google.protobuf.ByteString getTokenBytes() { + Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (partition_ != null) { + output.writeMessage(1, getPartition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, token_); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (partition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPartition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, token_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof StreamContinuationToken)) { + return super.equals(obj); + } + StreamContinuationToken other = (StreamContinuationToken) obj; + + if (hasPartition() != other.hasPartition()) return false; + if (hasPartition()) { + if (!getPartition().equals(other.getPartition())) return false; + } + if (!getToken().equals(other.getToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPartition()) { + hash = (37 * hash) + PARTITION_FIELD_NUMBER; + hash = (53 * hash) + getPartition().hashCode(); + } + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static StreamContinuationToken parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamContinuationToken parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamContinuationToken parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamContinuationToken parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamContinuationToken parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamContinuationToken parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamContinuationToken parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static StreamContinuationToken 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 StreamContinuationToken parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static StreamContinuationToken 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 StreamContinuationToken parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static StreamContinuationToken parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(StreamContinuationToken prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * The information required to continue reading the data from a
+   * `StreamPartition` from where a previous read left off.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.StreamContinuationToken} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.StreamContinuationToken) + StreamContinuationTokenOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationToken_fieldAccessorTable + .ensureFieldAccessorsInitialized(StreamContinuationToken.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.StreamContinuationToken.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + if (partitionBuilder_ == null) { + partition_ = null; + } else { + partition_ = null; + partitionBuilder_ = null; + } + token_ = ""; + + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationToken_descriptor; + } + + @Override + public StreamContinuationToken getDefaultInstanceForType() { + return StreamContinuationToken.getDefaultInstance(); + } + + @Override + public StreamContinuationToken build() { + StreamContinuationToken result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public StreamContinuationToken buildPartial() { + StreamContinuationToken result = new StreamContinuationToken(this); + if (partitionBuilder_ == null) { + result.partition_ = partition_; + } else { + result.partition_ = partitionBuilder_.build(); + } + result.token_ = token_; + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof StreamContinuationToken) { + return mergeFrom((StreamContinuationToken) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(StreamContinuationToken other) { + if (other == StreamContinuationToken.getDefaultInstance()) return this; + if (other.hasPartition()) { + mergePartition(other.getPartition()); + } + if (!other.getToken().isEmpty()) { + token_ = other.token_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + StreamContinuationToken parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (StreamContinuationToken) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private StreamPartition partition_; + private com.google.protobuf.SingleFieldBuilderV3< + StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder> + partitionBuilder_; + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return Whether the partition field is set. + */ + public boolean hasPartition() { + return partitionBuilder_ != null || partition_ != null; + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return The partition. + */ + public StreamPartition getPartition() { + if (partitionBuilder_ == null) { + return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + } else { + return partitionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder setPartition(StreamPartition value) { + if (partitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partition_ = value; + onChanged(); + } else { + partitionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder setPartition(StreamPartition.Builder builderForValue) { + if (partitionBuilder_ == null) { + partition_ = builderForValue.build(); + onChanged(); + } else { + partitionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder mergePartition(StreamPartition value) { + if (partitionBuilder_ == null) { + if (partition_ != null) { + partition_ = StreamPartition.newBuilder(partition_).mergeFrom(value).buildPartial(); + } else { + partition_ = value; + } + onChanged(); + } else { + partitionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public Builder clearPartition() { + if (partitionBuilder_ == null) { + partition_ = null; + onChanged(); + } else { + partition_ = null; + partitionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public StreamPartition.Builder getPartitionBuilder() { + + onChanged(); + return getPartitionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + public StreamPartitionOrBuilder getPartitionOrBuilder() { + if (partitionBuilder_ != null) { + return partitionBuilder_.getMessageOrBuilder(); + } else { + return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + } + } + /** + * + * + *
+     * The partition that this token applies to.
+     * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder> + getPartitionFieldBuilder() { + if (partitionBuilder_ == null) { + partitionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder>( + getPartition(), getParentForChildren(), isClean()); + partition_ = null; + } + return partitionBuilder_; + } + + private Object token_ = ""; + /** + * + * + *
+     * An encoded position in the stream to restart reading from.
+     * 
+ * + * string token = 2; + * + * @return The token. + */ + public String getToken() { + Object ref = token_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * + * + *
+     * An encoded position in the stream to restart reading from.
+     * 
+ * + * string token = 2; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An encoded position in the stream to restart reading from.
+     * 
+ * + * string token = 2; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(String value) { + if (value == null) { + throw new NullPointerException(); + } + + token_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An encoded position in the stream to restart reading from.
+     * 
+ * + * string token = 2; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * An encoded position in the stream to restart reading from.
+     * 
+ * + * string token = 2; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + token_ = value; + onChanged(); + return this; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.StreamContinuationToken) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.StreamContinuationToken) + private static final StreamContinuationToken DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new StreamContinuationToken(); + } + + public static StreamContinuationToken getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public StreamContinuationToken parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamContinuationToken(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public StreamContinuationToken getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java new file mode 100644 index 0000000000..4bb2598892 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokenOrBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +package com.google.bigtable.v2; + +public interface StreamContinuationTokenOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.StreamContinuationToken) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The partition that this token applies to.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return Whether the partition field is set. + */ + boolean hasPartition(); + /** + * + * + *
+   * The partition that this token applies to.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + * + * @return The partition. + */ + StreamPartition getPartition(); + /** + * + * + *
+   * The partition that this token applies to.
+   * 
+ * + * .google.bigtable.v2.StreamPartition partition = 1; + */ + StreamPartitionOrBuilder getPartitionOrBuilder(); + + /** + * + * + *
+   * An encoded position in the stream to restart reading from.
+   * 
+ * + * string token = 2; + * + * @return The token. + */ + String getToken(); + /** + * + * + *
+   * An encoded position in the stream to restart reading from.
+   * 
+ * + * string token = 2; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java new file mode 100644 index 0000000000..3161bf7759 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokens.java @@ -0,0 +1,929 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * The information required to continue reading the data from multiple
+ * `StreamPartitions` from where a previous read left off.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.StreamContinuationTokens} + */ +public final class StreamContinuationTokens extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamContinuationTokens) + StreamContinuationTokensOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamContinuationTokens.newBuilder() to construct. + private StreamContinuationTokens(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamContinuationTokens() { + tokens_ = java.util.Collections.emptyList(); + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new StreamContinuationTokens(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamContinuationTokens( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new 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; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tokens_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tokens_.add(input.readMessage(StreamContinuationToken.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tokens_ = java.util.Collections.unmodifiableList(tokens_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable + .ensureFieldAccessorsInitialized(StreamContinuationTokens.class, Builder.class); + } + + public static final int TOKENS_FIELD_NUMBER = 1; + private java.util.List tokens_; + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + @Override + public java.util.List getTokensList() { + return tokens_; + } + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + @Override + public java.util.List getTokensOrBuilderList() { + return tokens_; + } + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + @Override + public int getTokensCount() { + return tokens_.size(); + } + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + @Override + public StreamContinuationToken getTokens(int index) { + return tokens_.get(index); + } + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + @Override + public StreamContinuationTokenOrBuilder getTokensOrBuilder(int index) { + return tokens_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tokens_.size(); i++) { + output.writeMessage(1, tokens_.get(i)); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tokens_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tokens_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof StreamContinuationTokens)) { + return super.equals(obj); + } + StreamContinuationTokens other = (StreamContinuationTokens) obj; + + if (!getTokensList().equals(other.getTokensList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTokensCount() > 0) { + hash = (37 * hash) + TOKENS_FIELD_NUMBER; + hash = (53 * hash) + getTokensList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static StreamContinuationTokens parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamContinuationTokens parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamContinuationTokens parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamContinuationTokens parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamContinuationTokens parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamContinuationTokens parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamContinuationTokens parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static StreamContinuationTokens 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 StreamContinuationTokens parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static StreamContinuationTokens 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 StreamContinuationTokens parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static StreamContinuationTokens parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(StreamContinuationTokens prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * The information required to continue reading the data from multiple
+   * `StreamPartitions` from where a previous read left off.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.StreamContinuationTokens} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.StreamContinuationTokens) + StreamContinuationTokensOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return DataProto + .internal_static_google_bigtable_v2_StreamContinuationTokens_fieldAccessorTable + .ensureFieldAccessorsInitialized(StreamContinuationTokens.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.StreamContinuationTokens.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTokensFieldBuilder(); + } + } + + @Override + public Builder clear() { + super.clear(); + if (tokensBuilder_ == null) { + tokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tokensBuilder_.clear(); + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return DataProto.internal_static_google_bigtable_v2_StreamContinuationTokens_descriptor; + } + + @Override + public StreamContinuationTokens getDefaultInstanceForType() { + return StreamContinuationTokens.getDefaultInstance(); + } + + @Override + public StreamContinuationTokens build() { + StreamContinuationTokens result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public StreamContinuationTokens buildPartial() { + StreamContinuationTokens result = new StreamContinuationTokens(this); + int from_bitField0_ = bitField0_; + if (tokensBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tokens_ = java.util.Collections.unmodifiableList(tokens_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tokens_ = tokens_; + } else { + result.tokens_ = tokensBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof StreamContinuationTokens) { + return mergeFrom((StreamContinuationTokens) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(StreamContinuationTokens other) { + if (other == StreamContinuationTokens.getDefaultInstance()) return this; + if (tokensBuilder_ == null) { + if (!other.tokens_.isEmpty()) { + if (tokens_.isEmpty()) { + tokens_ = other.tokens_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTokensIsMutable(); + tokens_.addAll(other.tokens_); + } + onChanged(); + } + } else { + if (!other.tokens_.isEmpty()) { + if (tokensBuilder_.isEmpty()) { + tokensBuilder_.dispose(); + tokensBuilder_ = null; + tokens_ = other.tokens_; + bitField0_ = (bitField0_ & ~0x00000001); + tokensBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTokensFieldBuilder() + : null; + } else { + tokensBuilder_.addAllMessages(other.tokens_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + StreamContinuationTokens parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (StreamContinuationTokens) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List tokens_ = java.util.Collections.emptyList(); + + private void ensureTokensIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tokens_ = new java.util.ArrayList(tokens_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder> + tokensBuilder_; + + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public java.util.List getTokensList() { + if (tokensBuilder_ == null) { + return java.util.Collections.unmodifiableList(tokens_); + } else { + return tokensBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public int getTokensCount() { + if (tokensBuilder_ == null) { + return tokens_.size(); + } else { + return tokensBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public StreamContinuationToken getTokens(int index) { + if (tokensBuilder_ == null) { + return tokens_.get(index); + } else { + return tokensBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder setTokens(int index, StreamContinuationToken value) { + if (tokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.set(index, value); + onChanged(); + } else { + tokensBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder setTokens(int index, StreamContinuationToken.Builder builderForValue) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.set(index, builderForValue.build()); + onChanged(); + } else { + tokensBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder addTokens(StreamContinuationToken value) { + if (tokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.add(value); + onChanged(); + } else { + tokensBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder addTokens(int index, StreamContinuationToken value) { + if (tokensBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokensIsMutable(); + tokens_.add(index, value); + onChanged(); + } else { + tokensBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder addTokens(StreamContinuationToken.Builder builderForValue) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.add(builderForValue.build()); + onChanged(); + } else { + tokensBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder addTokens(int index, StreamContinuationToken.Builder builderForValue) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.add(index, builderForValue.build()); + onChanged(); + } else { + tokensBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder addAllTokens(Iterable values) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); + onChanged(); + } else { + tokensBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder clearTokens() { + if (tokensBuilder_ == null) { + tokens_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tokensBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public Builder removeTokens(int index) { + if (tokensBuilder_ == null) { + ensureTokensIsMutable(); + tokens_.remove(index); + onChanged(); + } else { + tokensBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public StreamContinuationToken.Builder getTokensBuilder(int index) { + return getTokensFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public StreamContinuationTokenOrBuilder getTokensOrBuilder(int index) { + if (tokensBuilder_ == null) { + return tokens_.get(index); + } else { + return tokensBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public java.util.List getTokensOrBuilderList() { + if (tokensBuilder_ != null) { + return tokensBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tokens_); + } + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public StreamContinuationToken.Builder addTokensBuilder() { + return getTokensFieldBuilder().addBuilder(StreamContinuationToken.getDefaultInstance()); + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public StreamContinuationToken.Builder addTokensBuilder(int index) { + return getTokensFieldBuilder() + .addBuilder(index, StreamContinuationToken.getDefaultInstance()); + } + /** + * + * + *
+     * List of continuation tokens.
+     * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + public java.util.List getTokensBuilderList() { + return getTokensFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder> + getTokensFieldBuilder() { + if (tokensBuilder_ == null) { + tokensBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + StreamContinuationToken, + StreamContinuationToken.Builder, + StreamContinuationTokenOrBuilder>( + tokens_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tokens_ = null; + } + return tokensBuilder_; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.StreamContinuationTokens) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.StreamContinuationTokens) + private static final StreamContinuationTokens DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new StreamContinuationTokens(); + } + + public static StreamContinuationTokens getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public StreamContinuationTokens parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamContinuationTokens(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public StreamContinuationTokens getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java new file mode 100644 index 0000000000..091c4687e1 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamContinuationTokensOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +package com.google.bigtable.v2; + +public interface StreamContinuationTokensOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.StreamContinuationTokens) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + java.util.List getTokensList(); + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + StreamContinuationToken getTokens(int index); + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + int getTokensCount(); + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + java.util.List getTokensOrBuilderList(); + /** + * + * + *
+   * List of continuation tokens.
+   * 
+ * + * repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; + */ + StreamContinuationTokenOrBuilder getTokensOrBuilder(int index); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java new file mode 100644 index 0000000000..612515c39a --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartition.java @@ -0,0 +1,712 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +package com.google.bigtable.v2; + +/** + * + * + *
+ * NOTE: This API is not generally available. Users must be allowlisted.
+ * A partition of a change stream.
+ * 
+ * + * Protobuf type {@code google.bigtable.v2.StreamPartition} + */ +public final class StreamPartition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.StreamPartition) + StreamPartitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamPartition.newBuilder() to construct. + private StreamPartition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamPartition() {} + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance(UnusedPrivateParameter unused) { + return new StreamPartition(); + } + + @Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StreamPartition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + RowRange.Builder subBuilder = null; + if (rowRange_ != null) { + subBuilder = rowRange_.toBuilder(); + } + rowRange_ = input.readMessage(RowRange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rowRange_); + rowRange_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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 DataProto.internal_static_google_bigtable_v2_StreamPartition_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return DataProto.internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized(StreamPartition.class, Builder.class); + } + + public static final int ROW_RANGE_FIELD_NUMBER = 1; + private RowRange rowRange_; + /** + * + * + *
+   * The row range covered by this partition and is specified by
+   * [`start_key_closed`, `end_key_open`).
+   * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + * + * @return Whether the rowRange field is set. + */ + @Override + public boolean hasRowRange() { + return rowRange_ != null; + } + /** + * + * + *
+   * The row range covered by this partition and is specified by
+   * [`start_key_closed`, `end_key_open`).
+   * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + * + * @return The rowRange. + */ + @Override + public RowRange getRowRange() { + return rowRange_ == null ? RowRange.getDefaultInstance() : rowRange_; + } + /** + * + * + *
+   * The row range covered by this partition and is specified by
+   * [`start_key_closed`, `end_key_open`).
+   * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + @Override + public RowRangeOrBuilder getRowRangeOrBuilder() { + return getRowRange(); + } + + private byte memoizedIsInitialized = -1; + + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rowRange_ != null) { + output.writeMessage(1, getRowRange()); + } + unknownFields.writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rowRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRowRange()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof StreamPartition)) { + return super.equals(obj); + } + StreamPartition other = (StreamPartition) obj; + + if (hasRowRange() != other.hasRowRange()) return false; + if (hasRowRange()) { + if (!getRowRange().equals(other.getRowRange())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRowRange()) { + hash = (37 * hash) + ROW_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getRowRange().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static StreamPartition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamPartition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamPartition parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamPartition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamPartition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static StreamPartition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static StreamPartition parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static StreamPartition 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 StreamPartition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static StreamPartition 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 StreamPartition parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static StreamPartition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(StreamPartition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType(BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * NOTE: This API is not generally available. Users must be allowlisted.
+   * A partition of a change stream.
+   * 
+ * + * Protobuf type {@code google.bigtable.v2.StreamPartition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.StreamPartition) + StreamPartitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return DataProto.internal_static_google_bigtable_v2_StreamPartition_descriptor; + } + + @Override + protected FieldAccessorTable internalGetFieldAccessorTable() { + return DataProto.internal_static_google_bigtable_v2_StreamPartition_fieldAccessorTable + .ensureFieldAccessorsInitialized(StreamPartition.class, Builder.class); + } + + // Construct using com.google.bigtable.v2.StreamPartition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @Override + public Builder clear() { + super.clear(); + if (rowRangeBuilder_ == null) { + rowRange_ = null; + } else { + rowRange_ = null; + rowRangeBuilder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return DataProto.internal_static_google_bigtable_v2_StreamPartition_descriptor; + } + + @Override + public StreamPartition getDefaultInstanceForType() { + return StreamPartition.getDefaultInstance(); + } + + @Override + public StreamPartition build() { + StreamPartition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public StreamPartition buildPartial() { + StreamPartition result = new StreamPartition(this); + if (rowRangeBuilder_ == null) { + result.rowRange_ = rowRange_; + } else { + result.rowRange_ = rowRangeBuilder_.build(); + } + onBuilt(); + return result; + } + + @Override + public Builder clone() { + return super.clone(); + } + + @Override + public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.setField(field, value); + } + + @Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + return super.setRepeatedField(field, index, value); + } + + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + return super.addRepeatedField(field, value); + } + + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof StreamPartition) { + return mergeFrom((StreamPartition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(StreamPartition other) { + if (other == StreamPartition.getDefaultInstance()) return this; + if (other.hasRowRange()) { + mergeRowRange(other.getRowRange()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + StreamPartition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (StreamPartition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private RowRange rowRange_; + private com.google.protobuf.SingleFieldBuilderV3 + rowRangeBuilder_; + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + * + * @return Whether the rowRange field is set. + */ + public boolean hasRowRange() { + return rowRangeBuilder_ != null || rowRange_ != null; + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + * + * @return The rowRange. + */ + public RowRange getRowRange() { + if (rowRangeBuilder_ == null) { + return rowRange_ == null ? RowRange.getDefaultInstance() : rowRange_; + } else { + return rowRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + public Builder setRowRange(RowRange value) { + if (rowRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rowRange_ = value; + onChanged(); + } else { + rowRangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + public Builder setRowRange(RowRange.Builder builderForValue) { + if (rowRangeBuilder_ == null) { + rowRange_ = builderForValue.build(); + onChanged(); + } else { + rowRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + public Builder mergeRowRange(RowRange value) { + if (rowRangeBuilder_ == null) { + if (rowRange_ != null) { + rowRange_ = RowRange.newBuilder(rowRange_).mergeFrom(value).buildPartial(); + } else { + rowRange_ = value; + } + onChanged(); + } else { + rowRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + public Builder clearRowRange() { + if (rowRangeBuilder_ == null) { + rowRange_ = null; + onChanged(); + } else { + rowRange_ = null; + rowRangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + public RowRange.Builder getRowRangeBuilder() { + + onChanged(); + return getRowRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + public RowRangeOrBuilder getRowRangeOrBuilder() { + if (rowRangeBuilder_ != null) { + return rowRangeBuilder_.getMessageOrBuilder(); + } else { + return rowRange_ == null ? RowRange.getDefaultInstance() : rowRange_; + } + } + /** + * + * + *
+     * The row range covered by this partition and is specified by
+     * [`start_key_closed`, `end_key_open`).
+     * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3 + getRowRangeFieldBuilder() { + if (rowRangeBuilder_ == null) { + rowRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + RowRange, RowRange.Builder, RowRangeOrBuilder>( + getRowRange(), getParentForChildren(), isClean()); + rowRange_ = null; + } + return rowRangeBuilder_; + } + + @Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.StreamPartition) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.StreamPartition) + private static final StreamPartition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new StreamPartition(); + } + + public static StreamPartition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @Override + public StreamPartition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamPartition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @Override + public StreamPartition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java new file mode 100644 index 0000000000..0ea28ebae1 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/StreamPartitionOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/data.proto + +package com.google.bigtable.v2; + +public interface StreamPartitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.StreamPartition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The row range covered by this partition and is specified by
+   * [`start_key_closed`, `end_key_open`).
+   * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + * + * @return Whether the rowRange field is set. + */ + boolean hasRowRange(); + /** + * + * + *
+   * The row range covered by this partition and is specified by
+   * [`start_key_closed`, `end_key_open`).
+   * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + * + * @return The rowRange. + */ + RowRange getRowRange(); + /** + * + * + *
+   * The row range covered by this partition and is specified by
+   * [`start_key_closed`, `end_key_open`).
+   * 
+ * + * .google.bigtable.v2.RowRange row_range = 1; + */ + RowRangeOrBuilder getRowRangeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto index 215b573cbd..a99bb410a1 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto @@ -22,6 +22,8 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/api/routing.proto"; import "google/bigtable/v2/data.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/rpc/status.proto"; @@ -198,6 +200,34 @@ service Bigtable { option (google.api.method_signature) = "table_name,row_key,rules"; option (google.api.method_signature) = "table_name,row_key,rules,app_profile_id"; } + + // NOTE: This API is not generally available. Users must be allowlisted. + // Returns the current list of partitions that make up the table's + // change stream. The union of partitions will cover the entire keyspace. + // Partitions can be read with `ReadChangeStream`. + rpc ListChangeStreamPartitions(ListChangeStreamPartitionsRequest) + returns (stream ListChangeStreamPartitionsResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:listChangeStreamPartitions" + body: "*" + }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; + } + + // NOTE: This API is not generally available. Users must be allowlisted. + // Reads changes from a table's change stream. Changes will + // reflect both user-initiated mutations and mutations that are caused by + // garbage collection. + rpc ReadChangeStream(ReadChangeStreamRequest) + returns (stream ReadChangeStreamResponse) { + option (google.api.http) = { + post: "/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream" + body: "*" + }; + option (google.api.method_signature) = "table_name"; + option (google.api.method_signature) = "table_name,app_profile_id"; + } } // Request message for Bigtable.ReadRows. @@ -526,3 +556,219 @@ message ReadModifyWriteRowResponse { // A Row containing the new contents of all cells modified by the request. Row row = 1; } + +// NOTE: This API is not generally available. Users must be allowlisted. +// Request message for Bigtable.ListChangeStreamPartitions. +message ListChangeStreamPartitionsRequest { + // Required. The unique name of the table from which to get change stream + // partitions. Values are of the form + // `projects//instances//tables/`. + // Change streaming must be enabled on the table. + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + // Single cluster routing must be configured on the profile. + string app_profile_id = 2; +} + +// NOTE: This API is not generally available. Users must be allowlisted. +// Response message for Bigtable.ListChangeStreamPartitions. +message ListChangeStreamPartitionsResponse { + // A partition of the change stream. + StreamPartition partition = 1; +} + +// NOTE: This API is not generally available. Users must be allowlisted. +// Request message for Bigtable.ReadChangeStream. +message ReadChangeStreamRequest { + // Required. The unique name of the table from which to read a change stream. + // Values are of the form + // `projects//instances//tables/
`. + // Change streaming must be enabled on the table. + string table_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigtableadmin.googleapis.com/Table" + } + ]; + + // This value specifies routing for replication. If not specified, the + // "default" application profile will be used. + // Single cluster routing must be configured on the profile. + string app_profile_id = 2; + + // The partition to read changes from. + StreamPartition partition = 3; + + // Options for describing where we want to start reading from the stream. + oneof start_from { + // Start reading the stream at the specified timestamp. This timestamp must + // be within the change stream retention period, less than or equal to the + // current time, and after change stream creation, whichever is greater. + // This value is inclusive and will be truncated to microsecond granularity. + google.protobuf.Timestamp start_time = 4; + + // Tokens that describe how to resume reading a stream where reading + // previously left off. If specified, changes will be read starting at the + // the position. Tokens are delivered on the stream as part of `Heartbeat` + // and `CloseStream` messages. + // + // If a single token is provided, the token’s partition must exactly match + // the request’s partition. If multiple tokens are provided, as in the case + // of a partition merge, the union of the token partitions must exactly + // cover the request’s partition. Otherwise, INVALID_ARGUMENT will be + // returned. + StreamContinuationTokens continuation_tokens = 6; + } + + // If specified, OK will be returned when the stream advances beyond + // this time. Otherwise, changes will be continuously delivered on the stream. + // This value is inclusive and will be truncated to microsecond granularity. + google.protobuf.Timestamp end_time = 5; + + // If specified, the duration between `Heartbeat` messages on the stream. + // Otherwise, defaults to 5 seconds. + google.protobuf.Duration heartbeat_duration = 7; +} + +// NOTE: This API is not generally available. Users must be allowlisted. +// Response message for Bigtable.ReadChangeStream. +message ReadChangeStreamResponse { + // A partial or complete mutation. + message MutationChunk { + // Information about the chunking of this mutation. + // Only `SetCell` mutations can be chunked, and all chunks for a `SetCell` + // will be delivered contiguously with no other mutation types interleaved. + message ChunkInfo { + // The total value size of all the chunks that make up the `SetCell`. + int32 chunked_value_size = 1; + + // The byte offset of this chunk into the total value size of the + // mutation. + int32 chunked_value_offset = 2; + + // When true, this is the last chunk of a chunked `SetCell`. + bool last_chunk = 3; + } + + // If set, then the mutation is a `SetCell` with a chunked value across + // multiple messages. + ChunkInfo chunk_info = 1; + + // If this is a continuation of a chunked message (`chunked_value_offset` > + // 0), ignore all fields except the `SetCell`'s value and merge it with + // the previous message by concatenating the value fields. + Mutation mutation = 2; + } + + // A message corresponding to one or more mutations to the partition + // being streamed. A single logical `DataChange` message may also be split + // across a sequence of multiple individual messages. Messages other than + // the first in a sequence will only have the `type` and `chunks` fields + // populated, with the final message in the sequence also containing `done` + // set to true. + message DataChange { + // The type of mutation. + enum Type { + // The type is unspecified. + TYPE_UNSPECIFIED = 0; + + // A user-initiated mutation. + USER = 1; + + // A system-initiated mutation as part of garbage collection. + // https://cloud.google.com/bigtable/docs/garbage-collection + GARBAGE_COLLECTION = 2; + + // This is a continuation of a multi-message change. + CONTINUATION = 3; + } + + // The type of the mutation. + Type type = 1; + + // The cluster where the mutation was applied. + // Not set when `type` is `GARBAGE_COLLECTION`. + string source_cluster_id = 2; + + // The row key for all mutations that are part of this `DataChange`. + // If the `DataChange` is chunked across multiple messages, then this field + // will only be set for the first message. + bytes row_key = 3; + + // The timestamp at which the mutation was applied on the Bigtable server. + google.protobuf.Timestamp commit_timestamp = 4; + + // A value that lets stream consumers reconstruct Bigtable's + // conflict resolution semantics. + // https://cloud.google.com/bigtable/docs/writes#conflict-resolution + // In the event that the same row key, column family, column qualifier, + // timestamp are modified on different clusters at the same + // `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + // one chosen for the eventually consistent state of the system. + int32 tiebreaker = 5; + + // The mutations associated with this change to the partition. + // May contain complete mutations or chunks of a multi-message chunked + // `DataChange` record. + repeated MutationChunk chunks = 6; + + // When true, indicates that the entire `DataChange` has been read + // and the client can safely process the message. + bool done = 8; + + // An encoded position for this stream's partition to restart reading from. + // This token is for the StreamPartition from the request. + string token = 9; + + // A commit timestamp that is lower than or equal to any timestamp for a + // record that will be delivered in the future on the stream. For an example + // usage see https://beam.apache.org/documentation/basics/#watermarks + google.protobuf.Timestamp low_watermark = 10; + } + + // A periodic message with information that can be used to checkpoint + // the state of a stream. + message Heartbeat { + // A token that can be provided to a subsequent `ReadChangeStream` call + // to pick up reading at the current stream position. + StreamContinuationToken continuation_token = 1; + + // A commit timestamp that is lower than or equal to any timestamp for a + // record that will be delivered in the future on the stream. For an example + // usage see https://beam.apache.org/documentation/basics/#watermarks + google.protobuf.Timestamp low_watermark = 2; + } + + // A message indicating that the client should stop reading from the stream. + // If status is OK and `continuation_tokens` is empty, the stream has finished + // (for example if there was an `end_time` specified). + // If `continuation_tokens` is present, then a change in partitioning requires + // the client to open a new stream for each token to resume reading. + message CloseStream { + // The status of the stream. + google.rpc.Status status = 1; + + // If non-empty, contains the information needed to start reading the new + // partition(s) that contain segments of this partition's row range. + repeated StreamContinuationToken continuation_tokens = 2; + } + + // The data or control message on the stream. + oneof stream_record { + // A mutation to the partition. + DataChange data_change = 1; + + // A periodic heartbeat message. + Heartbeat heartbeat = 2; + + // An indication that the stream should be closed. + CloseStream close_stream = 3; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto index 9e5a05c2ea..4881526e5a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/data.proto @@ -533,3 +533,30 @@ message ReadModifyWriteRule { int64 increment_amount = 4; } } + +// NOTE: This API is not generally available. Users must be allowlisted. +// A partition of a change stream. +message StreamPartition { + // The row range covered by this partition and is specified by + // [`start_key_closed`, `end_key_open`). + RowRange row_range = 1; +} + +// NOTE: This API is not generally available. Users must be allowlisted. +// The information required to continue reading the data from multiple +// `StreamPartitions` from where a previous read left off. +message StreamContinuationTokens { + // List of continuation tokens. + repeated StreamContinuationToken tokens = 1; +} + +// NOTE: This API is not generally available. Users must be allowlisted. +// The information required to continue reading the data from a +// `StreamPartition` from where a previous read left off. +message StreamContinuationToken { + // The partition that this token applies to. + StreamPartition partition = 1; + + // An encoded position in the stream to restart reading from. + string token = 2; +} From c529f192f3ec032c1863b44cddc75ca583117110 Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Wed, 20 Jul 2022 14:36:30 -0400 Subject: [PATCH 02/27] feat: Add ListChangeStreamPartitions callable (#1312) * feat: Add ListChangeStreamPartitions callable * feat: Change return type of ListChangeStreamPartitions to RowRange * feat: Fix format for ListChangeStreamPartitions * fix: Address comments for ListChangeStreamPartitionsCallable * feat: Add comments for IntervalApi for ListChangeStreamPartitions * feat: Ignore renaming of ReadRowsConvertExceptionCallable Co-authored-by: Teng Zhong --- .../clirr-ignored-differences.xml | 5 + .../bigtable/data/v2/BigtableDataClient.java | 138 ++++++++++++++++++ ...va => ConvertStreamExceptionCallable.java} | 27 ++-- .../data/v2/stub/EnhancedBigtableStub.java | 85 ++++++++++- .../v2/stub/EnhancedBigtableStubSettings.java | 35 +++++ ...istChangeStreamPartitionsUserCallable.java | 93 ++++++++++++ .../data/v2/BigtableDataClientTests.java | 34 +++++ .../ConvertStreamExceptionCallableTest.java | 76 ++++++++++ .../EnhancedBigtableStubSettingsTest.java | 1 + ...hangeStreamPartitionsUserCallableTest.java | 87 +++++++++++ 10 files changed, 566 insertions(+), 15 deletions(-) rename google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/{readrows/ReadRowsConvertExceptionCallable.java => ConvertStreamExceptionCallable.java} (69%) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java diff --git a/google-cloud-bigtable/clirr-ignored-differences.xml b/google-cloud-bigtable/clirr-ignored-differences.xml index 588327d0de..3fa8f3ee1e 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -39,6 +39,11 @@ 8001 com/google/cloud/bigtable/data/v2/stub/metrics/CompositeTracerFactory + + + 8001 + com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsConvertExceptionCallable + 8001 diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index ce9a57fa7e..38bc4dc811 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -29,6 +29,7 @@ import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Filters; @@ -1489,6 +1490,143 @@ public UnaryCallable readModifyWriteRowCallable() { return stub.readModifyWriteRowCallable(); } + /** + * Convenience method for synchronously streaming the partitions of a table. The returned + * ServerStream instance is not threadsafe, it can only be used from single thread. + * + *

Sample code: + * + *

{@code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
+   *   String tableId = "[TABLE]";
+   *
+   *   try {
+   *     ServerStream stream = bigtableDataClient.listChangeStreamPartitions(tableId);
+   *     int count = 0;
+   *
+   *     // Iterator style
+   *     for (RowRange partition : stream) {
+   *       if (++count > 10) {
+   *         stream.cancel();
+   *         break;
+   *       }
+   *       // Do something with partition
+   *     }
+   *   } catch (NotFoundException e) {
+   *     System.out.println("Tried to read a non-existent table");
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   * }
+   * }
+ * + * @see ServerStreamingCallable For call styles. + */ + @InternalApi("Used in Changestream beam pipeline.") + public ServerStream listChangeStreamPartitions(String tableId) { + return listChangeStreamPartitionsCallable().call(tableId); + } + + /** + * Convenience method for asynchronously streaming the partitions of a table. + * + *

Sample code: + * + *

{@code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
+   *   String tableId = "[TABLE]";
+   *
+   *   bigtableDataClient.listChangeStreamPartitionsAsync(tableId, new ResponseObserver() {
+   *     StreamController controller;
+   *     int count = 0;
+   *
+   *     public void onStart(StreamController controller) {
+   *       this.controller = controller;
+   *     }
+   *     public void onResponse(RowRange partition) {
+   *       if (++count > 10) {
+   *         controller.cancel();
+   *         return;
+   *       }
+   *       // Do something with partition
+   *     }
+   *     public void onError(Throwable t) {
+   *       if (t instanceof NotFoundException) {
+   *         System.out.println("Tried to read a non-existent table");
+   *       } else {
+   *         t.printStackTrace();
+   *       }
+   *     }
+   *     public void onComplete() {
+   *       // Handle stream completion
+   *     }
+   *   });
+   * }
+   * }
+ */ + @InternalApi("Used in Changestream beam pipeline.") + public void listChangeStreamPartitionsAsync(String tableId, ResponseObserver observer) { + listChangeStreamPartitionsCallable().call(tableId, observer); + } + + /** + * Streams back the results of the query. The returned callable object allows for customization of + * api invocation. + * + *

Sample code: + * + *

{@code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
+   *   String tableId = "[TABLE]";
+   *
+   *   // Iterator style
+   *   try {
+   *     for(RowRange partition : bigtableDataClient.listChangeStreamPartitionsCallable().call(tableId)) {
+   *       // Do something with partition
+   *     }
+   *   } catch (NotFoundException e) {
+   *     System.out.println("Tried to read a non-existent table");
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   *
+   *   // Sync style
+   *   try {
+   *     List partitions = bigtableDataClient.listChangeStreamPartitionsCallable().all().call(tableId);
+   *   } catch (NotFoundException e) {
+   *     System.out.println("Tried to read a non-existent table");
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   *
+   *   // Point look up
+   *   ApiFuture partitionFuture =
+   *     bigtableDataClient.listChangeStreamPartitionsCallable().first().futureCall(tableId);
+   *
+   *   ApiFutures.addCallback(partitionFuture, new ApiFutureCallback() {
+   *     public void onFailure(Throwable t) {
+   *       if (t instanceof NotFoundException) {
+   *         System.out.println("Tried to read a non-existent table");
+   *       } else {
+   *         t.printStackTrace();
+   *       }
+   *     }
+   *     public void onSuccess(RowRange result) {
+   *       System.out.println("Got partition: " + result);
+   *     }
+   *   }, MoreExecutors.directExecutor());
+   *
+   *   // etc
+   * }
+   * }
+ * + * @see ServerStreamingCallable For call styles. + */ + @InternalApi("Used in Changestream beam pipeline.") + public ServerStreamingCallable listChangeStreamPartitionsCallable() { + return stub.listChangeStreamPartitionsCallable(); + } + /** Close the clients and releases all associated resources. */ @Override public void close() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsConvertExceptionCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallable.java similarity index 69% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsConvertExceptionCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallable.java index 0c58f66441..55a0d390fb 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsConvertExceptionCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallable.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.google.cloud.bigtable.data.v2.stub.readrows; +package com.google.cloud.bigtable.data.v2.stub; import com.google.api.core.InternalApi; import com.google.api.gax.rpc.ApiCallContext; @@ -27,29 +27,30 @@ * This callable converts the "Received rst stream" exception into a retryable {@link ApiException}. */ @InternalApi -public final class ReadRowsConvertExceptionCallable - extends ServerStreamingCallable { +public final class ConvertStreamExceptionCallable + extends ServerStreamingCallable { - private final ServerStreamingCallable innerCallable; + private final ServerStreamingCallable innerCallable; - public ReadRowsConvertExceptionCallable( - ServerStreamingCallable innerCallable) { + public ConvertStreamExceptionCallable( + ServerStreamingCallable innerCallable) { this.innerCallable = innerCallable; } @Override public void call( - ReadRowsRequest request, ResponseObserver responseObserver, ApiCallContext context) { - ReadRowsConvertExceptionResponseObserver observer = - new ReadRowsConvertExceptionResponseObserver<>(responseObserver); + RequestT request, ResponseObserver responseObserver, ApiCallContext context) { + ConvertStreamExceptionResponseObserver observer = + new ConvertStreamExceptionResponseObserver<>(responseObserver); innerCallable.call(request, observer, context); } - private class ReadRowsConvertExceptionResponseObserver implements ResponseObserver { + private class ConvertStreamExceptionResponseObserver + implements ResponseObserver { - private final ResponseObserver outerObserver; + private final ResponseObserver outerObserver; - ReadRowsConvertExceptionResponseObserver(ResponseObserver outerObserver) { + ConvertStreamExceptionResponseObserver(ResponseObserver outerObserver) { this.outerObserver = outerObserver; } @@ -59,7 +60,7 @@ public void onStart(StreamController controller) { } @Override - public void onResponse(RowT response) { + public void onResponse(ResponseT response) { outerObserver.onResponse(response); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index ec237aabf7..7d2cd85b65 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -47,6 +47,8 @@ import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; +import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; +import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; @@ -55,6 +57,7 @@ import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.ReadRowsResponse; +import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.SampleRowKeysRequest; import com.google.bigtable.v2.SampleRowKeysResponse; import com.google.cloud.bigtable.Version; @@ -70,6 +73,7 @@ import com.google.cloud.bigtable.data.v2.models.RowAdapter; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.stub.changestream.ListChangeStreamPartitionsUserCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerStreamingCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerUnaryCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTracerFactory; @@ -84,7 +88,6 @@ import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsRetryingCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.FilterMarkerRowsCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor; -import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsConvertExceptionCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsResumptionStrategy; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsRetryCompletedCallable; import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsUserCallable; @@ -142,6 +145,8 @@ public class EnhancedBigtableStub implements AutoCloseable { private final UnaryCallable checkAndMutateRowCallable; private final UnaryCallable readModifyWriteRowCallable; + private final ServerStreamingCallable listChangeStreamPartitionsCallable; + public static EnhancedBigtableStub create(EnhancedBigtableStubSettings settings) throws IOException { settings = finalizeSettings(settings, Tags.getTagger(), Stats.getStatsRecorder()); @@ -284,6 +289,7 @@ public EnhancedBigtableStub(EnhancedBigtableStubSettings settings, ClientContext bulkMutateRowsCallable = createBulkMutateRowsCallable(); checkAndMutateRowCallable = createCheckAndMutateRowCallable(); readModifyWriteRowCallable = createReadModifyWriteRowCallable(); + listChangeStreamPartitionsCallable = createListChangeStreamPartitionsCallable(); } // @@ -410,7 +416,7 @@ public Map extract(ReadRowsRequest readRowsRequest) { // should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code // which by default is not retryable. Convert the exception so it can be retried in the client. ServerStreamingCallable convertException = - new ReadRowsConvertExceptionCallable<>(withStatsHeaders); + new ConvertStreamExceptionCallable<>(withStatsHeaders); ServerStreamingCallable merging = new RowMergingCallable<>(convertException, rowAdapter); @@ -798,6 +804,76 @@ public Map extract(ReadModifyWriteRowRequest request) { methodName, new ReadModifyWriteRowCallable(retrying, requestContext)); } + /** + * Creates a callable chain to handle streaming ListChangeStreamPartitions RPCs. The chain will: + * + *
    + *
  • Convert a String format tableId into a {@link + * com.google.bigtable.v2.ListChangeStreamPartitionsRequest} and dispatch the RPC. + *
  • Upon receiving the response stream, it will convert the {@link + * com.google.bigtable.v2.ListChangeStreamPartitionsResponse}s into {@link RowRange}. + *
+ */ + private ServerStreamingCallable createListChangeStreamPartitionsCallable() { + ServerStreamingCallable + base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(BigtableGrpc.getListChangeStreamPartitionsMethod()) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListChangeStreamPartitionsRequest listChangeStreamPartitionsRequest) { + return ImmutableMap.of( + "table_name", + listChangeStreamPartitionsRequest.getTableName(), + "app_profile_id", + listChangeStreamPartitionsRequest.getAppProfileId()); + } + }) + .build(), + settings.listChangeStreamPartitionsSettings().getRetryableCodes()); + + ServerStreamingCallable userCallable = + new ListChangeStreamPartitionsUserCallable(base, requestContext); + + ServerStreamingCallable withStatsHeaders = + new StatsHeadersServerStreamingCallable<>(userCallable); + + // Sometimes ListChangeStreamPartitions connections are disconnected via an RST frame. This + // error is transient and should be treated similar to UNAVAILABLE. However, this exception + // has an INTERNAL error code which by default is not retryable. Convert the exception so it + // can be retried in the client. + ServerStreamingCallable convertException = + new ConvertStreamExceptionCallable<>(withStatsHeaders); + + // Copy idle timeout settings for watchdog. + ServerStreamingCallSettings innerSettings = + ServerStreamingCallSettings.newBuilder() + .setRetryableCodes(settings.listChangeStreamPartitionsSettings().getRetryableCodes()) + .setRetrySettings(settings.listChangeStreamPartitionsSettings().getRetrySettings()) + .setIdleTimeout(settings.listChangeStreamPartitionsSettings().getIdleTimeout()) + .build(); + + ServerStreamingCallable watched = + Callables.watched(convertException, innerSettings, clientContext); + + ServerStreamingCallable withBigtableTracer = + new BigtableTracerStreamingCallable<>(watched); + + ServerStreamingCallable retrying = + Callables.retrying(withBigtableTracer, innerSettings, clientContext); + + SpanName span = getSpanName("ListChangeStreamPartitions"); + ServerStreamingCallable traced = + new TracedServerStreamingCallable<>(retrying, clientContext.getTracerFactory(), span); + + return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + } + /** * Wraps a callable chain in a user presentable callable that will inject the default call context * and trace the call. @@ -854,6 +930,11 @@ public UnaryCallable checkAndMutateRowCallable( public UnaryCallable readModifyWriteRowCallable() { return readModifyWriteRowCallable; } + + /** Returns a streaming list change stream partitions callable */ + public ServerStreamingCallable listChangeStreamPartitionsCallable() { + return listChangeStreamPartitionsCallable; + } //
private SpanName getSpanName(String methodName) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 395ba52b08..83f0445bc5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -33,6 +33,7 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.auth.Credentials; +import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.Version; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.KeyOffset; @@ -137,6 +138,22 @@ public class EnhancedBigtableStubSettings extends StubSettings LIST_CHANGE_STREAM_PARTITIONS_RETRY_CODES = + ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(Code.ABORTED).build(); + + private static final RetrySettings LIST_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setMaxAttempts(10) + .setJittered(true) + .setInitialRpcTimeout(Duration.ofMinutes(1)) + .setRpcTimeoutMultiplier(2.0) + .setMaxRpcTimeout(Duration.ofMinutes(10)) + .setTotalTimeout(Duration.ofMinutes(60)) + .build(); + /** * Scopes that are equivalent to JWT's audience. * @@ -174,6 +191,8 @@ public class EnhancedBigtableStubSettings extends StubSettings checkAndMutateRowSettings; private final UnaryCallSettings readModifyWriteRowSettings; + private final ServerStreamingCallSettings listChangeStreamPartitionsSettings; + private EnhancedBigtableStubSettings(Builder builder) { super(builder); @@ -208,6 +227,7 @@ private EnhancedBigtableStubSettings(Builder builder) { bulkReadRowsSettings = builder.bulkReadRowsSettings.build(); checkAndMutateRowSettings = builder.checkAndMutateRowSettings.build(); readModifyWriteRowSettings = builder.readModifyWriteRowSettings.build(); + listChangeStreamPartitionsSettings = builder.listChangeStreamPartitionsSettings.build(); } /** Create a new builder. */ @@ -491,6 +511,10 @@ public UnaryCallSettings readModifyWriteRowSettings() { return readModifyWriteRowSettings; } + public ServerStreamingCallSettings listChangeStreamPartitionsSettings() { + return listChangeStreamPartitionsSettings; + } + /** Returns a builder containing all the values of this settings class. */ public Builder toBuilder() { return new Builder(this); @@ -516,6 +540,9 @@ public static class Builder extends StubSettings.Builder readModifyWriteRowSettings; + private final ServerStreamingCallSettings.Builder + listChangeStreamPartitionsSettings; + /** * Initializes a new Builder with sane defaults for all settings. * @@ -626,6 +653,12 @@ private Builder() { readModifyWriteRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); copyRetrySettings(baseDefaults.readModifyWriteRowSettings(), readModifyWriteRowSettings); + + listChangeStreamPartitionsSettings = ServerStreamingCallSettings.newBuilder(); + listChangeStreamPartitionsSettings + .setRetryableCodes(LIST_CHANGE_STREAM_PARTITIONS_RETRY_CODES) + .setRetrySettings(LIST_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS) + .setIdleTimeout(Duration.ofMinutes(5)); } private Builder(EnhancedBigtableStubSettings settings) { @@ -646,6 +679,7 @@ private Builder(EnhancedBigtableStubSettings settings) { bulkReadRowsSettings = settings.bulkReadRowsSettings.toBuilder(); checkAndMutateRowSettings = settings.checkAndMutateRowSettings.toBuilder(); readModifyWriteRowSettings = settings.readModifyWriteRowSettings.toBuilder(); + listChangeStreamPartitionsSettings = settings.listChangeStreamPartitionsSettings.toBuilder(); } // @@ -857,6 +891,7 @@ public String toString() { .add("bulkReadRowsSettings", bulkReadRowsSettings) .add("checkAndMutateRowSettings", checkAndMutateRowSettings) .add("readModifyWriteRowSettings", readModifyWriteRowSettings) + .add("listChangeStreamPartitionsSettings", listChangeStreamPartitionsSettings) .add("parent", super.toString()) .toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java new file mode 100644 index 0000000000..1d3393bb2b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java @@ -0,0 +1,93 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamController; +import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; +import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.RowRange; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; + +/** Simple wrapper for ListChangeStreamPartitions to wrap the request and response protobufs. */ +public class ListChangeStreamPartitionsUserCallable + extends ServerStreamingCallable { + private final RequestContext requestContext; + private final ServerStreamingCallable< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + inner; + + public ListChangeStreamPartitionsUserCallable( + ServerStreamingCallable + inner, + RequestContext requestContext) { + this.requestContext = requestContext; + this.inner = inner; + } + + @Override + public void call( + String tableId, ResponseObserver responseObserver, ApiCallContext context) { + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); + ListChangeStreamPartitionsRequest request = + ListChangeStreamPartitionsRequest.newBuilder() + .setTableName(tableName) + .setAppProfileId(requestContext.getAppProfileId()) + .build(); + + inner.call(request, new ConvertPartitionToRangeObserver(responseObserver), context); + } + + private class ConvertPartitionToRangeObserver + implements ResponseObserver { + + private final ResponseObserver outerObserver; + + ConvertPartitionToRangeObserver(ResponseObserver observer) { + this.outerObserver = observer; + } + + @Override + public void onStart(final StreamController controller) { + outerObserver.onStart(controller); + } + + @Override + public void onResponse(ListChangeStreamPartitionsResponse response) { + RowRange rowRange = + RowRange.newBuilder() + .setStartKeyClosed(response.getPartition().getRowRange().getStartKeyClosed()) + .setEndKeyOpen(response.getPartition().getRowRange().getEndKeyOpen()) + .build(); + outerObserver.onResponse(rowRange); + } + + @Override + public void onError(Throwable t) { + outerObserver.onError(t); + } + + @Override + public void onComplete() { + outerObserver.onComplete(); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java index 34c9a29d71..fcbcc15e30 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java @@ -24,6 +24,7 @@ import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Filters.Filter; @@ -79,6 +80,9 @@ public class BigtableDataClientTests { @Mock private Batcher mockBulkMutationBatcher; @Mock private Batcher mockBulkReadRowsBatcher; + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private ServerStreamingCallable mockListChangeStreamPartitionsCallable; + private BigtableDataClient bigtableDataClient; @Before @@ -153,6 +157,14 @@ public void proxyReadRowsCallableTest() { assertThat(bigtableDataClient.readRowsCallable()).isSameInstanceAs(mockReadRowsCallable); } + @Test + public void proxyListChangeStreamPartitionsCallableTest() { + Mockito.when(mockStub.listChangeStreamPartitionsCallable()) + .thenReturn(mockListChangeStreamPartitionsCallable); + assertThat(bigtableDataClient.listChangeStreamPartitionsCallable()) + .isSameInstanceAs(mockListChangeStreamPartitionsCallable); + } + @Test public void proxyReadRowAsyncTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); @@ -300,6 +312,28 @@ public void proxyReadRowsAsyncTest() { Mockito.verify(mockReadRowsCallable).call(query, mockObserver); } + @Test + public void proxyListChangeStreamPartitionsSyncTest() { + Mockito.when(mockStub.listChangeStreamPartitionsCallable()) + .thenReturn(mockListChangeStreamPartitionsCallable); + + bigtableDataClient.listChangeStreamPartitions("fake-table"); + + Mockito.verify(mockListChangeStreamPartitionsCallable).call("fake-table"); + } + + @Test + public void proxyListChangeStreamPartitionsAsyncTest() { + Mockito.when(mockStub.listChangeStreamPartitionsCallable()) + .thenReturn(mockListChangeStreamPartitionsCallable); + + @SuppressWarnings("unchecked") + ResponseObserver mockObserver = Mockito.mock(ResponseObserver.class); + bigtableDataClient.listChangeStreamPartitionsAsync("fake-table", mockObserver); + + Mockito.verify(mockListChangeStreamPartitionsCallable).call("fake-table", mockObserver); + } + @Test public void proxySampleRowKeysCallableTest() { Mockito.when(mockStub.sampleRowKeysCallable()).thenReturn(mockSampleRowKeysCallable); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java new file mode 100644 index 0000000000..8f08e15b23 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.InternalException; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ConvertStreamExceptionCallableTest { + + @Test + public void rstStreamExceptionConvertedToRetryableTest() { + ApiException originalException = + new InternalException( + new StatusRuntimeException( + Status.INTERNAL.withDescription( + "INTERNAL: HTTP/2 error code: INTERNAL_ERROR\nReceived Rst Stream")), + GrpcStatusCode.of(Status.Code.INTERNAL), + false); + assertFalse(originalException.isRetryable()); + SettableExceptionCallable settableExceptionCallable = + new SettableExceptionCallable<>(originalException); + ConvertStreamExceptionCallable convertStreamExceptionCallable = + new ConvertStreamExceptionCallable<>(settableExceptionCallable); + + Throwable actualError = null; + try { + convertStreamExceptionCallable.all().call("fake-request"); + } catch (Throwable t) { + actualError = t; + } + assert actualError instanceof InternalException; + InternalException actualException = (InternalException) actualError; + assertTrue(actualException.isRetryable()); + } + + private static final class SettableExceptionCallable + extends ServerStreamingCallable { + private final Throwable throwable; + + public SettableExceptionCallable(Throwable throwable) { + this.throwable = throwable; + } + + @Override + public void call( + RequestT request, ResponseObserver responseObserver, ApiCallContext context) { + responseObserver.onError(throwable); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index c4e5ea2e40..32ab93d1f2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -701,6 +701,7 @@ public void isRefreshingChannelFalseValueTest() { "bulkReadRowsSettings", "checkAndMutateRowSettings", "readModifyWriteRowSettings", + "listChangeStreamPartitionsSettings", }; @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java new file mode 100644 index 0000000000..03db35f8d6 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java @@ -0,0 +1,87 @@ +/* + * Copyright 2018 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; +import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi; +import com.google.common.collect.Lists; +import com.google.common.truth.Truth; +import com.google.protobuf.ByteString; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ListChangeStreamPartitionsUserCallableTest { + private final RequestContext requestContext = + RequestContext.create("my-project", "my-instance", "my-profile"); + + @Test + public void requestIsCorrect() { + FakeStreamingApi.ServerStreamingStashCallable< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + inner = new FakeStreamingApi.ServerStreamingStashCallable<>(Lists.newArrayList()); + ListChangeStreamPartitionsUserCallable listChangeStreamPartitionsUserCallable = + new ListChangeStreamPartitionsUserCallable(inner, requestContext); + + listChangeStreamPartitionsUserCallable.all().call("my-table"); + assertThat(inner.getActualRequest()) + .isEqualTo( + ListChangeStreamPartitionsRequest.newBuilder() + .setTableName( + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) + .setAppProfileId(requestContext.getAppProfileId()) + .build()); + } + + @Test + public void responseIsConverted() { + FakeStreamingApi.ServerStreamingStashCallable< + ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + inner = + new FakeStreamingApi.ServerStreamingStashCallable<>( + Lists.newArrayList( + ListChangeStreamPartitionsResponse.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("apple")) + .setEndKeyOpen(ByteString.copyFromUtf8("banana")) + .build()) + .build()) + .build())); + ListChangeStreamPartitionsUserCallable listChangeStreamPartitionsUserCallable = + new ListChangeStreamPartitionsUserCallable(inner, requestContext); + + List results = listChangeStreamPartitionsUserCallable.all().call("my-table"); + Truth.assertThat(results) + .containsExactly( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("apple")) + .setEndKeyOpen(ByteString.copyFromUtf8("banana")) + .build()); + } +} From 39a7b58337c9bcd29da92218422be59a1f74163a Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Tue, 26 Jul 2022 13:06:57 -0400 Subject: [PATCH 03/27] feat: Create ReadChangeStreamQuery and ChangeStreamRecode::Heartbeat/CloseStream (#1318) * feat: Add ReadChangeStreamQuery and ChangeStreamRecord::Heartbeat/CloseStream 1. ReadChangeStreamQuery will be used by readChangeStream(TODO) 2. ChangeStreamRecord is one of: Heartbeat, CloseStream, or a ChangeStreamMutation(TODO) * fix: Address comments about styles * fix: Remove `InternalApi` tag for package private methods in veneer client Co-authored-by: Teng Zhong --- .../models/ChangeStreamContinuationToken.java | 99 +++++ .../data/v2/models/ChangeStreamRecord.java | 25 ++ .../bigtable/data/v2/models/CloseStream.java | 102 +++++ .../bigtable/data/v2/models/Heartbeat.java | 79 ++++ .../data/v2/models/ReadChangeStreamQuery.java | 268 +++++++++++++ .../v2/models/ChangeStreamRecordTest.java | 166 ++++++++ .../v2/models/ReadChangeStreamQueryTest.java | 368 ++++++++++++++++++ 7 files changed, 1107 insertions(+) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java new file mode 100644 index 0000000000..f499a94e45 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java @@ -0,0 +1,99 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import javax.annotation.Nonnull; + +/** A simple wrapper for {@link StreamContinuationToken}. */ +public final class ChangeStreamContinuationToken implements Serializable { + private static final long serialVersionUID = 524679926247095L; + + private transient StreamContinuationToken.Builder builder; + + private ChangeStreamContinuationToken(@Nonnull StreamContinuationToken.Builder builder) { + this.builder = builder; + } + + private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { + input.defaultReadObject(); + builder = StreamContinuationToken.newBuilder().mergeFrom(input); + } + + private void writeObject(ObjectOutputStream output) throws IOException { + output.defaultWriteObject(); + builder.build().writeTo(output); + } + + public RowRange getRowRange() { + return this.builder.getPartition().getRowRange(); + } + + public String getToken() { + return this.builder.getToken(); + } + + /** + * Creates the protobuf. This method is considered an internal implementation detail and not meant + * to be used by applications. + */ + StreamContinuationToken toProto() { + return builder.build(); + } + + /** Wraps the protobuf {@link StreamContinuationToken}. */ + static ChangeStreamContinuationToken fromProto( + @Nonnull StreamContinuationToken streamContinuationToken) { + return new ChangeStreamContinuationToken(streamContinuationToken.toBuilder()); + } + + public ChangeStreamContinuationToken clone() { + return new ChangeStreamContinuationToken(this.builder.clone()); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeStreamContinuationToken otherToken = (ChangeStreamContinuationToken) o; + return Objects.equal(getRowRange(), otherToken.getRowRange()) + && Objects.equal(getToken(), otherToken.getToken()); + } + + @Override + public int hashCode() { + return Objects.hashCode(getRowRange(), getToken()); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("rowRange", getRowRange()) + .add("token", getToken()) + .toString(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java new file mode 100644 index 0000000000..0bf5e0c31e --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java @@ -0,0 +1,25 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.api.core.InternalExtensionOnly; + +/** + * Default representation of a change stream record, which can be a Heartbeat, a CloseStream, or a + * logical mutation. + */ +@InternalExtensionOnly +public interface ChangeStreamRecord {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java new file mode 100644 index 0000000000..403705f676 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -0,0 +1,102 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; +import com.google.rpc.Status; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.List; +import javax.annotation.Nonnull; + +public final class CloseStream implements ChangeStreamRecord, Serializable { + private static final long serialVersionUID = 7316215828353608505L; + private final Status status; + private transient ImmutableList.Builder + changeStreamContinuationTokens = ImmutableList.builder(); + + private CloseStream(Status status, List continuationTokens) { + this.status = status; + for (StreamContinuationToken streamContinuationToken : continuationTokens) { + changeStreamContinuationTokens.add( + ChangeStreamContinuationToken.fromProto(streamContinuationToken)); + } + } + + @InternalApi("Used in Changestream beam pipeline.") + public Status getStatus() { + return this.status; + } + + @InternalApi("Used in Changestream beam pipeline.") + public List getChangeStreamContinuationTokens() { + return changeStreamContinuationTokens.build(); + } + + private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { + input.defaultReadObject(); + + @SuppressWarnings("unchecked") + ImmutableList deserialized = + (ImmutableList) input.readObject(); + this.changeStreamContinuationTokens = + ImmutableList.builder().addAll(deserialized); + } + + private void writeObject(ObjectOutputStream output) throws IOException { + output.defaultWriteObject(); + output.writeObject(changeStreamContinuationTokens.build()); + } + + /** Wraps the protobuf {@link ReadChangeStreamResponse.CloseStream}. */ + static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { + return new CloseStream(closeStream.getStatus(), closeStream.getContinuationTokensList()); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloseStream record = (CloseStream) o; + return Objects.equal(status, record.getStatus()) + && Objects.equal( + changeStreamContinuationTokens.build(), record.getChangeStreamContinuationTokens()); + } + + @Override + public int hashCode() { + return Objects.hashCode(status, changeStreamContinuationTokens); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("status", status) + .add("changeStreamContinuationTokens", changeStreamContinuationTokens) + .toString(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java new file mode 100644 index 0000000000..73876f887b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -0,0 +1,79 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import com.google.protobuf.Timestamp; +import java.io.Serializable; +import javax.annotation.Nonnull; + +public final class Heartbeat implements ChangeStreamRecord, Serializable { + private static final long serialVersionUID = 7316215828353608504L; + private final Timestamp lowWatermark; + private final ChangeStreamContinuationToken changeStreamContinuationToken; + + private Heartbeat( + Timestamp lowWatermark, ChangeStreamContinuationToken changeStreamContinuationToken) { + this.lowWatermark = lowWatermark; + this.changeStreamContinuationToken = changeStreamContinuationToken; + } + + @InternalApi("Used in Changestream beam pipeline.") + public ChangeStreamContinuationToken getChangeStreamContinuationToken() { + return changeStreamContinuationToken; + } + + @InternalApi("Used in Changestream beam pipeline.") + public Timestamp getLowWatermark() { + return lowWatermark; + } + + /** Wraps the protobuf {@link ReadChangeStreamResponse.Heartbeat}. */ + static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { + return new Heartbeat( + heartbeat.getLowWatermark(), + ChangeStreamContinuationToken.fromProto(heartbeat.getContinuationToken())); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Heartbeat record = (Heartbeat) o; + return Objects.equal(lowWatermark, record.getLowWatermark()) + && Objects.equal(changeStreamContinuationToken, record.getChangeStreamContinuationToken()); + } + + @Override + public int hashCode() { + return Objects.hashCode(lowWatermark, changeStreamContinuationToken); + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("lowWatermark", lowWatermark) + .add("changeStreamContinuationToken", changeStreamContinuationToken) + .toString(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java new file mode 100644 index 0000000000..5ac3a743f6 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java @@ -0,0 +1,268 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationTokens; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.List; +import javax.annotation.Nonnull; + +/** A simple wrapper to construct a query for the ReadChangeStream RPC. */ +public final class ReadChangeStreamQuery implements Serializable { + private static final long serialVersionUID = 948588515749969176L; + + private final String tableId; + private transient ReadChangeStreamRequest.Builder builder = ReadChangeStreamRequest.newBuilder(); + + /** + * Constructs a new ReadChangeStreamQuery object for the specified table id. The table id will be + * combined with the instance name specified in the {@link + * com.google.cloud.bigtable.data.v2.BigtableDataSettings}. + */ + public static ReadChangeStreamQuery create(String tableId) { + return new ReadChangeStreamQuery(tableId); + } + + private ReadChangeStreamQuery(String tableId) { + this.tableId = tableId; + } + + private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { + input.defaultReadObject(); + builder = ReadChangeStreamRequest.newBuilder().mergeFrom(input); + } + + private void writeObject(ObjectOutputStream output) throws IOException { + output.defaultWriteObject(); + builder.build().writeTo(output); + } + + /** + * Adds a partition. + * + * @param rowRange Represents the partition in the form [startKey, endKey). startKey can be null + * to represent negative infinity. endKey can be null to represent positive infinity. + */ + public ReadChangeStreamQuery streamPartition(@Nonnull RowRange rowRange) { + builder.setPartition(StreamPartition.newBuilder().setRowRange(rowRange).build()); + return this; + } + + /** + * Adds a partition. + * + * @param start The beginning of the range (inclusive). Can be null to represent negative + * infinity. + * @param end The end of the range (exclusive). Can be null to represent positive infinity. + */ + public ReadChangeStreamQuery streamPartition(String start, String end) { + return streamPartition(wrapKey(start), wrapKey(end)); + } + + /** + * Adds a partition. + * + * @param start The beginning of the range (inclusive). Can be null to represent negative + * infinity. + * @param end The end of the range (exclusive). Can be null to represent positive infinity. + */ + public ReadChangeStreamQuery streamPartition(ByteString start, ByteString end) { + RowRange.Builder rangeBuilder = RowRange.newBuilder(); + if (start != null) { + rangeBuilder.setStartKeyClosed(start); + } + if (end != null) { + rangeBuilder.setEndKeyOpen(end); + } + return streamPartition(rangeBuilder.build()); + } + + /** Adds a partition. */ + public ReadChangeStreamQuery streamPartition(ByteStringRange range) { + RowRange.Builder rangeBuilder = RowRange.newBuilder(); + + switch (range.getStartBound()) { + case OPEN: + throw new IllegalStateException("Start bound should be closed."); + case CLOSED: + rangeBuilder.setStartKeyClosed(range.getStart()); + break; + case UNBOUNDED: + rangeBuilder.clearStartKey(); + break; + default: + throw new IllegalStateException("Unknown start bound: " + range.getStartBound()); + } + + switch (range.getEndBound()) { + case OPEN: + rangeBuilder.setEndKeyOpen(range.getEnd()); + break; + case CLOSED: + throw new IllegalStateException("End bound should be open."); + case UNBOUNDED: + rangeBuilder.clearEndKey(); + break; + default: + throw new IllegalStateException("Unknown end bound: " + range.getEndBound()); + } + + return streamPartition(rangeBuilder.build()); + } + + /** Sets the startTime to read the change stream. */ + public ReadChangeStreamQuery startTime(Timestamp value) { + Preconditions.checkArgument( + !builder.hasContinuationTokens(), + "startTime and continuationTokens can't be specified together"); + builder.setStartTime(value); + return this; + } + + /** Sets the endTime to read the change stream. */ + public ReadChangeStreamQuery endTime(Timestamp value) { + builder.setEndTime(value); + return this; + } + + /** Sets the stream continuation tokens to read the change stream. */ + public ReadChangeStreamQuery continuationTokens( + List changeStreamContinuationTokens) { + Preconditions.checkArgument( + !builder.hasStartTime(), "startTime and continuationTokens can't be specified together"); + StreamContinuationTokens.Builder streamContinuationTokensBuilder = + StreamContinuationTokens.newBuilder(); + for (ChangeStreamContinuationToken changeStreamContinuationToken : + changeStreamContinuationTokens) { + builder.setContinuationTokens( + streamContinuationTokensBuilder.addTokens(changeStreamContinuationToken.toProto())); + } + builder.setContinuationTokens(streamContinuationTokensBuilder.build()); + return this; + } + + /** Sets the heartbeat duration for the change stream. */ + public ReadChangeStreamQuery heartbeatDuration(long seconds) { + return heartbeatDuration(seconds, 0); + } + + /** Sets the heartbeat duration for the change stream. */ + public ReadChangeStreamQuery heartbeatDuration(long seconds, int nanos) { + builder.setHeartbeatDuration(Duration.newBuilder().setSeconds(seconds).setNanos(nanos).build()); + return this; + } + + /** + * Creates the request protobuf. This method is considered an internal implementation detail and + * not meant to be used by applications. + */ + @InternalApi("Used in Changestream beam pipeline.") + public ReadChangeStreamRequest toProto(RequestContext requestContext) { + String tableName = + NameUtil.formatTableName( + requestContext.getProjectId(), requestContext.getInstanceId(), tableId); + + return builder + .setTableName(tableName) + .setAppProfileId(requestContext.getAppProfileId()) + .build(); + } + + /** + * Wraps the protobuf {@link ReadChangeStreamRequest}. + * + *

WARNING: Please note that the project id & instance id in the table name will be overwritten + * by the configuration in the BigtableDataClient. + */ + public static ReadChangeStreamQuery fromProto(@Nonnull ReadChangeStreamRequest request) { + ReadChangeStreamQuery query = + new ReadChangeStreamQuery(NameUtil.extractTableIdFromTableName(request.getTableName())); + query.builder = request.toBuilder(); + + return query; + } + + public ReadChangeStreamQuery clone() { + ReadChangeStreamQuery query = ReadChangeStreamQuery.create(tableId); + query.builder = this.builder.clone(); + return query; + } + + private static ByteString wrapKey(String key) { + if (key == null) { + return null; + } + return ByteString.copyFromUtf8(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReadChangeStreamQuery query = (ReadChangeStreamQuery) o; + return Objects.equal(tableId, query.tableId) + && Objects.equal(builder.getPartition(), query.builder.getPartition()) + && Objects.equal(builder.getStartTime(), query.builder.getStartTime()) + && Objects.equal(builder.getEndTime(), query.builder.getEndTime()) + && Objects.equal(builder.getContinuationTokens(), query.builder.getContinuationTokens()) + && Objects.equal(builder.getHeartbeatDuration(), query.builder.getHeartbeatDuration()); + } + + @Override + public int hashCode() { + return Objects.hashCode( + tableId, + builder.getPartition(), + builder.getStartTime(), + builder.getEndTime(), + builder.getContinuationTokens(), + builder.getHeartbeatDuration()); + } + + @Override + public String toString() { + ReadChangeStreamRequest request = builder.build(); + + return MoreObjects.toStringHelper(this) + .add("tableId", tableId) + .add("partition", request.getPartition()) + .add("startTime", request.getStartTime()) + .add("endTime", request.getEndTime()) + .add("continuationTokens", request.getContinuationTokens()) + .add("heartbeatDuration", request.getHeartbeatDuration()) + .toString(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java new file mode 100644 index 0000000000..c82aae7330 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -0,0 +1,166 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamPartition; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ChangeStreamRecordTest { + + @Test + public void heartbeatSerializationTest() throws IOException, ClassNotFoundException { + ReadChangeStreamResponse.Heartbeat heartbeatProto = + ReadChangeStreamResponse.Heartbeat.newBuilder() + .setLowWatermark(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) + .setContinuationToken( + StreamContinuationToken.newBuilder().setToken("random-token").build()) + .build(); + Heartbeat heartbeat = Heartbeat.fromProto(heartbeatProto); + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(heartbeat); + oos.close(); + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + Heartbeat actual = (Heartbeat) ois.readObject(); + assertThat(actual).isEqualTo(heartbeat); + } + + @Test + public void closeStreamSerializationTest() throws IOException, ClassNotFoundException { + com.google.rpc.Status status = com.google.rpc.Status.newBuilder().setCode(0).build(); + RowRange rowRange1 = + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("")) + .setEndKeyOpen(ByteString.copyFromUtf8("apple")) + .build(); + String token1 = "close-stream-token-1"; + RowRange rowRange2 = + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("apple")) + .setEndKeyOpen(ByteString.copyFromUtf8("")) + .build(); + String token2 = "close-stream-token-2"; + ReadChangeStreamResponse.CloseStream closeStreamProto = + ReadChangeStreamResponse.CloseStream.newBuilder() + .addContinuationTokens( + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange1).build()) + .setToken(token1) + .build()) + .addContinuationTokens( + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange2).build()) + .setToken(token2) + .build()) + .setStatus(status) + .build(); + CloseStream closeStream = CloseStream.fromProto(closeStreamProto); + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(closeStream); + oos.close(); + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + CloseStream actual = (CloseStream) ois.readObject(); + assertThat(actual.getChangeStreamContinuationTokens()) + .isEqualTo(closeStream.getChangeStreamContinuationTokens()); + assertThat(actual.getStatus()).isEqualTo(closeStream.getStatus()); + } + + @Test + public void heartbeatTest() { + Timestamp lowWatermark = Timestamp.newBuilder().setSeconds(1000).build(); + RowRange rowRange = + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("apple")) + .setEndKeyOpen(ByteString.copyFromUtf8("banana")) + .build(); + String token = "heartbeat-token"; + ReadChangeStreamResponse.Heartbeat heartbeatProto = + ReadChangeStreamResponse.Heartbeat.newBuilder() + .setLowWatermark(lowWatermark) + .setContinuationToken( + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange).build()) + .setToken(token) + .build()) + .build(); + Heartbeat actualHeartbeat = Heartbeat.fromProto(heartbeatProto); + + Assert.assertEquals(actualHeartbeat.getLowWatermark(), lowWatermark); + Assert.assertEquals(actualHeartbeat.getChangeStreamContinuationToken().getRowRange(), rowRange); + Assert.assertEquals(actualHeartbeat.getChangeStreamContinuationToken().getToken(), token); + } + + @Test + public void closeStreamTest() { + com.google.rpc.Status status = com.google.rpc.Status.newBuilder().setCode(0).build(); + RowRange rowRange1 = + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("")) + .setEndKeyOpen(ByteString.copyFromUtf8("apple")) + .build(); + String token1 = "close-stream-token-1"; + RowRange rowRange2 = + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("apple")) + .setEndKeyOpen(ByteString.copyFromUtf8("")) + .build(); + String token2 = "close-stream-token-2"; + ReadChangeStreamResponse.CloseStream closeStreamProto = + ReadChangeStreamResponse.CloseStream.newBuilder() + .addContinuationTokens( + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange1).build()) + .setToken(token1) + .build()) + .addContinuationTokens( + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange2).build()) + .setToken(token2) + .build()) + .setStatus(status) + .build(); + CloseStream actualCloseStream = CloseStream.fromProto(closeStreamProto); + + Assert.assertEquals(status, actualCloseStream.getStatus()); + Assert.assertEquals( + rowRange1, actualCloseStream.getChangeStreamContinuationTokens().get(0).getRowRange()); + Assert.assertEquals( + token1, actualCloseStream.getChangeStreamContinuationTokens().get(0).getToken()); + Assert.assertEquals( + rowRange2, actualCloseStream.getChangeStreamContinuationTokens().get(1).getRowRange()); + Assert.assertEquals( + token2, actualCloseStream.getChangeStreamContinuationTokens().get(1).getToken()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java new file mode 100644 index 0000000000..cae2d93926 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java @@ -0,0 +1,368 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamRequest.Builder; +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamContinuationTokens; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.Timestamp; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.Collections; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ReadChangeStreamQueryTest { + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; + private static final String APP_PROFILE_ID = "fake-profile-id"; + private RequestContext requestContext; + + @Rule public ExpectedException expect = ExpectedException.none(); + + @Before + public void setUp() { + requestContext = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); + } + + @Test + public void requestContextTest() { + ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID); + + ReadChangeStreamRequest proto = query.toProto(requestContext); + assertThat(proto).isEqualTo(expectedProtoBuilder().build()); + } + + @Test + public void streamPartitionTest() { + // Case 1: String. + ReadChangeStreamQuery query1 = + ReadChangeStreamQuery.create(TABLE_ID).streamPartition("simple-begin", "simple-end"); + ReadChangeStreamRequest actualProto1 = query1.toProto(requestContext); + Builder expectedProto1 = expectedProtoBuilder(); + expectedProto1.setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("simple-begin")) + .setEndKeyOpen(ByteString.copyFromUtf8("simple-end")) + .build()) + .build()); + assertThat(actualProto1).isEqualTo(expectedProto1.build()); + + // Case 2: ByteString. + ReadChangeStreamQuery query2 = + ReadChangeStreamQuery.create(TABLE_ID) + .streamPartition( + ByteString.copyFromUtf8("byte-begin"), ByteString.copyFromUtf8("byte-end")); + ReadChangeStreamRequest actualProto2 = query2.toProto(requestContext); + Builder expectedProto2 = expectedProtoBuilder(); + expectedProto2.setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("byte-begin")) + .setEndKeyOpen(ByteString.copyFromUtf8("byte-end")) + .build()) + .build()); + assertThat(actualProto2).isEqualTo(expectedProto2.build()); + + // Case 3: ByteStringRange. + ReadChangeStreamQuery query3 = + ReadChangeStreamQuery.create(TABLE_ID) + .streamPartition(ByteStringRange.create("range-begin", "range-end")); + ReadChangeStreamRequest actualProto3 = query3.toProto(requestContext); + Builder expectedProto3 = expectedProtoBuilder(); + expectedProto3.setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("range-begin")) + .setEndKeyOpen(ByteString.copyFromUtf8("range-end")) + .build()) + .build()); + assertThat(actualProto3).isEqualTo(expectedProto3.build()); + } + + @Test + public void startTimeTest() { + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID) + .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + + Builder expectedProto = + expectedProtoBuilder() + .setStartTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + + ReadChangeStreamRequest actualProto = query.toProto(requestContext); + assertThat(actualProto).isEqualTo(expectedProto.build()); + } + + @Test + public void endTimeTest() { + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + + Builder expectedProto = + expectedProtoBuilder() + .setEndTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + + ReadChangeStreamRequest actualProto = query.toProto(requestContext); + assertThat(actualProto).isEqualTo(expectedProto.build()); + } + + @Test + public void heartbeatDurationTest() { + ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(5); + + Builder expectedProto = + expectedProtoBuilder() + .setHeartbeatDuration(com.google.protobuf.Duration.newBuilder().setSeconds(5).build()); + + ReadChangeStreamRequest actualProto = query.toProto(requestContext); + assertThat(actualProto).isEqualTo(expectedProto.build()); + } + + @Test + public void continuationTokensTest() { + StreamContinuationToken tokenProto = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("start")) + .setEndKeyOpen(ByteString.copyFromUtf8("end")) + .build()) + .build()) + .setToken("random-token") + .build(); + ChangeStreamContinuationToken token = ChangeStreamContinuationToken.fromProto(tokenProto); + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID).continuationTokens(Collections.singletonList(token)); + + Builder expectedProto = + expectedProtoBuilder() + .setContinuationTokens( + StreamContinuationTokens.newBuilder().addTokens(tokenProto).build()); + + ReadChangeStreamRequest actualProto = query.toProto(requestContext); + assertThat(actualProto).isEqualTo(expectedProto.build()); + } + + @Test(expected = IllegalArgumentException.class) + public void createWithStartTimeAndContinuationTokensTest() { + StreamContinuationToken tokenProto = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("start")) + .setEndKeyOpen(ByteString.copyFromUtf8("end")) + .build()) + .build()) + .setToken("random-token") + .build(); + ChangeStreamContinuationToken token = ChangeStreamContinuationToken.fromProto(tokenProto); + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID) + .startTime(Timestamp.newBuilder().setSeconds(5).build()) + .continuationTokens(Collections.singletonList(token)); + expect.expect(IllegalArgumentException.class); + expect.expectMessage("startTime and continuationTokens can't be specified together"); + } + + @Test + public void serializationTest() throws IOException, ClassNotFoundException { + StreamContinuationToken tokenProto = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("start")) + .setEndKeyOpen(ByteString.copyFromUtf8("end")) + .build()) + .build()) + .setToken("random-token") + .build(); + ChangeStreamContinuationToken token = ChangeStreamContinuationToken.fromProto(tokenProto); + ReadChangeStreamQuery expected = + ReadChangeStreamQuery.create(TABLE_ID) + .streamPartition("simple-begin", "simple-end") + .continuationTokens(Collections.singletonList(token)) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) + .heartbeatDuration(5); + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(expected); + oos.close(); + + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + + ReadChangeStreamQuery actual = (ReadChangeStreamQuery) ois.readObject(); + assertThat(actual.toProto(requestContext)).isEqualTo(expected.toProto(requestContext)); + } + + private static ReadChangeStreamRequest.Builder expectedProtoBuilder() { + return ReadChangeStreamRequest.newBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAppProfileId(APP_PROFILE_ID); + } + + @Test + public void testFromProto() { + StreamContinuationToken token = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("")) + .setEndKeyOpen(ByteString.copyFromUtf8("")) + .build()) + .build()) + .setToken("random-token") + .build(); + ReadChangeStreamRequest request = + ReadChangeStreamRequest.newBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("")) + .setEndKeyClosed(ByteString.copyFromUtf8("")) + .build())) + .setContinuationTokens(StreamContinuationTokens.newBuilder().addTokens(token).build()) + .setEndTime(Timestamp.newBuilder().setSeconds(2000).build()) + .setHeartbeatDuration(Duration.newBuilder().setSeconds(5).build()) + .build(); + ReadChangeStreamQuery query = ReadChangeStreamQuery.fromProto(request); + assertThat(query.toProto(requestContext)).isEqualTo(request); + } + + @Test(expected = IllegalArgumentException.class) + public void testFromProtoWithEmptyTableId() { + ReadChangeStreamQuery.fromProto(ReadChangeStreamRequest.getDefaultInstance()); + + expect.expect(IllegalArgumentException.class); + expect.expectMessage("Invalid table name:"); + } + + @Test + public void testEquality() { + ReadChangeStreamQuery request = + ReadChangeStreamQuery.create(TABLE_ID) + .streamPartition("simple-begin", "simple-end") + .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) + .heartbeatDuration(5); + + // ReadChangeStreamQuery#toProto should not change the ReadChangeStreamQuery instance state + request.toProto(requestContext); + assertThat(request) + .isEqualTo( + ReadChangeStreamQuery.create(TABLE_ID) + .streamPartition("simple-begin", "simple-end") + .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) + .heartbeatDuration(5)); + + assertThat(ReadChangeStreamQuery.create(TABLE_ID).streamPartition("begin-1", "end-1")) + .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).streamPartition("begin-2", "end-1")); + assertThat( + ReadChangeStreamQuery.create(TABLE_ID) + .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build())) + .isNotEqualTo( + ReadChangeStreamQuery.create(TABLE_ID) + .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1001).build())); + assertThat( + ReadChangeStreamQuery.create(TABLE_ID) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build())) + .isNotEqualTo( + ReadChangeStreamQuery.create(TABLE_ID) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1001).build())); + assertThat(ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(5)) + .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(6)); + } + + @Test + public void testClone() { + StreamContinuationToken tokenProto = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("start")) + .setEndKeyOpen(ByteString.copyFromUtf8("end")) + .build()) + .build()) + .setToken("random-token") + .build(); + ChangeStreamContinuationToken token = ChangeStreamContinuationToken.fromProto(tokenProto); + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID) + .streamPartition("begin", "end") + .continuationTokens(Collections.singletonList(token)) + .endTime(Timestamp.newBuilder().setSeconds(2000).build()) + .heartbeatDuration(5); + ReadChangeStreamRequest request = + ReadChangeStreamRequest.newBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setAppProfileId(APP_PROFILE_ID) + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("begin")) + .setEndKeyOpen(ByteString.copyFromUtf8("end")) + .build())) + .setContinuationTokens( + StreamContinuationTokens.newBuilder().addTokens(tokenProto).build()) + .setEndTime(Timestamp.newBuilder().setSeconds(2000).build()) + .setHeartbeatDuration(Duration.newBuilder().setSeconds(5).build()) + .build(); + + ReadChangeStreamQuery clonedReq = query.clone(); + assertThat(clonedReq).isEqualTo(query); + assertThat(clonedReq.toProto(requestContext)).isEqualTo(request); + } +} From 53dd0f0f413e67e3e0243c7b1037c776225849ea Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Mon, 1 Aug 2022 11:09:57 -0400 Subject: [PATCH 04/27] feat: Add ChangeStreamMutation which is a ChangeStreamRecord (#1324) * Add ChangeStreamMutation which is a ChangeStreamRecord A ChangeStreamMutation holds a list of mods, represented by List, where an Entry is one of DeleteFamily/DeleteCells/SetCell. * fix: Fix styles * fix: Address comments * fix: Update Heartbeat to use AutoValue * fix: Add more comments * fix: Address comments * fix: Fix unit test due to toString(). Can't compare ByteString.toString() directly even though the contents are the same. So we compare their fields and toRowMutation. Co-authored-by: Teng Zhong --- .../data/v2/models/ChangeStreamMutation.java | 351 ++++++++++++++++++ .../bigtable/data/v2/models/DeleteCells.java | 47 +++ .../bigtable/data/v2/models/DeleteFamily.java | 34 ++ .../cloud/bigtable/data/v2/models/Entry.java | 26 ++ .../bigtable/data/v2/models/Heartbeat.java | 59 +-- .../bigtable/data/v2/models/SetCell.java | 53 +++ .../v2/models/ChangeStreamMutationTest.java | 330 ++++++++++++++++ .../v2/models/ChangeStreamRecordTest.java | 5 +- .../bigtable/data/v2/models/EntryTest.java | 101 +++++ 9 files changed, 958 insertions(+), 48 deletions(-) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java new file mode 100644 index 0000000000..b79b184e7a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -0,0 +1,351 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; +import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Nonnull; + +/** + * A ChangeStreamMutation represents a list of mods(represented by List<{@link Entry}>) targeted at + * a single row, which is concatenated by (TODO:ChangeStreamRecordMerger). It represents a logical + * row mutation and can be converted to the original write request(i.e. {@link RowMutation} or + * {@link RowMutationEntry}. + * + *

A ChangeStreamMutation can be constructed in two ways, depending on whether it's a user + * initiated mutation or a Garbage Collection mutation. Either way, the caller should explicitly set + * `token` and `lowWatermark` before build(), otherwise it'll raise an error. + * + *

Case 1) User initiated mutation. + * + *

{@code
+ * ChangeStreamMutation.Builder builder = ChangeStreamMutation.createUserMutation(...);
+ * builder.setCell(...);
+ * builder.deleteFamily(...);
+ * builder.deleteCells(...);
+ * ChangeStreamMutation changeStreamMutation = builder.setToken(...).setLowWatermark().build();
+ * }
+ * + * Case 2) Garbage Collection mutation. + * + *
{@code
+ * ChangeStreamMutation.Builder builder = ChangeStreamMutation.createGcMutation(...);
+ * builder.setCell(...);
+ * builder.deleteFamily(...);
+ * builder.deleteCells(...);
+ * ChangeStreamMutation changeStreamMutation = builder.setToken(...).setLowWatermark().build();
+ * }
+ */ +public final class ChangeStreamMutation implements ChangeStreamRecord, Serializable { + private static final long serialVersionUID = 8419520253162024218L; + + private final ByteString rowKey; + + /** Possible values: USER/GARBAGE_COLLECTION. */ + private final Type type; + + /** This should only be set when type==USER. */ + private final String sourceClusterId; + + private final Timestamp commitTimestamp; + + private final int tieBreaker; + + private transient ImmutableList.Builder entries = ImmutableList.builder(); + + private String token; + + private Timestamp lowWatermark; + + private ChangeStreamMutation(Builder builder) { + this.rowKey = builder.rowKey; + this.type = builder.type; + this.sourceClusterId = builder.sourceClusterId; + this.commitTimestamp = builder.commitTimestamp; + this.tieBreaker = builder.tieBreaker; + this.token = builder.token; + this.lowWatermark = builder.lowWatermark; + this.entries = builder.entries; + } + + /** + * Creates a new instance of a user initiated mutation. It returns a builder instead of a + * ChangeStreamMutation because `token` and `loWatermark` must be set later when we finish + * building the logical mutation. + */ + static Builder createUserMutation( + @Nonnull ByteString rowKey, + @Nonnull String sourceClusterId, + @Nonnull Timestamp commitTimestamp, + int tieBreaker) { + return new Builder(rowKey, Type.USER, sourceClusterId, commitTimestamp, tieBreaker); + } + + /** + * Creates a new instance of a GC mutation. It returns a builder instead of a ChangeStreamMutation + * because `token` and `loWatermark` must be set later when we finish building the logical + * mutation. + */ + static Builder createGcMutation( + @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { + return new Builder(rowKey, Type.GARBAGE_COLLECTION, null, commitTimestamp, tieBreaker); + } + + private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { + input.defaultReadObject(); + + @SuppressWarnings("unchecked") + ImmutableList deserialized = (ImmutableList) input.readObject(); + this.entries = ImmutableList.builder().addAll(deserialized); + } + + private void writeObject(ObjectOutputStream output) throws IOException { + output.defaultWriteObject(); + output.writeObject(entries.build()); + } + + /** Get the row key of the current mutation. */ + @Nonnull + public ByteString getRowKey() { + return this.rowKey; + } + + /** Get the type of the current mutation. */ + @Nonnull + public Type getType() { + return this.type; + } + + /** Get the source cluster id of the current mutation. Null for Garbage collection mutation. */ + public String getSourceClusterId() { + return this.sourceClusterId; + } + + /** Get the commit timestamp of the current mutation. */ + @Nonnull + public Timestamp getCommitTimestamp() { + return this.commitTimestamp; + } + + /** + * Get the tie breaker of the current mutation. This is used to resolve conflicts when multiple + * mutations are applied to different clusters at the same time. + */ + public int getTieBreaker() { + return this.tieBreaker; + } + + /** Get the token of the current mutation, which can be used to resume the changestream. */ + public String getToken() { + return this.token; + } + + /** Get the low watermark of the current mutation. */ + public Timestamp getLowWatermark() { + return this.lowWatermark; + } + + /** Get the list of mods of the current mutation. */ + @Nonnull + public List getEntries() { + return this.entries.build(); + } + + /** Returns a builder containing all the values of this ChangeStreamMutation class. */ + Builder toBuilder() { + return new Builder(this); + } + + /** Helper class to create a ChangeStreamMutation. */ + public static class Builder { + private final ByteString rowKey; + + private final Type type; + + private final String sourceClusterId; + + private final Timestamp commitTimestamp; + + private final int tieBreaker; + + private transient ImmutableList.Builder entries = ImmutableList.builder(); + + private String token; + + private Timestamp lowWatermark; + + private Builder( + ByteString rowKey, + Type type, + String sourceClusterId, + Timestamp commitTimestamp, + int tieBreaker) { + this.rowKey = rowKey; + this.type = type; + this.sourceClusterId = sourceClusterId; + this.commitTimestamp = commitTimestamp; + this.tieBreaker = tieBreaker; + } + + private Builder(ChangeStreamMutation changeStreamMutation) { + this.rowKey = changeStreamMutation.rowKey; + this.type = changeStreamMutation.type; + this.sourceClusterId = changeStreamMutation.sourceClusterId; + this.commitTimestamp = changeStreamMutation.commitTimestamp; + this.tieBreaker = changeStreamMutation.tieBreaker; + this.entries = changeStreamMutation.entries; + this.token = changeStreamMutation.token; + this.lowWatermark = changeStreamMutation.lowWatermark; + } + + Builder setCell( + @Nonnull String familyName, + @Nonnull ByteString qualifier, + long timestamp, + @Nonnull ByteString value) { + this.entries.add(SetCell.create(familyName, qualifier, timestamp, value)); + return this; + } + + Builder deleteCells( + @Nonnull String familyName, + @Nonnull ByteString qualifier, + @Nonnull TimestampRange timestampRange) { + this.entries.add(DeleteCells.create(familyName, qualifier, timestampRange)); + return this; + } + + Builder deleteFamily(@Nonnull String familyName) { + this.entries.add(DeleteFamily.create(familyName)); + return this; + } + + public Builder setToken(@Nonnull String token) { + this.token = token; + return this; + } + + public Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { + this.lowWatermark = lowWatermark; + return this; + } + + public ChangeStreamMutation build() { + Preconditions.checkArgument( + token != null && lowWatermark != null, + "ChangeStreamMutation must have a continuation token and low watermark."); + return new ChangeStreamMutation(this); + } + } + + public RowMutation toRowMutation(@Nonnull String tableId) { + RowMutation rowMutation = RowMutation.create(tableId, rowKey); + for (Entry entry : this.entries.build()) { + if (entry instanceof DeleteFamily) { + rowMutation.deleteFamily(((DeleteFamily) entry).getFamilyName()); + } else if (entry instanceof DeleteCells) { + DeleteCells deleteCells = (DeleteCells) entry; + rowMutation.deleteCells( + deleteCells.getFamilyName(), + deleteCells.getQualifier(), + deleteCells.getTimestampRange()); + } else if (entry instanceof SetCell) { + SetCell setCell = (SetCell) entry; + rowMutation.setCell( + setCell.getFamilyName(), + setCell.getQualifier(), + setCell.getTimestamp(), + setCell.getValue()); + } else { + throw new IllegalArgumentException("Unexpected Entry type."); + } + } + return rowMutation; + } + + public RowMutationEntry toRowMutationEntry() { + RowMutationEntry rowMutationEntry = RowMutationEntry.create(rowKey); + for (Entry entry : this.entries.build()) { + if (entry instanceof DeleteFamily) { + rowMutationEntry.deleteFamily(((DeleteFamily) entry).getFamilyName()); + } else if (entry instanceof DeleteCells) { + DeleteCells deleteCells = (DeleteCells) entry; + rowMutationEntry.deleteCells( + deleteCells.getFamilyName(), + deleteCells.getQualifier(), + deleteCells.getTimestampRange()); + } else if (entry instanceof SetCell) { + SetCell setCell = (SetCell) entry; + rowMutationEntry.setCell( + setCell.getFamilyName(), + setCell.getQualifier(), + setCell.getTimestamp(), + setCell.getValue()); + } else { + throw new IllegalArgumentException("Unexpected Entry type."); + } + } + return rowMutationEntry; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeStreamMutation otherChangeStreamMutation = (ChangeStreamMutation) o; + return Objects.equal(this.hashCode(), otherChangeStreamMutation.hashCode()); + } + + @Override + public int hashCode() { + return Objects.hashCode( + rowKey, type, sourceClusterId, commitTimestamp, tieBreaker, token, lowWatermark, entries); + } + + @Override + public String toString() { + List entriesAsStrings = new ArrayList<>(); + for (Entry entry : this.entries.build()) { + entriesAsStrings.add(entry.toString()); + } + String entryString = "[" + String.join(";\t", entriesAsStrings) + "]"; + return MoreObjects.toStringHelper(this) + .add("rowKey", this.rowKey.toStringUtf8()) + .add("type", this.type) + .add("sourceClusterId", this.sourceClusterId) + .add("commitTimestamp", this.commitTimestamp.toString()) + .add("token", this.token) + .add("lowWatermark", this.lowWatermark) + .add("entries", entryString) + .toString(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java new file mode 100644 index 0000000000..238ddb1638 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; +import com.google.protobuf.ByteString; +import java.io.Serializable; +import javax.annotation.Nonnull; + +/** Representation of a DeleteCells mod in a data change. */ +@AutoValue +public abstract class DeleteCells implements Entry, Serializable { + private static final long serialVersionUID = 851772158721462017L; + + public static DeleteCells create( + @Nonnull String familyName, + @Nonnull ByteString qualifier, + @Nonnull TimestampRange timestampRange) { + return new AutoValue_DeleteCells(familyName, qualifier, timestampRange); + } + + /** Get the column family of the current DeleteCells. */ + @Nonnull + public abstract String getFamilyName(); + + /** Get the column qualifier of the current DeleteCells. */ + @Nonnull + public abstract ByteString getQualifier(); + + /** Get the timestamp range of the current DeleteCells. */ + @Nonnull + public abstract TimestampRange getTimestampRange(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java new file mode 100644 index 0000000000..171ecccb41 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java @@ -0,0 +1,34 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.auto.value.AutoValue; +import java.io.Serializable; +import javax.annotation.Nonnull; + +/** Representation of a DeleteFamily mod in a data change. */ +@AutoValue +public abstract class DeleteFamily implements Entry, Serializable { + private static final long serialVersionUID = 81806775917145615L; + + public static DeleteFamily create(@Nonnull String familyName) { + return new AutoValue_DeleteFamily(familyName); + } + + /** Get the column family of the current DeleteFamily. */ + @Nonnull + public abstract String getFamilyName(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java new file mode 100644 index 0000000000..c5c30016f4 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java @@ -0,0 +1,26 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.api.core.InternalExtensionOnly; + +/** + * Default representation of a mod in a data change, which can be a {@link DeleteFamily}, a {@link + * DeleteCells}, or a {@link SetCell} This class will be used by {@link ChangeStreamMutation} to + * represent a list of mods in a logical change stream mutation. + */ +@InternalExtensionOnly +public interface Entry {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index 73876f887b..db82657e49 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -16,64 +16,31 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; +import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.protobuf.Timestamp; import java.io.Serializable; import javax.annotation.Nonnull; -public final class Heartbeat implements ChangeStreamRecord, Serializable { +@AutoValue +public abstract class Heartbeat implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608504L; - private final Timestamp lowWatermark; - private final ChangeStreamContinuationToken changeStreamContinuationToken; - private Heartbeat( - Timestamp lowWatermark, ChangeStreamContinuationToken changeStreamContinuationToken) { - this.lowWatermark = lowWatermark; - this.changeStreamContinuationToken = changeStreamContinuationToken; - } - - @InternalApi("Used in Changestream beam pipeline.") - public ChangeStreamContinuationToken getChangeStreamContinuationToken() { - return changeStreamContinuationToken; - } - - @InternalApi("Used in Changestream beam pipeline.") - public Timestamp getLowWatermark() { - return lowWatermark; + public static Heartbeat create( + ChangeStreamContinuationToken changeStreamContinuationToken, Timestamp lowWatermark) { + return new AutoValue_Heartbeat(changeStreamContinuationToken, lowWatermark); } /** Wraps the protobuf {@link ReadChangeStreamResponse.Heartbeat}. */ static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { - return new Heartbeat( - heartbeat.getLowWatermark(), - ChangeStreamContinuationToken.fromProto(heartbeat.getContinuationToken())); + return create( + ChangeStreamContinuationToken.fromProto(heartbeat.getContinuationToken()), + heartbeat.getLowWatermark()); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Heartbeat record = (Heartbeat) o; - return Objects.equal(lowWatermark, record.getLowWatermark()) - && Objects.equal(changeStreamContinuationToken, record.getChangeStreamContinuationToken()); - } - - @Override - public int hashCode() { - return Objects.hashCode(lowWatermark, changeStreamContinuationToken); - } + @InternalApi("Used in Changestream beam pipeline.") + public abstract ChangeStreamContinuationToken getChangeStreamContinuationToken(); - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("lowWatermark", lowWatermark) - .add("changeStreamContinuationToken", changeStreamContinuationToken) - .toString(); - } + @InternalApi("Used in Changestream beam pipeline.") + public abstract Timestamp getLowWatermark(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java new file mode 100644 index 0000000000..a157b5cd73 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.auto.value.AutoValue; +import com.google.protobuf.ByteString; +import java.io.Serializable; +import javax.annotation.Nonnull; + +/** + * Representation of a SetCell mod in a data change, whose value is concatenated by + * (TODO:ChangeStreamRecordMerger) in case of SetCell value chunking. + */ +@AutoValue +public abstract class SetCell implements Entry, Serializable { + private static final long serialVersionUID = 77123872266724154L; + + public static SetCell create( + @Nonnull String familyName, + @Nonnull ByteString qualifier, + long timestamp, + @Nonnull ByteString value) { + return new AutoValue_SetCell(familyName, qualifier, timestamp, value); + } + + /** Get the column family of the current SetCell. */ + @Nonnull + public abstract String getFamilyName(); + + /** Get the column qualifier of the current SetCell. */ + @Nonnull + public abstract ByteString getQualifier(); + + /** Get the timestamp of the current SetCell. */ + public abstract long getTimestamp(); + + /** Get the value of the current SetCell. */ + @Nonnull + public abstract ByteString getValue(); +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java new file mode 100644 index 0000000000..938213fb36 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -0,0 +1,330 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.MutateRowRequest; +import com.google.bigtable.v2.MutateRowsRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.common.primitives.Longs; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import org.junit.Assert; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ChangeStreamMutationTest { + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; + private static final String APP_PROFILE_ID = "fake-profile"; + private static final RequestContext REQUEST_CONTEXT = + RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); + + @Rule public ExpectedException expect = ExpectedException.none(); + + @Test + public void userInitiatedMutationTest() throws IOException, ClassNotFoundException { + // Create a user initiated logical mutation. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")) + .deleteFamily("fake-family") + .deleteCells( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Test the getters. + Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); + Assert.assertEquals( + changeStreamMutation.getType(), ReadChangeStreamResponse.DataChange.Type.USER); + Assert.assertEquals(changeStreamMutation.getSourceClusterId(), "fake-source-cluster-id"); + Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); + Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); + Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); + Assert.assertEquals(changeStreamMutation.getLowWatermark(), fakeLowWatermark); + + // Test serialization. + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(changeStreamMutation); + oos.close(); + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + ChangeStreamMutation actual = (ChangeStreamMutation) ois.readObject(); + Assert.assertEquals(actual.getRowKey(), changeStreamMutation.getRowKey()); + Assert.assertEquals(actual.getType(), changeStreamMutation.getType()); + Assert.assertEquals(actual.getSourceClusterId(), changeStreamMutation.getSourceClusterId()); + Assert.assertEquals(actual.getCommitTimestamp(), changeStreamMutation.getCommitTimestamp()); + Assert.assertEquals(actual.getTieBreaker(), changeStreamMutation.getTieBreaker()); + Assert.assertEquals(actual.getToken(), changeStreamMutation.getToken()); + Assert.assertEquals(actual.getLowWatermark(), changeStreamMutation.getLowWatermark()); + assertThat(actual.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)) + .isEqualTo(changeStreamMutation.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)); + } + + @Test + public void gcMutationTest() throws IOException, ClassNotFoundException { + // Create a GC mutation. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createGcMutation( + ByteString.copyFromUtf8("key"), fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")) + .deleteFamily("fake-family") + .deleteCells( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Test the getters. + Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); + Assert.assertEquals( + changeStreamMutation.getType(), + ReadChangeStreamResponse.DataChange.Type.GARBAGE_COLLECTION); + Assert.assertNull(changeStreamMutation.getSourceClusterId()); + Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); + Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); + Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); + Assert.assertEquals(changeStreamMutation.getLowWatermark(), fakeLowWatermark); + + // Test serialization. + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(changeStreamMutation); + oos.close(); + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + ChangeStreamMutation actual = (ChangeStreamMutation) ois.readObject(); + Assert.assertEquals(actual.getRowKey(), changeStreamMutation.getRowKey()); + Assert.assertEquals(actual.getType(), changeStreamMutation.getType()); + Assert.assertEquals(actual.getSourceClusterId(), changeStreamMutation.getSourceClusterId()); + Assert.assertEquals(actual.getCommitTimestamp(), changeStreamMutation.getCommitTimestamp()); + Assert.assertEquals(actual.getTieBreaker(), changeStreamMutation.getTieBreaker()); + Assert.assertEquals(actual.getToken(), changeStreamMutation.getToken()); + Assert.assertEquals(actual.getLowWatermark(), changeStreamMutation.getLowWatermark()); + assertThat(actual.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)) + .isEqualTo(changeStreamMutation.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)); + } + + @Test + public void toRowMutationTest() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")) + .deleteFamily("fake-family") + .deleteCells( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Convert it to a rowMutation and construct a MutateRowRequest. + RowMutation rowMutation = changeStreamMutation.toRowMutation(TABLE_ID); + MutateRowRequest mutateRowRequest = rowMutation.toProto(REQUEST_CONTEXT); + String tableName = + NameUtil.formatTableName( + REQUEST_CONTEXT.getProjectId(), REQUEST_CONTEXT.getInstanceId(), TABLE_ID); + assertThat(mutateRowRequest.getTableName()).isEqualTo(tableName); + assertThat(mutateRowRequest.getMutationsList()).hasSize(3); + assertThat(mutateRowRequest.getMutations(0).getSetCell().getValue()) + .isEqualTo(ByteString.copyFromUtf8("fake-value")); + assertThat(mutateRowRequest.getMutations(1).getDeleteFromFamily().getFamilyName()) + .isEqualTo("fake-family"); + assertThat(mutateRowRequest.getMutations(2).getDeleteFromColumn().getFamilyName()) + .isEqualTo("fake-family"); + assertThat(mutateRowRequest.getMutations(2).getDeleteFromColumn().getColumnQualifier()) + .isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); + } + + @Test(expected = IllegalArgumentException.class) + public void toRowMutationWithoutTokenShouldFailTest() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setLowWatermark(fakeLowWatermark) + .build(); + expect.expect(IllegalArgumentException.class); + } + + @Test(expected = IllegalArgumentException.class) + public void toRowMutationWithoutLowWatermarkShouldFailTest() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setToken("fake-token") + .build(); + expect.expect(IllegalArgumentException.class); + } + + @Test + public void toRowMutationEntryTest() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")) + .deleteFamily("fake-family") + .deleteCells( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Convert it to a rowMutationEntry and construct a MutateRowRequest. + RowMutationEntry rowMutationEntry = changeStreamMutation.toRowMutationEntry(); + MutateRowsRequest.Entry mutateRowsRequestEntry = rowMutationEntry.toProto(); + assertThat(mutateRowsRequestEntry.getRowKey()).isEqualTo(ByteString.copyFromUtf8("key")); + assertThat(mutateRowsRequestEntry.getMutationsList()).hasSize(3); + assertThat(mutateRowsRequestEntry.getMutations(0).getSetCell().getValue()) + .isEqualTo(ByteString.copyFromUtf8("fake-value")); + assertThat(mutateRowsRequestEntry.getMutations(1).getDeleteFromFamily().getFamilyName()) + .isEqualTo("fake-family"); + assertThat(mutateRowsRequestEntry.getMutations(2).getDeleteFromColumn().getFamilyName()) + .isEqualTo("fake-family"); + assertThat(mutateRowsRequestEntry.getMutations(2).getDeleteFromColumn().getColumnQualifier()) + .isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); + } + + @Test(expected = IllegalArgumentException.class) + public void toRowMutationEntryWithoutTokenShouldFailTest() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setLowWatermark(fakeLowWatermark) + .build(); + expect.expect(IllegalArgumentException.class); + } + + @Test(expected = IllegalArgumentException.class) + public void toRowMutationEntryWithoutLowWatermarkShouldFailTest() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setToken("fake-token") + .build(); + expect.expect(IllegalArgumentException.class); + } + + @Test + public void testWithLongValue() { + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000L, + ByteString.copyFrom(Longs.toByteArray(1L))) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + RowMutation rowMutation = changeStreamMutation.toRowMutation(TABLE_ID); + MutateRowRequest mutateRowRequest = rowMutation.toProto(REQUEST_CONTEXT); + String tableName = + NameUtil.formatTableName( + REQUEST_CONTEXT.getProjectId(), REQUEST_CONTEXT.getInstanceId(), TABLE_ID); + assertThat(mutateRowRequest.getTableName()).isEqualTo(tableName); + assertThat(mutateRowRequest.getMutationsList()).hasSize(1); + assertThat(mutateRowRequest.getMutations(0).getSetCell().getValue()) + .isEqualTo(ByteString.copyFromUtf8("\000\000\000\000\000\000\000\001")); + } + + @Test + public void toBuilderTest() { + // Create a user initiated logical mutation. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")) + .deleteFamily("fake-family") + .deleteCells( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Test round-trip of a ChangeStreamMutation through `toBuilder().build()`. + ChangeStreamMutation otherMutation = changeStreamMutation.toBuilder().build(); + assertThat(changeStreamMutation).isEqualTo(otherMutation); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java index c82aae7330..05df603959 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -23,6 +23,7 @@ import com.google.bigtable.v2.StreamPartition; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; +import com.google.rpc.Status; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -57,7 +58,7 @@ public void heartbeatSerializationTest() throws IOException, ClassNotFoundExcept @Test public void closeStreamSerializationTest() throws IOException, ClassNotFoundException { - com.google.rpc.Status status = com.google.rpc.Status.newBuilder().setCode(0).build(); + Status status = Status.newBuilder().setCode(0).build(); RowRange rowRange1 = RowRange.newBuilder() .setStartKeyClosed(ByteString.copyFromUtf8("")) @@ -124,7 +125,7 @@ public void heartbeatTest() { @Test public void closeStreamTest() { - com.google.rpc.Status status = com.google.rpc.Status.newBuilder().setCode(0).build(); + Status status = Status.newBuilder().setCode(0).build(); RowRange rowRange1 = RowRange.newBuilder() .setStartKeyClosed(ByteString.copyFromUtf8("")) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java new file mode 100644 index 0000000000..11ff0a9f02 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java @@ -0,0 +1,101 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.protobuf.ByteString; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class EntryTest { + private void validateSerializationRoundTrip(Object obj) + throws IOException, ClassNotFoundException { + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(obj); + oos.close(); + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + assertThat(ois.readObject()).isEqualTo(obj); + } + + @Test + public void serializationTest() throws IOException, ClassNotFoundException { + // DeleteFamily + Entry deleteFamilyEntry = DeleteFamily.create("fake-family"); + validateSerializationRoundTrip(deleteFamilyEntry); + + // DeleteCell + Entry deleteCellsEntry = + DeleteCells.create( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)); + validateSerializationRoundTrip(deleteCellsEntry); + + // SetCell + Entry setCellEntry = + SetCell.create( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")); + validateSerializationRoundTrip(setCellEntry); + } + + @Test + public void deleteFamilyTest() { + Entry deleteFamilyEntry = DeleteFamily.create("fake-family"); + DeleteFamily deleteFamily = (DeleteFamily) deleteFamilyEntry; + Assert.assertEquals("fake-family", deleteFamily.getFamilyName()); + } + + @Test + public void deleteCellsTest() { + Entry deleteCellEntry = + DeleteCells.create( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)); + DeleteCells deleteCells = (DeleteCells) deleteCellEntry; + Assert.assertEquals("fake-family", deleteCells.getFamilyName()); + Assert.assertEquals(ByteString.copyFromUtf8("fake-qualifier"), deleteCells.getQualifier()); + Assert.assertEquals(Range.TimestampRange.create(1000L, 2000L), deleteCells.getTimestampRange()); + } + + @Test + public void setSellTest() { + Entry setCellEntry = + SetCell.create( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 1000, + ByteString.copyFromUtf8("fake-value")); + SetCell setCell = (SetCell) setCellEntry; + Assert.assertEquals("fake-family", setCell.getFamilyName()); + Assert.assertEquals(ByteString.copyFromUtf8("fake-qualifier"), setCell.getQualifier()); + Assert.assertEquals(1000, setCell.getTimestamp()); + Assert.assertEquals(ByteString.copyFromUtf8("fake-value"), setCell.getValue()); + } +} From cb7b455f340b7354fbf8342e685cf5fdac8b7fad Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Wed, 3 Aug 2022 15:52:39 -0400 Subject: [PATCH 05/27] feat: Add ChangeStreamRecordAdapter and ChangeStreamStateMachine (#1334) * Add ChangeStreamRecordAdapter and ChangeStreamStateMachine These will be used later for ChangeStreamMergingCallable. * fix: Fix styles and add some tests. * fix: Address comments * fix: Update comments Co-authored-by: Teng Zhong --- .../data/v2/models/ChangeStreamMutation.java | 20 +- .../v2/models/ChangeStreamRecordAdapter.java | 173 ++++++ .../DefaultChangeStreamRecordAdapter.java | 175 ++++++ .../bigtable/data/v2/models/Heartbeat.java | 2 +- .../ChangeStreamStateMachine.java | 582 ++++++++++++++++++ .../v2/models/ChangeStreamMutationTest.java | 20 +- .../DefaultChangeStreamRecordAdapterTest.java | 446 ++++++++++++++ .../ChangeStreamStateMachineTest.java | 61 ++ 8 files changed, 1457 insertions(+), 22 deletions(-) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index b79b184e7a..10571ecd1f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -321,14 +321,28 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ChangeStreamMutation otherChangeStreamMutation = (ChangeStreamMutation) o; - return Objects.equal(this.hashCode(), otherChangeStreamMutation.hashCode()); + ChangeStreamMutation other = (ChangeStreamMutation) o; + return Objects.equal(this.rowKey, other.rowKey) + && Objects.equal(this.type, other.type) + && Objects.equal(this.sourceClusterId, other.sourceClusterId) + && Objects.equal(this.commitTimestamp, other.commitTimestamp) + && Objects.equal(this.tieBreaker, other.tieBreaker) + && Objects.equal(this.token, other.token) + && Objects.equal(this.lowWatermark, other.lowWatermark) + && Objects.equal(this.entries.build(), other.entries.build()); } @Override public int hashCode() { return Objects.hashCode( - rowKey, type, sourceClusterId, commitTimestamp, tieBreaker, token, lowWatermark, entries); + rowKey, + type, + sourceClusterId, + commitTimestamp, + tieBreaker, + token, + lowWatermark, + entries.build()); } @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java new file mode 100644 index 0000000000..6e9715a407 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java @@ -0,0 +1,173 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import javax.annotation.Nonnull; + +/** + * An extension point that allows end users to plug in a custom implementation of logical change + * stream records. This is useful in cases where the user would like to apply advanced client side + * filtering(for example, only keep DeleteFamily in the mutations). This adapter acts like a factory + * for a SAX style change stream record builder. + */ +public interface ChangeStreamRecordAdapter { + /** Creates a new instance of a {@link ChangeStreamRecordBuilder}. */ + ChangeStreamRecordBuilder createChangeStreamRecordBuilder(); + + /** Checks if the given change stream record is a Heartbeat. */ + @InternalApi("Used in Changestream beam pipeline.") + boolean isHeartbeat(ChangeStreamRecordT record); + + /** + * Get the token from the given Heartbeat record. If the given record is not a Heartbeat, it will + * throw an Exception. + */ + @InternalApi("Used in Changestream beam pipeline.") + String getTokenFromHeartbeat(ChangeStreamRecordT heartbeatRecord); + + /** Checks if the given change stream record is a ChangeStreamMutation. */ + @InternalApi("Used in Changestream beam pipeline.") + boolean isChangeStreamMutation(ChangeStreamRecordT record); + + /** + * Get the token from the given ChangeStreamMutation record. If the given record is not a + * ChangeStreamMutation, it will throw an Exception. + */ + @InternalApi("Used in Changestream beam pipeline.") + String getTokenFromChangeStreamMutation(ChangeStreamRecordT record); + + /** + * A SAX style change stream record factory. It is responsible for creating one of the three types + * of change stream record: heartbeat, close stream, and a change stream mutation. + * + *

State management is handled external to the implementation of this class: + * + *

    + * Case 1: Heartbeat + *
  1. Exactly 1 {@code onHeartbeat}. + *
+ * + *
    + * Case 2: CloseStream + *
  1. Exactly 1 {@code onCloseStream}. + *
+ * + *
    + * Case 3: ChangeStreamMutation. A change stream mutation consists of one or more mods, where + * the SetCells might be chunked. There are 3 different types of mods that a ReadChangeStream + * response can have: + *
  1. DeleteFamily -> Exactly 1 {@code deleteFamily} + *
  2. DeleteCell -> Exactly 1 {@code deleteCell} + *
  3. SetCell -> Exactly 1 {@code startCell}, At least 1 {@code CellValue}, Exactly 1 {@code + * finishCell}. + *
+ * + *

The whole flow of constructing a ChangeStreamMutation is: + * + *

    + *
  1. Exactly 1 {@code startUserMutation} or {@code startGcMutation}. + *
  2. At least 1 DeleteFamily/DeleteCell/SetCell mods. + *
  3. Exactly 1 {@code finishChangeStreamMutation}. + *
+ * + *

Note: For a non-chunked SetCell, only 1 {@code CellValue} will be called. For a chunked + * SetCell, more than 1 {@code CellValue}s will be called. + * + *

Note: DeleteRow's won't appear in data changes since they'll be converted to multiple + * DeleteFamily's. + */ + interface ChangeStreamRecordBuilder { + /** + * Called to create a heartbeat. This will be called at most once. If called, the current change + * stream record must not include any data changes or close stream messages. + */ + ChangeStreamRecordT onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat); + + /** + * Called to create a close stream message. This will be called at most once. If called, the + * current change stream record must not include any data changes or heartbeats. + */ + ChangeStreamRecordT onCloseStream(ReadChangeStreamResponse.CloseStream closeStream); + + /** + * Called to start a new user initiated ChangeStreamMutation. This will be called at most once. + * If called, the current change stream record must not include any close stream message or + * heartbeat. + */ + void startUserMutation( + @Nonnull ByteString rowKey, + @Nonnull String sourceClusterId, + @Nonnull Timestamp commitTimestamp, + int tieBreaker); + + /** + * Called to start a new Garbage Collection ChangeStreamMutation. This will be called at most + * once. If called, the current change stream record must not include any close stream message + * or heartbeat. + */ + void startGcMutation( + @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker); + + /** Called to add a DeleteFamily mod. */ + void deleteFamily(@Nonnull String familyName); + + /** Called to add a DeleteCell mod. */ + void deleteCells( + @Nonnull String familyName, + @Nonnull ByteString qualifier, + @Nonnull TimestampRange timestampRange); + + /** + * Called to start a SetCell. + * + *

    + * In case of a non-chunked cell, the following order is guaranteed: + *
  1. Exactly 1 {@code startCell}. + *
  2. Exactly 1 {@code cellValue}. + *
  3. Exactly 1 {@code finishCell}. + *
+ * + *
    + * In case of a chunked cell, the following order is guaranteed: + *
  1. Exactly 1 {@code startCell}. + *
  2. At least 2 {@code cellValue}. + *
  3. Exactly 1 {@code finishCell}. + *
+ */ + void startCell(String family, ByteString qualifier, long timestampMicros); + + /** + * Called once per non-chunked cell, or at least twice per chunked cell to concatenate the cell + * value. + */ + void cellValue(ByteString value); + + /** Called once per cell to signal the end of the value (unless reset). */ + void finishCell(); + + /** Called once per stream record to signal that all mods have been processed (unless reset). */ + ChangeStreamRecordT finishChangeStreamMutation( + @Nonnull String token, @Nonnull Timestamp lowWatermark); + + /** Called when the current in progress change stream record should be dropped */ + void reset(); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java new file mode 100644 index 0000000000..d8eb632e54 --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java @@ -0,0 +1,175 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import javax.annotation.Nonnull; + +/** + * Default implementation of a {@link ChangeStreamRecordAdapter} that uses {@link + * ChangeStreamRecord}s to represent change stream records. + */ +public class DefaultChangeStreamRecordAdapter + implements ChangeStreamRecordAdapter { + + /** {@inheritDoc} */ + @Override + public ChangeStreamRecordBuilder createChangeStreamRecordBuilder() { + return new DefaultChangeStreamRecordBuilder(); + } + + /** {@inheritDoc} */ + @Override + public boolean isHeartbeat(ChangeStreamRecord record) { + return record instanceof Heartbeat; + } + + /** {@inheritDoc} */ + @Override + public String getTokenFromHeartbeat(ChangeStreamRecord record) { + Preconditions.checkArgument(isHeartbeat(record), "record is not a Heartbeat."); + return ((Heartbeat) record).getChangeStreamContinuationToken().getToken(); + } + + /** {@inheritDoc} */ + @Override + public boolean isChangeStreamMutation(ChangeStreamRecord record) { + return record instanceof ChangeStreamMutation; + } + + /** {@inheritDoc} */ + @Override + public String getTokenFromChangeStreamMutation(ChangeStreamRecord record) { + Preconditions.checkArgument( + isChangeStreamMutation(record), "record is not a ChangeStreamMutation."); + return ((ChangeStreamMutation) record).getToken(); + } + + /** {@inheritDoc} */ + static class DefaultChangeStreamRecordBuilder + implements ChangeStreamRecordBuilder { + private ChangeStreamMutation.Builder changeStreamMutationBuilder = null; + + // For the current SetCell. + private String family; + private ByteString qualifier; + private long timestampMicros; + private ByteString value; + + public DefaultChangeStreamRecordBuilder() { + reset(); + } + + /** {@inheritDoc} */ + @Override + public ChangeStreamRecord onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + Preconditions.checkArgument( + this.changeStreamMutationBuilder == null, + "Can not create a Heartbeat when there is an existing ChangeStreamMutation being built."); + return Heartbeat.fromProto(heartbeat); + } + + /** {@inheritDoc} */ + @Override + public ChangeStreamRecord onCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + Preconditions.checkArgument( + this.changeStreamMutationBuilder == null, + "Can not create a CloseStream when there is an existing ChangeStreamMutation being built."); + return CloseStream.fromProto(closeStream); + } + + /** {@inheritDoc} */ + @Override + public void startUserMutation( + @Nonnull ByteString rowKey, + @Nonnull String sourceClusterId, + @Nonnull Timestamp commitTimestamp, + int tieBreaker) { + this.changeStreamMutationBuilder = + ChangeStreamMutation.createUserMutation( + rowKey, sourceClusterId, commitTimestamp, tieBreaker); + } + + /** {@inheritDoc} */ + @Override + public void startGcMutation( + @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { + this.changeStreamMutationBuilder = + ChangeStreamMutation.createGcMutation(rowKey, commitTimestamp, tieBreaker); + } + + /** {@inheritDoc} */ + @Override + public void deleteFamily(@Nonnull String familyName) { + this.changeStreamMutationBuilder.deleteFamily(familyName); + } + + /** {@inheritDoc} */ + @Override + public void deleteCells( + @Nonnull String familyName, + @Nonnull ByteString qualifier, + @Nonnull TimestampRange timestampRange) { + this.changeStreamMutationBuilder.deleteCells(familyName, qualifier, timestampRange); + } + + /** {@inheritDoc} */ + @Override + public void startCell(String family, ByteString qualifier, long timestampMicros) { + this.family = family; + this.qualifier = qualifier; + this.timestampMicros = timestampMicros; + this.value = ByteString.EMPTY; + } + + /** {@inheritDoc} */ + @Override + public void cellValue(ByteString value) { + this.value = this.value.concat(value); + } + + /** {@inheritDoc} */ + @Override + public void finishCell() { + this.changeStreamMutationBuilder.setCell( + this.family, this.qualifier, this.timestampMicros, this.value); + } + + /** {@inheritDoc} */ + @Override + public ChangeStreamRecord finishChangeStreamMutation( + @Nonnull String token, @Nonnull Timestamp lowWatermark) { + this.changeStreamMutationBuilder.setToken(token); + this.changeStreamMutationBuilder.setLowWatermark(lowWatermark); + return this.changeStreamMutationBuilder.build(); + } + + /** {@inheritDoc} */ + @Override + public void reset() { + changeStreamMutationBuilder = null; + + family = null; + qualifier = null; + timestampMicros = 0; + value = null; + } + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index db82657e49..f2371c8507 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -26,7 +26,7 @@ public abstract class Heartbeat implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608504L; - public static Heartbeat create( + private static Heartbeat create( ChangeStreamContinuationToken changeStreamContinuationToken, Timestamp lowWatermark) { return new AutoValue_Heartbeat(changeStreamContinuationToken, lowWatermark); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java new file mode 100644 index 0000000000..7ab7fa2b7b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java @@ -0,0 +1,582 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter.ChangeStreamRecordBuilder; +import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; +import com.google.common.base.Preconditions; + +/** + * A state machine to produce change stream records from a stream of {@link + * ReadChangeStreamResponse}. A change stream record can be a Heartbeat, a CloseStream or a + * ChangeStreamMutation. + * + *

There could be two types of chunking for a ChangeStreamMutation: + * + *

    + *
  • Non-SetCell chunking. For example, a ChangeStreamMutation has two mods, DeleteFamily and + * DeleteColumn. DeleteFamily is sent in the first {@link ReadChangeStreamResponse} and + * DeleteColumn is sent in the second {@link ReadChangeStreamResponse}. + *
  • {@link ReadChangeStreamResponse.MutationChunk} has a chunked {@link + * com.google.bigtable.v2.Mutation.SetCell} mutation. For example, a logical mutation has one + * big {@link Mutation.SetCell} mutation which is chunked into two {@link + * ReadChangeStreamResponse}s. The first {@link ReadChangeStreamResponse.DataChange} has the + * first half of the cell value, and the second {@link ReadChangeStreamResponse.DataChange} + * has the second half. + *
+ * + * This state machine handles both types of chunking. + * + *

Building of the actual change stream record object is delegated to a {@link + * ChangeStreamRecordBuilder}. This class is not thread safe. + * + *

The inputs are: + * + *

    + *
  • {@link ReadChangeStreamResponse.Heartbeat}s. + *
  • {@link ReadChangeStreamResponse.CloseStream}s. + *
  • {@link ReadChangeStreamResponse.DataChange}s, that must be merged to a + * ChangeStreamMutation. + *
  • ChangeStreamRecord consumption events that reset the state machine for the next change + * stream record. + *
+ * + *

The outputs are: + * + *

    + *
  • Heartbeat records. + *
  • CloseStream records. + *
  • ChangeStreamMutation records. + *
+ * + *

Expected Usage: + * + *

{@code
+ * ChangeStreamStateMachine changeStreamStateMachine = new ChangeStreamStateMachine<>(myChangeStreamRecordAdapter);
+ * while(responseIterator.hasNext()) {
+ *   ReadChangeStreamResponse response = responseIterator.next();
+ *   if (response.hasHeartbeat()) {
+ *     changeStreamStateMachine.handleHeartbeat(response.getHeartbeat());
+ *   } else if (response.hasCloseStream()) {
+ *     changeStreamStateMachine.handleCloseStream(response.getCloseStream());
+ *   } else {
+ *       changeStreamStateMachine.handleDataChange(response.getDataChange());
+ *   }
+ *   if (changeStreamStateMachine.hasCompleteChangeStreamRecord()) {
+ *       MyChangeStreamRecord = changeStreamStateMachine.consumeChangeStreamRecord();
+ *       // do something with the change stream record.
+ *   }
+ * }
+ * }
+ * + *

Package-private for internal use. + * + * @param The type of row the adapter will build + */ +final class ChangeStreamStateMachine { + private final ChangeStreamRecordBuilder builder; + private State currentState; + // debug stats + private int numHeartbeats = 0; + private int numCloseStreams = 0; + private int numDataChanges = 0; + private int numNonCellMods = 0; + private int numCellChunks = 0; // 1 for non-chunked cell. + private int actualTotalSizeOfChunkedSetCell = 0; + private ChangeStreamRecordT completeChangeStreamRecord; + + /** + * Initialize a new state machine that's ready for a new change stream record. + * + * @param builder The builder that will build the final change stream record. + */ + ChangeStreamStateMachine(ChangeStreamRecordBuilder builder) { + this.builder = builder; + reset(); + } + + /** + * Handle heartbeat events from the server. + * + *

+ *
Valid states: + *
{@link ChangeStreamStateMachine#AWAITING_NEW_STREAM_RECORD} + *
Resulting states: + *
{@link ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME} + *
+ */ + void handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + try { + numHeartbeats++; + currentState = currentState.handleHeartbeat(heartbeat); + } catch (RuntimeException e) { + currentState = null; + throw e; + } + } + + /** + * Handle CloseStream events from the server. + * + *
+ *
Valid states: + *
{@link ChangeStreamStateMachine#AWAITING_NEW_STREAM_RECORD} + *
Resulting states: + *
{@link ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME} + *
+ */ + void handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + try { + numCloseStreams++; + currentState = currentState.handleCloseStream(closeStream); + } catch (RuntimeException e) { + currentState = null; + throw e; + } + } + + /** + * Feeds a new dataChange into the state machine. If the dataChange is invalid, the state machine + * will throw an exception and should not be used for further input. + * + *
+ *
Valid states: + *
{@link ChangeStreamStateMachine#AWAITING_NEW_STREAM_RECORD} + *
{@link ChangeStreamStateMachine#AWAITING_NEW_MOD} + *
{@link ChangeStreamStateMachine#AWAITING_CELL_VALUE} + *
Resulting states: + *
{@link ChangeStreamStateMachine#AWAITING_NEW_MOD} + *
{@link ChangeStreamStateMachine#AWAITING_CELL_VALUE} + *
{@link ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME} + *
+ * + * @param dataChange The new chunk to process. + * @throws ChangeStreamStateMachine.InvalidInputException When the chunk is not applicable to the + * current state. + * @throws IllegalStateException When the internal state is inconsistent + */ + void handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { + try { + numDataChanges++; + currentState = currentState.handleMod(dataChange, 0); + } catch (RuntimeException e) { + currentState = null; + throw e; + } + } + + /** + * Returns the completed change stream record and transitions to {@link + * ChangeStreamStateMachine#AWAITING_NEW_STREAM_RECORD}. + * + * @return The completed change stream record. + * @throws IllegalStateException If the last dataChange did not complete a change stream record. + */ + ChangeStreamRecordT consumeChangeStreamRecord() { + Preconditions.checkState( + completeChangeStreamRecord != null, "No change stream record to consume."); + Preconditions.checkState( + currentState == AWAITING_STREAM_RECORD_CONSUME, + "Change stream record is not ready to consume: " + currentState); + ChangeStreamRecordT changeStreamRecord = completeChangeStreamRecord; + reset(); + return changeStreamRecord; + } + + /** Checks if there is a complete change stream record to be consumed. */ + boolean hasCompleteChangeStreamRecord() { + return completeChangeStreamRecord != null && currentState == AWAITING_STREAM_RECORD_CONSUME; + } + /** + * Checks if the state machine is in the middle of processing a change stream record. + * + * @return True If there is a change stream record in progress. + */ + boolean isChangeStreamRecordInProgress() { + return currentState != AWAITING_NEW_STREAM_RECORD; + } + + private void reset() { + currentState = AWAITING_NEW_STREAM_RECORD; + numHeartbeats = 0; + numCloseStreams = 0; + numDataChanges = 0; + numNonCellMods = 0; + numCellChunks = 0; + actualTotalSizeOfChunkedSetCell = 0; + completeChangeStreamRecord = null; + + builder.reset(); + } + + /** + * Base class for all the state machine's internal states. + * + *

Each state can consume 3 events: Heartbeat, CloseStream and a Mod. By default, the default + * implementation will just throw an IllegalStateException unless the subclass adds explicit + * handling for these events. + */ + abstract static class State { + /** + * Accepts a Heartbeat by the server. And completes the current change stream record. + * + * @throws IllegalStateException If the subclass can't handle heartbeat events. + */ + ChangeStreamStateMachine.State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + throw new IllegalStateException(); + } + + /** + * Accepts a CloseStream by the server. And completes the current change stream record. + * + * @throws IllegalStateException If the subclass can't handle CloseStream events. + */ + ChangeStreamStateMachine.State handleCloseStream( + ReadChangeStreamResponse.CloseStream closeStream) { + throw new IllegalStateException(); + } + + /** + * Accepts a new mod and transitions to the next state. A mod could be a DeleteFamily, a + * DeleteColumn, or a SetCell. + * + * @param dataChange The DataChange that holds the new mod to process. + * @param index The index of the mod in the DataChange. + * @return The next state. + * @throws IllegalStateException If the subclass can't handle the mod. + * @throws ChangeStreamStateMachine.InvalidInputException If the subclass determines that this + * dataChange is invalid. + */ + ChangeStreamStateMachine.State handleMod( + ReadChangeStreamResponse.DataChange dataChange, int index) { + throw new IllegalStateException(); + } + } + + /** + * The default state when the state machine is awaiting a ReadChangeStream response to start a new + * change stream record. It will notify the builder of the new change stream record and transits + * to one of the following states: + * + *

+ *
{@link ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME}, in case of a Heartbeat + * or a CloseStream. + *
Same as {@link ChangeStreamStateMachine#AWAITING_NEW_MOD}, depending on the DataChange. + *
+ */ + private final State AWAITING_NEW_STREAM_RECORD = + new State() { + @Override + State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + validate( + completeChangeStreamRecord == null, + "AWAITING_NEW_STREAM_RECORD: Existing ChangeStreamRecord not consumed yet."); + completeChangeStreamRecord = builder.onHeartbeat(heartbeat); + return AWAITING_STREAM_RECORD_CONSUME; + } + + @Override + State handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + validate( + completeChangeStreamRecord == null, + "AWAITING_NEW_STREAM_RECORD: Existing ChangeStreamRecord not consumed yet."); + completeChangeStreamRecord = builder.onCloseStream(closeStream); + return AWAITING_STREAM_RECORD_CONSUME; + } + + @Override + State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { + validate( + completeChangeStreamRecord == null, + "AWAITING_NEW_STREAM_RECORD: Existing ChangeStreamRecord not consumed yet."); + validate( + !dataChange.getRowKey().isEmpty(), + "AWAITING_NEW_STREAM_RECORD: First data change missing rowKey."); + validate( + dataChange.hasCommitTimestamp(), + "AWAITING_NEW_STREAM_RECORD: First data change missing commit timestamp."); + validate( + index == 0, + "AWAITING_NEW_STREAM_RECORD: First data change should start with the first mod."); + validate( + dataChange.getChunksCount() > 0, + "AWAITING_NEW_STREAM_RECORD: First data change missing mods."); + if (dataChange.getType() == Type.GARBAGE_COLLECTION) { + validate( + dataChange.getSourceClusterId().isEmpty(), + "AWAITING_NEW_STREAM_RECORD: GC mutation shouldn't have source cluster id."); + builder.startGcMutation( + dataChange.getRowKey(), + dataChange.getCommitTimestamp(), + dataChange.getTiebreaker()); + } else if (dataChange.getType() == Type.USER) { + validate( + !dataChange.getSourceClusterId().isEmpty(), + "AWAITING_NEW_STREAM_RECORD: User initiated data change missing source cluster id."); + builder.startUserMutation( + dataChange.getRowKey(), + dataChange.getSourceClusterId(), + dataChange.getCommitTimestamp(), + dataChange.getTiebreaker()); + } else { + validate(false, "AWAITING_NEW_STREAM_RECORD: Unexpected type: " + dataChange.getType()); + } + return AWAITING_NEW_MOD.handleMod(dataChange, index); + } + }; + + /** + * A state to handle the next Mod. + * + *
+ *
Valid exit states: + *
{@link ChangeStreamStateMachine#AWAITING_NEW_MOD}. Current mod is added, and we have more + * mods to expect. + *
{@link ChangeStreamStateMachine#AWAITING_CELL_VALUE}. Current mod is the first chunk of a + * chunked SetCell. + *
{@link ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME}. Current mod is the last + * mod of the current logical mutation. + *
+ */ + private final State AWAITING_NEW_MOD = + new State() { + @Override + State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + throw new IllegalStateException( + "AWAITING_NEW_MOD: Can't handle a Heartbeat in the middle of building a ChangeStreamMutation."); + } + + @Override + State handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + throw new IllegalStateException( + "AWAITING_NEW_MOD: Can't handle a CloseStream in the middle of building a ChangeStreamMutation."); + } + + @Override + State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { + validate( + 0 <= index && index <= dataChange.getChunksCount() - 1, + "AWAITING_NEW_MOD: Index out of bound."); + ReadChangeStreamResponse.MutationChunk chunk = dataChange.getChunks(index); + Mutation mod = chunk.getMutation(); + // Case 1: SetCell + if (mod.hasSetCell()) { + // Start the Cell and delegate to AWAITING_CELL_VALUE to add the cell value. + Mutation.SetCell setCell = chunk.getMutation().getSetCell(); + if (chunk.hasChunkInfo()) { + // If it has chunk info, it must be the first chunk of a chunked SetCell. + validate( + chunk.getChunkInfo().getChunkedValueOffset() == 0, + "First chunk of a chunked cell must start with offset==0."); + actualTotalSizeOfChunkedSetCell = 0; + } + builder.startCell( + setCell.getFamilyName(), + setCell.getColumnQualifier(), + setCell.getTimestampMicros()); + return AWAITING_CELL_VALUE.handleMod(dataChange, index); + } + // Case 2: DeleteFamily + if (mod.hasDeleteFromFamily()) { + numNonCellMods++; + builder.deleteFamily(mod.getDeleteFromFamily().getFamilyName()); + return checkAndFinishMutationIfNeeded(dataChange, index + 1); + } + // Case 3: DeleteCell + if (mod.hasDeleteFromColumn()) { + numNonCellMods++; + builder.deleteCells( + mod.getDeleteFromColumn().getFamilyName(), + mod.getDeleteFromColumn().getColumnQualifier(), + TimestampRange.create( + mod.getDeleteFromColumn().getTimeRange().getStartTimestampMicros(), + mod.getDeleteFromColumn().getTimeRange().getEndTimestampMicros())); + return checkAndFinishMutationIfNeeded(dataChange, index + 1); + } + throw new IllegalStateException("AWAITING_NEW_MOD: Unexpected mod type"); + } + }; + + /** + * A state that represents a cell's value continuation. + * + *
+ *
Valid exit states: + *
{@link ChangeStreamStateMachine#AWAITING_NEW_MOD}. Current chunked SetCell is added, and + * we have more mods to expect. + *
{@link ChangeStreamStateMachine#AWAITING_CELL_VALUE}. Current chunked SetCell has more + * cell values to expect. + *
{@link ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME}. Current chunked SetCell + * is the last mod of the current logical mutation. + *
+ */ + private final State AWAITING_CELL_VALUE = + new State() { + @Override + State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + throw new IllegalStateException( + "AWAITING_CELL_VALUE: Can't handle a Heartbeat in the middle of building a SetCell."); + } + + @Override + State handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + throw new IllegalStateException( + "AWAITING_CELL_VALUE: Can't handle a CloseStream in the middle of building a SetCell."); + } + + @Override + State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { + validate( + 0 <= index && index <= dataChange.getChunksCount() - 1, + "AWAITING_CELL_VALUE: Index out of bound."); + ReadChangeStreamResponse.MutationChunk chunk = dataChange.getChunks(index); + validate( + chunk.getMutation().hasSetCell(), + "AWAITING_CELL_VALUE: Current mod is not a SetCell."); + Mutation.SetCell setCell = chunk.getMutation().getSetCell(); + numCellChunks++; + builder.cellValue(setCell.getValue()); + // Case 1: Current SetCell is chunked. For example: [ReadChangeStreamResponse1: + // {DeleteColumn, DeleteFamily, SetCell_1}, ReadChangeStreamResponse2: {SetCell_2, + // DeleteFamily}]. + if (chunk.hasChunkInfo()) { + validate( + chunk.getChunkInfo().getChunkedValueSize() > 0, + "AWAITING_CELL_VALUE: Chunked value size must be positive."); + actualTotalSizeOfChunkedSetCell += setCell.getValue().size(); + // If it's the last chunk of the chunked SetCell, finish the cell. + if (chunk.getChunkInfo().getLastChunk()) { + builder.finishCell(); + validate( + actualTotalSizeOfChunkedSetCell == chunk.getChunkInfo().getChunkedValueSize(), + "Chunked value size in ChunkInfo doesn't match the actual total size. " + + "ChunkInfo: " + + chunk.getChunkInfo().getChunkedValueSize() + + "; actual total size: " + + actualTotalSizeOfChunkedSetCell); + return checkAndFinishMutationIfNeeded(dataChange, index + 1); + } else { + // If this is not the last chunk of a chunked SetCell, then this must be the last mod + // of the current response, and we're expecting the rest of the chunked cells in the + // following ReadChangeStream response. + validate( + index == dataChange.getChunksCount() - 1, + "AWAITING_CELL_VALUE: Current mod is a chunked SetCell " + + "but not the last chunk, but it's not the last mod of the current response."); + return AWAITING_CELL_VALUE; + } + } + // Case 2: Current SetCell is not chunked. + builder.finishCell(); + return checkAndFinishMutationIfNeeded(dataChange, index + 1); + } + }; + + /** + * A state that represents a completed change stream record. It prevents new change stream records + * from being read until the current one has been consumed. The caller is supposed to consume the + * change stream record by calling {@link ChangeStreamStateMachine#consumeChangeStreamRecord()} + * which will reset the state to {@link ChangeStreamStateMachine#AWAITING_NEW_STREAM_RECORD}. + */ + private final State AWAITING_STREAM_RECORD_CONSUME = + new State() { + @Override + State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + throw new IllegalStateException( + "AWAITING_STREAM_RECORD_CONSUME: Skipping completed change stream record."); + } + + @Override + State handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + throw new IllegalStateException( + "AWAITING_STREAM_RECORD_CONSUME: Skipping completed change stream record."); + } + + @Override + State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { + throw new IllegalStateException( + "AWAITING_STREAM_RECORD_CONSUME: Skipping completed change stream record."); + } + }; + + /** + * Check if we should continue handling mods in the current DataChange or wrap up. There are 3 + * cases: + * + *
    + *
  • 1) index < dataChange.getChunksCount() -> continue to handle the next mod. + *
  • 2_1) index == dataChange.getChunksCount() && dataChange.done == true -> current change + * stream mutation is complete. Wrap it up and return {@link + * ChangeStreamStateMachine#AWAITING_STREAM_RECORD_CONSUME}. + *
  • 2_2) index == dataChange.getChunksCount() && dataChange.done != true -> current change + * stream mutation isn't complete. Return {@link ChangeStreamStateMachine#AWAITING_NEW_MOD} + * to wait for more mods in the next ReadChangeStreamResponse. + *
+ */ + private State checkAndFinishMutationIfNeeded( + ReadChangeStreamResponse.DataChange dataChange, int index) { + validate( + 0 <= index && index <= dataChange.getChunksCount(), + "checkAndFinishMutationIfNeeded: index out of bound."); + // Case 1): Handle the next mod. + if (index < dataChange.getChunksCount()) { + return AWAITING_NEW_MOD.handleMod(dataChange, index); + } + // If we reach here, it means that all the mods in this DataChange have been handled. We should + // finish up the logical mutation or wait for more mods in the next ReadChangeStreamResponse, + // depending on whether the current response is the last response for the logical mutation. + if (dataChange.getDone()) { + // Case 2_1): Current change stream mutation is complete. + validate(!dataChange.getToken().isEmpty(), "Last data change missing token"); + validate(dataChange.hasLowWatermark(), "Last data change missing lowWatermark"); + completeChangeStreamRecord = + builder.finishChangeStreamMutation(dataChange.getToken(), dataChange.getLowWatermark()); + return AWAITING_STREAM_RECORD_CONSUME; + } + // Case 2_2): The current DataChange itself is chunked, so wait for the next + // ReadChangeStreamResponse. Note that we should wait for the new mods instead + // of for the new change stream record since the current record hasn't finished yet. + return AWAITING_NEW_MOD; + } + + private void validate(boolean condition, String message) { + if (!condition) { + throw new ChangeStreamStateMachine.InvalidInputException( + message + + ". numHeartbeats: " + + numHeartbeats + + ", numCloseStreams: " + + numCloseStreams + + ", numDataChanges: " + + numDataChanges + + ", numNonCellMods: " + + numNonCellMods + + ", numCellChunks: " + + numCellChunks + + ", actualTotalSizeOfChunkedSetCell: " + + actualTotalSizeOfChunkedSetCell); + } + } + + static class InvalidInputException extends RuntimeException { + InvalidInputException(String message) { + super(message); + } + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index 938213fb36..a14fe001cd 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -87,15 +87,7 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti oos.close(); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); ChangeStreamMutation actual = (ChangeStreamMutation) ois.readObject(); - Assert.assertEquals(actual.getRowKey(), changeStreamMutation.getRowKey()); - Assert.assertEquals(actual.getType(), changeStreamMutation.getType()); - Assert.assertEquals(actual.getSourceClusterId(), changeStreamMutation.getSourceClusterId()); - Assert.assertEquals(actual.getCommitTimestamp(), changeStreamMutation.getCommitTimestamp()); - Assert.assertEquals(actual.getTieBreaker(), changeStreamMutation.getTieBreaker()); - Assert.assertEquals(actual.getToken(), changeStreamMutation.getToken()); - Assert.assertEquals(actual.getLowWatermark(), changeStreamMutation.getLowWatermark()); - assertThat(actual.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)) - .isEqualTo(changeStreamMutation.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)); + Assert.assertEquals(actual, changeStreamMutation); } @Test @@ -138,15 +130,7 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { oos.close(); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); ChangeStreamMutation actual = (ChangeStreamMutation) ois.readObject(); - Assert.assertEquals(actual.getRowKey(), changeStreamMutation.getRowKey()); - Assert.assertEquals(actual.getType(), changeStreamMutation.getType()); - Assert.assertEquals(actual.getSourceClusterId(), changeStreamMutation.getSourceClusterId()); - Assert.assertEquals(actual.getCommitTimestamp(), changeStreamMutation.getCommitTimestamp()); - Assert.assertEquals(actual.getTieBreaker(), changeStreamMutation.getTieBreaker()); - Assert.assertEquals(actual.getToken(), changeStreamMutation.getToken()); - Assert.assertEquals(actual.getLowWatermark(), changeStreamMutation.getLowWatermark()); - assertThat(actual.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)) - .isEqualTo(changeStreamMutation.toRowMutation(TABLE_ID).toProto(REQUEST_CONTEXT)); + Assert.assertEquals(actual, changeStreamMutation); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java new file mode 100644 index 0000000000..e29b914ffc --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java @@ -0,0 +1,446 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.TimestampRange; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter.ChangeStreamRecordBuilder; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class DefaultChangeStreamRecordAdapterTest { + + private final DefaultChangeStreamRecordAdapter adapter = new DefaultChangeStreamRecordAdapter(); + private ChangeStreamRecordBuilder changeStreamRecordBuilder; + + @Rule public ExpectedException expect = ExpectedException.none(); + + @Before + public void setUp() { + changeStreamRecordBuilder = adapter.createChangeStreamRecordBuilder(); + } + + @Test + public void isHeartbeatTest() { + ChangeStreamRecord heartbeatRecord = + Heartbeat.fromProto(ReadChangeStreamResponse.Heartbeat.getDefaultInstance()); + ChangeStreamRecord closeStreamRecord = + CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); + ChangeStreamRecord changeStreamMutationRecord = + ChangeStreamMutation.createGcMutation( + ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0) + .setToken("token") + .setLowWatermark(Timestamp.getDefaultInstance()) + .build(); + Assert.assertTrue(adapter.isHeartbeat(heartbeatRecord)); + Assert.assertFalse(adapter.isHeartbeat(closeStreamRecord)); + Assert.assertFalse(adapter.isHeartbeat(changeStreamMutationRecord)); + } + + @Test + public void getTokenFromHeartbeatTest() { + ChangeStreamRecord heartbeatRecord = + Heartbeat.fromProto( + ReadChangeStreamResponse.Heartbeat.newBuilder() + .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) + .setContinuationToken( + StreamContinuationToken.newBuilder().setToken("heartbeat-token").build()) + .build()); + Assert.assertEquals(adapter.getTokenFromHeartbeat(heartbeatRecord), "heartbeat-token"); + } + + @Test(expected = IllegalArgumentException.class) + public void getTokenFromHeartbeatInvalidTypeTest() { + ChangeStreamRecord closeStreamRecord = + CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); + adapter.getTokenFromHeartbeat(closeStreamRecord); + expect.expectMessage("record is not a Heartbeat."); + } + + @Test + public void isChangeStreamMutationTest() { + ChangeStreamRecord heartbeatRecord = + Heartbeat.fromProto(ReadChangeStreamResponse.Heartbeat.getDefaultInstance()); + ChangeStreamRecord closeStreamRecord = + CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); + ChangeStreamRecord changeStreamMutationRecord = + ChangeStreamMutation.createGcMutation( + ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0) + .setToken("token") + .setLowWatermark(Timestamp.getDefaultInstance()) + .build(); + Assert.assertFalse(adapter.isChangeStreamMutation(heartbeatRecord)); + Assert.assertFalse(adapter.isChangeStreamMutation(closeStreamRecord)); + Assert.assertTrue(adapter.isChangeStreamMutation(changeStreamMutationRecord)); + } + + @Test + public void getTokenFromChangeStreamMutationTest() { + ChangeStreamRecord changeStreamMutationRecord = + ChangeStreamMutation.createGcMutation( + ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0) + .setToken("change-stream-mutation-token") + .setLowWatermark(Timestamp.getDefaultInstance()) + .build(); + Assert.assertEquals( + adapter.getTokenFromChangeStreamMutation(changeStreamMutationRecord), + "change-stream-mutation-token"); + } + + @Test(expected = IllegalArgumentException.class) + public void getTokenFromChangeStreamMutationInvalidTypeTest() { + ChangeStreamRecord closeStreamRecord = + CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); + adapter.getTokenFromChangeStreamMutation(closeStreamRecord); + expect.expectMessage("record is not a ChangeStreamMutation."); + } + + @Test + public void heartbeatTest() { + ReadChangeStreamResponse.Heartbeat expectedHeartbeat = + ReadChangeStreamResponse.Heartbeat.newBuilder() + .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) + .setContinuationToken( + StreamContinuationToken.newBuilder().setToken("random-token").build()) + .build(); + assertThat(changeStreamRecordBuilder.onHeartbeat(expectedHeartbeat)) + .isEqualTo(Heartbeat.fromProto(expectedHeartbeat)); + // Call again. + assertThat(changeStreamRecordBuilder.onHeartbeat(expectedHeartbeat)) + .isEqualTo(Heartbeat.fromProto(expectedHeartbeat)); + } + + @Test + public void closeStreamTest() { + ReadChangeStreamResponse.CloseStream expectedCloseStream = + ReadChangeStreamResponse.CloseStream.newBuilder() + .addContinuationTokens( + StreamContinuationToken.newBuilder().setToken("random-token").build()) + .setStatus(Status.newBuilder().setCode(0).build()) + .build(); + assertThat(changeStreamRecordBuilder.onCloseStream(expectedCloseStream)) + .isEqualTo(CloseStream.fromProto(expectedCloseStream)); + // Call again. + assertThat(changeStreamRecordBuilder.onCloseStream(expectedCloseStream)) + .isEqualTo(CloseStream.fromProto(expectedCloseStream)); + } + + @Test(expected = IllegalArgumentException.class) + public void createHeartbeatWithExistingMutationShouldFailTest() { + changeStreamRecordBuilder.startGcMutation( + ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0); + changeStreamRecordBuilder.onHeartbeat(ReadChangeStreamResponse.Heartbeat.getDefaultInstance()); + } + + @Test(expected = IllegalArgumentException.class) + public void createCloseStreamWithExistingMutationShouldFailTest() { + changeStreamRecordBuilder.startGcMutation( + ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0); + changeStreamRecordBuilder.onCloseStream( + ReadChangeStreamResponse.CloseStream.getDefaultInstance()); + } + + @Test + public void singleDeleteFamilyTest() { + // Suppose this is the mod we get from the ReadChangeStreamResponse. + Mutation.DeleteFromFamily deleteFromFamily = + Mutation.DeleteFromFamily.newBuilder().setFamilyName("fake-family").build(); + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + + // Expected logical mutation in the change stream record. + ChangeStreamMutation expectedChangeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.deleteFamily(deleteFromFamily.getFamilyName()); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + // Call again. + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + } + + @Test + public void singleDeleteCellTest() { + // Suppose this is the mod we get from the ReadChangeStreamResponse. + Mutation.DeleteFromColumn deleteFromColumn = + Mutation.DeleteFromColumn.newBuilder() + .setFamilyName("fake-family") + .setColumnQualifier(ByteString.copyFromUtf8("fake-qualifier")) + .setTimeRange( + TimestampRange.newBuilder() + .setStartTimestampMicros(1000L) + .setEndTimestampMicros(2000L) + .build()) + .build(); + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + + // Expected logical mutation in the change stream record. + ChangeStreamMutation expectedChangeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteCells( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + Range.TimestampRange.create(1000L, 2000L)) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.deleteCells( + deleteFromColumn.getFamilyName(), + deleteFromColumn.getColumnQualifier(), + Range.TimestampRange.create( + deleteFromColumn.getTimeRange().getStartTimestampMicros(), + deleteFromColumn.getTimeRange().getEndTimestampMicros())); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + // Call again. + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + } + + @Test + public void singleNonChunkedCellTest() { + // Expected logical mutation in the change stream record. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation expectedChangeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 100L, + ByteString.copyFromUtf8("fake-value")) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. + // Suppose the SetCell is not chunked and the state machine calls `cellValue()` once. + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.startCell( + "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("fake-value")); + changeStreamRecordBuilder.finishCell(); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + // Call again. + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + } + + @Test + public void singleChunkedCellTest() { + // Expected logical mutation in the change stream record. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation expectedChangeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 100L, + ByteString.copyFromUtf8("fake-value1-value2")) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. + // Suppose the SetCell is chunked into two pieces and the state machine calls `cellValue()` + // twice. + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.startCell( + "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("fake-value1")); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value2")); + changeStreamRecordBuilder.finishCell(); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + // Call again. + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + } + + @Test + public void multipleChunkedCellsTest() { + // Expected logical mutation in the change stream record. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation.Builder expectedChangeStreamMutationBuilder = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + for (int i = 0; i < 10; ++i) { + expectedChangeStreamMutationBuilder.setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 100L, + ByteString.copyFromUtf8(i + "-fake-value1-value2-value3")); + } + expectedChangeStreamMutationBuilder.setToken("fake-token").setLowWatermark(fakeLowWatermark); + + // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + for (int i = 0; i < 10; ++i) { + changeStreamRecordBuilder.startCell( + "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8(i + "-fake-value1")); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value2")); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value3")); + changeStreamRecordBuilder.finishCell(); + } + // Check that they're the same. + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutationBuilder.build()); + // Call again. + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutationBuilder.build()); + } + + @Test + public void multipleDifferentModsTest() { + // Expected logical mutation in the change stream record, which contains one DeleteFromFamily, + // one non-chunked cell, and one chunked cell. + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation.Builder expectedChangeStreamMutationBuilder = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 100L, + ByteString.copyFromUtf8("non-chunked-value")) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 100L, + ByteString.copyFromUtf8("chunked-value")) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark); + + // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.deleteFamily("fake-family"); + // Add non-chunked cell. + changeStreamRecordBuilder.startCell( + "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("non-chunked-value")); + changeStreamRecordBuilder.finishCell(); + // Add chunked cell. + changeStreamRecordBuilder.startCell( + "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("chunked")); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value")); + changeStreamRecordBuilder.finishCell(); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutationBuilder.build()); + } + + @Test + public void resetTest() { + // Build a Heartbeat. + ReadChangeStreamResponse.Heartbeat expectedHeartbeat = + ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); + assertThat(changeStreamRecordBuilder.onHeartbeat(expectedHeartbeat)) + .isEqualTo(Heartbeat.fromProto(expectedHeartbeat)); + + // Reset and build a CloseStream. + changeStreamRecordBuilder.reset(); + ReadChangeStreamResponse.CloseStream expectedCloseStream = + ReadChangeStreamResponse.CloseStream.getDefaultInstance(); + assertThat(changeStreamRecordBuilder.onCloseStream(expectedCloseStream)) + .isEqualTo(CloseStream.fromProto(expectedCloseStream)); + + // Reset and build a DeleteFamily. + changeStreamRecordBuilder.reset(); + Mutation deleteFromFamily = + Mutation.newBuilder() + .setDeleteFromFamily( + Mutation.DeleteFromFamily.newBuilder().setFamilyName("fake-family").build()) + .build(); + Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); + Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); + ChangeStreamMutation expectedChangeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .deleteFamily("fake-family") + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.deleteFamily(deleteFromFamily.getDeleteFromFamily().getFamilyName()); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + + // Reset a build a cell. + changeStreamRecordBuilder.reset(); + expectedChangeStreamMutation = + ChangeStreamMutation.createUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + .setCell( + "fake-family", + ByteString.copyFromUtf8("fake-qualifier"), + 100L, + ByteString.copyFromUtf8("fake-value1-value2")) + .setToken("fake-token") + .setLowWatermark(fakeLowWatermark) + .build(); + + changeStreamRecordBuilder.startUserMutation( + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + changeStreamRecordBuilder.startCell( + "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("fake-value1")); + changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value2")); + changeStreamRecordBuilder.finishCell(); + assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + .isEqualTo(expectedChangeStreamMutation); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java new file mode 100644 index 0000000000..d86df91c35 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachineTest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.DefaultChangeStreamRecordAdapter; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ChangeStreamStateMachineTest { + ChangeStreamStateMachine changeStreamStateMachine; + + @Before + public void setUp() throws Exception { + changeStreamStateMachine = + new ChangeStreamStateMachine<>( + new DefaultChangeStreamRecordAdapter().createChangeStreamRecordBuilder()); + } + + @Test + public void testErrorHandlingStats() { + ReadChangeStreamResponse.DataChange dataChange = + ReadChangeStreamResponse.DataChange.newBuilder().build(); + + ChangeStreamStateMachine.InvalidInputException actualError = null; + try { + changeStreamStateMachine.handleDataChange(dataChange); + } catch (ChangeStreamStateMachine.InvalidInputException e) { + actualError = e; + } + + assertThat(actualError) + .hasMessageThat() + .containsMatch("AWAITING_NEW_STREAM_RECORD: First data change missing rowKey"); + assertThat(actualError).hasMessageThat().contains("numHeartbeats: 0"); + assertThat(actualError).hasMessageThat().contains("numCloseStreams: 0"); + assertThat(actualError).hasMessageThat().contains("numDataChanges: 1"); + assertThat(actualError).hasMessageThat().contains("numNonCellMods: 0"); + assertThat(actualError).hasMessageThat().contains("numCellChunks: 0"); + assertThat(actualError).hasMessageThat().contains("actualTotalSizeOfChunkedSetCell: 0"); + } +} From c612cf698de6e3b7f639034d262769083d4715cd Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:19:31 -0400 Subject: [PATCH 06/27] feat: Add readChangeStream callables (#1338) * feat: Add readChangeStream callables The merging logic is tested in: ReadChangeStreamMergingCallableTest ReadChangeStreamMergingAcceptanceTest * fix: Fix styles * fix: Make some methods package private Remove all the mutation related tests in ChangeStreamRecordMergingCallableTest. Just use the ReadChangeStreamMergingAcceptanceTest. * fix: Address comments * fix: Address some comments * fix: Add test for [{SC_chunk1}, {SC_chunk2}, {SC_chunk3}]->ChangeStreamMutation{SC} * fix: Update the changestream.json file for better description * fix: Update code comments to make style-check happy * fix: Add sanity check for ChunkedValueSize. Add comments to explain why we can put the AcceptanceTest in the google-cloud-bigtable repo * fix: Fix comment Co-authored-by: Teng Zhong --- google-cloud-bigtable/pom.xml | 33 + .../bigtable/data/v2/BigtableDataClient.java | 155 ++ .../data/v2/models/ChangeStreamMutation.java | 9 +- .../bigtable/data/v2/models/SetCell.java | 5 +- .../data/v2/stub/EnhancedBigtableStub.java | 100 ++ .../v2/stub/EnhancedBigtableStubSettings.java | 42 +- .../ChangeStreamRecordMerger.java | 112 ++ .../ChangeStreamRecordMergingCallable.java | 63 + .../ChangeStreamStateMachine.java | 25 +- .../ReadChangeStreamUserCallable.java | 51 + .../src/main/proto/changestream_tests.proto | 63 + .../src/main/resources/changestream.json | 1379 +++++++++++++++++ .../data/v2/BigtableDataClientTests.java | 35 + .../EnhancedBigtableStubSettingsTest.java | 1 + ...ChangeStreamRecordMergingCallableTest.java | 124 ++ ...ReadChangeStreamMergingAcceptanceTest.java | 263 ++++ .../ReadChangeStreamUserCallableTest.java | 48 + 17 files changed, 2496 insertions(+), 12 deletions(-) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallable.java create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallable.java create mode 100644 google-cloud-bigtable/src/main/proto/changestream_tests.proto create mode 100644 google-cloud-bigtable/src/main/resources/changestream.json create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 8cd922d5f4..1ad646c868 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -36,6 +36,10 @@ batch-bigtable.googleapis.com:443 + + 1.44.0 + 3.19.3 + ${protobuf.version} @@ -545,7 +549,36 @@ + + + kr.motd.maven + os-maven-plugin + 1.6.0 + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + + + compile + compile-custom + + + + + + com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier} + + grpc-java + + io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} + + + org.codehaus.mojo build-helper-maven-plugin diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index 38bc4dc811..2de6e9b94a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -31,11 +31,13 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.models.BulkMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Filters; import com.google.cloud.bigtable.data.v2.models.Filters.Filter; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowAdapter; @@ -1627,6 +1629,159 @@ public ServerStreamingCallable listChangeStreamPartitionsCalla return stub.listChangeStreamPartitionsCallable(); } + /** + * Convenience method for synchronously streaming the results of a {@link ReadChangeStreamQuery}. + * The returned ServerStream instance is not threadsafe, it can only be used from single thread. + * + *

Sample code: + * + *

{@code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
+   *   String tableId = "[TABLE]";
+   *
+   *   ReadChangeStreamQuery query = ReadChangeStreamQuery.create(tableId)
+   *          .streamPartition("START_KEY", "END_KEY")
+   *          .startTime(Timestamp.newBuilder().setSeconds(100).build());
+   *
+   *   try {
+   *     ServerStream stream = bigtableDataClient.readChangeStream(query);
+   *     int count = 0;
+   *
+   *     // Iterator style
+   *     for (ChangeStreamRecord record : stream) {
+   *       if (++count > 10) {
+   *         stream.cancel();
+   *         break;
+   *       }
+   *       // Do something with the change stream record.
+   *     }
+   *   } catch (NotFoundException e) {
+   *     System.out.println("Tried to read a non-existent table");
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   * }
+   * }
+ * + * @see ServerStreamingCallable For call styles. + * @see ReadChangeStreamQuery For query options. + */ + @InternalApi("Used in Changestream beam pipeline.") + public ServerStream readChangeStream(ReadChangeStreamQuery query) { + return readChangeStreamCallable().call(query); + } + + /** + * Convenience method for asynchronously streaming the results of a {@link ReadChangeStreamQuery}. + * + *

Sample code: + * + *

{@code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
+   *   String tableId = "[TABLE]";
+   *
+   *   ReadChangeStreamQuery query = ReadChangeStreamQuery.create(tableId)
+   *          .streamPartition("START_KEY", "END_KEY")
+   *          .startTime(Timestamp.newBuilder().setSeconds(100).build());
+   *
+   *   bigtableDataClient.readChangeStreamAsync(query, new ResponseObserver() {
+   *     StreamController controller;
+   *     int count = 0;
+   *
+   *     public void onStart(StreamController controller) {
+   *       this.controller = controller;
+   *     }
+   *     public void onResponse(ChangeStreamRecord record) {
+   *       if (++count > 10) {
+   *         controller.cancel();
+   *         return;
+   *       }
+   *       // Do something with the change stream record.
+   *     }
+   *     public void onError(Throwable t) {
+   *       if (t instanceof NotFoundException) {
+   *         System.out.println("Tried to read a non-existent table");
+   *       } else {
+   *         t.printStackTrace();
+   *       }
+   *     }
+   *     public void onComplete() {
+   *       // Handle stream completion
+   *     }
+   *   });
+   * }
+   * }
+ */ + @InternalApi("Used in Changestream beam pipeline.") + public void readChangeStreamAsync( + ReadChangeStreamQuery query, ResponseObserver observer) { + readChangeStreamCallable().call(query, observer); + } + + /** + * Streams back the results of the query. The returned callable object allows for customization of + * api invocation. + * + *

Sample code: + * + *

{@code
+   * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) {
+   *   String tableId = "[TABLE]";
+   *
+   *   ReadChangeStreamQuery query = ReadChangeStreamQuery.create(tableId)
+   *          .streamPartition("START_KEY", "END_KEY")
+   *          .startTime(Timestamp.newBuilder().setSeconds(100).build());
+   *
+   *   // Iterator style
+   *   try {
+   *     for(ChangeStreamRecord record : bigtableDataClient.readChangeStreamCallable().call(query)) {
+   *       // Do something with record
+   *     }
+   *   } catch (NotFoundException e) {
+   *     System.out.println("Tried to read a non-existent table");
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   *
+   *   // Sync style
+   *   try {
+   *     List records = bigtableDataClient.readChangeStreamCallable().all().call(query);
+   *   } catch (NotFoundException e) {
+   *     System.out.println("Tried to read a non-existent table");
+   *   } catch (RuntimeException e) {
+   *     e.printStackTrace();
+   *   }
+   *
+   *   // Point look up
+   *   ApiFuture recordFuture =
+   *     bigtableDataClient.readChangeStreamCallable().first().futureCall(query);
+   *
+   *   ApiFutures.addCallback(recordFuture, new ApiFutureCallback() {
+   *     public void onFailure(Throwable t) {
+   *       if (t instanceof NotFoundException) {
+   *         System.out.println("Tried to read a non-existent table");
+   *       } else {
+   *         t.printStackTrace();
+   *       }
+   *     }
+   *     public void onSuccess(ChangeStreamRecord result) {
+   *       System.out.println("Got record: " + result);
+   *     }
+   *   }, MoreExecutors.directExecutor());
+   *
+   *   // etc
+   * }
+   * }
+ * + * @see ServerStreamingCallable For call styles. + * @see ReadChangeStreamQuery For query options. + */ + @InternalApi("Used in Changestream beam pipeline.") + public ServerStreamingCallable + readChangeStreamCallable() { + return stub.readChangeStreamCallable(); + } + /** Close the clients and releases all associated resources. */ @Override public void close() { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index 10571ecd1f..db0891fda1 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -17,6 +17,7 @@ import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; +import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; import com.google.common.base.Preconditions; @@ -33,7 +34,7 @@ /** * A ChangeStreamMutation represents a list of mods(represented by List<{@link Entry}>) targeted at - * a single row, which is concatenated by (TODO:ChangeStreamRecordMerger). It represents a logical + * a single row, which is concatenated by {@link ChangeStreamRecordMerger}. It represents a logical * row mutation and can be converted to the original write request(i.e. {@link RowMutation} or * {@link RowMutationEntry}. * @@ -245,17 +246,17 @@ Builder deleteFamily(@Nonnull String familyName) { return this; } - public Builder setToken(@Nonnull String token) { + Builder setToken(@Nonnull String token) { this.token = token; return this; } - public Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { + Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { this.lowWatermark = lowWatermark; return this; } - public ChangeStreamMutation build() { + ChangeStreamMutation build() { Preconditions.checkArgument( token != null && lowWatermark != null, "ChangeStreamMutation must have a continuation token and low watermark."); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java index a157b5cd73..0c1add67f8 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java @@ -16,13 +16,14 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.auto.value.AutoValue; +import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; import com.google.protobuf.ByteString; import java.io.Serializable; import javax.annotation.Nonnull; /** - * Representation of a SetCell mod in a data change, whose value is concatenated by - * (TODO:ChangeStreamRecordMerger) in case of SetCell value chunking. + * Representation of a SetCell mod in a data change, whose value is concatenated by {@link + * ChangeStreamRecordMerger} in case of SetCell value chunking. */ @AutoValue public abstract class SetCell implements Entry, Serializable { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 7d2cd85b65..7872b1e07e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -53,6 +53,8 @@ import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.MutateRowsResponse; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadModifyWriteRowResponse; import com.google.bigtable.v2.ReadRowsRequest; @@ -64,16 +66,23 @@ import com.google.cloud.bigtable.data.v2.internal.JwtCredentialsWithAudience; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.BulkMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; +import com.google.cloud.bigtable.data.v2.models.DefaultChangeStreamRecordAdapter; import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowAdapter; import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; +import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMergingCallable; import com.google.cloud.bigtable.data.v2.stub.changestream.ListChangeStreamPartitionsUserCallable; +import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamUserCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerStreamingCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerUnaryCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsTracerFactory; @@ -147,6 +156,9 @@ public class EnhancedBigtableStub implements AutoCloseable { private final ServerStreamingCallable listChangeStreamPartitionsCallable; + private final ServerStreamingCallable + readChangeStreamCallable; + public static EnhancedBigtableStub create(EnhancedBigtableStubSettings settings) throws IOException { settings = finalizeSettings(settings, Tags.getTagger(), Stats.getStatsRecorder()); @@ -290,6 +302,8 @@ public EnhancedBigtableStub(EnhancedBigtableStubSettings settings, ClientContext checkAndMutateRowCallable = createCheckAndMutateRowCallable(); readModifyWriteRowCallable = createReadModifyWriteRowCallable(); listChangeStreamPartitionsCallable = createListChangeStreamPartitionsCallable(); + readChangeStreamCallable = + createReadChangeStreamCallable(new DefaultChangeStreamRecordAdapter()); } // @@ -874,6 +888,86 @@ public Map extract( return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); } + /** + * Creates a callable chain to handle streaming ReadChangeStream RPCs. The chain will: + * + *
    + *
  • Convert a {@link ReadChangeStreamQuery} into a {@link ReadChangeStreamRequest} and + * dispatch the RPC. + *
  • Upon receiving the response stream, it will produce a stream of ChangeStreamRecordT. In + * case of mutations, it will merge the {@link ReadChangeStreamResponse.DataChange}s into + * {@link ChangeStreamMutation}. The actual change stream record implementation can be + * configured by the {@code changeStreamRecordAdapter} parameter. + *
  • TODO: Retry/resume on failure. + *
  • Add tracing & metrics. + *
+ */ + public + ServerStreamingCallable + createReadChangeStreamCallable( + ChangeStreamRecordAdapter changeStreamRecordAdapter) { + ServerStreamingCallable base = + GrpcRawCallableFactory.createServerStreamingCallable( + GrpcCallSettings.newBuilder() + .setMethodDescriptor(BigtableGrpc.getReadChangeStreamMethod()) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ReadChangeStreamRequest readChangeStreamRequest) { + return ImmutableMap.of( + "table_name", readChangeStreamRequest.getTableName(), + "app_profile_id", readChangeStreamRequest.getAppProfileId()); + } + }) + .build(), + settings.readChangeStreamSettings().getRetryableCodes()); + + ServerStreamingCallable withStatsHeaders = + new StatsHeadersServerStreamingCallable<>(base); + + // Sometimes ReadChangeStream connections are disconnected via an RST frame. This error is + // transient and should be treated similar to UNAVAILABLE. However, this exception has an + // INTERNAL error code which by default is not retryable. Convert the exception it can be + // retried in the client. + ServerStreamingCallable convertException = + new ConvertStreamExceptionCallable<>(withStatsHeaders); + + ServerStreamingCallable merging = + new ChangeStreamRecordMergingCallable<>(convertException, changeStreamRecordAdapter); + + // Copy idle timeout settings for watchdog. + ServerStreamingCallSettings innerSettings = + ServerStreamingCallSettings.newBuilder() + // TODO: setResumptionStrategy. + .setRetryableCodes(settings.readChangeStreamSettings().getRetryableCodes()) + .setRetrySettings(settings.readChangeStreamSettings().getRetrySettings()) + .setIdleTimeout(settings.readChangeStreamSettings().getIdleTimeout()) + .build(); + + ServerStreamingCallable watched = + Callables.watched(merging, innerSettings, clientContext); + + ServerStreamingCallable withBigtableTracer = + new BigtableTracerStreamingCallable<>(watched); + + // TODO: Add ReadChangeStreamRetryCompletedCallable. + + ServerStreamingCallable readChangeStreamCallable = + Callables.retrying(withBigtableTracer, innerSettings, clientContext); + + ServerStreamingCallable + readChangeStreamUserCallable = + new ReadChangeStreamUserCallable<>(readChangeStreamCallable, requestContext); + + SpanName span = getSpanName("ReadChangeStream"); + ServerStreamingCallable traced = + new TracedServerStreamingCallable<>( + readChangeStreamUserCallable, clientContext.getTracerFactory(), span); + + return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); + } + /** * Wraps a callable chain in a user presentable callable that will inject the default call context * and trace the call. @@ -935,6 +1029,12 @@ public UnaryCallable readModifyWriteRowCallable() { public ServerStreamingCallable listChangeStreamPartitionsCallable() { return listChangeStreamPartitionsCallable; } + + /** Returns a streaming read change stream callable. */ + public ServerStreamingCallable + readChangeStreamCallable() { + return readChangeStreamCallable; + } //
private SpanName getSpanName(String methodName) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 83f0445bc5..68769c9602 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -35,9 +35,11 @@ import com.google.auth.Credentials; import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.Version; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; @@ -154,6 +156,26 @@ public class EnhancedBigtableStubSettings extends StubSettings READ_CHANGE_STREAM_RETRY_CODES = + ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(Code.ABORTED).build(); + + private static final RetrySettings READ_CHANGE_STREAM_RETRY_SETTINGS = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(10)) + .setRetryDelayMultiplier(2.0) + .setMaxRetryDelay(Duration.ofMinutes(1)) + .setMaxAttempts(10) + .setJittered(true) + .setInitialRpcTimeout(Duration.ofMinutes(5)) + .setRpcTimeoutMultiplier(2.0) + .setMaxRpcTimeout(Duration.ofMinutes(5)) + .setTotalTimeout(Duration.ofHours(12)) + .build(); + /** * Scopes that are equivalent to JWT's audience. * @@ -190,8 +212,9 @@ public class EnhancedBigtableStubSettings extends StubSettings checkAndMutateRowSettings; private final UnaryCallSettings readModifyWriteRowSettings; - private final ServerStreamingCallSettings listChangeStreamPartitionsSettings; + private final ServerStreamingCallSettings + readChangeStreamSettings; private EnhancedBigtableStubSettings(Builder builder) { super(builder); @@ -228,6 +251,7 @@ private EnhancedBigtableStubSettings(Builder builder) { checkAndMutateRowSettings = builder.checkAndMutateRowSettings.build(); readModifyWriteRowSettings = builder.readModifyWriteRowSettings.build(); listChangeStreamPartitionsSettings = builder.listChangeStreamPartitionsSettings.build(); + readChangeStreamSettings = builder.readChangeStreamSettings.build(); } /** Create a new builder. */ @@ -515,6 +539,11 @@ public ServerStreamingCallSettings listChangeStreamPartitionsS return listChangeStreamPartitionsSettings; } + public ServerStreamingCallSettings + readChangeStreamSettings() { + return readChangeStreamSettings; + } + /** Returns a builder containing all the values of this settings class. */ public Builder toBuilder() { return new Builder(this); @@ -539,9 +568,10 @@ public static class Builder extends StubSettings.Builder checkAndMutateRowSettings; private final UnaryCallSettings.Builder readModifyWriteRowSettings; - private final ServerStreamingCallSettings.Builder listChangeStreamPartitionsSettings; + private final ServerStreamingCallSettings.Builder + readChangeStreamSettings; /** * Initializes a new Builder with sane defaults for all settings. @@ -659,6 +689,12 @@ private Builder() { .setRetryableCodes(LIST_CHANGE_STREAM_PARTITIONS_RETRY_CODES) .setRetrySettings(LIST_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS) .setIdleTimeout(Duration.ofMinutes(5)); + + readChangeStreamSettings = ServerStreamingCallSettings.newBuilder(); + readChangeStreamSettings + .setRetryableCodes(READ_CHANGE_STREAM_RETRY_CODES) + .setRetrySettings(READ_CHANGE_STREAM_RETRY_SETTINGS) + .setIdleTimeout(Duration.ofMinutes(5)); } private Builder(EnhancedBigtableStubSettings settings) { @@ -680,6 +716,7 @@ private Builder(EnhancedBigtableStubSettings settings) { checkAndMutateRowSettings = settings.checkAndMutateRowSettings.toBuilder(); readModifyWriteRowSettings = settings.readModifyWriteRowSettings.toBuilder(); listChangeStreamPartitionsSettings = settings.listChangeStreamPartitionsSettings.toBuilder(); + readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); } // @@ -892,6 +929,7 @@ public String toString() { .add("checkAndMutateRowSettings", checkAndMutateRowSettings) .add("readModifyWriteRowSettings", readModifyWriteRowSettings) .add("listChangeStreamPartitionsSettings", listChangeStreamPartitionsSettings) + .add("readChangeStreamSettings", readChangeStreamSettings) .add("parent", super.toString()) .toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java new file mode 100644 index 0000000000..0b4bf5acdb --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java @@ -0,0 +1,112 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.api.core.InternalApi; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter; +import com.google.cloud.bigtable.gaxx.reframing.Reframer; +import com.google.cloud.bigtable.gaxx.reframing.ReframingResponseObserver; +import com.google.common.base.Preconditions; +import java.util.ArrayDeque; +import java.util.Queue; + +/** + * An implementation of a {@link Reframer} that feeds the change stream record merging {@link + * ChangeStreamStateMachine}. + * + *

{@link ReframingResponseObserver} pushes {@link ReadChangeStreamResponse}s into this class and + * pops a change stream record containing one of the following: 1) Heartbeat. 2) CloseStream. 3) + * ChangeStreamMutation(a representation of a fully merged logical mutation). + * + *

Example usage: + * + *

{@code
+ * ChangeStreamRecordMerger changeStreamRecordMerger =
+ *     new ChangeStreamRecordMerger<>(myChangeStreamRecordAdaptor);
+ *
+ * while(responseIterator.hasNext()) {
+ *   ReadChangeStreamResponse response = responseIterator.next();
+ *
+ *   if (changeStreamRecordMerger.hasFullFrame()) {
+ *     ChangeStreamRecord changeStreamRecord = changeStreamRecordMerger.pop();
+ *     // Do something with change stream record.
+ *   } else {
+ *     changeStreamRecordMerger.push(response);
+ *   }
+ * }
+ *
+ * if (changeStreamRecordMerger.hasPartialFrame()) {
+ *   throw new RuntimeException("Incomplete stream");
+ * }
+ *
+ * }
+ * + *

This class is considered an internal implementation detail and not meant to be used by + * applications. + * + *

Package-private for internal use. + * + * @see ReframingResponseObserver for more details + */ +@InternalApi +public class ChangeStreamRecordMerger + implements Reframer { + private final ChangeStreamStateMachine changeStreamStateMachine; + private final Queue changeStreamRecord; + + public ChangeStreamRecordMerger( + ChangeStreamRecordAdapter.ChangeStreamRecordBuilder + changeStreamRecordBuilder) { + changeStreamStateMachine = new ChangeStreamStateMachine<>(changeStreamRecordBuilder); + changeStreamRecord = new ArrayDeque<>(); + } + + @Override + public void push(ReadChangeStreamResponse response) { + if (response.hasHeartbeat()) { + changeStreamStateMachine.handleHeartbeat(response.getHeartbeat()); + } else if (response.hasCloseStream()) { + changeStreamStateMachine.handleCloseStream(response.getCloseStream()); + } else { + changeStreamStateMachine.handleDataChange(response.getDataChange()); + } + if (changeStreamStateMachine.hasCompleteChangeStreamRecord()) { + changeStreamRecord.add(changeStreamStateMachine.consumeChangeStreamRecord()); + } + } + + @Override + public boolean hasFullFrame() { + return !changeStreamRecord.isEmpty(); + } + + @Override + public boolean hasPartialFrame() { + // Check if buffer in this class contains data. If an assembled is still not available, then + // that means `buffer` has been fully consumed. The last place to check is the + // ChangeStreamStateMachine buffer, to see if it's holding on to an incomplete change + // stream record. + return hasFullFrame() || changeStreamStateMachine.isChangeStreamRecordInProgress(); + } + + @Override + public ChangeStreamRecordT pop() { + return Preconditions.checkNotNull( + changeStreamRecord.poll(), + "ChangeStreamRecordMerger.pop() called when there are no change stream records."); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallable.java new file mode 100644 index 0000000000..5c6c07451b --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallable.java @@ -0,0 +1,63 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter; +import com.google.cloud.bigtable.gaxx.reframing.ReframingResponseObserver; + +/** + * A ServerStreamingCallable that consumes {@link ReadChangeStreamResponse}s and produces change + * stream records. + * + *

This class delegates all the work to gax's {@link ReframingResponseObserver} and the logic to + * {@link ChangeStreamRecordMerger}. + * + *

This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class ChangeStreamRecordMergingCallable + extends ServerStreamingCallable { + private final ServerStreamingCallable inner; + private final ChangeStreamRecordAdapter changeStreamRecordAdapter; + + public ChangeStreamRecordMergingCallable( + ServerStreamingCallable inner, + ChangeStreamRecordAdapter changeStreamRecordAdapter) { + this.inner = inner; + this.changeStreamRecordAdapter = changeStreamRecordAdapter; + } + + @Override + public void call( + ReadChangeStreamRequest request, + ResponseObserver responseObserver, + ApiCallContext context) { + ChangeStreamRecordAdapter.ChangeStreamRecordBuilder + changeStreamRecordBuilder = changeStreamRecordAdapter.createChangeStreamRecordBuilder(); + ChangeStreamRecordMerger merger = + new ChangeStreamRecordMerger<>(changeStreamRecordBuilder); + ReframingResponseObserver innerObserver = + new ReframingResponseObserver<>(responseObserver, merger); + inner.call(request, innerObserver, context); + } +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java index 7ab7fa2b7b..ea555ea445 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java @@ -98,6 +98,13 @@ final class ChangeStreamStateMachine { private int numDataChanges = 0; private int numNonCellMods = 0; private int numCellChunks = 0; // 1 for non-chunked cell. + /** + * Expected total size of a chunked SetCell value, given by the {@link + * ReadChangeStreamResponse.MutationChunk.ChunkInfo}. This value should be the same for all chunks + * of a SetCell. + */ + private int expectedTotalSizeOfChunkedSetCell = 0; + private int actualTotalSizeOfChunkedSetCell = 0; private ChangeStreamRecordT completeChangeStreamRecord; @@ -219,6 +226,7 @@ private void reset() { numDataChanges = 0; numNonCellMods = 0; numCellChunks = 0; + expectedTotalSizeOfChunkedSetCell = 0; actualTotalSizeOfChunkedSetCell = 0; completeChangeStreamRecord = null; @@ -383,7 +391,11 @@ State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { // If it has chunk info, it must be the first chunk of a chunked SetCell. validate( chunk.getChunkInfo().getChunkedValueOffset() == 0, - "First chunk of a chunked cell must start with offset==0."); + "AWAITING_NEW_MOD: First chunk of a chunked cell must start with offset==0."); + validate( + chunk.getChunkInfo().getChunkedValueSize() > 0, + "AWAITING_NEW_MOD: First chunk of a chunked cell must have a positive chunked value size."); + expectedTotalSizeOfChunkedSetCell = chunk.getChunkInfo().getChunkedValueSize(); actualTotalSizeOfChunkedSetCell = 0; } builder.startCell( @@ -459,15 +471,18 @@ State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { validate( chunk.getChunkInfo().getChunkedValueSize() > 0, "AWAITING_CELL_VALUE: Chunked value size must be positive."); + validate( + chunk.getChunkInfo().getChunkedValueSize() == expectedTotalSizeOfChunkedSetCell, + "AWAITING_CELL_VALUE: Chunked value size must be the same for all chunks."); actualTotalSizeOfChunkedSetCell += setCell.getValue().size(); // If it's the last chunk of the chunked SetCell, finish the cell. if (chunk.getChunkInfo().getLastChunk()) { builder.finishCell(); validate( - actualTotalSizeOfChunkedSetCell == chunk.getChunkInfo().getChunkedValueSize(), + actualTotalSizeOfChunkedSetCell == expectedTotalSizeOfChunkedSetCell, "Chunked value size in ChunkInfo doesn't match the actual total size. " - + "ChunkInfo: " - + chunk.getChunkInfo().getChunkedValueSize() + + "Expected total size: " + + expectedTotalSizeOfChunkedSetCell + "; actual total size: " + actualTotalSizeOfChunkedSetCell); return checkAndFinishMutationIfNeeded(dataChange, index + 1); @@ -569,6 +584,8 @@ private void validate(boolean condition, String message) { + numNonCellMods + ", numCellChunks: " + numCellChunks + + ", expectedTotalSizeOfChunkedSetCell: " + + expectedTotalSizeOfChunkedSetCell + ", actualTotalSizeOfChunkedSetCell: " + actualTotalSizeOfChunkedSetCell); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallable.java new file mode 100644 index 0000000000..0c78199ccd --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallable.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; + +/** + * A ServerStreamingCallable that converts a {@link ReadChangeStreamQuery} to a {@link + * ReadChangeStreamRequest}. + */ +@InternalApi("Used in Changestream beam pipeline.") +public class ReadChangeStreamUserCallable + extends ServerStreamingCallable { + private final ServerStreamingCallable inner; + private final RequestContext requestContext; + + public ReadChangeStreamUserCallable( + ServerStreamingCallable inner, + RequestContext requestContext) { + this.inner = inner; + this.requestContext = requestContext; + } + + @Override + public void call( + ReadChangeStreamQuery request, + ResponseObserver responseObserver, + ApiCallContext context) { + ReadChangeStreamRequest innerRequest = request.toProto(requestContext); + inner.call(innerRequest, responseObserver, context); + } +} diff --git a/google-cloud-bigtable/src/main/proto/changestream_tests.proto b/google-cloud-bigtable/src/main/proto/changestream_tests.proto new file mode 100644 index 0000000000..779cdfba35 --- /dev/null +++ b/google-cloud-bigtable/src/main/proto/changestream_tests.proto @@ -0,0 +1,63 @@ +// Copyright 2022, Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.conformance.bigtable.v2; + +import "google/bigtable/v2/bigtable.proto"; +import "google/protobuf/timestamp.proto"; +import "google/bigtable/v2/data.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2.Tests.Conformance"; +option java_outer_classname = "ChangeStreamTestDefinition"; +option java_package = "com.google.cloud.conformance.bigtable.v2"; +option go_package = "google/cloud/conformance/bigtable/v2"; + +message ChangeStreamTestFile { + repeated ReadChangeStreamTest read_change_stream_tests = 1; +} + +message ReadChangeStreamTest { + + message TestChangeStreamMutation { + bytes row_key = 1; + google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 2; + string source_cluster_id = 3; + google.protobuf.Timestamp commit_timestamp = 4; + int64 tiebreaker = 5; + string token = 6; + google.protobuf.Timestamp low_watermark = 7; + repeated google.bigtable.v2.Mutation mutations = 8; + } + + message TestChangeStreamRecord { + oneof record { + google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 1; + google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 2; + TestChangeStreamMutation change_stream_mutation = 3; + } + } + + // Expected results of reading the change stream. + // Only the last result can be an error. + message Result { + TestChangeStreamRecord record = 1; + bool error = 2; + } + + string description = 1; + repeated google.bigtable.v2.ReadChangeStreamResponse api_responses = 2; + repeated Result results = 3; +} diff --git a/google-cloud-bigtable/src/main/resources/changestream.json b/google-cloud-bigtable/src/main/resources/changestream.json new file mode 100644 index 0000000000..2dd886f805 --- /dev/null +++ b/google-cloud-bigtable/src/main/resources/changestream.json @@ -0,0 +1,1379 @@ +{ + "readChangeStreamTests": [ + { + "description": "1 heartbeat", + "api_responses": [ + { + "heartbeat": { + "continuation_token": { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "" + } + }, + "token": "heartbeat-token" + }, + "low_watermark": "2022-07-01T00:00:00Z" + } + } + ], + "results": [ + { + "record" : { + "heartbeat": { + "continuation_token": { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "" + } + }, + "token": "heartbeat-token" + }, + "low_watermark": "2022-07-01T00:00:00Z" + } + }, + "error": false + } + ] + }, + { + "description": "1 CloseStream", + "api_responses": [ + { + "close_stream": { + "status": { + "code": "11", + "message": "Partition boundaries are misaligned." + }, + "continuation_tokens": [ + { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "0000000000000001" + } + }, + "token": "close-stream-token-1" + }, + { + "partition": { + "row_range": { + "start_key_closed": "0000000000000001", + "end_key_open": "0000000000000002" + } + }, + "token": "close-stream-token-2" + } + ] + } + } + ], + "results": [ + { + "record" : { + "close_stream": { + "status": { + "code": "11", + "message": "Partition boundaries are misaligned." + }, + "continuation_tokens": [ + { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "0000000000000001" + } + }, + "token": "close-stream-token-1" + }, + { + "partition": { + "row_range": { + "start_key_closed": "0000000000000001", + "end_key_open": "0000000000000002" + } + }, + "token": "close-stream-token-2" + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 heartbeat + 1 CloseStream", + "api_responses": [ + { + "heartbeat": { + "continuation_token": { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "" + } + }, + "token": "heartbeat-token" + }, + "low_watermark": "2022-07-01T00:00:00Z" + } + }, + { + "close_stream": { + "status": { + "code": "11", + "message": "Partition boundaries are misaligned." + }, + "continuation_tokens": [ + { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "0000000000000001" + } + }, + "token": "close-stream-token-1" + } + ] + } + } + ], + "results": [ + { + "record" : { + "heartbeat": { + "continuation_token": { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "" + } + }, + "token": "heartbeat-token" + }, + "low_watermark": "2022-07-01T00:00:00Z" + } + }, + "error": false + }, + { + "record" : { + "close_stream": { + "status": { + "code": "11", + "message": "Partition boundaries are misaligned." + }, + "continuation_tokens": [ + { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "0000000000000001" + } + }, + "token": "close-stream-token-1" + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 logical mutation no chunking([{DF,DC,SC}]->ChangeStreamMutation{DF,DC,SC})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + }, + { + "mutation": { + "delete_from_column" : { + "family_name": "family", + "column_qualifier": "dg==", + "time_range": { + "start_timestamp_micros": 5000, + "end_timestamp_micros": 15000 + } + } + } + }, + { + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "low_watermark": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "mutations": [ + { + "delete_from_family": { + "family_name": "family" + } + }, + { + "delete_from_column" : { + "family_name": "family", + "column_qualifier": "dg==", + "time_range": { + "start_timestamp_micros": 5000, + "end_timestamp_micros": 15000 + } + } + }, + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 incomplete logical mutation(missing `done: true`)", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ] + } + } + ], + "results": [ + { + "error": true + } + ] + }, + { + "description": "GC mutation no source cluster id", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "GARBAGE_COLLECTION", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "GARBAGE_COLLECTION", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "delete_from_family": { + "family_name": "family" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 chunked SetCell([{SC_chunk1(v)}, {SC_chunk2(alue-VAL)}]->ChangeStreamMutation{SC(value-VAL)})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "ChunkedValueSize mismatch for a chunked SetCell([{SC_chunk1(v)}, {SC_chunk2(alue-VAL)}]->error)", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "chunk_info": { + "chunked_value_size": 1 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "error": true + } + ] + }, + { + "description": "1 chunked SetCell([{SC_chunk1(v)}, {SC_chunk2(alue-VAL)}, {SC_chunk3(-VAL)}]->ChangeStreamMutation{SC(value-VAL-VAL)})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "chunk_info": { + "chunked_value_size": 13 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 13 + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 9, + "chunked_value_size": 13, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "LVZBTA==" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFMLVZBTA==" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "2 chunked SetCells([{SC1_chunk1(v)}, {SC1_chunk2(alue-VAL), SC2_chunk1(v)}, {SC2_chunk2(alue-VAL)}]->ChangeStreamMutation{SC1(value-VAL),SC2(value-VAL)})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + }, + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + }, + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 chunked SetCell + 1 unchunked SetCell([{SC1_chunk1(v)}, {SC1_chunk2(alue-VAL), SC2(value-VAL)}]->ChangeStreamMutation{SC1(value-VAL),SC2(value-VAL)})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + }, + { + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + }, + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 unchunked SetCell + 1 chunked SetCell([{SC1(v), SC2_chunk1(v)}, {SC2_chunk2(alue-VAL)}]->ChangeStreamMutation{SC1(v),SC2(value-VAL)})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + }, + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + }, + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 mod + 1 chunked SetCell + 1 mod([{DF1,SC_chunk1(v)}, {SC_chunk2(alue-VAL), DF2}]->ChangeStreamMutation{DF1,SC(value-VAL),DF2})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + }, + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + }, + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "delete_from_family": { + "family_name": "family" + } + }, + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + }, + { + "delete_from_family": { + "family_name": "family" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "1 chunked SetCell + many nonchunked mods([{SC_chunk1(v)}, {SC_chunk2(alue-VAL),DF,DC}]->ChangeStreamMutation{SC(value-VAL),DF,DC})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "chunk_info": { + "chunked_value_size": 9 + }, + "mutation": { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dg==" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "chunk_info": { + "chunked_value_offset": 1, + "chunked_value_size": 9, + "last_chunk": true + }, + "mutation": { + "set_cell": { + "value": "YWx1ZS1WQUw=" + } + } + }, + { + "mutation": { + "delete_from_column" : { + "family_name": "family", + "column_qualifier": "dg==", + "time_range": { + "start_timestamp_micros": 5000, + "end_timestamp_micros": 15000 + } + } + } + }, + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "set_cell": { + "family_name": "family", + "column_qualifier": "0000000000000000", + "timestamp_micros": 1000, + "value": "dmFsdWUtVkFM" + } + }, + { + "delete_from_column" : { + "family_name": "family", + "column_qualifier": "dg==", + "time_range": { + "start_timestamp_micros": 5000, + "end_timestamp_micros": 15000 + } + } + }, + { + "delete_from_family": { + "family_name": "family" + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "non SetCell chunking([{DF1},{DF2,DC}]->ChangeStreamMutation{DF1,DF2,DC})", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + }, + { + "mutation": { + "delete_from_column" : { + "family_name": "family", + "column_qualifier": "dg==", + "time_range": { + "start_timestamp_micros": 5000, + "end_timestamp_micros": 15000 + } + } + } + } + ], + "done": true + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "delete_from_family": { + "family_name": "family" + } + }, + { + "delete_from_family": { + "family_name": "family" + } + }, + { + "delete_from_column" : { + "family_name": "family", + "column_qualifier": "dg==", + "time_range": { + "start_timestamp_micros": 5000, + "end_timestamp_micros": 15000 + } + } + } + ] + } + }, + "error": false + } + ] + }, + { + "description": "2 logical mutations with non SetCell chunking + CloseStream([{Change1_DF1}, {Change1_DF2}, {Change2_DF3}, {Change2_DF4}, {CloseStream}]->[ChangeStreamMutation1{DF1,DF2}),ChangeStreamMutation2{DF3,DF4}),CloseStream]", + "api_responses": [ + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ], + "done": true + } + }, + { + "data_change": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ] + } + }, + { + "data_change": { + "type": "CONTINUATION", + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "chunks": [ + { + "mutation": { + "delete_from_family": { + "family_name": "family" + } + } + } + ], + "done": true + } + }, + { + "close_stream": { + "status": { + "code": "11", + "message": "Partition boundaries are misaligned." + }, + "continuation_tokens": [ + { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "0000000000000001" + } + }, + "token": "close-stream-token-1" + }, + { + "partition": { + "row_range": { + "start_key_closed": "0000000000000001", + "end_key_open": "0000000000000002" + } + }, + "token": "close-stream-token-2" + } + ] + } + } + ], + "results": [ + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "delete_from_family": { + "family_name": "family" + } + }, + { + "delete_from_family": { + "family_name": "family" + } + } + ] + } + }, + "error": false + }, + { + "record": { + "change_stream_mutation": { + "row_key": "0000000000000000", + "type": "USER", + "source_cluster_id": "source-cluster-id", + "commit_timestamp": "2022-07-01T00:00:00Z", + "tiebreaker": 100, + "token": "data-change-token", + "low_watermark": "2022-07-01T00:00:00Z", + "mutations": [ + { + "delete_from_family": { + "family_name": "family" + } + }, + { + "delete_from_family": { + "family_name": "family" + } + } + ] + } + }, + "error": false + }, + { + "record" : { + "close_stream": { + "status": { + "code": "11", + "message": "Partition boundaries are misaligned." + }, + "continuation_tokens": [ + { + "partition": { + "row_range": { + "start_key_closed": "", + "end_key_open": "0000000000000001" + } + }, + "token": "close-stream-token-1" + }, + { + "partition": { + "row_range": { + "start_key_closed": "0000000000000001", + "end_key_open": "0000000000000002" + } + }, + "token": "close-stream-token-2" + } + ] + } + }, + "error": false + } + ] + } + ] +} \ No newline at end of file diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java index fcbcc15e30..648a298155 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java @@ -26,11 +26,13 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.models.BulkMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.Filters.Filter; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowCell; @@ -83,6 +85,10 @@ public class BigtableDataClientTests { @Mock(answer = Answers.RETURNS_DEEP_STUBS) private ServerStreamingCallable mockListChangeStreamPartitionsCallable; + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private ServerStreamingCallable + mockReadChangeStreamCallable; + private BigtableDataClient bigtableDataClient; @Before @@ -165,6 +171,13 @@ public void proxyListChangeStreamPartitionsCallableTest() { .isSameInstanceAs(mockListChangeStreamPartitionsCallable); } + @Test + public void proxyReadChangeStreamCallableTest() { + Mockito.when(mockStub.readChangeStreamCallable()).thenReturn(mockReadChangeStreamCallable); + assertThat(bigtableDataClient.readChangeStreamCallable()) + .isSameInstanceAs(mockReadChangeStreamCallable); + } + @Test public void proxyReadRowAsyncTest() { Mockito.when(mockStub.readRowCallable()).thenReturn(mockReadRowCallable); @@ -334,6 +347,28 @@ public void proxyListChangeStreamPartitionsAsyncTest() { Mockito.verify(mockListChangeStreamPartitionsCallable).call("fake-table", mockObserver); } + @Test + public void proxyReadChangeStreamSyncTest() { + Mockito.when(mockStub.readChangeStreamCallable()).thenReturn(mockReadChangeStreamCallable); + + ReadChangeStreamQuery query = ReadChangeStreamQuery.create("fake-table"); + bigtableDataClient.readChangeStream(query); + + Mockito.verify(mockReadChangeStreamCallable).call(query); + } + + @Test + public void proxyReadChangeStreamAsyncTest() { + Mockito.when(mockStub.readChangeStreamCallable()).thenReturn(mockReadChangeStreamCallable); + + @SuppressWarnings("unchecked") + ResponseObserver mockObserver = Mockito.mock(ResponseObserver.class); + ReadChangeStreamQuery query = ReadChangeStreamQuery.create("fake-table"); + bigtableDataClient.readChangeStreamAsync(query, mockObserver); + + Mockito.verify(mockReadChangeStreamCallable).call(query, mockObserver); + } + @Test public void proxySampleRowKeysCallableTest() { Mockito.when(mockStub.sampleRowKeysCallable()).thenReturn(mockSampleRowKeysCallable); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index 32ab93d1f2..fa2efbf7e0 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -702,6 +702,7 @@ public void isRefreshingChannelFalseValueTest() { "checkAndMutateRowSettings", "readModifyWriteRowSettings", "listChangeStreamPartitionsSettings", + "readChangeStreamSettings", }; @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java new file mode 100644 index 0000000000..d23eb64765 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java @@ -0,0 +1,124 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.CloseStream; +import com.google.cloud.bigtable.data.v2.models.DefaultChangeStreamRecordAdapter; +import com.google.cloud.bigtable.data.v2.models.Heartbeat; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import java.util.Collections; +import java.util.List; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** + * Additional tests in addition to {@link ReadChangeStreamMergingAcceptanceTest}. + * + *

All the ChangeStreamMutation tests are in {@link ReadChangeStreamMergingAcceptanceTest}. + */ +@RunWith(JUnit4.class) +public class ChangeStreamRecordMergingCallableTest { + + @Test + public void heartbeatTest() { + ReadChangeStreamResponse.Heartbeat heartbeatProto = + ReadChangeStreamResponse.Heartbeat.newBuilder() + .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) + .setContinuationToken( + StreamContinuationToken.newBuilder().setToken("random-token").build()) + .build(); + ReadChangeStreamResponse response = + ReadChangeStreamResponse.newBuilder().setHeartbeat(heartbeatProto).build(); + FakeStreamingApi.ServerStreamingStashCallable + inner = new ServerStreamingStashCallable<>(Collections.singletonList(response)); + + ChangeStreamRecordMergingCallable mergingCallable = + new ChangeStreamRecordMergingCallable<>(inner, new DefaultChangeStreamRecordAdapter()); + List results = + mergingCallable.all().call(ReadChangeStreamRequest.getDefaultInstance()); + + // Validate the result. + Assert.assertEquals(results.size(), 1); + ChangeStreamRecord record = results.get(0); + Assert.assertTrue(record instanceof Heartbeat); + Heartbeat heartbeat = (Heartbeat) record; + Assert.assertEquals( + heartbeat.getChangeStreamContinuationToken().getRowRange(), + heartbeatProto.getContinuationToken().getPartition().getRowRange()); + Assert.assertEquals( + heartbeat.getChangeStreamContinuationToken().getToken(), + heartbeatProto.getContinuationToken().getToken()); + Assert.assertEquals(heartbeat.getLowWatermark(), heartbeatProto.getLowWatermark()); + } + + @Test + public void closeStreamTest() { + StreamContinuationToken streamContinuationToken = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("")) + .setEndKeyOpen(ByteString.copyFromUtf8("")) + .build()) + .build()) + .setToken("random-token") + .build(); + ReadChangeStreamResponse.CloseStream closeStreamProto = + ReadChangeStreamResponse.CloseStream.newBuilder() + .addContinuationTokens(streamContinuationToken) + .setStatus(Status.newBuilder().setCode(0).build()) + .build(); + ReadChangeStreamResponse response = + ReadChangeStreamResponse.newBuilder().setCloseStream(closeStreamProto).build(); + FakeStreamingApi.ServerStreamingStashCallable + inner = new ServerStreamingStashCallable<>(Collections.singletonList(response)); + + ChangeStreamRecordMergingCallable mergingCallable = + new ChangeStreamRecordMergingCallable<>(inner, new DefaultChangeStreamRecordAdapter()); + List results = + mergingCallable.all().call(ReadChangeStreamRequest.getDefaultInstance()); + + // Validate the result. + Assert.assertEquals(results.size(), 1); + ChangeStreamRecord record = results.get(0); + Assert.assertTrue(record instanceof CloseStream); + CloseStream closeStream = (CloseStream) record; + Assert.assertEquals(closeStream.getStatus(), closeStreamProto.getStatus()); + Assert.assertEquals(closeStream.getChangeStreamContinuationTokens().size(), 1); + ChangeStreamContinuationToken changeStreamContinuationToken = + closeStream.getChangeStreamContinuationTokens().get(0); + Assert.assertEquals( + changeStreamContinuationToken.getRowRange(), + streamContinuationToken.getPartition().getRowRange()); + Assert.assertEquals( + changeStreamContinuationToken.getToken(), streamContinuationToken.getToken()); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java new file mode 100644 index 0000000000..5ae88a7f9f --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -0,0 +1,263 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; + +import com.google.api.client.util.Lists; +import com.google.api.gax.rpc.ServerStream; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamPartition; +import com.google.bigtable.v2.TimestampRange; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.CloseStream; +import com.google.cloud.bigtable.data.v2.models.DefaultChangeStreamRecordAdapter; +import com.google.cloud.bigtable.data.v2.models.DeleteCells; +import com.google.cloud.bigtable.data.v2.models.DeleteFamily; +import com.google.cloud.bigtable.data.v2.models.Entry; +import com.google.cloud.bigtable.data.v2.models.Heartbeat; +import com.google.cloud.bigtable.data.v2.models.SetCell; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi; +import com.google.cloud.conformance.bigtable.v2.ChangeStreamTestDefinition.ChangeStreamTestFile; +import com.google.cloud.conformance.bigtable.v2.ChangeStreamTestDefinition.ReadChangeStreamTest; +import com.google.common.base.CaseFormat; +import com.google.protobuf.util.JsonFormat; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +/** + * Parses and runs the acceptance tests for read change stream. Currently, this test is only used by + * the JAVA library. If in the future we need cross-language support, we should move the test proto + * to https://github.com/googleapis/conformance-tests/tree/main/bigtable/v2/proto/google/cloud/conformance/bigtable/v2 + * and the test data to https://github.com/googleapis/conformance-tests/blob/main/bigtable/v2/readrows.json + */ +@RunWith(Parameterized.class) +public class ReadChangeStreamMergingAcceptanceTest { + // Location: `google-cloud-bigtable/src/main/resources/changestream.json` + private static final String TEST_DATA_JSON_RESOURCE = "changestream.json"; + + private final ReadChangeStreamTest testCase; + + /** + * @param testData The serialized test data representing the test case. + * @param junitName Not used by the test, but used by the parameterized test runner as the name of + * the test. + */ + public ReadChangeStreamMergingAcceptanceTest( + ReadChangeStreamTest testData, @SuppressWarnings("unused") String junitName) { + this.testCase = testData; + } + + // Each tuple consists of [testData: ReadChangeStreamTest, junitName: String] + @Parameterized.Parameters(name = "{1}") + public static Collection data() throws IOException { + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + InputStream dataJson = cl.getResourceAsStream(TEST_DATA_JSON_RESOURCE); + assertWithMessage("Unable to load test definition: %s", TEST_DATA_JSON_RESOURCE) + .that(dataJson) + .isNotNull(); + + InputStreamReader reader = new InputStreamReader(dataJson); + ChangeStreamTestFile.Builder testBuilder = ChangeStreamTestFile.newBuilder(); + JsonFormat.parser().merge(reader, testBuilder); + ChangeStreamTestFile testDefinition = testBuilder.build(); + + List tests = testDefinition.getReadChangeStreamTestsList(); + ArrayList data = new ArrayList<>(tests.size()); + for (ReadChangeStreamTest test : tests) { + String junitName = + CaseFormat.LOWER_HYPHEN.to( + CaseFormat.LOWER_CAMEL, test.getDescription().replace(" ", "-")); + data.add(new Object[] {test, junitName}); + } + return data; + } + + @Test + public void test() throws Exception { + List responses = testCase.getApiResponsesList(); + + // Wrap the responses in a callable. + ServerStreamingCallable source = + new FakeStreamingApi.ServerStreamingStashCallable<>(responses); + ChangeStreamRecordMergingCallable mergingCallable = + new ChangeStreamRecordMergingCallable<>(source, new DefaultChangeStreamRecordAdapter()); + + // Invoke the callable to get the change stream records. + ServerStream stream = + mergingCallable.call(ReadChangeStreamRequest.getDefaultInstance()); + + // Transform the change stream records into ReadChangeStreamTest.Result's. + List actualResults = Lists.newArrayList(); + Exception error = null; + try { + for (ChangeStreamRecord record : stream) { + if (record instanceof Heartbeat) { + Heartbeat heartbeat = (Heartbeat) record; + ReadChangeStreamResponse.Heartbeat heartbeatProto = + ReadChangeStreamResponse.Heartbeat.newBuilder() + .setContinuationToken( + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + heartbeat.getChangeStreamContinuationToken().getRowRange()) + .build()) + .setToken(heartbeat.getChangeStreamContinuationToken().getToken()) + .build()) + .setLowWatermark(heartbeat.getLowWatermark()) + .build(); + actualResults.add( + ReadChangeStreamTest.Result.newBuilder() + .setRecord( + ReadChangeStreamTest.TestChangeStreamRecord.newBuilder() + .setHeartbeat(heartbeatProto) + .build()) + .build()); + } else if (record instanceof CloseStream) { + CloseStream closeStream = (CloseStream) record; + ReadChangeStreamResponse.CloseStream.Builder builder = + ReadChangeStreamResponse.CloseStream.newBuilder().setStatus(closeStream.getStatus()); + for (ChangeStreamContinuationToken token : + closeStream.getChangeStreamContinuationTokens()) { + builder.addContinuationTokens( + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder().setRowRange(token.getRowRange()).build()) + .setToken(token.getToken()) + .build()); + } + ReadChangeStreamResponse.CloseStream closeStreamProto = builder.build(); + actualResults.add( + ReadChangeStreamTest.Result.newBuilder() + .setRecord( + ReadChangeStreamTest.TestChangeStreamRecord.newBuilder() + .setCloseStream(closeStreamProto) + .build()) + .build()); + } else if (record instanceof ChangeStreamMutation) { + ChangeStreamMutation changeStreamMutation = (ChangeStreamMutation) record; + ReadChangeStreamTest.TestChangeStreamMutation.Builder builder = + ReadChangeStreamTest.TestChangeStreamMutation.newBuilder(); + builder.setRowKey(changeStreamMutation.getRowKey()); + builder.setType(changeStreamMutation.getType()); + if (changeStreamMutation.getSourceClusterId() != null) { + builder.setSourceClusterId(changeStreamMutation.getSourceClusterId()); + } + builder.setCommitTimestamp(changeStreamMutation.getCommitTimestamp()); + builder.setTiebreaker(changeStreamMutation.getTieBreaker()); + builder.setToken(changeStreamMutation.getToken()); + builder.setLowWatermark(changeStreamMutation.getLowWatermark()); + for (Entry entry : changeStreamMutation.getEntries()) { + if (entry instanceof DeleteFamily) { + DeleteFamily deleteFamily = (DeleteFamily) entry; + builder.addMutations( + Mutation.newBuilder() + .setDeleteFromFamily( + Mutation.DeleteFromFamily.newBuilder() + .setFamilyName(deleteFamily.getFamilyName()) + .build())); + } else if (entry instanceof DeleteCells) { + DeleteCells deleteCells = (DeleteCells) entry; + builder.addMutations( + Mutation.newBuilder() + .setDeleteFromColumn( + Mutation.DeleteFromColumn.newBuilder() + .setFamilyName(deleteCells.getFamilyName()) + .setColumnQualifier(deleteCells.getQualifier()) + .setTimeRange( + TimestampRange.newBuilder() + .setStartTimestampMicros( + deleteCells.getTimestampRange().getStart()) + .setEndTimestampMicros( + deleteCells.getTimestampRange().getEnd()) + .build()) + .build())); + } else if (entry instanceof SetCell) { + SetCell setCell = (SetCell) entry; + builder.addMutations( + Mutation.newBuilder() + .setSetCell( + Mutation.SetCell.newBuilder() + .setFamilyName(setCell.getFamilyName()) + .setColumnQualifier(setCell.getQualifier()) + .setTimestampMicros(setCell.getTimestamp()) + .setValue(setCell.getValue()))); + } else { + throw new IllegalStateException("Unexpected Entry type"); + } + } + actualResults.add( + ReadChangeStreamTest.Result.newBuilder() + .setRecord( + ReadChangeStreamTest.TestChangeStreamRecord.newBuilder() + .setChangeStreamMutation(builder)) + .build()); + } else { + throw new IllegalStateException("Unexpected ChangeStreamRecord type"); + } + } + } catch (Exception e) { + error = e; + } + + // Verify the results. + if (expectsError(testCase)) { + assertThat(error).isNotNull(); + } else { + if (error != null) { + throw error; + } + } + + assertThat(getNonExceptionResults(testCase)).isEqualTo(actualResults); + } + + private static boolean expectsError(ReadChangeStreamTest testCase) { + List results = testCase.getResultsList(); + return results != null && !results.isEmpty() && results.get(results.size() - 1).getError(); + } + + private static List getNonExceptionResults( + ReadChangeStreamTest testCase) { + List results = testCase.getResultsList(); + List response = new ArrayList<>(); + if (results != null) { + for (ReadChangeStreamTest.Result result : results) { + if (!result.getError()) { + response.add(result); + } + } + } + return response; + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java new file mode 100644 index 0000000000..4043ea78cd --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.bigtable.v2.*; +import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; +import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; +import com.google.common.truth.Truth; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ReadChangeStreamUserCallableTest { + private static final RequestContext REQUEST_CONTEXT = + RequestContext.create("fake-project", "fake-instance", "fake-profile"); + + @Test + public void testRequestIsConverted() { + ServerStreamingStashCallable innerCallable = + new ServerStreamingStashCallable<>(); + ReadChangeStreamUserCallable callable = + new ReadChangeStreamUserCallable<>(innerCallable, REQUEST_CONTEXT); + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create("fake-table") + .streamPartition("begin", "end") + .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) + .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) + .heartbeatDuration(5L); + callable.call(query); + Truth.assertThat(innerCallable.getActualRequest()).isEqualTo(query.toProto(REQUEST_CONTEXT)); + } +} From 9b30758a32bc682a4b15c6b374ca9532bfb65e6e Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Tue, 9 Aug 2022 17:15:06 -0400 Subject: [PATCH 07/27] feat: Expose some package-private methods to be used by CDC beam code (#1345) Co-authored-by: Teng Zhong --- .../models/ChangeStreamContinuationToken.java | 7 ++++-- .../data/v2/models/ChangeStreamMutation.java | 25 +++++++++++++------ .../bigtable/data/v2/models/CloseStream.java | 3 ++- .../bigtable/data/v2/models/Heartbeat.java | 3 ++- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java index f499a94e45..bb5363a3a5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.common.base.MoreObjects; @@ -57,12 +58,14 @@ public String getToken() { * Creates the protobuf. This method is considered an internal implementation detail and not meant * to be used by applications. */ - StreamContinuationToken toProto() { + @InternalApi("Used in Changestream beam pipeline.") + public StreamContinuationToken toProto() { return builder.build(); } /** Wraps the protobuf {@link StreamContinuationToken}. */ - static ChangeStreamContinuationToken fromProto( + @InternalApi("Used in Changestream beam pipeline.") + public static ChangeStreamContinuationToken fromProto( @Nonnull StreamContinuationToken streamContinuationToken) { return new ChangeStreamContinuationToken(streamContinuationToken.toBuilder()); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index db0891fda1..f9107220b3 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; @@ -99,7 +100,8 @@ private ChangeStreamMutation(Builder builder) { * ChangeStreamMutation because `token` and `loWatermark` must be set later when we finish * building the logical mutation. */ - static Builder createUserMutation( + @InternalApi("Used in Changestream beam pipeline.") + public static Builder createUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, @Nonnull Timestamp commitTimestamp, @@ -112,7 +114,8 @@ static Builder createUserMutation( * because `token` and `loWatermark` must be set later when we finish building the logical * mutation. */ - static Builder createGcMutation( + @InternalApi("Used in Changestream beam pipeline.") + public static Builder createGcMutation( @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { return new Builder(rowKey, Type.GARBAGE_COLLECTION, null, commitTimestamp, tieBreaker); } @@ -224,7 +227,8 @@ private Builder(ChangeStreamMutation changeStreamMutation) { this.lowWatermark = changeStreamMutation.lowWatermark; } - Builder setCell( + @InternalApi("Used in Changestream beam pipeline.") + public Builder setCell( @Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, @@ -233,7 +237,8 @@ Builder setCell( return this; } - Builder deleteCells( + @InternalApi("Used in Changestream beam pipeline.") + public Builder deleteCells( @Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull TimestampRange timestampRange) { @@ -241,22 +246,26 @@ Builder deleteCells( return this; } - Builder deleteFamily(@Nonnull String familyName) { + @InternalApi("Used in Changestream beam pipeline.") + public Builder deleteFamily(@Nonnull String familyName) { this.entries.add(DeleteFamily.create(familyName)); return this; } - Builder setToken(@Nonnull String token) { + @InternalApi("Used in Changestream beam pipeline.") + public Builder setToken(@Nonnull String token) { this.token = token; return this; } - Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { + @InternalApi("Used in Changestream beam pipeline.") + public Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { this.lowWatermark = lowWatermark; return this; } - ChangeStreamMutation build() { + @InternalApi("Used in Changestream beam pipeline.") + public ChangeStreamMutation build() { Preconditions.checkArgument( token != null && lowWatermark != null, "ChangeStreamMutation must have a continuation token and low watermark."); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java index 403705f676..e871c86697 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -69,7 +69,8 @@ private void writeObject(ObjectOutputStream output) throws IOException { } /** Wraps the protobuf {@link ReadChangeStreamResponse.CloseStream}. */ - static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { + @InternalApi("Used in Changestream beam pipeline.") + public static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { return new CloseStream(closeStream.getStatus(), closeStream.getContinuationTokensList()); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index f2371c8507..63c23525f3 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -32,7 +32,8 @@ private static Heartbeat create( } /** Wraps the protobuf {@link ReadChangeStreamResponse.Heartbeat}. */ - static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { + @InternalApi("Used in Changestream beam pipeline.") + public static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { return create( ChangeStreamContinuationToken.fromProto(heartbeat.getContinuationToken()), heartbeat.getLowWatermark()); From f1176ae2f3af9461770636f0ec53722effe1f8ee Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Wed, 10 Aug 2022 14:46:38 -0400 Subject: [PATCH 08/27] feat: Implement ReadChangeStreamResumptionStrategy (#1344) * feat: Implement ReadChangeStreamResumptionStrategy * fix: Address comments * fix: Fix typos * fix: Update comments * fix: Address comments Co-authored-by: Teng Zhong --- .../data/v2/stub/EnhancedBigtableStub.java | 8 +- .../ReadChangeStreamResumptionStrategy.java | 101 ++++ .../ReadChangeStreamRetryTest.java | 475 ++++++++++++++++++ 3 files changed, 580 insertions(+), 4 deletions(-) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 7872b1e07e..6b5746fea2 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -82,6 +82,7 @@ import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMergingCallable; import com.google.cloud.bigtable.data.v2.stub.changestream.ListChangeStreamPartitionsUserCallable; +import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamResumptionStrategy; import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamUserCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerStreamingCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerUnaryCallable; @@ -898,7 +899,7 @@ public Map extract( * case of mutations, it will merge the {@link ReadChangeStreamResponse.DataChange}s into * {@link ChangeStreamMutation}. The actual change stream record implementation can be * configured by the {@code changeStreamRecordAdapter} parameter. - *

  • TODO: Retry/resume on failure. + *
  • Retry/resume on failure. *
  • Add tracing & metrics. * */ @@ -939,7 +940,8 @@ public Map extract( // Copy idle timeout settings for watchdog. ServerStreamingCallSettings innerSettings = ServerStreamingCallSettings.newBuilder() - // TODO: setResumptionStrategy. + .setResumptionStrategy( + new ReadChangeStreamResumptionStrategy<>(changeStreamRecordAdapter)) .setRetryableCodes(settings.readChangeStreamSettings().getRetryableCodes()) .setRetrySettings(settings.readChangeStreamSettings().getRetrySettings()) .setIdleTimeout(settings.readChangeStreamSettings().getIdleTimeout()) @@ -951,8 +953,6 @@ public Map extract( ServerStreamingCallable withBigtableTracer = new BigtableTracerStreamingCallable<>(watched); - // TODO: Add ReadChangeStreamRetryCompletedCallable. - ServerStreamingCallable readChangeStreamCallable = Callables.retrying(withBigtableTracer, innerSettings, clientContext); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java new file mode 100644 index 0000000000..a3532180fc --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java @@ -0,0 +1,101 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.api.core.InternalApi; +import com.google.api.gax.retrying.StreamResumptionStrategy; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamRequest.Builder; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamContinuationTokens; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter; + +/** + * An implementation of a {@link StreamResumptionStrategy} for change stream records. This class + * tracks the continuation token and upon retry can build a request to resume the stream from where + * it left off. + * + *

    This class is considered an internal implementation detail and not meant to be used by + * applications. + */ +@InternalApi +public class ReadChangeStreamResumptionStrategy + implements StreamResumptionStrategy { + private final ChangeStreamRecordAdapter changeStreamRecordAdapter; + private String token = null; + + public ReadChangeStreamResumptionStrategy( + ChangeStreamRecordAdapter changeStreamRecordAdapter) { + this.changeStreamRecordAdapter = changeStreamRecordAdapter; + } + + @Override + public boolean canResume() { + return true; + } + + @Override + public StreamResumptionStrategy createNew() { + return new ReadChangeStreamResumptionStrategy<>(changeStreamRecordAdapter); + } + + @Override + public ChangeStreamRecordT processResponse(ChangeStreamRecordT response) { + // Update the token from a Heartbeat or a ChangeStreamMutation. + // We don't worry about resumption after CloseStream, since the server + // will return an OK status right after sending a CloseStream. + if (changeStreamRecordAdapter.isHeartbeat(response)) { + this.token = changeStreamRecordAdapter.getTokenFromHeartbeat(response); + } + if (changeStreamRecordAdapter.isChangeStreamMutation(response)) { + this.token = changeStreamRecordAdapter.getTokenFromChangeStreamMutation(response); + } + return response; + } + + /** + * {@inheritDoc} + * + *

    Given a request, this implementation will narrow that request to include data changes that + * come after {@link #token}. + */ + @Override + public ReadChangeStreamRequest getResumeRequest(ReadChangeStreamRequest originalRequest) { + // A null token means that we have not successfully read a Heartbeat nor a ChangeStreamMutation, + // so start from the beginning. + if (this.token == null) { + return originalRequest; + } + + Builder builder = originalRequest.toBuilder(); + // We need to clear the start_from and use the updated continuation_tokens + // to resume the request. + // The partition should always be the same as the one from the original request, + // otherwise we would receive a CloseStream with different + // partitions(which indicates tablet split/merge events). + builder.clearStartFrom(); + builder.setContinuationTokens( + StreamContinuationTokens.newBuilder() + .addTokens( + StreamContinuationToken.newBuilder() + .setPartition(originalRequest.getPartition()) + .setToken(this.token) + .build()) + .build()); + + return builder.build(); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java new file mode 100644 index 0000000000..a0defe6375 --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java @@ -0,0 +1,475 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub.changestream; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GrpcStatusCode; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.FixedTransportChannelProvider; +import com.google.api.gax.rpc.InternalException; +import com.google.api.gax.rpc.ServerStream; +import com.google.bigtable.v2.BigtableGrpc; +import com.google.bigtable.v2.Mutation; +import com.google.bigtable.v2.ReadChangeStreamRequest; +import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamContinuationTokens; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.internal.NameUtil; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation; +import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; +import com.google.cloud.bigtable.data.v2.models.CloseStream; +import com.google.cloud.bigtable.data.v2.models.Heartbeat; +import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; +import com.google.common.collect.Lists; +import com.google.common.collect.Queues; +import com.google.common.truth.Truth; +import com.google.protobuf.ByteString; +import com.google.protobuf.Timestamp; +import io.grpc.Status; +import io.grpc.Status.Code; +import io.grpc.StatusRuntimeException; +import io.grpc.stub.StreamObserver; +import io.grpc.testing.GrpcServerRule; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Queue; +import javax.annotation.Nonnull; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ReadChangeStreamRetryTest { + private static final String PROJECT_ID = "fake-project"; + private static final String INSTANCE_ID = "fake-instance"; + private static final String TABLE_ID = "fake-table"; + private static final String START_KEY_CLOSED = "a"; + private static final String END_KEY_OPEN = "b"; + private static final String HEARTBEAT_TOKEN = "heartbeat-token"; + private static final String CLOSE_STREAM_TOKEN = "close-stream-token"; + private static final String DATA_CHANGE_TOKEN = "data-change-token"; + private static Timestamp REQUEST_START_TIME = Timestamp.newBuilder().setSeconds(1).build(); + + @Rule public GrpcServerRule serverRule = new GrpcServerRule(); + private TestBigtableService service; + private BigtableDataClient client; + + @Before + public void setUp() throws IOException { + service = new TestBigtableService(); + serverRule.getServiceRegistry().addService(service); + + BigtableDataSettings.Builder settings = + BigtableDataSettings.newBuilder() + .setProjectId(PROJECT_ID) + .setInstanceId(INSTANCE_ID) + .setCredentialsProvider(NoCredentialsProvider.create()); + + settings + .stubSettings() + .setTransportChannelProvider( + FixedTransportChannelProvider.create( + GrpcTransportChannel.create(serverRule.getChannel()))) + .build(); + + client = BigtableDataClient.create(settings.build()); + } + + @After + public void tearDown() { + if (client != null) { + client.close(); + } + } + + private StreamContinuationToken createStreamContinuationToken(@Nonnull String token) { + return StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8(START_KEY_CLOSED)) + .setEndKeyOpen(ByteString.copyFromUtf8(END_KEY_OPEN)) + .build()) + .build()) + .setToken(token) + .build(); + } + + private ReadChangeStreamResponse.Heartbeat createHeartbeat( + StreamContinuationToken streamContinuationToken) { + return ReadChangeStreamResponse.Heartbeat.newBuilder() + .setContinuationToken(streamContinuationToken) + .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) + .build(); + } + + private ReadChangeStreamResponse.CloseStream createCloseStream() { + return ReadChangeStreamResponse.CloseStream.newBuilder() + .addContinuationTokens(createStreamContinuationToken(CLOSE_STREAM_TOKEN)) + .setStatus(com.google.rpc.Status.newBuilder().setCode(0).build()) + .build(); + } + + private ReadChangeStreamResponse.DataChange createDataChange(boolean done) { + Mutation deleteFromFamily = + Mutation.newBuilder() + .setDeleteFromFamily( + Mutation.DeleteFromFamily.newBuilder().setFamilyName("fake-family").build()) + .build(); + ReadChangeStreamResponse.DataChange.Builder dataChangeBuilder = + ReadChangeStreamResponse.DataChange.newBuilder() + .setType(ReadChangeStreamResponse.DataChange.Type.USER) + .setSourceClusterId("fake-source-cluster-id") + .setRowKey(ByteString.copyFromUtf8("key")) + .setCommitTimestamp(Timestamp.newBuilder().setSeconds(100).build()) + .setTiebreaker(100) + .addChunks( + ReadChangeStreamResponse.MutationChunk.newBuilder().setMutation(deleteFromFamily)); + if (done) { + dataChangeBuilder.setDone(true); + dataChangeBuilder.setLowWatermark(Timestamp.newBuilder().setSeconds(1).build()); + dataChangeBuilder.setToken(DATA_CHANGE_TOKEN); + } + return dataChangeBuilder.build(); + } + + // [{ReadChangeStreamResponse.Heartbeat}] -> [{Heartbeat}] + @Test + public void happyPathHeartbeatTest() { + ReadChangeStreamResponse heartbeatResponse = + ReadChangeStreamResponse.newBuilder() + .setHeartbeat(createHeartbeat(createStreamContinuationToken(HEARTBEAT_TOKEN))) + .build(); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(heartbeatResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); + } + + // [{ReadChangeStreamResponse.CloseStream}] -> [{CloseStream}] + @Test + public void happyPathCloseStreamTest() { + ReadChangeStreamResponse closeStreamResponse = + ReadChangeStreamResponse.newBuilder().setCloseStream(createCloseStream()).build(); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(closeStreamResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof CloseStream); + } + + // [{DataChange(done==true)}] -> [{ReadChangeStreamMutation}] + @Test + public void happyPathCompleteDataChangeTest() { + // Setting `done==true` to complete the ChangeStreamMutation. + ReadChangeStreamResponse dataChangeResponse = + ReadChangeStreamResponse.newBuilder().setDataChange(createDataChange(true)).build(); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(dataChangeResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); + } + + // [{UNAVAILABLE}, {ReadChangeStreamResponse.Heartbeat}] -> [{Heartbeat}] + @Test + public void singleHeartbeatImmediateRetryTest() { + ReadChangeStreamResponse heartbeatResponse = + ReadChangeStreamResponse.newBuilder() + .setHeartbeat(createHeartbeat(createStreamContinuationToken(HEARTBEAT_TOKEN))) + .build(); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWithStatus(Code.UNAVAILABLE)); + // Resume with the exact same request. + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(heartbeatResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); + } + + // [{UNAVAILABLE}, {ReadChangeStreamResponse.CloseStream}] -> [{CloseStream}] + @Test + public void singleCloseStreamImmediateRetryTest() { + // CloseStream. + ReadChangeStreamResponse closeStreamResponse = + ReadChangeStreamResponse.newBuilder().setCloseStream(createCloseStream()).build(); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWithStatus(Code.UNAVAILABLE)); + // Resume with the exact same request. + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(closeStreamResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof CloseStream); + } + + // [{UNAVAILABLE}, {DataChange with done==true}] -> [{(ChangeStreamRecord) ChangeStreamMutation}] + @Test + public void singleCompleteDataChangeImmediateRetryTest() { + // DataChange + ReadChangeStreamResponse dataChangeResponse = + ReadChangeStreamResponse.newBuilder().setDataChange(createDataChange(true)).build(); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWithStatus(Code.UNAVAILABLE)); + // Resume with the exact same request. + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(dataChangeResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); + } + + // [{ReadChangeStreamResponse.Heartbeat}, {UNAVAILABLE}] -> Resume with token from heartbeat. + @Test + public void errorAfterHeartbeatShouldResumeWithTokenTest() { + StreamContinuationToken streamContinuationToken = + createStreamContinuationToken(HEARTBEAT_TOKEN); + ReadChangeStreamResponse heartbeatResponse = + ReadChangeStreamResponse.newBuilder() + .setHeartbeat(createHeartbeat(streamContinuationToken)) + .build(); + service.expectations.add( + RpcExpectation.create() + .expectInitialRequest() + .respondWith(heartbeatResponse) + .respondWithStatus(Code.UNAVAILABLE)); + // Resume the request with the token from the Heartbeat. `startTime` is cleared. + // We don't care about the response here so just do expectRequest. + service.expectations.add( + RpcExpectation.create() + .expectRequest( + StreamContinuationTokens.newBuilder().addTokens(streamContinuationToken).build())); + List actualResults = getResults(); + // This is the Heartbeat we get before UNAVAILABLE. + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); + } + + // [{DataChange with done==true}, {UNAVAILABLE}] -> Resume with token from DataChange. + @Test + public void errorAfterDataChangeWithDoneShouldResumeWithTokenTest() { + // DataChange + ReadChangeStreamResponse dataChangeResponse = + ReadChangeStreamResponse.newBuilder().setDataChange(createDataChange(true)).build(); + service.expectations.add( + RpcExpectation.create() + .expectInitialRequest() + .respondWith(dataChangeResponse) + .respondWithStatus(Code.UNAVAILABLE)); + // Resume the request with the token from the ChangeStreamMutation. `startTime` is cleared. + // We don't care about the response here so just do expectRequest. + service.expectations.add( + RpcExpectation.create() + .expectRequest( + StreamContinuationTokens.newBuilder() + .addTokens(createStreamContinuationToken(DATA_CHANGE_TOKEN)) + .build())); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); + } + + // [{DataChange with done==false}, {UNAVAILABLE}] -> Resume with original request. + @Test + public void errorAfterDataChangeWithoutDoneShouldResumeWithTokenTest() { + // DataChange + ReadChangeStreamResponse dataChangeResponse = + ReadChangeStreamResponse.newBuilder().setDataChange(createDataChange(false)).build(); + service.expectations.add( + RpcExpectation.create() + .expectInitialRequest() + .respondWith(dataChangeResponse) + .respondWithStatus(Code.UNAVAILABLE)); + // Resume the request with the original request, because the previous DataChange didn't + // complete the ChangeStreamMutation(i.e. without `done==true`). + // We don't care about the response here so just do expectRequest. + service.expectations.add(RpcExpectation.create().expectInitialRequest()); + List actualResults = getResults(); + Truth.assertThat(actualResults).isEmpty(); + } + + // [{DataChange with done==true}, {Heartbeat}, {UNAVAILABLE}] -> Resume with token from Heartbeat. + @Test + public void shouldResumeWithLastTokenTest() { + // DataChange + ReadChangeStreamResponse dataChangeResponse = + ReadChangeStreamResponse.newBuilder().setDataChange(createDataChange(true)).build(); + // Heartbeat. + ReadChangeStreamResponse heartbeatResponse = + ReadChangeStreamResponse.newBuilder() + .setHeartbeat(createHeartbeat(createStreamContinuationToken(HEARTBEAT_TOKEN))) + .build(); + service.expectations.add( + RpcExpectation.create() + .expectInitialRequest() + .respondWith(dataChangeResponse) + .respondWith(heartbeatResponse) + .respondWithStatus(Code.UNAVAILABLE)); + // If we receive a DataChange with done==true and a Heartbeat then a retryable error, it should + // resume with the last token, which is the one from the heartbeat. + // If the original request reads with start_time, it'll be resumed with the continuation token. + // We don't care about the response here so just do expectRequest. + service.expectations.add( + RpcExpectation.create() + .expectRequest( + StreamContinuationTokens.newBuilder() + .addTokens(createStreamContinuationToken(HEARTBEAT_TOKEN)) + .build())); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 2); + Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); + Assert.assertTrue(actualResults.get(1) instanceof Heartbeat); + } + + @Test + public void retryRstStreamExceptionTest() { + ApiException exception = + new InternalException( + new StatusRuntimeException( + Status.INTERNAL.withDescription( + "INTERNAL: HTTP/2 error code: INTERNAL_ERROR\nReceived Rst Stream")), + GrpcStatusCode.of(Code.INTERNAL), + false); + ReadChangeStreamResponse heartbeatResponse = + ReadChangeStreamResponse.newBuilder() + .setHeartbeat(createHeartbeat(createStreamContinuationToken(HEARTBEAT_TOKEN))) + .build(); + service.expectations.add( + RpcExpectation.create() + .expectInitialRequest() + .respondWithException(Code.INTERNAL, exception)); + service.expectations.add( + RpcExpectation.create().expectInitialRequest().respondWith(heartbeatResponse)); + List actualResults = getResults(); + Assert.assertEquals(actualResults.size(), 1); + Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); + } + + private List getResults() { + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID).startTime(REQUEST_START_TIME); + // Always give it this partition. We don't care. + ServerStream actualRecords = + client.readChangeStream(query.streamPartition(START_KEY_CLOSED, END_KEY_OPEN)); + List actualValues = Lists.newArrayList(); + for (ChangeStreamRecord record : actualRecords) { + actualValues.add(record); + } + return actualValues; + } + + private static class TestBigtableService extends BigtableGrpc.BigtableImplBase { + Queue expectations = Queues.newArrayDeque(); + int i = -1; + + @Override + public void readChangeStream( + ReadChangeStreamRequest request, + StreamObserver responseObserver) { + + RpcExpectation expectedRpc = expectations.poll(); + i++; + + Truth.assertWithMessage("Unexpected request#" + i + ":" + request.toString()) + .that(expectedRpc) + .isNotNull(); + Truth.assertWithMessage("Unexpected request#" + i) + .that(request) + .isEqualTo(expectedRpc.getExpectedRequest()); + + for (ReadChangeStreamResponse response : expectedRpc.responses) { + responseObserver.onNext(response); + } + if (expectedRpc.statusCode.toStatus().isOk()) { + responseObserver.onCompleted(); + } else if (expectedRpc.exception != null) { + responseObserver.onError(expectedRpc.exception); + } else { + responseObserver.onError(expectedRpc.statusCode.toStatus().asRuntimeException()); + } + } + } + + private static class RpcExpectation { + ReadChangeStreamRequest.Builder requestBuilder; + Status.Code statusCode; + ApiException exception; + List responses; + + private RpcExpectation() { + this.requestBuilder = + ReadChangeStreamRequest.newBuilder() + .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8(START_KEY_CLOSED)) + .setEndKeyOpen(ByteString.copyFromUtf8(END_KEY_OPEN)) + .build()) + .build()); + this.statusCode = Status.Code.OK; + this.responses = Lists.newArrayList(); + } + + static RpcExpectation create() { + return new RpcExpectation(); + } + + RpcExpectation expectInitialRequest() { + requestBuilder.setStartTime(REQUEST_START_TIME); + return this; + } + + RpcExpectation expectRequest(StreamContinuationTokens continuationTokens) { + requestBuilder.setContinuationTokens(continuationTokens); + return this; + } + + RpcExpectation respondWithStatus(Status.Code code) { + this.statusCode = code; + return this; + } + + RpcExpectation respondWithException(Status.Code code, ApiException exception) { + this.statusCode = code; + this.exception = exception; + return this; + } + + RpcExpectation respondWith(ReadChangeStreamResponse... responses) { + Collections.addAll(this.responses, responses); + return this; + } + + ReadChangeStreamRequest getExpectedRequest() { + return requestBuilder.build(); + } + } +} From bb5c0c05157043683486f0bffd6c47b803247a60 Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:14:52 -0400 Subject: [PATCH 09/27] feat: Add toByteString/fromByteString for ChangeStreamContinuationToken (#1346) * feat: Add toByteString/fromByteString for ChangeStreamContinuationToken This will be used by the beam connector to write/read to a Bigtable table. This PR also does: 1. Revert the changes in https://github.com/googleapis/java-bigtable/pull/1345 since we can use Mockito to create mock objects for testing. * fix: Update comments * fix: Address comments * fix: Add InternalExtensionOnly annotations for Heartbeat/CloseStream/ChangeStreamMutation Co-authored-by: Teng Zhong --- .../models/ChangeStreamContinuationToken.java | 68 +++++++------ .../data/v2/models/ChangeStreamMutation.java | 31 +++--- .../bigtable/data/v2/models/CloseStream.java | 11 ++- .../bigtable/data/v2/models/Heartbeat.java | 6 +- .../ChangeStreamContinuationTokenTest.java | 99 +++++++++++++++++++ 5 files changed, 164 insertions(+), 51 deletions(-) create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java index bb5363a3a5..af7b15ea4e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java @@ -18,11 +18,12 @@ import com.google.api.core.InternalApi; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.common.base.MoreObjects; import com.google.common.base.Objects; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; import java.io.Serializable; import javax.annotation.Nonnull; @@ -30,48 +31,59 @@ public final class ChangeStreamContinuationToken implements Serializable { private static final long serialVersionUID = 524679926247095L; - private transient StreamContinuationToken.Builder builder; + private final StreamContinuationToken tokenProto; - private ChangeStreamContinuationToken(@Nonnull StreamContinuationToken.Builder builder) { - this.builder = builder; + private ChangeStreamContinuationToken(@Nonnull StreamContinuationToken tokenProto) { + this.tokenProto = tokenProto; } - private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { - input.defaultReadObject(); - builder = StreamContinuationToken.newBuilder().mergeFrom(input); - } - - private void writeObject(ObjectOutputStream output) throws IOException { - output.defaultWriteObject(); - builder.build().writeTo(output); + @InternalApi("Used in Changestream beam pipeline.") + public ChangeStreamContinuationToken( + @Nonnull ByteStringRange byteStringRange, @Nonnull String token) { + this.tokenProto = + StreamContinuationToken.newBuilder() + .setPartition( + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(byteStringRange.getStart()) + .setEndKeyOpen(byteStringRange.getEnd()) + .build()) + .build()) + .setToken(token) + .build(); } + // TODO: Change this to return ByteStringRange. public RowRange getRowRange() { - return this.builder.getPartition().getRowRange(); + return this.tokenProto.getPartition().getRowRange(); } public String getToken() { - return this.builder.getToken(); + return this.tokenProto.getToken(); } - /** - * Creates the protobuf. This method is considered an internal implementation detail and not meant - * to be used by applications. - */ - @InternalApi("Used in Changestream beam pipeline.") - public StreamContinuationToken toProto() { - return builder.build(); + // Creates the protobuf. + StreamContinuationToken toProto() { + return tokenProto; } /** Wraps the protobuf {@link StreamContinuationToken}. */ - @InternalApi("Used in Changestream beam pipeline.") - public static ChangeStreamContinuationToken fromProto( + static ChangeStreamContinuationToken fromProto( @Nonnull StreamContinuationToken streamContinuationToken) { - return new ChangeStreamContinuationToken(streamContinuationToken.toBuilder()); + return new ChangeStreamContinuationToken(streamContinuationToken); } - public ChangeStreamContinuationToken clone() { - return new ChangeStreamContinuationToken(this.builder.clone()); + @InternalApi("Used in Changestream beam pipeline.") + public ByteString toByteString() { + return tokenProto.toByteString(); + } + + @InternalApi("Used in Changestream beam pipeline.") + public static ChangeStreamContinuationToken fromByteString(ByteString byteString) + throws InvalidProtocolBufferException { + return new ChangeStreamContinuationToken( + StreamContinuationToken.newBuilder().mergeFrom(byteString).build()); } @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index f9107220b3..cfb8bb30b7 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -15,7 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; -import com.google.api.core.InternalApi; +import com.google.api.core.InternalExtensionOnly; import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; @@ -62,8 +62,11 @@ * builder.deleteCells(...); * ChangeStreamMutation changeStreamMutation = builder.setToken(...).setLowWatermark().build(); * } + * + * Make this class non-final so that we can create a subclass to mock it. */ -public final class ChangeStreamMutation implements ChangeStreamRecord, Serializable { +@InternalExtensionOnly("Used in Changestream beam pipeline testing.") +public class ChangeStreamMutation implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 8419520253162024218L; private final ByteString rowKey; @@ -100,8 +103,7 @@ private ChangeStreamMutation(Builder builder) { * ChangeStreamMutation because `token` and `loWatermark` must be set later when we finish * building the logical mutation. */ - @InternalApi("Used in Changestream beam pipeline.") - public static Builder createUserMutation( + static Builder createUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, @Nonnull Timestamp commitTimestamp, @@ -114,8 +116,7 @@ public static Builder createUserMutation( * because `token` and `loWatermark` must be set later when we finish building the logical * mutation. */ - @InternalApi("Used in Changestream beam pipeline.") - public static Builder createGcMutation( + static Builder createGcMutation( @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { return new Builder(rowKey, Type.GARBAGE_COLLECTION, null, commitTimestamp, tieBreaker); } @@ -227,8 +228,7 @@ private Builder(ChangeStreamMutation changeStreamMutation) { this.lowWatermark = changeStreamMutation.lowWatermark; } - @InternalApi("Used in Changestream beam pipeline.") - public Builder setCell( + Builder setCell( @Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, @@ -237,8 +237,7 @@ public Builder setCell( return this; } - @InternalApi("Used in Changestream beam pipeline.") - public Builder deleteCells( + Builder deleteCells( @Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull TimestampRange timestampRange) { @@ -246,26 +245,22 @@ public Builder deleteCells( return this; } - @InternalApi("Used in Changestream beam pipeline.") - public Builder deleteFamily(@Nonnull String familyName) { + Builder deleteFamily(@Nonnull String familyName) { this.entries.add(DeleteFamily.create(familyName)); return this; } - @InternalApi("Used in Changestream beam pipeline.") - public Builder setToken(@Nonnull String token) { + Builder setToken(@Nonnull String token) { this.token = token; return this; } - @InternalApi("Used in Changestream beam pipeline.") - public Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { + Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { this.lowWatermark = lowWatermark; return this; } - @InternalApi("Used in Changestream beam pipeline.") - public ChangeStreamMutation build() { + ChangeStreamMutation build() { Preconditions.checkArgument( token != null && lowWatermark != null, "ChangeStreamMutation must have a continuation token and low watermark."); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java index e871c86697..346b0b60a7 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -16,6 +16,7 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; +import com.google.api.core.InternalExtensionOnly; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.StreamContinuationToken; import com.google.common.base.MoreObjects; @@ -29,7 +30,12 @@ import java.util.List; import javax.annotation.Nonnull; -public final class CloseStream implements ChangeStreamRecord, Serializable { +/** + * A simple wrapper for {@link ReadChangeStreamResponse.CloseStream}. Make this class non-final so + * that we can create a subclass to mock it. + */ +@InternalExtensionOnly("Used in Changestream beam pipeline testing.") +public class CloseStream implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608505L; private final Status status; private transient ImmutableList.Builder @@ -69,8 +75,7 @@ private void writeObject(ObjectOutputStream output) throws IOException { } /** Wraps the protobuf {@link ReadChangeStreamResponse.CloseStream}. */ - @InternalApi("Used in Changestream beam pipeline.") - public static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { + static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { return new CloseStream(closeStream.getStatus(), closeStream.getContinuationTokensList()); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index 63c23525f3..40daa9d23a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -16,12 +16,15 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; +import com.google.api.core.InternalExtensionOnly; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.protobuf.Timestamp; import java.io.Serializable; import javax.annotation.Nonnull; +/** A simple wrapper for {@link ReadChangeStreamResponse.Heartbeat}. */ +@InternalExtensionOnly("Used in Changestream beam pipeline testing.") @AutoValue public abstract class Heartbeat implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608504L; @@ -32,8 +35,7 @@ private static Heartbeat create( } /** Wraps the protobuf {@link ReadChangeStreamResponse.Heartbeat}. */ - @InternalApi("Used in Changestream beam pipeline.") - public static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { + static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat) { return create( ChangeStreamContinuationToken.fromProto(heartbeat.getContinuationToken()), heartbeat.getLowWatermark()); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java new file mode 100644 index 0000000000..e93dfc70bf --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.models; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.RowRange; +import com.google.bigtable.v2.StreamContinuationToken; +import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class ChangeStreamContinuationTokenTest { + + private final String TOKEN = "token"; + + private ByteStringRange createFakeByteStringRange() { + return ByteStringRange.create("a", "b"); + } + + // TODO: Get rid of this once we change ChangeStreamContinuationToken::getRowRange() + // to ChangeStreamContinuationToken::getByteStringRange(). + private RowRange rowRangeFromByteStringRange(ByteStringRange byteStringRange) { + return RowRange.newBuilder() + .setStartKeyClosed(byteStringRange.getStart()) + .setEndKeyOpen(byteStringRange.getEnd()) + .build(); + } + + @Test + public void basicTest() throws Exception { + ByteStringRange byteStringRange = createFakeByteStringRange(); + ChangeStreamContinuationToken changeStreamContinuationToken = + new ChangeStreamContinuationToken(byteStringRange, TOKEN); + Assert.assertEquals( + changeStreamContinuationToken.getRowRange(), rowRangeFromByteStringRange(byteStringRange)); + Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); + + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(bos); + oos.writeObject(changeStreamContinuationToken); + oos.close(); + ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); + ChangeStreamContinuationToken actual = (ChangeStreamContinuationToken) ois.readObject(); + assertThat(actual).isEqualTo(changeStreamContinuationToken); + } + + @Test + public void fromProtoTest() { + ByteStringRange byteStringRange = createFakeByteStringRange(); + RowRange fakeRowRange = rowRangeFromByteStringRange(byteStringRange); + StreamContinuationToken proto = + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(fakeRowRange).build()) + .setToken(TOKEN) + .build(); + ChangeStreamContinuationToken changeStreamContinuationToken = + ChangeStreamContinuationToken.fromProto(proto); + Assert.assertEquals(changeStreamContinuationToken.getRowRange(), fakeRowRange); + Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); + Assert.assertEquals( + changeStreamContinuationToken, + ChangeStreamContinuationToken.fromProto(changeStreamContinuationToken.toProto())); + } + + @Test + public void toByteStringTest() throws Exception { + ByteStringRange byteStringRange = createFakeByteStringRange(); + ChangeStreamContinuationToken changeStreamContinuationToken = + new ChangeStreamContinuationToken(byteStringRange, TOKEN); + Assert.assertEquals( + changeStreamContinuationToken.getRowRange(), rowRangeFromByteStringRange(byteStringRange)); + Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); + Assert.assertEquals( + changeStreamContinuationToken, + ChangeStreamContinuationToken.fromByteString(changeStreamContinuationToken.toByteString())); + } +} From 2a4e7867a8d3a68bde1a116b090552ef85e73205 Mon Sep 17 00:00:00 2001 From: Tony Tang Date: Fri, 12 Aug 2022 11:35:25 -0400 Subject: [PATCH 10/27] feat!: rename ListChangeStreamPartitions to GenerateInitialChangeStreamPartitions (#1347) * Rename ListChangeStreamPartitions to GenerateInitialChangeStreamPartitions Change-Id: Id306df92de00e172ae900a9c4bf95de856edd90f * Fix formatting Change-Id: I5a45afa15b8b4b65a10fd17987f2d832f6924213 * Fix more formatting Change-Id: Ib7668abf8f61a5c939323c55dad14bc57501232e * Fix more formatting after rebase Change-Id: I88a545e8d34db9f5e675b6ef7409a9fbf3102d3d --- .../bigtable/data/v2/BigtableDataClient.java | 23 +- .../bigtable/data/v2/gapic_metadata.json | 6 + .../bigtable/data/v2/stub/BigtableStub.java | 11 +- .../data/v2/stub/BigtableStubSettings.java | 47 +- .../data/v2/stub/EnhancedBigtableStub.java | 71 +- .../v2/stub/EnhancedBigtableStubSettings.java | 32 +- .../data/v2/stub/GrpcBigtableStub.java | 52 +- ...alChangeStreamPartitionsUserCallable.java} | 28 +- .../data/v2/BigtableDataClientTests.java | 34 +- .../EnhancedBigtableStubSettingsTest.java | 2 +- ...angeStreamPartitionsUserCallableTest.java} | 31 +- .../com/google/bigtable/v2/BigtableGrpc.java | 99 +- .../com/google/bigtable/v2/BigtableProto.java | 284 +-- ...InitialChangeStreamPartitionsRequest.java} | 377 +-- ...angeStreamPartitionsRequestOrBuilder.java} | 16 +- ...nitialChangeStreamPartitionsResponse.java} | 269 ++- ...ngeStreamPartitionsResponseOrBuilder.java} | 4 +- .../bigtable/v2/ReadChangeStreamRequest.java | 452 ++-- .../v2/ReadChangeStreamRequestOrBuilder.java | 14 +- .../bigtable/v2/ReadChangeStreamResponse.java | 2093 ++++++++++------- .../v2/ReadChangeStreamResponseOrBuilder.java | 14 +- .../proto/google/bigtable/v2/bigtable.proto | 26 +- 22 files changed, 2250 insertions(+), 1735 deletions(-) rename google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/{ListChangeStreamPartitionsUserCallable.java => GenerateInitialChangeStreamPartitionsUserCallable.java} (73%) rename google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/{ListChangeStreamPartitionsUserCallableTest.java => GenerateInitialChangeStreamPartitionsUserCallableTest.java} (70%) rename proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/{ListChangeStreamPartitionsRequest.java => GenerateInitialChangeStreamPartitionsRequest.java} (62%) rename proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/{ListChangeStreamPartitionsRequestOrBuilder.java => GenerateInitialChangeStreamPartitionsRequestOrBuilder.java} (89%) rename proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/{ListChangeStreamPartitionsResponse.java => GenerateInitialChangeStreamPartitionsResponse.java} (64%) rename proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/{ListChangeStreamPartitionsResponseOrBuilder.java => GenerateInitialChangeStreamPartitionsResponseOrBuilder.java} (92%) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index 2de6e9b94a..acfbff0747 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -1503,7 +1503,7 @@ public UnaryCallable readModifyWriteRowCallable() { * String tableId = "[TABLE]"; * * try { - * ServerStream stream = bigtableDataClient.listChangeStreamPartitions(tableId); + * ServerStream stream = bigtableDataClient.generateInitialChangeStreamPartitions(tableId); * int count = 0; * * // Iterator style @@ -1525,8 +1525,8 @@ public UnaryCallable readModifyWriteRowCallable() { * @see ServerStreamingCallable For call styles. */ @InternalApi("Used in Changestream beam pipeline.") - public ServerStream listChangeStreamPartitions(String tableId) { - return listChangeStreamPartitionsCallable().call(tableId); + public ServerStream generateInitialChangeStreamPartitions(String tableId) { + return generateInitialChangeStreamPartitionsCallable().call(tableId); } /** @@ -1538,7 +1538,7 @@ public ServerStream listChangeStreamPartitions(String tableId) { * try (BigtableDataClient bigtableDataClient = BigtableDataClient.create("[PROJECT]", "[INSTANCE]")) { * String tableId = "[TABLE]"; * - * bigtableDataClient.listChangeStreamPartitionsAsync(tableId, new ResponseObserver() { + * bigtableDataClient.generateInitialChangeStreamPartitionsAsync(tableId, new ResponseObserver() { * StreamController controller; * int count = 0; * @@ -1567,8 +1567,9 @@ public ServerStream listChangeStreamPartitions(String tableId) { * } */ @InternalApi("Used in Changestream beam pipeline.") - public void listChangeStreamPartitionsAsync(String tableId, ResponseObserver observer) { - listChangeStreamPartitionsCallable().call(tableId, observer); + public void generateInitialChangeStreamPartitionsAsync( + String tableId, ResponseObserver observer) { + generateInitialChangeStreamPartitionsCallable().call(tableId, observer); } /** @@ -1583,7 +1584,7 @@ public void listChangeStreamPartitionsAsync(String tableId, ResponseObserver partitions = bigtableDataClient.listChangeStreamPartitionsCallable().all().call(tableId); + * List partitions = bigtableDataClient.generateInitialChangeStreamPartitionsCallable().all().call(tableId); * } catch (NotFoundException e) { * System.out.println("Tried to read a non-existent table"); * } catch (RuntimeException e) { @@ -1603,7 +1604,7 @@ public void listChangeStreamPartitionsAsync(String tableId, ResponseObserver partitionFuture = - * bigtableDataClient.listChangeStreamPartitionsCallable().first().futureCall(tableId); + * bigtableDataClient.generateInitialChangeStreamPartitionsCallable().first().futureCall(tableId); * * ApiFutures.addCallback(partitionFuture, new ApiFutureCallback() { * public void onFailure(Throwable t) { @@ -1625,8 +1626,8 @@ public void listChangeStreamPartitionsAsync(String tableId, ResponseObserver listChangeStreamPartitionsCallable() { - return stub.listChangeStreamPartitionsCallable(); + public ServerStreamingCallable generateInitialChangeStreamPartitionsCallable() { + return stub.generateInitialChangeStreamPartitionsCallable(); } /** diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json index 77b50a1f50..495762d219 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/gapic_metadata.json @@ -13,6 +13,9 @@ "CheckAndMutateRow": { "methods": ["checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRow", "checkAndMutateRowCallable"] }, + "GenerateInitialChangeStreamPartitions": { + "methods": ["generateInitialChangeStreamPartitionsCallable"] + }, "MutateRow": { "methods": ["mutateRow", "mutateRow", "mutateRow", "mutateRow", "mutateRow", "mutateRowCallable"] }, @@ -22,6 +25,9 @@ "PingAndWarm": { "methods": ["pingAndWarm", "pingAndWarm", "pingAndWarm", "pingAndWarm", "pingAndWarm", "pingAndWarmCallable"] }, + "ReadChangeStream": { + "methods": ["readChangeStreamCallable"] + }, "ReadModifyWriteRow": { "methods": ["readModifyWriteRow", "readModifyWriteRow", "readModifyWriteRow", "readModifyWriteRow", "readModifyWriteRow", "readModifyWriteRowCallable"] }, diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java index a3ab3f3951..7be629f8cf 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java @@ -22,8 +22,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; -import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; -import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; @@ -78,10 +78,11 @@ public UnaryCallable pingAndWarmCallabl } public ServerStreamingCallable< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsCallable() { + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsCallable() { throw new UnsupportedOperationException( - "Not implemented: listChangeStreamPartitionsCallable()"); + "Not implemented: generateInitialChangeStreamPartitionsCallable()"); } public ServerStreamingCallable diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java index 5c77a08132..6f3143abca 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java @@ -35,8 +35,8 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; -import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; -import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; @@ -88,8 +88,9 @@ public class BigtableStubSettings extends StubSettings { private final UnaryCallSettings readModifyWriteRowSettings; private final ServerStreamingCallSettings< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsSettings; + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings readChangeStreamSettings; @@ -131,11 +132,14 @@ public UnaryCallSettings pingAndWarmSet return readModifyWriteRowSettings; } - /** Returns the object with the settings used for calls to listChangeStreamPartitions. */ + /** + * Returns the object with the settings used for calls to generateInitialChangeStreamPartitions. + */ public ServerStreamingCallSettings< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsSettings() { - return listChangeStreamPartitionsSettings; + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsSettings() { + return generateInitialChangeStreamPartitionsSettings; } /** Returns the object with the settings used for calls to readChangeStream. */ @@ -225,8 +229,8 @@ protected BigtableStubSettings(Builder settingsBuilder) throws IOException { checkAndMutateRowSettings = settingsBuilder.checkAndMutateRowSettings().build(); pingAndWarmSettings = settingsBuilder.pingAndWarmSettings().build(); readModifyWriteRowSettings = settingsBuilder.readModifyWriteRowSettings().build(); - listChangeStreamPartitionsSettings = - settingsBuilder.listChangeStreamPartitionsSettings().build(); + generateInitialChangeStreamPartitionsSettings = + settingsBuilder.generateInitialChangeStreamPartitionsSettings().build(); readChangeStreamSettings = settingsBuilder.readChangeStreamSettings().build(); } @@ -247,8 +251,9 @@ public static class Builder extends StubSettings.Builder readModifyWriteRowSettings; private final ServerStreamingCallSettings.Builder< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsSettings; + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings.Builder< ReadChangeStreamRequest, ReadChangeStreamResponse> readChangeStreamSettings; @@ -362,7 +367,7 @@ protected Builder(ClientContext clientContext) { checkAndMutateRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); pingAndWarmSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); readModifyWriteRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listChangeStreamPartitionsSettings = ServerStreamingCallSettings.newBuilder(); + generateInitialChangeStreamPartitionsSettings = ServerStreamingCallSettings.newBuilder(); readChangeStreamSettings = ServerStreamingCallSettings.newBuilder(); unaryMethodSettingsBuilders = @@ -384,7 +389,8 @@ protected Builder(BigtableStubSettings settings) { checkAndMutateRowSettings = settings.checkAndMutateRowSettings.toBuilder(); pingAndWarmSettings = settings.pingAndWarmSettings.toBuilder(); readModifyWriteRowSettings = settings.readModifyWriteRowSettings.toBuilder(); - listChangeStreamPartitionsSettings = settings.listChangeStreamPartitionsSettings.toBuilder(); + generateInitialChangeStreamPartitionsSettings = + settings.generateInitialChangeStreamPartitionsSettings.toBuilder(); readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); unaryMethodSettingsBuilders = @@ -445,7 +451,7 @@ private static Builder initDefaults(Builder builder) { .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); builder - .listChangeStreamPartitionsSettings() + .generateInitialChangeStreamPartitionsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); @@ -513,11 +519,14 @@ public UnaryCallSettings.Builder mutateRowS return readModifyWriteRowSettings; } - /** Returns the builder for the settings used for calls to listChangeStreamPartitions. */ + /** + * Returns the builder for the settings used for calls to generateInitialChangeStreamPartitions. + */ public ServerStreamingCallSettings.Builder< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsSettings() { - return listChangeStreamPartitionsSettings; + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsSettings() { + return generateInitialChangeStreamPartitionsSettings; } /** Returns the builder for the settings used for calls to readChangeStream. */ diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 6b5746fea2..4e29f2a3f5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -47,8 +47,8 @@ import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; -import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; -import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; @@ -81,7 +81,7 @@ import com.google.cloud.bigtable.data.v2.models.RowMutation; import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMergingCallable; -import com.google.cloud.bigtable.data.v2.stub.changestream.ListChangeStreamPartitionsUserCallable; +import com.google.cloud.bigtable.data.v2.stub.changestream.GenerateInitialChangeStreamPartitionsUserCallable; import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamResumptionStrategy; import com.google.cloud.bigtable.data.v2.stub.changestream.ReadChangeStreamUserCallable; import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracerStreamingCallable; @@ -155,7 +155,8 @@ public class EnhancedBigtableStub implements AutoCloseable { private final UnaryCallable checkAndMutateRowCallable; private final UnaryCallable readModifyWriteRowCallable; - private final ServerStreamingCallable listChangeStreamPartitionsCallable; + private final ServerStreamingCallable + generateInitialChangeStreamPartitionsCallable; private final ServerStreamingCallable readChangeStreamCallable; @@ -302,7 +303,8 @@ public EnhancedBigtableStub(EnhancedBigtableStubSettings settings, ClientContext bulkMutateRowsCallable = createBulkMutateRowsCallable(); checkAndMutateRowCallable = createCheckAndMutateRowCallable(); readModifyWriteRowCallable = createReadModifyWriteRowCallable(); - listChangeStreamPartitionsCallable = createListChangeStreamPartitionsCallable(); + generateInitialChangeStreamPartitionsCallable = + createGenerateInitialChangeStreamPartitionsCallable(); readChangeStreamCallable = createReadChangeStreamCallable(new DefaultChangeStreamRecordAdapter()); } @@ -820,57 +822,68 @@ public Map extract(ReadModifyWriteRowRequest request) { } /** - * Creates a callable chain to handle streaming ListChangeStreamPartitions RPCs. The chain will: + * Creates a callable chain to handle streaming GenerateInitialChangeStreamPartitions RPCs. The + * chain will: * *

      *
    • Convert a String format tableId into a {@link - * com.google.bigtable.v2.ListChangeStreamPartitionsRequest} and dispatch the RPC. + * GenerateInitialChangeStreamPartitionsRequest} and dispatch the RPC. *
    • Upon receiving the response stream, it will convert the {@link - * com.google.bigtable.v2.ListChangeStreamPartitionsResponse}s into {@link RowRange}. + * com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse}s into {@link + * RowRange}. *
    */ - private ServerStreamingCallable createListChangeStreamPartitionsCallable() { - ServerStreamingCallable + private ServerStreamingCallable + createGenerateInitialChangeStreamPartitionsCallable() { + ServerStreamingCallable< + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> base = GrpcRawCallableFactory.createServerStreamingCallable( GrpcCallSettings - . + . newBuilder() - .setMethodDescriptor(BigtableGrpc.getListChangeStreamPartitionsMethod()) + .setMethodDescriptor( + BigtableGrpc.getGenerateInitialChangeStreamPartitionsMethod()) .setParamsExtractor( - new RequestParamsExtractor() { + new RequestParamsExtractor() { @Override public Map extract( - ListChangeStreamPartitionsRequest listChangeStreamPartitionsRequest) { + GenerateInitialChangeStreamPartitionsRequest + generateInitialChangeStreamPartitionsRequest) { return ImmutableMap.of( "table_name", - listChangeStreamPartitionsRequest.getTableName(), + generateInitialChangeStreamPartitionsRequest.getTableName(), "app_profile_id", - listChangeStreamPartitionsRequest.getAppProfileId()); + generateInitialChangeStreamPartitionsRequest.getAppProfileId()); } }) .build(), - settings.listChangeStreamPartitionsSettings().getRetryableCodes()); + settings.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()); ServerStreamingCallable userCallable = - new ListChangeStreamPartitionsUserCallable(base, requestContext); + new GenerateInitialChangeStreamPartitionsUserCallable(base, requestContext); ServerStreamingCallable withStatsHeaders = new StatsHeadersServerStreamingCallable<>(userCallable); - // Sometimes ListChangeStreamPartitions connections are disconnected via an RST frame. This - // error is transient and should be treated similar to UNAVAILABLE. However, this exception - // has an INTERNAL error code which by default is not retryable. Convert the exception so it - // can be retried in the client. + // Sometimes GenerateInitialChangeStreamPartitions connections are disconnected via an RST + // frame. This error is transient and should be treated similar to UNAVAILABLE. However, this + // exception has an INTERNAL error code which by default is not retryable. Convert the exception + // so it can be retried in the client. ServerStreamingCallable convertException = new ConvertStreamExceptionCallable<>(withStatsHeaders); // Copy idle timeout settings for watchdog. ServerStreamingCallSettings innerSettings = ServerStreamingCallSettings.newBuilder() - .setRetryableCodes(settings.listChangeStreamPartitionsSettings().getRetryableCodes()) - .setRetrySettings(settings.listChangeStreamPartitionsSettings().getRetrySettings()) - .setIdleTimeout(settings.listChangeStreamPartitionsSettings().getIdleTimeout()) + .setRetryableCodes( + settings.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()) + .setRetrySettings( + settings.generateInitialChangeStreamPartitionsSettings().getRetrySettings()) + .setIdleTimeout( + settings.generateInitialChangeStreamPartitionsSettings().getIdleTimeout()) .build(); ServerStreamingCallable watched = @@ -882,7 +895,7 @@ public Map extract( ServerStreamingCallable retrying = Callables.retrying(withBigtableTracer, innerSettings, clientContext); - SpanName span = getSpanName("ListChangeStreamPartitions"); + SpanName span = getSpanName("GenerateInitialChangeStreamPartitions"); ServerStreamingCallable traced = new TracedServerStreamingCallable<>(retrying, clientContext.getTracerFactory(), span); @@ -1025,9 +1038,9 @@ public UnaryCallable readModifyWriteRowCallable() { return readModifyWriteRowCallable; } - /** Returns a streaming list change stream partitions callable */ - public ServerStreamingCallable listChangeStreamPartitionsCallable() { - return listChangeStreamPartitionsCallable; + /** Returns a streaming generate initial change stream partitions callable */ + public ServerStreamingCallable generateInitialChangeStreamPartitionsCallable() { + return generateInitialChangeStreamPartitionsCallable; } /** Returns a streaming read change stream callable. */ diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 68769c9602..9d2a731018 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -140,10 +140,10 @@ public class EnhancedBigtableStubSettings extends StubSettings LIST_CHANGE_STREAM_PARTITIONS_RETRY_CODES = + private static final Set GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_CODES = ImmutableSet.builder().addAll(IDEMPOTENT_RETRY_CODES).add(Code.ABORTED).build(); - private static final RetrySettings LIST_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS = + private static final RetrySettings GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS = RetrySettings.newBuilder() .setInitialRetryDelay(Duration.ofMillis(10)) .setRetryDelayMultiplier(2.0) @@ -212,7 +212,8 @@ public class EnhancedBigtableStubSettings extends StubSettings checkAndMutateRowSettings; private final UnaryCallSettings readModifyWriteRowSettings; - private final ServerStreamingCallSettings listChangeStreamPartitionsSettings; + private final ServerStreamingCallSettings + generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings readChangeStreamSettings; @@ -250,7 +251,8 @@ private EnhancedBigtableStubSettings(Builder builder) { bulkReadRowsSettings = builder.bulkReadRowsSettings.build(); checkAndMutateRowSettings = builder.checkAndMutateRowSettings.build(); readModifyWriteRowSettings = builder.readModifyWriteRowSettings.build(); - listChangeStreamPartitionsSettings = builder.listChangeStreamPartitionsSettings.build(); + generateInitialChangeStreamPartitionsSettings = + builder.generateInitialChangeStreamPartitionsSettings.build(); readChangeStreamSettings = builder.readChangeStreamSettings.build(); } @@ -535,8 +537,9 @@ public UnaryCallSettings readModifyWriteRowSettings() { return readModifyWriteRowSettings; } - public ServerStreamingCallSettings listChangeStreamPartitionsSettings() { - return listChangeStreamPartitionsSettings; + public ServerStreamingCallSettings + generateInitialChangeStreamPartitionsSettings() { + return generateInitialChangeStreamPartitionsSettings; } public ServerStreamingCallSettings @@ -569,7 +572,7 @@ public static class Builder extends StubSettings.Builder readModifyWriteRowSettings; private final ServerStreamingCallSettings.Builder - listChangeStreamPartitionsSettings; + generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings.Builder readChangeStreamSettings; @@ -684,10 +687,10 @@ private Builder() { readModifyWriteRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); copyRetrySettings(baseDefaults.readModifyWriteRowSettings(), readModifyWriteRowSettings); - listChangeStreamPartitionsSettings = ServerStreamingCallSettings.newBuilder(); - listChangeStreamPartitionsSettings - .setRetryableCodes(LIST_CHANGE_STREAM_PARTITIONS_RETRY_CODES) - .setRetrySettings(LIST_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS) + generateInitialChangeStreamPartitionsSettings = ServerStreamingCallSettings.newBuilder(); + generateInitialChangeStreamPartitionsSettings + .setRetryableCodes(GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_CODES) + .setRetrySettings(GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS_RETRY_SETTINGS) .setIdleTimeout(Duration.ofMinutes(5)); readChangeStreamSettings = ServerStreamingCallSettings.newBuilder(); @@ -715,7 +718,8 @@ private Builder(EnhancedBigtableStubSettings settings) { bulkReadRowsSettings = settings.bulkReadRowsSettings.toBuilder(); checkAndMutateRowSettings = settings.checkAndMutateRowSettings.toBuilder(); readModifyWriteRowSettings = settings.readModifyWriteRowSettings.toBuilder(); - listChangeStreamPartitionsSettings = settings.listChangeStreamPartitionsSettings.toBuilder(); + generateInitialChangeStreamPartitionsSettings = + settings.generateInitialChangeStreamPartitionsSettings.toBuilder(); readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder(); } // @@ -928,7 +932,9 @@ public String toString() { .add("bulkReadRowsSettings", bulkReadRowsSettings) .add("checkAndMutateRowSettings", checkAndMutateRowSettings) .add("readModifyWriteRowSettings", readModifyWriteRowSettings) - .add("listChangeStreamPartitionsSettings", listChangeStreamPartitionsSettings) + .add( + "generateInitialChangeStreamPartitionsSettings", + generateInitialChangeStreamPartitionsSettings) .add("readChangeStreamSettings", readChangeStreamSettings) .add("parent", super.toString()) .toString(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java index b2c219bb3f..1a8ef37421 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java @@ -28,8 +28,8 @@ import com.google.api.pathtemplate.PathTemplate; import com.google.bigtable.v2.CheckAndMutateRowRequest; import com.google.bigtable.v2.CheckAndMutateRowResponse; -import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; -import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; import com.google.bigtable.v2.MutateRowsRequest; @@ -128,16 +128,22 @@ public class GrpcBigtableStub extends BigtableStub { .build(); private static final MethodDescriptor< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsMethodDescriptor = + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsMethodDescriptor = MethodDescriptor - .newBuilder() + . + newBuilder() .setType(MethodDescriptor.MethodType.SERVER_STREAMING) - .setFullMethodName("google.bigtable.v2.Bigtable/ListChangeStreamPartitions") + .setFullMethodName( + "google.bigtable.v2.Bigtable/GenerateInitialChangeStreamPartitions") .setRequestMarshaller( - ProtoUtils.marshaller(ListChangeStreamPartitionsRequest.getDefaultInstance())) + ProtoUtils.marshaller( + GenerateInitialChangeStreamPartitionsRequest.getDefaultInstance())) .setResponseMarshaller( - ProtoUtils.marshaller(ListChangeStreamPartitionsResponse.getDefaultInstance())) + ProtoUtils.marshaller( + GenerateInitialChangeStreamPartitionsResponse.getDefaultInstance())) .build(); private static final MethodDescriptor @@ -162,8 +168,9 @@ public class GrpcBigtableStub extends BigtableStub { private final UnaryCallable readModifyWriteRowCallable; private final ServerStreamingCallable< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsCallable; + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsCallable; private final ServerStreamingCallable readChangeStreamCallable; @@ -332,11 +339,15 @@ protected GrpcBigtableStub( return builder.build(); }) .build(); - GrpcCallSettings - listChangeStreamPartitionsTransportSettings = + GrpcCallSettings< + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsTransportSettings = GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listChangeStreamPartitionsMethodDescriptor) + . + newBuilder() + .setMethodDescriptor(generateInitialChangeStreamPartitionsMethodDescriptor) .setParamsExtractor( request -> { ImmutableMap.Builder params = ImmutableMap.builder(); @@ -381,10 +392,10 @@ protected GrpcBigtableStub( readModifyWriteRowTransportSettings, settings.readModifyWriteRowSettings(), clientContext); - this.listChangeStreamPartitionsCallable = + this.generateInitialChangeStreamPartitionsCallable = callableFactory.createServerStreamingCallable( - listChangeStreamPartitionsTransportSettings, - settings.listChangeStreamPartitionsSettings(), + generateInitialChangeStreamPartitionsTransportSettings, + settings.generateInitialChangeStreamPartitionsSettings(), clientContext); this.readChangeStreamCallable = callableFactory.createServerStreamingCallable( @@ -438,9 +449,10 @@ public UnaryCallable pingAndWarmCallabl @Override public ServerStreamingCallable< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> - listChangeStreamPartitionsCallable() { - return listChangeStreamPartitionsCallable; + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> + generateInitialChangeStreamPartitionsCallable() { + return generateInitialChangeStreamPartitionsCallable; } @Override diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java similarity index 73% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java index 1d3393bb2b..365cf56ff2 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java @@ -19,22 +19,28 @@ import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StreamController; -import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; -import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; -/** Simple wrapper for ListChangeStreamPartitions to wrap the request and response protobufs. */ -public class ListChangeStreamPartitionsUserCallable +/** + * Simple wrapper for GenerateInitialChangeStreamPartitions to wrap the request and response + * protobufs. + */ +public class GenerateInitialChangeStreamPartitionsUserCallable extends ServerStreamingCallable { private final RequestContext requestContext; private final ServerStreamingCallable< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> inner; - public ListChangeStreamPartitionsUserCallable( - ServerStreamingCallable + public GenerateInitialChangeStreamPartitionsUserCallable( + ServerStreamingCallable< + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> inner, RequestContext requestContext) { this.requestContext = requestContext; @@ -47,8 +53,8 @@ public void call( String tableName = NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId); - ListChangeStreamPartitionsRequest request = - ListChangeStreamPartitionsRequest.newBuilder() + GenerateInitialChangeStreamPartitionsRequest request = + GenerateInitialChangeStreamPartitionsRequest.newBuilder() .setTableName(tableName) .setAppProfileId(requestContext.getAppProfileId()) .build(); @@ -57,7 +63,7 @@ public void call( } private class ConvertPartitionToRangeObserver - implements ResponseObserver { + implements ResponseObserver { private final ResponseObserver outerObserver; @@ -71,7 +77,7 @@ public void onStart(final StreamController controller) { } @Override - public void onResponse(ListChangeStreamPartitionsResponse response) { + public void onResponse(GenerateInitialChangeStreamPartitionsResponse response) { RowRange rowRange = RowRange.newBuilder() .setStartKeyClosed(response.getPartition().getRowRange().getStartKeyClosed()) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java index 648a298155..c3850e7e15 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java @@ -83,7 +83,8 @@ public class BigtableDataClientTests { @Mock private Batcher mockBulkReadRowsBatcher; @Mock(answer = Answers.RETURNS_DEEP_STUBS) - private ServerStreamingCallable mockListChangeStreamPartitionsCallable; + private ServerStreamingCallable + mockGenerateInitialChangeStreamPartitionsCallable; @Mock(answer = Answers.RETURNS_DEEP_STUBS) private ServerStreamingCallable @@ -164,11 +165,11 @@ public void proxyReadRowsCallableTest() { } @Test - public void proxyListChangeStreamPartitionsCallableTest() { - Mockito.when(mockStub.listChangeStreamPartitionsCallable()) - .thenReturn(mockListChangeStreamPartitionsCallable); - assertThat(bigtableDataClient.listChangeStreamPartitionsCallable()) - .isSameInstanceAs(mockListChangeStreamPartitionsCallable); + public void proxyGenerateInitialChangeStreamPartitionsCallableTest() { + Mockito.when(mockStub.generateInitialChangeStreamPartitionsCallable()) + .thenReturn(mockGenerateInitialChangeStreamPartitionsCallable); + assertThat(bigtableDataClient.generateInitialChangeStreamPartitionsCallable()) + .isSameInstanceAs(mockGenerateInitialChangeStreamPartitionsCallable); } @Test @@ -326,25 +327,26 @@ public void proxyReadRowsAsyncTest() { } @Test - public void proxyListChangeStreamPartitionsSyncTest() { - Mockito.when(mockStub.listChangeStreamPartitionsCallable()) - .thenReturn(mockListChangeStreamPartitionsCallable); + public void proxyGenerateInitialChangeStreamPartitionsSyncTest() { + Mockito.when(mockStub.generateInitialChangeStreamPartitionsCallable()) + .thenReturn(mockGenerateInitialChangeStreamPartitionsCallable); - bigtableDataClient.listChangeStreamPartitions("fake-table"); + bigtableDataClient.generateInitialChangeStreamPartitions("fake-table"); - Mockito.verify(mockListChangeStreamPartitionsCallable).call("fake-table"); + Mockito.verify(mockGenerateInitialChangeStreamPartitionsCallable).call("fake-table"); } @Test - public void proxyListChangeStreamPartitionsAsyncTest() { - Mockito.when(mockStub.listChangeStreamPartitionsCallable()) - .thenReturn(mockListChangeStreamPartitionsCallable); + public void proxyGenerateInitialChangeStreamPartitionsAsyncTest() { + Mockito.when(mockStub.generateInitialChangeStreamPartitionsCallable()) + .thenReturn(mockGenerateInitialChangeStreamPartitionsCallable); @SuppressWarnings("unchecked") ResponseObserver mockObserver = Mockito.mock(ResponseObserver.class); - bigtableDataClient.listChangeStreamPartitionsAsync("fake-table", mockObserver); + bigtableDataClient.generateInitialChangeStreamPartitionsAsync("fake-table", mockObserver); - Mockito.verify(mockListChangeStreamPartitionsCallable).call("fake-table", mockObserver); + Mockito.verify(mockGenerateInitialChangeStreamPartitionsCallable) + .call("fake-table", mockObserver); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index fa2efbf7e0..731ba7f77e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -701,7 +701,7 @@ public void isRefreshingChannelFalseValueTest() { "bulkReadRowsSettings", "checkAndMutateRowSettings", "readModifyWriteRowSettings", - "listChangeStreamPartitionsSettings", + "generateInitialChangeStreamPartitionsSettings", "readChangeStreamSettings", }; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java similarity index 70% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java index 03db35f8d6..908961be77 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ListChangeStreamPartitionsUserCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java @@ -17,8 +17,8 @@ import static com.google.common.truth.Truth.assertThat; -import com.google.bigtable.v2.ListChangeStreamPartitionsRequest; -import com.google.bigtable.v2.ListChangeStreamPartitionsResponse; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; +import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamPartition; import com.google.cloud.bigtable.data.v2.internal.NameUtil; @@ -33,22 +33,24 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class ListChangeStreamPartitionsUserCallableTest { +public class GenerateInitialChangeStreamPartitionsUserCallableTest { private final RequestContext requestContext = RequestContext.create("my-project", "my-instance", "my-profile"); @Test public void requestIsCorrect() { FakeStreamingApi.ServerStreamingStashCallable< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> inner = new FakeStreamingApi.ServerStreamingStashCallable<>(Lists.newArrayList()); - ListChangeStreamPartitionsUserCallable listChangeStreamPartitionsUserCallable = - new ListChangeStreamPartitionsUserCallable(inner, requestContext); + GenerateInitialChangeStreamPartitionsUserCallable + generateInitialChangeStreamPartitionsUserCallable = + new GenerateInitialChangeStreamPartitionsUserCallable(inner, requestContext); - listChangeStreamPartitionsUserCallable.all().call("my-table"); + generateInitialChangeStreamPartitionsUserCallable.all().call("my-table"); assertThat(inner.getActualRequest()) .isEqualTo( - ListChangeStreamPartitionsRequest.newBuilder() + GenerateInitialChangeStreamPartitionsRequest.newBuilder() .setTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), "my-table")) @@ -59,11 +61,12 @@ public void requestIsCorrect() { @Test public void responseIsConverted() { FakeStreamingApi.ServerStreamingStashCallable< - ListChangeStreamPartitionsRequest, ListChangeStreamPartitionsResponse> + GenerateInitialChangeStreamPartitionsRequest, + GenerateInitialChangeStreamPartitionsResponse> inner = new FakeStreamingApi.ServerStreamingStashCallable<>( Lists.newArrayList( - ListChangeStreamPartitionsResponse.newBuilder() + GenerateInitialChangeStreamPartitionsResponse.newBuilder() .setPartition( StreamPartition.newBuilder() .setRowRange( @@ -73,10 +76,12 @@ public void responseIsConverted() { .build()) .build()) .build())); - ListChangeStreamPartitionsUserCallable listChangeStreamPartitionsUserCallable = - new ListChangeStreamPartitionsUserCallable(inner, requestContext); + GenerateInitialChangeStreamPartitionsUserCallable + generateInitialChangeStreamPartitionsUserCallable = + new GenerateInitialChangeStreamPartitionsUserCallable(inner, requestContext); - List results = listChangeStreamPartitionsUserCallable.all().call("my-table"); + List results = + generateInitialChangeStreamPartitionsUserCallable.all().call("my-table"); Truth.assertThat(results) .containsExactly( RowRange.newBuilder() diff --git a/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java b/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java index f1cfa5c841..8ad1bae368 100644 --- a/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java +++ b/grpc-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableGrpc.java @@ -335,53 +335,57 @@ private BigtableGrpc() {} } private static volatile io.grpc.MethodDescriptor< - com.google.bigtable.v2.ListChangeStreamPartitionsRequest, - com.google.bigtable.v2.ListChangeStreamPartitionsResponse> - getListChangeStreamPartitionsMethod; + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> + getGenerateInitialChangeStreamPartitionsMethod; @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListChangeStreamPartitions", - requestType = com.google.bigtable.v2.ListChangeStreamPartitionsRequest.class, - responseType = com.google.bigtable.v2.ListChangeStreamPartitionsResponse.class, + fullMethodName = SERVICE_NAME + '/' + "GenerateInitialChangeStreamPartitions", + requestType = com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.class, + responseType = com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) public static io.grpc.MethodDescriptor< - com.google.bigtable.v2.ListChangeStreamPartitionsRequest, - com.google.bigtable.v2.ListChangeStreamPartitionsResponse> - getListChangeStreamPartitionsMethod() { + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> + getGenerateInitialChangeStreamPartitionsMethod() { io.grpc.MethodDescriptor< - com.google.bigtable.v2.ListChangeStreamPartitionsRequest, - com.google.bigtable.v2.ListChangeStreamPartitionsResponse> - getListChangeStreamPartitionsMethod; - if ((getListChangeStreamPartitionsMethod = BigtableGrpc.getListChangeStreamPartitionsMethod) + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> + getGenerateInitialChangeStreamPartitionsMethod; + if ((getGenerateInitialChangeStreamPartitionsMethod = + BigtableGrpc.getGenerateInitialChangeStreamPartitionsMethod) == null) { synchronized (BigtableGrpc.class) { - if ((getListChangeStreamPartitionsMethod = BigtableGrpc.getListChangeStreamPartitionsMethod) + if ((getGenerateInitialChangeStreamPartitionsMethod = + BigtableGrpc.getGenerateInitialChangeStreamPartitionsMethod) == null) { - BigtableGrpc.getListChangeStreamPartitionsMethod = - getListChangeStreamPartitionsMethod = + BigtableGrpc.getGenerateInitialChangeStreamPartitionsMethod = + getGenerateInitialChangeStreamPartitionsMethod = io.grpc.MethodDescriptor - . + . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListChangeStreamPartitions")) + generateFullMethodName( + SERVICE_NAME, "GenerateInitialChangeStreamPartitions")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.bigtable.v2.ListChangeStreamPartitionsRequest + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( - com.google.bigtable.v2.ListChangeStreamPartitionsResponse + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse .getDefaultInstance())) .setSchemaDescriptor( - new BigtableMethodDescriptorSupplier("ListChangeStreamPartitions")) + new BigtableMethodDescriptorSupplier( + "GenerateInitialChangeStreamPartitions")) .build(); } } } - return getListChangeStreamPartitionsMethod; + return getGenerateInitialChangeStreamPartitionsMethod; } private static volatile io.grpc.MethodDescriptor< @@ -600,12 +604,13 @@ public void readModifyWriteRow( * Partitions can be read with `ReadChangeStream`. * */ - public void listChangeStreamPartitions( - com.google.bigtable.v2.ListChangeStreamPartitionsRequest request, - io.grpc.stub.StreamObserver + public void generateInitialChangeStreamPartitions( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest request, + io.grpc.stub.StreamObserver< + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListChangeStreamPartitionsMethod(), responseObserver); + getGenerateInitialChangeStreamPartitionsMethod(), responseObserver); } /** @@ -675,12 +680,12 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.bigtable.v2.ReadModifyWriteRowResponse>( this, METHODID_READ_MODIFY_WRITE_ROW))) .addMethod( - getListChangeStreamPartitionsMethod(), + getGenerateInitialChangeStreamPartitionsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< - com.google.bigtable.v2.ListChangeStreamPartitionsRequest, - com.google.bigtable.v2.ListChangeStreamPartitionsResponse>( - this, METHODID_LIST_CHANGE_STREAM_PARTITIONS))) + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse>( + this, METHODID_GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS))) .addMethod( getReadChangeStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( @@ -843,12 +848,13 @@ public void readModifyWriteRow( * Partitions can be read with `ReadChangeStream`. * */ - public void listChangeStreamPartitions( - com.google.bigtable.v2.ListChangeStreamPartitionsRequest request, - io.grpc.stub.StreamObserver + public void generateInitialChangeStreamPartitions( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest request, + io.grpc.stub.StreamObserver< + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( - getChannel().newCall(getListChangeStreamPartitionsMethod(), getCallOptions()), + getChannel().newCall(getGenerateInitialChangeStreamPartitionsMethod(), getCallOptions()), request, responseObserver); } @@ -1008,11 +1014,14 @@ public com.google.bigtable.v2.ReadModifyWriteRowResponse readModifyWriteRow( * Partitions can be read with `ReadChangeStream`. * */ - public java.util.Iterator - listChangeStreamPartitions( - com.google.bigtable.v2.ListChangeStreamPartitionsRequest request) { + public java.util.Iterator + generateInitialChangeStreamPartitions( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( - getChannel(), getListChangeStreamPartitionsMethod(), getCallOptions(), request); + getChannel(), + getGenerateInitialChangeStreamPartitionsMethod(), + getCallOptions(), + request); } /** @@ -1120,7 +1129,7 @@ protected BigtableFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions private static final int METHODID_CHECK_AND_MUTATE_ROW = 4; private static final int METHODID_PING_AND_WARM = 5; private static final int METHODID_READ_MODIFY_WRITE_ROW = 6; - private static final int METHODID_LIST_CHANGE_STREAM_PARTITIONS = 7; + private static final int METHODID_GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS = 7; private static final int METHODID_READ_CHANGE_STREAM = 8; private static final class MethodHandlers @@ -1182,11 +1191,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_LIST_CHANGE_STREAM_PARTITIONS: - serviceImpl.listChangeStreamPartitions( - (com.google.bigtable.v2.ListChangeStreamPartitionsRequest) request, + case METHODID_GENERATE_INITIAL_CHANGE_STREAM_PARTITIONS: + serviceImpl.generateInitialChangeStreamPartitions( + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) request, (io.grpc.stub.StreamObserver< - com.google.bigtable.v2.ListChangeStreamPartitionsResponse>) + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse>) responseObserver); break; case METHODID_READ_CHANGE_STREAM: @@ -1264,7 +1273,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCheckAndMutateRowMethod()) .addMethod(getPingAndWarmMethod()) .addMethod(getReadModifyWriteRowMethod()) - .addMethod(getListChangeStreamPartitionsMethod()) + .addMethod(getGenerateInitialChangeStreamPartitionsMethod()) .addMethod(getReadChangeStreamMethod()) .build(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java index e37fe2f8bb..5de4d1ecd5 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java @@ -96,13 +96,13 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable; + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable; + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -202,141 +202,143 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v2.Re" + "adModifyWriteRuleB\003\340A\002\"B\n\032ReadModifyWrit" + "eRowResponse\022$\n\003row\030\001 \001(\0132\027.google.bigta" - + "ble.v2.Row\"{\n!ListChangeStreamPartitions" - + "Request\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"big" - + "tableadmin.googleapis.com/Table\022\026\n\016app_p" - + "rofile_id\030\002 \001(\t\"\\\n\"ListChangeStreamParti" - + "tionsResponse\0226\n\tpartition\030\001 \001(\0132#.googl" - + "e.bigtable.v2.StreamPartition\"\233\003\n\027ReadCh" - + "angeStreamRequest\022>\n\ntable_name\030\001 \001(\tB*\340" - + "A\002\372A$\n\"bigtableadmin.googleapis.com/Tabl" - + "e\022\026\n\016app_profile_id\030\002 \001(\t\0226\n\tpartition\030\003" - + " \001(\0132#.google.bigtable.v2.StreamPartitio" - + "n\0220\n\nstart_time\030\004 \001(\0132\032.google.protobuf." - + "TimestampH\000\022K\n\023continuation_tokens\030\006 \001(\013" - + "2,.google.bigtable.v2.StreamContinuation" - + "TokensH\000\022,\n\010end_time\030\005 \001(\0132\032.google.prot" - + "obuf.Timestamp\0225\n\022heartbeat_duration\030\007 \001" - + "(\0132\031.google.protobuf.DurationB\014\n\nstart_f" - + "rom\"\327\t\n\030ReadChangeStreamResponse\022N\n\013data" - + "_change\030\001 \001(\01327.google.bigtable.v2.ReadC" - + "hangeStreamResponse.DataChangeH\000\022K\n\thear" - + "tbeat\030\002 \001(\01326.google.bigtable.v2.ReadCha" - + "ngeStreamResponse.HeartbeatH\000\022P\n\014close_s" - + "tream\030\003 \001(\01328.google.bigtable.v2.ReadCha" - + "ngeStreamResponse.CloseStreamH\000\032\364\001\n\rMuta" - + "tionChunk\022X\n\nchunk_info\030\001 \001(\0132D.google.b" - + "igtable.v2.ReadChangeStreamResponse.Muta" - + "tionChunk.ChunkInfo\022.\n\010mutation\030\002 \001(\0132\034." - + "google.bigtable.v2.Mutation\032Y\n\tChunkInfo" - + "\022\032\n\022chunked_value_size\030\001 \001(\005\022\034\n\024chunked_" - + "value_offset\030\002 \001(\005\022\022\n\nlast_chunk\030\003 \001(\010\032\274" - + "\003\n\nDataChange\022J\n\004type\030\001 \001(\0162<.google.big" - + "table.v2.ReadChangeStreamResponse.DataCh" - + "ange.Type\022\031\n\021source_cluster_id\030\002 \001(\t\022\017\n\007" - + "row_key\030\003 \001(\014\0224\n\020commit_timestamp\030\004 \001(\0132" - + "\032.google.protobuf.Timestamp\022\022\n\ntiebreake" - + "r\030\005 \001(\005\022J\n\006chunks\030\006 \003(\0132:.google.bigtabl" - + "e.v2.ReadChangeStreamResponse.MutationCh" - + "unk\022\014\n\004done\030\010 \001(\010\022\r\n\005token\030\t \001(\t\0221\n\rlow_" - + "watermark\030\n \001(\0132\032.google.protobuf.Timest" - + "amp\"P\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004USE" - + "R\020\001\022\026\n\022GARBAGE_COLLECTION\020\002\022\020\n\014CONTINUAT" - + "ION\020\003\032\207\001\n\tHeartbeat\022G\n\022continuation_toke" - + "n\030\001 \001(\0132+.google.bigtable.v2.StreamConti" - + "nuationToken\0221\n\rlow_watermark\030\002 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\032{\n\013CloseStream\022\"" - + "\n\006status\030\001 \001(\0132\022.google.rpc.Status\022H\n\023co" - + "ntinuation_tokens\030\002 \003(\0132+.google.bigtabl" - + "e.v2.StreamContinuationTokenB\017\n\rstream_r" - + "ecord2\252\030\n\010Bigtable\022\233\002\n\010ReadRows\022#.google" - + ".bigtable.v2.ReadRowsRequest\032$.google.bi" - + "gtable.v2.ReadRowsResponse\"\301\001\202\323\344\223\002>\"9/v2" - + "/{table_name=projects/*/instances/*/tabl" - + "es/*}:readRows:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{" - + "table_name=projects/*/instances/*/tables" - + "/*}\022\020\n\016app_profile_id\332A\ntable_name\332A\031tab" - + "le_name,app_profile_id0\001\022\254\002\n\rSampleRowKe" - + "ys\022(.google.bigtable.v2.SampleRowKeysReq" - + "uest\032).google.bigtable.v2.SampleRowKeysR" - + "esponse\"\303\001\202\323\344\223\002@\022>/v2/{table_name=projec" - + "ts/*/instances/*/tables/*}:sampleRowKeys" + + "ble.v2.Row\"\206\001\n,GenerateInitialChangeStre" + + "amPartitionsRequest\022>\n\ntable_name\030\001 \001(\tB" + + "*\340A\002\372A$\n\"bigtableadmin.googleapis.com/Ta" + + "ble\022\026\n\016app_profile_id\030\002 \001(\t\"g\n-GenerateI" + + "nitialChangeStreamPartitionsResponse\0226\n\t" + + "partition\030\001 \001(\0132#.google.bigtable.v2.Str" + + "eamPartition\"\233\003\n\027ReadChangeStreamRequest" + + "\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtablead" + + "min.googleapis.com/Table\022\026\n\016app_profile_" + + "id\030\002 \001(\t\0226\n\tpartition\030\003 \001(\0132#.google.big" + + "table.v2.StreamPartition\0220\n\nstart_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampH\000\022K\n\023co" + + "ntinuation_tokens\030\006 \001(\0132,.google.bigtabl" + + "e.v2.StreamContinuationTokensH\000\022,\n\010end_t" + + "ime\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n" + + "\022heartbeat_duration\030\007 \001(\0132\031.google.proto" + + "buf.DurationB\014\n\nstart_from\"\327\t\n\030ReadChang" + + "eStreamResponse\022N\n\013data_change\030\001 \001(\01327.g" + + "oogle.bigtable.v2.ReadChangeStreamRespon" + + "se.DataChangeH\000\022K\n\theartbeat\030\002 \001(\01326.goo" + + "gle.bigtable.v2.ReadChangeStreamResponse" + + ".HeartbeatH\000\022P\n\014close_stream\030\003 \001(\01328.goo" + + "gle.bigtable.v2.ReadChangeStreamResponse" + + ".CloseStreamH\000\032\364\001\n\rMutationChunk\022X\n\nchun" + + "k_info\030\001 \001(\0132D.google.bigtable.v2.ReadCh" + + "angeStreamResponse.MutationChunk.ChunkIn" + + "fo\022.\n\010mutation\030\002 \001(\0132\034.google.bigtable.v" + + "2.Mutation\032Y\n\tChunkInfo\022\032\n\022chunked_value" + + "_size\030\001 \001(\005\022\034\n\024chunked_value_offset\030\002 \001(" + + "\005\022\022\n\nlast_chunk\030\003 \001(\010\032\274\003\n\nDataChange\022J\n\004" + + "type\030\001 \001(\0162<.google.bigtable.v2.ReadChan" + + "geStreamResponse.DataChange.Type\022\031\n\021sour" + + "ce_cluster_id\030\002 \001(\t\022\017\n\007row_key\030\003 \001(\014\0224\n\020" + + "commit_timestamp\030\004 \001(\0132\032.google.protobuf" + + ".Timestamp\022\022\n\ntiebreaker\030\005 \001(\005\022J\n\006chunks" + + "\030\006 \003(\0132:.google.bigtable.v2.ReadChangeSt" + + "reamResponse.MutationChunk\022\014\n\004done\030\010 \001(\010" + + "\022\r\n\005token\030\t \001(\t\0221\n\rlow_watermark\030\n \001(\0132\032" + + ".google.protobuf.Timestamp\"P\n\004Type\022\024\n\020TY" + + "PE_UNSPECIFIED\020\000\022\010\n\004USER\020\001\022\026\n\022GARBAGE_CO" + + "LLECTION\020\002\022\020\n\014CONTINUATION\020\003\032\207\001\n\tHeartbe" + + "at\022G\n\022continuation_token\030\001 \001(\0132+.google." + + "bigtable.v2.StreamContinuationToken\0221\n\rl" + + "ow_watermark\030\002 \001(\0132\032.google.protobuf.Tim" + + "estamp\032{\n\013CloseStream\022\"\n\006status\030\001 \001(\0132\022." + + "google.rpc.Status\022H\n\023continuation_tokens" + + "\030\002 \003(\0132+.google.bigtable.v2.StreamContin" + + "uationTokenB\017\n\rstream_record2\327\030\n\010Bigtabl" + + "e\022\233\002\n\010ReadRows\022#.google.bigtable.v2.Read" + + "RowsRequest\032$.google.bigtable.v2.ReadRow" + + "sResponse\"\301\001\202\323\344\223\002>\"9/v2/{table_name=proj" + + "ects/*/instances/*/tables/*}:readRows:\001*" + "\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=projec" + "ts/*/instances/*/tables/*}\022\020\n\016app_profil" + "e_id\332A\ntable_name\332A\031table_name,app_profi" - + "le_id0\001\022\301\002\n\tMutateRow\022$.google.bigtable." - + "v2.MutateRowRequest\032%.google.bigtable.v2" - + ".MutateRowResponse\"\346\001\202\323\344\223\002?\":/v2/{table_" - + "name=projects/*/instances/*/tables/*}:mu" - + "tateRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_n" - + "ame=projects/*/instances/*/tables/*}\022\020\n\016" - + "app_profile_id\332A\034table_name,row_key,muta" - + "tions\332A+table_name,row_key,mutations,app" - + "_profile_id\022\263\002\n\nMutateRows\022%.google.bigt" - + "able.v2.MutateRowsRequest\032&.google.bigta" - + "ble.v2.MutateRowsResponse\"\323\001\202\323\344\223\002@\";/v2/" - + "{table_name=projects/*/instances/*/table" - + "s/*}:mutateRows:\001*\212\323\344\223\002N\022:\n\ntable_name\022," - + "{table_name=projects/*/instances/*/table" - + "s/*}\022\020\n\016app_profile_id\332A\022table_name,entr" - + "ies\332A!table_name,entries,app_profile_id0" - + "\001\022\255\003\n\021CheckAndMutateRow\022,.google.bigtabl" - + "e.v2.CheckAndMutateRowRequest\032-.google.b" - + "igtable.v2.CheckAndMutateRowResponse\"\272\002\202" - + "\323\344\223\002G\"B/v2/{table_name=projects/*/instan" - + "ces/*/tables/*}:checkAndMutateRow:\001*\212\323\344\223" - + "\002N\022:\n\ntable_name\022,{table_name=projects/*" - + "/instances/*/tables/*}\022\020\n\016app_profile_id" - + "\332ABtable_name,row_key,predicate_filter,t" - + "rue_mutations,false_mutations\332AQtable_na" - + "me,row_key,predicate_filter,true_mutatio" - + "ns,false_mutations,app_profile_id\022\356\001\n\013Pi" - + "ngAndWarm\022&.google.bigtable.v2.PingAndWa" - + "rmRequest\032\'.google.bigtable.v2.PingAndWa" - + "rmResponse\"\215\001\202\323\344\223\002+\"&/v2/{name=projects/" - + "*/instances/*}:ping:\001*\212\323\344\223\0029\022%\n\004name\022\035{n" - + "ame=projects/*/instances/*}\022\020\n\016app_profi" - + "le_id\332A\004name\332A\023name,app_profile_id\022\335\002\n\022R" - + "eadModifyWriteRow\022-.google.bigtable.v2.R" - + "eadModifyWriteRowRequest\032..google.bigtab" - + "le.v2.ReadModifyWriteRowResponse\"\347\001\202\323\344\223\002" - + "H\"C/v2/{table_name=projects/*/instances/" - + "*/tables/*}:readModifyWriteRow:\001*\212\323\344\223\002N\022" + + "le_id0\001\022\254\002\n\rSampleRowKeys\022(.google.bigta" + + "ble.v2.SampleRowKeysRequest\032).google.big" + + "table.v2.SampleRowKeysResponse\"\303\001\202\323\344\223\002@\022" + + ">/v2/{table_name=projects/*/instances/*/" + + "tables/*}:sampleRowKeys\212\323\344\223\002N\022:\n\ntable_n" + + "ame\022,{table_name=projects/*/instances/*/" + + "tables/*}\022\020\n\016app_profile_id\332A\ntable_name" + + "\332A\031table_name,app_profile_id0\001\022\301\002\n\tMutat" + + "eRow\022$.google.bigtable.v2.MutateRowReque" + + "st\032%.google.bigtable.v2.MutateRowRespons" + + "e\"\346\001\202\323\344\223\002?\":/v2/{table_name=projects/*/i" + + "nstances/*/tables/*}:mutateRow:\001*\212\323\344\223\002N\022" + ":\n\ntable_name\022,{table_name=projects/*/in" - + "stances/*/tables/*}\022\020\n\016app_profile_id\332A\030" - + "table_name,row_key,rules\332A\'table_name,ro" - + "w_key,rules,app_profile_id\022\216\002\n\032ListChang" - + "eStreamPartitions\0225.google.bigtable.v2.L" - + "istChangeStreamPartitionsRequest\0326.googl" - + "e.bigtable.v2.ListChangeStreamPartitions" - + "Response\"\177\202\323\344\223\002P\"K/v2/{table_name=projec" - + "ts/*/instances/*/tables/*}:listChangeStr" - + "eamPartitions:\001*\332A\ntable_name\332A\031table_na" - + "me,app_profile_id0\001\022\346\001\n\020ReadChangeStream" - + "\022+.google.bigtable.v2.ReadChangeStreamRe" - + "quest\032,.google.bigtable.v2.ReadChangeStr" - + "eamResponse\"u\202\323\344\223\002F\"A/v2/{table_name=pro" - + "jects/*/instances/*/tables/*}:readChange" - + "Stream:\001*\332A\ntable_name\332A\031table_name,app_" - + "profile_id0\001\032\333\002\312A\027bigtable.googleapis.co" - + "m\322A\275\002https://www.googleapis.com/auth/big" - + "table.data,https://www.googleapis.com/au" - + "th/bigtable.data.readonly,https://www.go" - + "ogleapis.com/auth/cloud-bigtable.data,ht" - + "tps://www.googleapis.com/auth/cloud-bigt" - + "able.data.readonly,https://www.googleapi" - + "s.com/auth/cloud-platform,https://www.go" - + "ogleapis.com/auth/cloud-platform.read-on" - + "lyB\353\002\n\026com.google.bigtable.v2B\rBigtableP" - + "rotoP\001Z:google.golang.org/genproto/googl" - + "eapis/bigtable/v2;bigtable\252\002\030Google.Clou" - + "d.Bigtable.V2\312\002\030Google\\Cloud\\Bigtable\\V2" - + "\352\002\033Google::Cloud::Bigtable::V2\352A\\\n\"bigta" - + "bleadmin.googleapis.com/Table\0226projects/" - + "{project}/instances/{instance}/tables/{t" - + "able}\352AP\n%bigtableadmin.googleapis.com/I" - + "nstance\022\'projects/{project}/instances/{i" - + "nstance}b\006proto3" + + "stances/*/tables/*}\022\020\n\016app_profile_id\332A\034" + + "table_name,row_key,mutations\332A+table_nam" + + "e,row_key,mutations,app_profile_id\022\263\002\n\nM" + + "utateRows\022%.google.bigtable.v2.MutateRow" + + "sRequest\032&.google.bigtable.v2.MutateRows" + + "Response\"\323\001\202\323\344\223\002@\";/v2/{table_name=proje" + + "cts/*/instances/*/tables/*}:mutateRows:\001" + + "*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=proje" + + "cts/*/instances/*/tables/*}\022\020\n\016app_profi" + + "le_id\332A\022table_name,entries\332A!table_name," + + "entries,app_profile_id0\001\022\255\003\n\021CheckAndMut" + + "ateRow\022,.google.bigtable.v2.CheckAndMuta" + + "teRowRequest\032-.google.bigtable.v2.CheckA" + + "ndMutateRowResponse\"\272\002\202\323\344\223\002G\"B/v2/{table" + + "_name=projects/*/instances/*/tables/*}:c" + + "heckAndMutateRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022" + + ",{table_name=projects/*/instances/*/tabl" + + "es/*}\022\020\n\016app_profile_id\332ABtable_name,row" + + "_key,predicate_filter,true_mutations,fal" + + "se_mutations\332AQtable_name,row_key,predic" + + "ate_filter,true_mutations,false_mutation" + + "s,app_profile_id\022\356\001\n\013PingAndWarm\022&.googl" + + "e.bigtable.v2.PingAndWarmRequest\032\'.googl" + + "e.bigtable.v2.PingAndWarmResponse\"\215\001\202\323\344\223" + + "\002+\"&/v2/{name=projects/*/instances/*}:pi" + + "ng:\001*\212\323\344\223\0029\022%\n\004name\022\035{name=projects/*/in" + + "stances/*}\022\020\n\016app_profile_id\332A\004name\332A\023na" + + "me,app_profile_id\022\335\002\n\022ReadModifyWriteRow" + + "\022-.google.bigtable.v2.ReadModifyWriteRow" + + "Request\032..google.bigtable.v2.ReadModifyW" + + "riteRowResponse\"\347\001\202\323\344\223\002H\"C/v2/{table_nam" + + "e=projects/*/instances/*/tables/*}:readM" + + "odifyWriteRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{t" + + "able_name=projects/*/instances/*/tables/" + + "*}\022\020\n\016app_profile_id\332A\030table_name,row_ke" + + "y,rules\332A\'table_name,row_key,rules,app_p" + + "rofile_id\022\273\002\n%GenerateInitialChangeStrea" + + "mPartitions\022@.google.bigtable.v2.Generat" + + "eInitialChangeStreamPartitionsRequest\032A." + + "google.bigtable.v2.GenerateInitialChange" + + "StreamPartitionsResponse\"\212\001\202\323\344\223\002[\"V/v2/{" + + "table_name=projects/*/instances/*/tables" + + "/*}:generateInitialChangeStreamPartition" + + "s:\001*\332A\ntable_name\332A\031table_name,app_profi" + + "le_id0\001\022\346\001\n\020ReadChangeStream\022+.google.bi" + + "gtable.v2.ReadChangeStreamRequest\032,.goog" + + "le.bigtable.v2.ReadChangeStreamResponse\"" + + "u\202\323\344\223\002F\"A/v2/{table_name=projects/*/inst" + + "ances/*/tables/*}:readChangeStream:\001*\332A\n" + + "table_name\332A\031table_name,app_profile_id0\001" + + "\032\333\002\312A\027bigtable.googleapis.com\322A\275\002https:/" + + "/www.googleapis.com/auth/bigtable.data,h" + + "ttps://www.googleapis.com/auth/bigtable." + + "data.readonly,https://www.googleapis.com" + + "/auth/cloud-bigtable.data,https://www.go" + + "ogleapis.com/auth/cloud-bigtable.data.re" + + "adonly,https://www.googleapis.com/auth/c" + + "loud-platform,https://www.googleapis.com" + + "/auth/cloud-platform.read-onlyB\353\002\n\026com.g" + + "oogle.bigtable.v2B\rBigtableProtoP\001Z:goog" + + "le.golang.org/genproto/googleapis/bigtab" + + "le/v2;bigtable\252\002\030Google.Cloud.Bigtable.V" + + "2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::C" + + "loud::Bigtable::V2\352A\\\n\"bigtableadmin.goo" + + "gleapis.com/Table\0226projects/{project}/in" + + "stances/{instance}/tables/{table}\352AP\n%bi" + + "gtableadmin.googleapis.com/Instance\022\'pro" + + "jects/{project}/instances/{instance}b\006pr" + + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -499,19 +501,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Row", }); - internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor = + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor = getDescriptor().getMessageTypes().get(14); - internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable = + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor, + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor, new java.lang.String[] { "TableName", "AppProfileId", }); - internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor = + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor = getDescriptor().getMessageTypes().get(15); - internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable = + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor, + internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor, new java.lang.String[] { "Partition", }); diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java similarity index 62% rename from proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java rename to proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java index 38beeb41dd..b426e994c4 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequest.java @@ -23,45 +23,46 @@ * *
      * NOTE: This API is not generally available. Users must be allowlisted.
    - * Request message for Bigtable.ListChangeStreamPartitions.
    + * Request message for Bigtable.GenerateInitialChangeStreamPartitions.
      * 
    * - * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsRequest} + * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} */ -public final class ListChangeStreamPartitionsRequest extends com.google.protobuf.GeneratedMessageV3 +public final class GenerateInitialChangeStreamPartitionsRequest + extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.ListChangeStreamPartitionsRequest) - ListChangeStreamPartitionsRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + GenerateInitialChangeStreamPartitionsRequestOrBuilder { private static final long serialVersionUID = 0L; - // Use ListChangeStreamPartitionsRequest.newBuilder() to construct. - private ListChangeStreamPartitionsRequest( + // Use GenerateInitialChangeStreamPartitionsRequest.newBuilder() to construct. + private GenerateInitialChangeStreamPartitionsRequest( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListChangeStreamPartitionsRequest() { + private GenerateInitialChangeStreamPartitionsRequest() { tableName_ = ""; appProfileId_ = ""; } - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { - return new ListChangeStreamPartitionsRequest(); + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateInitialChangeStreamPartitionsRequest(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListChangeStreamPartitionsRequest( + private GenerateInitialChangeStreamPartitionsRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -75,14 +76,14 @@ private ListChangeStreamPartitionsRequest( break; case 10: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); tableName_ = s; break; } case 18: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); appProfileId_ = s; break; @@ -109,25 +110,28 @@ private ListChangeStreamPartitionsRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsRequest.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.class, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.Builder.class); } public static final int TABLE_NAME_FIELD_NUMBER = 1; - private volatile Object tableName_; + private volatile java.lang.Object tableName_; /** * * *
    -   * Required. The unique name of the table from which to get change stream
    -   * partitions. Values are of the form
    +   * Required. The unique name of the table from which to get change stream partitions.
    +   * Values are of the form
        * `projects/<project>/instances/<instance>/tables/<table>`.
        * Change streaming must be enabled on the table.
        * 
    @@ -138,14 +142,14 @@ protected FieldAccessorTable internalGetFieldAccessorTable() { * * @return The tableName. */ - @Override - public String getTableName() { - Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); tableName_ = s; return s; } @@ -154,8 +158,8 @@ public String getTableName() { * * *
    -   * Required. The unique name of the table from which to get change stream
    -   * partitions. Values are of the form
    +   * Required. The unique name of the table from which to get change stream partitions.
    +   * Values are of the form
        * `projects/<project>/instances/<instance>/tables/<table>`.
        * Change streaming must be enabled on the table.
        * 
    @@ -166,11 +170,12 @@ public String getTableName() { * * @return The bytes for tableName. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getTableNameBytes() { - Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); tableName_ = b; return b; } else { @@ -179,7 +184,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { } public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; - private volatile Object appProfileId_; + private volatile java.lang.Object appProfileId_; /** * * @@ -193,14 +198,14 @@ public com.google.protobuf.ByteString getTableNameBytes() { * * @return The appProfileId. */ - @Override - public String getAppProfileId() { - Object ref = appProfileId_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); appProfileId_ = s; return s; } @@ -218,11 +223,12 @@ public String getAppProfileId() { * * @return The bytes for appProfileId. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getAppProfileIdBytes() { - Object ref = appProfileId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); appProfileId_ = b; return b; } else { @@ -232,7 +238,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -242,7 +248,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); @@ -253,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -270,15 +276,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof ListChangeStreamPartitionsRequest)) { + if (!(obj instanceof com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest)) { return super.equals(obj); } - ListChangeStreamPartitionsRequest other = (ListChangeStreamPartitionsRequest) obj; + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest other = + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) obj; if (!getTableName().equals(other.getTableName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; @@ -286,7 +293,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -302,70 +309,72 @@ public int hashCode() { return hash; } - public static ListChangeStreamPartitionsRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ListChangeStreamPartitionsRequest parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ListChangeStreamPartitionsRequest parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ListChangeStreamPartitionsRequest parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ListChangeStreamPartitionsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ListChangeStreamPartitionsRequest parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ListChangeStreamPartitionsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ListChangeStreamPartitionsRequest parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest 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 ListChangeStreamPartitionsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static ListChangeStreamPartitionsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + 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 ListChangeStreamPartitionsRequest parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ListChangeStreamPartitionsRequest parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -373,7 +382,7 @@ public static ListChangeStreamPartitionsRequest parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -382,17 +391,18 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(ListChangeStreamPartitionsRequest prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -401,33 +411,37 @@ protected Builder newBuilderForType(BuilderParent parent) { * *
        * NOTE: This API is not generally available. Users must be allowlisted.
    -   * Request message for Bigtable.ListChangeStreamPartitions.
    +   * Request message for Bigtable.GenerateInitialChangeStreamPartitions.
        * 
    * - * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsRequest} + * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ListChangeStreamPartitionsRequest) - ListChangeStreamPartitionsRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsRequest.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.class, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.Builder.class); } - // Construct using com.google.bigtable.v2.ListChangeStreamPartitionsRequest.newBuilder() + // Construct using + // com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -436,7 +450,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); tableName_ = ""; @@ -446,79 +460,87 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsRequest_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor; } - @Override - public ListChangeStreamPartitionsRequest getDefaultInstanceForType() { - return ListChangeStreamPartitionsRequest.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + getDefaultInstanceForType() { + return com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + .getDefaultInstance(); } - @Override - public ListChangeStreamPartitionsRequest build() { - ListChangeStreamPartitionsRequest result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest build() { + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public ListChangeStreamPartitionsRequest buildPartial() { - ListChangeStreamPartitionsRequest result = new ListChangeStreamPartitionsRequest(this); + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest buildPartial() { + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest result = + new com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(this); result.tableName_ = tableName_; result.appProfileId_ = appProfileId_; onBuilt(); return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ListChangeStreamPartitionsRequest) { - return mergeFrom((ListChangeStreamPartitionsRequest) other); + if (other instanceof com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) { + return mergeFrom( + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(ListChangeStreamPartitionsRequest other) { - if (other == ListChangeStreamPartitionsRequest.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest other) { + if (other + == com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + .getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); @@ -532,21 +554,23 @@ public Builder mergeFrom(ListChangeStreamPartitionsRequest other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - ListChangeStreamPartitionsRequest parsedMessage = null; + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ListChangeStreamPartitionsRequest) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -556,13 +580,13 @@ public Builder mergeFrom( return this; } - private Object tableName_ = ""; + private java.lang.Object tableName_ = ""; /** * * *
    -     * Required. The unique name of the table from which to get change stream
    -     * partitions. Values are of the form
    +     * Required. The unique name of the table from which to get change stream partitions.
    +     * Values are of the form
          * `projects/<project>/instances/<instance>/tables/<table>`.
          * Change streaming must be enabled on the table.
          * 
    @@ -573,23 +597,23 @@ public Builder mergeFrom( * * @return The tableName. */ - public String getTableName() { - Object ref = tableName_; - if (!(ref instanceof String)) { + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); tableName_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** * * *
    -     * Required. The unique name of the table from which to get change stream
    -     * partitions. Values are of the form
    +     * Required. The unique name of the table from which to get change stream partitions.
    +     * Values are of the form
          * `projects/<project>/instances/<instance>/tables/<table>`.
          * Change streaming must be enabled on the table.
          * 
    @@ -601,10 +625,10 @@ public String getTableName() { * @return The bytes for tableName. */ public com.google.protobuf.ByteString getTableNameBytes() { - Object ref = tableName_; + java.lang.Object ref = tableName_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); tableName_ = b; return b; } else { @@ -615,8 +639,8 @@ public com.google.protobuf.ByteString getTableNameBytes() { * * *
    -     * Required. The unique name of the table from which to get change stream
    -     * partitions. Values are of the form
    +     * Required. The unique name of the table from which to get change stream partitions.
    +     * Values are of the form
          * `projects/<project>/instances/<instance>/tables/<table>`.
          * Change streaming must be enabled on the table.
          * 
    @@ -628,7 +652,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { * @param value The tableName to set. * @return This builder for chaining. */ - public Builder setTableName(String value) { + public Builder setTableName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -641,8 +665,8 @@ public Builder setTableName(String value) { * * *
    -     * Required. The unique name of the table from which to get change stream
    -     * partitions. Values are of the form
    +     * Required. The unique name of the table from which to get change stream partitions.
    +     * Values are of the form
          * `projects/<project>/instances/<instance>/tables/<table>`.
          * Change streaming must be enabled on the table.
          * 
    @@ -663,8 +687,8 @@ public Builder clearTableName() { * * *
    -     * Required. The unique name of the table from which to get change stream
    -     * partitions. Values are of the form
    +     * Required. The unique name of the table from which to get change stream partitions.
    +     * Values are of the form
          * `projects/<project>/instances/<instance>/tables/<table>`.
          * Change streaming must be enabled on the table.
          * 
    @@ -687,7 +711,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { return this; } - private Object appProfileId_ = ""; + private java.lang.Object appProfileId_ = ""; /** * * @@ -701,15 +725,15 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { * * @return The appProfileId. */ - public String getAppProfileId() { - Object ref = appProfileId_; - if (!(ref instanceof String)) { + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); appProfileId_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** @@ -726,10 +750,10 @@ public String getAppProfileId() { * @return The bytes for appProfileId. */ public com.google.protobuf.ByteString getAppProfileIdBytes() { - Object ref = appProfileId_; + java.lang.Object ref = appProfileId_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); appProfileId_ = b; return b; } else { @@ -750,7 +774,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { * @param value The appProfileId to set. * @return This builder for chaining. */ - public Builder setAppProfileId(String value) { + public Builder setAppProfileId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -803,53 +827,58 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { return this; } - @Override + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ListChangeStreamPartitionsRequest) + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.ListChangeStreamPartitionsRequest) - private static final ListChangeStreamPartitionsRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) + private static final com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ListChangeStreamPartitionsRequest(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest(); } - public static ListChangeStreamPartitionsRequest getDefaultInstance() { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public ListChangeStreamPartitionsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListChangeStreamPartitionsRequest(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateInitialChangeStreamPartitionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateInitialChangeStreamPartitionsRequest(input, extensionRegistry); + } + }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { return PARSER; } - @Override - public ListChangeStreamPartitionsRequest getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java similarity index 89% rename from proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java rename to proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java index 741730e983..9fd0307e59 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsRequestOrBuilder.java @@ -18,17 +18,17 @@ package com.google.bigtable.v2; -public interface ListChangeStreamPartitionsRequestOrBuilder +public interface GenerateInitialChangeStreamPartitionsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ListChangeStreamPartitionsRequest) + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest) com.google.protobuf.MessageOrBuilder { /** * * *
    -   * Required. The unique name of the table from which to get change stream
    -   * partitions. Values are of the form
    +   * Required. The unique name of the table from which to get change stream partitions.
    +   * Values are of the form
        * `projects/<project>/instances/<instance>/tables/<table>`.
        * Change streaming must be enabled on the table.
        * 
    @@ -39,13 +39,13 @@ public interface ListChangeStreamPartitionsRequestOrBuilder * * @return The tableName. */ - String getTableName(); + java.lang.String getTableName(); /** * * *
    -   * Required. The unique name of the table from which to get change stream
    -   * partitions. Values are of the form
    +   * Required. The unique name of the table from which to get change stream partitions.
    +   * Values are of the form
        * `projects/<project>/instances/<instance>/tables/<table>`.
        * Change streaming must be enabled on the table.
        * 
    @@ -71,7 +71,7 @@ public interface ListChangeStreamPartitionsRequestOrBuilder * * @return The appProfileId. */ - String getAppProfileId(); + java.lang.String getAppProfileId(); /** * * diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java similarity index 64% rename from proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java rename to proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java index fd684952e7..6bfad03aa4 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponse.java @@ -23,42 +23,43 @@ * *
      * NOTE: This API is not generally available. Users must be allowlisted.
    - * Response message for Bigtable.ListChangeStreamPartitions.
    + * Response message for Bigtable.GenerateInitialChangeStreamPartitions.
      * 
    * - * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsResponse} + * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} */ -public final class ListChangeStreamPartitionsResponse extends com.google.protobuf.GeneratedMessageV3 +public final class GenerateInitialChangeStreamPartitionsResponse + extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.bigtable.v2.ListChangeStreamPartitionsResponse) - ListChangeStreamPartitionsResponseOrBuilder { + // @@protoc_insertion_point(message_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + GenerateInitialChangeStreamPartitionsResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use ListChangeStreamPartitionsResponse.newBuilder() to construct. - private ListChangeStreamPartitionsResponse( + // Use GenerateInitialChangeStreamPartitionsResponse.newBuilder() to construct. + private GenerateInitialChangeStreamPartitionsResponse( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ListChangeStreamPartitionsResponse() {} + private GenerateInitialChangeStreamPartitionsResponse() {} - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { - return new ListChangeStreamPartitionsResponse(); + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateInitialChangeStreamPartitionsResponse(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListChangeStreamPartitionsResponse( + private GenerateInitialChangeStreamPartitionsResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -108,15 +109,18 @@ private ListChangeStreamPartitionsResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsResponse.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.class, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.Builder.class); } public static final int PARTITION_FIELD_NUMBER = 1; @@ -132,7 +136,7 @@ protected FieldAccessorTable internalGetFieldAccessorTable() { * * @return Whether the partition field is set. */ - @Override + @java.lang.Override public boolean hasPartition() { return partition_ != null; } @@ -147,7 +151,7 @@ public boolean hasPartition() { * * @return The partition. */ - @Override + @java.lang.Override public com.google.bigtable.v2.StreamPartition getPartition() { return partition_ == null ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() @@ -162,14 +166,14 @@ public com.google.bigtable.v2.StreamPartition getPartition() { * * .google.bigtable.v2.StreamPartition partition = 1; */ - @Override + @java.lang.Override public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { return getPartition(); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -179,7 +183,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (partition_ != null) { output.writeMessage(1, getPartition()); @@ -187,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -201,15 +205,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof ListChangeStreamPartitionsResponse)) { + if (!(obj instanceof com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse)) { return super.equals(obj); } - ListChangeStreamPartitionsResponse other = (ListChangeStreamPartitionsResponse) obj; + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse other = + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) obj; if (hasPartition() != other.hasPartition()) return false; if (hasPartition()) { @@ -219,7 +224,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -235,70 +240,72 @@ public int hashCode() { return hash; } - public static ListChangeStreamPartitionsResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ListChangeStreamPartitionsResponse parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ListChangeStreamPartitionsResponse parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ListChangeStreamPartitionsResponse parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ListChangeStreamPartitionsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ListChangeStreamPartitionsResponse parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ListChangeStreamPartitionsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ListChangeStreamPartitionsResponse parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse 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 ListChangeStreamPartitionsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static ListChangeStreamPartitionsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + 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 ListChangeStreamPartitionsResponse parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ListChangeStreamPartitionsResponse parseFrom( + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -306,7 +313,7 @@ public static ListChangeStreamPartitionsResponse parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -315,17 +322,18 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(ListChangeStreamPartitionsResponse prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -334,33 +342,37 @@ protected Builder newBuilderForType(BuilderParent parent) { * *
        * NOTE: This API is not generally available. Users must be allowlisted.
    -   * Response message for Bigtable.ListChangeStreamPartitions.
    +   * Response message for Bigtable.GenerateInitialChangeStreamPartitions.
        * 
    * - * Protobuf type {@code google.bigtable.v2.ListChangeStreamPartitionsResponse} + * Protobuf type {@code google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ListChangeStreamPartitionsResponse) - ListChangeStreamPartitionsResponseOrBuilder { + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized(ListChangeStreamPartitionsResponse.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.class, + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.Builder.class); } - // Construct using com.google.bigtable.v2.ListChangeStreamPartitionsResponse.newBuilder() + // Construct using + // com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -369,7 +381,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); if (partitionBuilder_ == null) { @@ -381,29 +393,32 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto - .internal_static_google_bigtable_v2_ListChangeStreamPartitionsResponse_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor; } - @Override - public ListChangeStreamPartitionsResponse getDefaultInstanceForType() { - return ListChangeStreamPartitionsResponse.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + getDefaultInstanceForType() { + return com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + .getDefaultInstance(); } - @Override - public ListChangeStreamPartitionsResponse build() { - ListChangeStreamPartitionsResponse result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse build() { + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public ListChangeStreamPartitionsResponse buildPartial() { - ListChangeStreamPartitionsResponse result = new ListChangeStreamPartitionsResponse(this); + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse buildPartial() { + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse result = + new com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(this); if (partitionBuilder_ == null) { result.partition_ = partition_; } else { @@ -413,50 +428,55 @@ public ListChangeStreamPartitionsResponse buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ListChangeStreamPartitionsResponse) { - return mergeFrom((ListChangeStreamPartitionsResponse) other); + if (other instanceof com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) { + return mergeFrom( + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(ListChangeStreamPartitionsResponse other) { - if (other == ListChangeStreamPartitionsResponse.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse other) { + if (other + == com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + .getDefaultInstance()) return this; if (other.hasPartition()) { mergePartition(other.getPartition()); } @@ -465,21 +485,23 @@ public Builder mergeFrom(ListChangeStreamPartitionsResponse other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - ListChangeStreamPartitionsResponse parsedMessage = null; + com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ListChangeStreamPartitionsResponse) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -674,53 +696,58 @@ public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { return partitionBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ListChangeStreamPartitionsResponse) + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) } - // @@protoc_insertion_point(class_scope:google.bigtable.v2.ListChangeStreamPartitionsResponse) - private static final ListChangeStreamPartitionsResponse DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) + private static final com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ListChangeStreamPartitionsResponse(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse(); } - public static ListChangeStreamPartitionsResponse getDefaultInstance() { + public static com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public ListChangeStreamPartitionsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListChangeStreamPartitionsResponse(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateInitialChangeStreamPartitionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateInitialChangeStreamPartitionsResponse(input, extensionRegistry); + } + }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { return PARSER; } - @Override - public ListChangeStreamPartitionsResponse getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java similarity index 92% rename from proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java rename to proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java index 630816f767..ba1d2b2346 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ListChangeStreamPartitionsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/GenerateInitialChangeStreamPartitionsResponseOrBuilder.java @@ -18,9 +18,9 @@ package com.google.bigtable.v2; -public interface ListChangeStreamPartitionsResponseOrBuilder +public interface GenerateInitialChangeStreamPartitionsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ListChangeStreamPartitionsResponse) + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse) com.google.protobuf.MessageOrBuilder { /** diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java index 14d0d9024e..334a287971 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequest.java @@ -43,13 +43,13 @@ private ReadChangeStreamRequest() { appProfileId_ = ""; } - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ReadChangeStreamRequest(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -60,7 +60,7 @@ private ReadChangeStreamRequest( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -74,25 +74,27 @@ private ReadChangeStreamRequest( break; case 10: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); tableName_ = s; break; } case 18: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); appProfileId_ = s; break; } case 26: { - StreamPartition.Builder subBuilder = null; + com.google.bigtable.v2.StreamPartition.Builder subBuilder = null; if (partition_ != null) { subBuilder = partition_.toBuilder(); } - partition_ = input.readMessage(StreamPartition.parser(), extensionRegistry); + partition_ = + input.readMessage( + com.google.bigtable.v2.StreamPartition.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(partition_); partition_ = subBuilder.buildPartial(); @@ -132,13 +134,16 @@ private ReadChangeStreamRequest( } case 50: { - StreamContinuationTokens.Builder subBuilder = null; + com.google.bigtable.v2.StreamContinuationTokens.Builder subBuilder = null; if (startFromCase_ == 6) { - subBuilder = ((StreamContinuationTokens) startFrom_).toBuilder(); + subBuilder = + ((com.google.bigtable.v2.StreamContinuationTokens) startFrom_).toBuilder(); } - startFrom_ = input.readMessage(StreamContinuationTokens.parser(), extensionRegistry); + startFrom_ = + input.readMessage( + com.google.bigtable.v2.StreamContinuationTokens.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((StreamContinuationTokens) startFrom_); + subBuilder.mergeFrom((com.google.bigtable.v2.StreamContinuationTokens) startFrom_); startFrom_ = subBuilder.buildPartial(); } startFromCase_ = 6; @@ -181,20 +186,27 @@ private ReadChangeStreamRequest( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized(ReadChangeStreamRequest.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamRequest.class, + com.google.bigtable.v2.ReadChangeStreamRequest.Builder.class); } private int startFromCase_ = 0; - private Object startFrom_; + private java.lang.Object startFrom_; - public enum StartFromCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { + public enum StartFromCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { START_TIME(4), CONTINUATION_TOKENS(6), STARTFROM_NOT_SET(0); @@ -208,7 +220,7 @@ private StartFromCase(int value) { * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ - @Deprecated + @java.lang.Deprecated public static StartFromCase valueOf(int value) { return forNumber(value); } @@ -236,7 +248,7 @@ public StartFromCase getStartFromCase() { } public static final int TABLE_NAME_FIELD_NUMBER = 1; - private volatile Object tableName_; + private volatile java.lang.Object tableName_; /** * * @@ -253,14 +265,14 @@ public StartFromCase getStartFromCase() { * * @return The tableName. */ - @Override - public String getTableName() { - Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); tableName_ = s; return s; } @@ -281,11 +293,12 @@ public String getTableName() { * * @return The bytes for tableName. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getTableNameBytes() { - Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); tableName_ = b; return b; } else { @@ -294,7 +307,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { } public static final int APP_PROFILE_ID_FIELD_NUMBER = 2; - private volatile Object appProfileId_; + private volatile java.lang.Object appProfileId_; /** * * @@ -308,14 +321,14 @@ public com.google.protobuf.ByteString getTableNameBytes() { * * @return The appProfileId. */ - @Override - public String getAppProfileId() { - Object ref = appProfileId_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); appProfileId_ = s; return s; } @@ -333,11 +346,12 @@ public String getAppProfileId() { * * @return The bytes for appProfileId. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getAppProfileIdBytes() { - Object ref = appProfileId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); + java.lang.Object ref = appProfileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); appProfileId_ = b; return b; } else { @@ -346,7 +360,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { } public static final int PARTITION_FIELD_NUMBER = 3; - private StreamPartition partition_; + private com.google.bigtable.v2.StreamPartition partition_; /** * * @@ -358,7 +372,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { * * @return Whether the partition field is set. */ - @Override + @java.lang.Override public boolean hasPartition() { return partition_ != null; } @@ -373,9 +387,11 @@ public boolean hasPartition() { * * @return The partition. */ - @Override - public StreamPartition getPartition() { - return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + @java.lang.Override + public com.google.bigtable.v2.StreamPartition getPartition() { + return partition_ == null + ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() + : partition_; } /** * @@ -386,8 +402,8 @@ public StreamPartition getPartition() { * * .google.bigtable.v2.StreamPartition partition = 3; */ - @Override - public StreamPartitionOrBuilder getPartitionOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { return getPartition(); } @@ -406,7 +422,7 @@ public StreamPartitionOrBuilder getPartitionOrBuilder() { * * @return Whether the startTime field is set. */ - @Override + @java.lang.Override public boolean hasStartTime() { return startFromCase_ == 4; } @@ -424,7 +440,7 @@ public boolean hasStartTime() { * * @return The startTime. */ - @Override + @java.lang.Override public com.google.protobuf.Timestamp getStartTime() { if (startFromCase_ == 4) { return (com.google.protobuf.Timestamp) startFrom_; @@ -443,7 +459,7 @@ public com.google.protobuf.Timestamp getStartTime() { * * .google.protobuf.Timestamp start_time = 4; */ - @Override + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { if (startFromCase_ == 4) { return (com.google.protobuf.Timestamp) startFrom_; @@ -471,7 +487,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * @return Whether the continuationTokens field is set. */ - @Override + @java.lang.Override public boolean hasContinuationTokens() { return startFromCase_ == 6; } @@ -494,12 +510,12 @@ public boolean hasContinuationTokens() { * * @return The continuationTokens. */ - @Override - public StreamContinuationTokens getContinuationTokens() { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { if (startFromCase_ == 6) { - return (StreamContinuationTokens) startFrom_; + return (com.google.bigtable.v2.StreamContinuationTokens) startFrom_; } - return StreamContinuationTokens.getDefaultInstance(); + return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } /** * @@ -518,12 +534,12 @@ public StreamContinuationTokens getContinuationTokens() { * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - @Override - public StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { if (startFromCase_ == 6) { - return (StreamContinuationTokens) startFrom_; + return (com.google.bigtable.v2.StreamContinuationTokens) startFrom_; } - return StreamContinuationTokens.getDefaultInstance(); + return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } public static final int END_TIME_FIELD_NUMBER = 5; @@ -541,7 +557,7 @@ public StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { * * @return Whether the endTime field is set. */ - @Override + @java.lang.Override public boolean hasEndTime() { return endTime_ != null; } @@ -558,7 +574,7 @@ public boolean hasEndTime() { * * @return The endTime. */ - @Override + @java.lang.Override public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } @@ -573,7 +589,7 @@ public com.google.protobuf.Timestamp getEndTime() { * * .google.protobuf.Timestamp end_time = 5; */ - @Override + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); } @@ -592,7 +608,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * * @return Whether the heartbeatDuration field is set. */ - @Override + @java.lang.Override public boolean hasHeartbeatDuration() { return heartbeatDuration_ != null; } @@ -608,7 +624,7 @@ public boolean hasHeartbeatDuration() { * * @return The heartbeatDuration. */ - @Override + @java.lang.Override public com.google.protobuf.Duration getHeartbeatDuration() { return heartbeatDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() @@ -624,14 +640,14 @@ public com.google.protobuf.Duration getHeartbeatDuration() { * * .google.protobuf.Duration heartbeat_duration = 7; */ - @Override + @java.lang.Override public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { return getHeartbeatDuration(); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -641,7 +657,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_); @@ -659,7 +675,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(5, getEndTime()); } if (startFromCase_ == 6) { - output.writeMessage(6, (StreamContinuationTokens) startFrom_); + output.writeMessage(6, (com.google.bigtable.v2.StreamContinuationTokens) startFrom_); } if (heartbeatDuration_ != null) { output.writeMessage(7, getHeartbeatDuration()); @@ -667,7 +683,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -693,7 +709,7 @@ public int getSerializedSize() { if (startFromCase_ == 6) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (StreamContinuationTokens) startFrom_); + 6, (com.google.bigtable.v2.StreamContinuationTokens) startFrom_); } if (heartbeatDuration_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getHeartbeatDuration()); @@ -703,15 +719,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof ReadChangeStreamRequest)) { + if (!(obj instanceof com.google.bigtable.v2.ReadChangeStreamRequest)) { return super.equals(obj); } - ReadChangeStreamRequest other = (ReadChangeStreamRequest) obj; + com.google.bigtable.v2.ReadChangeStreamRequest other = + (com.google.bigtable.v2.ReadChangeStreamRequest) obj; if (!getTableName().equals(other.getTableName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; @@ -742,7 +759,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -782,70 +799,71 @@ public int hashCode() { return hash; } - public static ReadChangeStreamRequest parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ReadChangeStreamRequest parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ReadChangeStreamRequest parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ReadChangeStreamRequest parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ReadChangeStreamRequest parseFrom(byte[] data) + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ReadChangeStreamRequest parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ReadChangeStreamRequest parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ReadChangeStreamRequest parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamRequest 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 ReadChangeStreamRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static ReadChangeStreamRequest parseDelimitedFrom( + public static com.google.bigtable.v2.ReadChangeStreamRequest 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 ReadChangeStreamRequest parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ReadChangeStreamRequest parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -853,7 +871,7 @@ public static ReadChangeStreamRequest parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -862,17 +880,17 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(ReadChangeStreamRequest prototype) { + public static Builder newBuilder(com.google.bigtable.v2.ReadChangeStreamRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -889,16 +907,20 @@ protected Builder newBuilderForType(BuilderParent parent) { public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamRequest) - ReadChangeStreamRequestOrBuilder { + com.google.bigtable.v2.ReadChangeStreamRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized(ReadChangeStreamRequest.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamRequest.class, + com.google.bigtable.v2.ReadChangeStreamRequest.Builder.class); } // Construct using com.google.bigtable.v2.ReadChangeStreamRequest.newBuilder() @@ -906,7 +928,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -915,7 +937,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); tableName_ = ""; @@ -945,28 +967,30 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor; } - @Override - public ReadChangeStreamRequest getDefaultInstanceForType() { - return ReadChangeStreamRequest.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamRequest getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamRequest.getDefaultInstance(); } - @Override - public ReadChangeStreamRequest build() { - ReadChangeStreamRequest result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamRequest build() { + com.google.bigtable.v2.ReadChangeStreamRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public ReadChangeStreamRequest buildPartial() { - ReadChangeStreamRequest result = new ReadChangeStreamRequest(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamRequest buildPartial() { + com.google.bigtable.v2.ReadChangeStreamRequest result = + new com.google.bigtable.v2.ReadChangeStreamRequest(this); result.tableName_ = tableName_; result.appProfileId_ = appProfileId_; if (partitionBuilder_ == null) { @@ -1003,50 +1027,51 @@ public ReadChangeStreamRequest buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ReadChangeStreamRequest) { - return mergeFrom((ReadChangeStreamRequest) other); + if (other instanceof com.google.bigtable.v2.ReadChangeStreamRequest) { + return mergeFrom((com.google.bigtable.v2.ReadChangeStreamRequest) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(ReadChangeStreamRequest other) { - if (other == ReadChangeStreamRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamRequest other) { + if (other == com.google.bigtable.v2.ReadChangeStreamRequest.getDefaultInstance()) return this; if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; onChanged(); @@ -1085,21 +1110,21 @@ public Builder mergeFrom(ReadChangeStreamRequest other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - ReadChangeStreamRequest parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ReadChangeStreamRequest) e.getUnfinishedMessage(); + parsedMessage = (com.google.bigtable.v2.ReadChangeStreamRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1110,7 +1135,7 @@ public Builder mergeFrom( } private int startFromCase_ = 0; - private Object startFrom_; + private java.lang.Object startFrom_; public StartFromCase getStartFromCase() { return StartFromCase.forNumber(startFromCase_); @@ -1123,7 +1148,7 @@ public Builder clearStartFrom() { return this; } - private Object tableName_ = ""; + private java.lang.Object tableName_ = ""; /** * * @@ -1140,15 +1165,15 @@ public Builder clearStartFrom() { * * @return The tableName. */ - public String getTableName() { - Object ref = tableName_; - if (!(ref instanceof String)) { + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); tableName_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** @@ -1168,10 +1193,10 @@ public String getTableName() { * @return The bytes for tableName. */ public com.google.protobuf.ByteString getTableNameBytes() { - Object ref = tableName_; + java.lang.Object ref = tableName_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); tableName_ = b; return b; } else { @@ -1195,7 +1220,7 @@ public com.google.protobuf.ByteString getTableNameBytes() { * @param value The tableName to set. * @return This builder for chaining. */ - public Builder setTableName(String value) { + public Builder setTableName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1254,7 +1279,7 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { return this; } - private Object appProfileId_ = ""; + private java.lang.Object appProfileId_ = ""; /** * * @@ -1268,15 +1293,15 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { * * @return The appProfileId. */ - public String getAppProfileId() { - Object ref = appProfileId_; - if (!(ref instanceof String)) { + public java.lang.String getAppProfileId() { + java.lang.Object ref = appProfileId_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); appProfileId_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** @@ -1293,10 +1318,10 @@ public String getAppProfileId() { * @return The bytes for appProfileId. */ public com.google.protobuf.ByteString getAppProfileIdBytes() { - Object ref = appProfileId_; + java.lang.Object ref = appProfileId_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); appProfileId_ = b; return b; } else { @@ -1317,7 +1342,7 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { * @param value The appProfileId to set. * @return This builder for chaining. */ - public Builder setAppProfileId(String value) { + public Builder setAppProfileId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -1370,9 +1395,11 @@ public Builder setAppProfileIdBytes(com.google.protobuf.ByteString value) { return this; } - private StreamPartition partition_; + private com.google.bigtable.v2.StreamPartition partition_; private com.google.protobuf.SingleFieldBuilderV3< - StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder> + com.google.bigtable.v2.StreamPartition, + com.google.bigtable.v2.StreamPartition.Builder, + com.google.bigtable.v2.StreamPartitionOrBuilder> partitionBuilder_; /** * @@ -1399,9 +1426,11 @@ public boolean hasPartition() { * * @return The partition. */ - public StreamPartition getPartition() { + public com.google.bigtable.v2.StreamPartition getPartition() { if (partitionBuilder_ == null) { - return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + return partition_ == null + ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() + : partition_; } else { return partitionBuilder_.getMessage(); } @@ -1415,7 +1444,7 @@ public StreamPartition getPartition() { * * .google.bigtable.v2.StreamPartition partition = 3; */ - public Builder setPartition(StreamPartition value) { + public Builder setPartition(com.google.bigtable.v2.StreamPartition value) { if (partitionBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1437,7 +1466,7 @@ public Builder setPartition(StreamPartition value) { * * .google.bigtable.v2.StreamPartition partition = 3; */ - public Builder setPartition(StreamPartition.Builder builderForValue) { + public Builder setPartition(com.google.bigtable.v2.StreamPartition.Builder builderForValue) { if (partitionBuilder_ == null) { partition_ = builderForValue.build(); onChanged(); @@ -1456,10 +1485,13 @@ public Builder setPartition(StreamPartition.Builder builderForValue) { * * .google.bigtable.v2.StreamPartition partition = 3; */ - public Builder mergePartition(StreamPartition value) { + public Builder mergePartition(com.google.bigtable.v2.StreamPartition value) { if (partitionBuilder_ == null) { if (partition_ != null) { - partition_ = StreamPartition.newBuilder(partition_).mergeFrom(value).buildPartial(); + partition_ = + com.google.bigtable.v2.StreamPartition.newBuilder(partition_) + .mergeFrom(value) + .buildPartial(); } else { partition_ = value; } @@ -1499,7 +1531,7 @@ public Builder clearPartition() { * * .google.bigtable.v2.StreamPartition partition = 3; */ - public StreamPartition.Builder getPartitionBuilder() { + public com.google.bigtable.v2.StreamPartition.Builder getPartitionBuilder() { onChanged(); return getPartitionFieldBuilder().getBuilder(); @@ -1513,11 +1545,13 @@ public StreamPartition.Builder getPartitionBuilder() { * * .google.bigtable.v2.StreamPartition partition = 3; */ - public StreamPartitionOrBuilder getPartitionOrBuilder() { + public com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder() { if (partitionBuilder_ != null) { return partitionBuilder_.getMessageOrBuilder(); } else { - return partition_ == null ? StreamPartition.getDefaultInstance() : partition_; + return partition_ == null + ? com.google.bigtable.v2.StreamPartition.getDefaultInstance() + : partition_; } } /** @@ -1530,12 +1564,16 @@ public StreamPartitionOrBuilder getPartitionOrBuilder() { * .google.bigtable.v2.StreamPartition partition = 3; */ private com.google.protobuf.SingleFieldBuilderV3< - StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder> + com.google.bigtable.v2.StreamPartition, + com.google.bigtable.v2.StreamPartition.Builder, + com.google.bigtable.v2.StreamPartitionOrBuilder> getPartitionFieldBuilder() { if (partitionBuilder_ == null) { partitionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - StreamPartition, StreamPartition.Builder, StreamPartitionOrBuilder>( + com.google.bigtable.v2.StreamPartition, + com.google.bigtable.v2.StreamPartition.Builder, + com.google.bigtable.v2.StreamPartitionOrBuilder>( getPartition(), getParentForChildren(), isClean()); partition_ = null; } @@ -1561,7 +1599,7 @@ public StreamPartitionOrBuilder getPartitionOrBuilder() { * * @return Whether the startTime field is set. */ - @Override + @java.lang.Override public boolean hasStartTime() { return startFromCase_ == 4; } @@ -1579,7 +1617,7 @@ public boolean hasStartTime() { * * @return The startTime. */ - @Override + @java.lang.Override public com.google.protobuf.Timestamp getStartTime() { if (startTimeBuilder_ == null) { if (startFromCase_ == 4) { @@ -1729,7 +1767,7 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { * * .google.protobuf.Timestamp start_time = 4; */ - @Override + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { if ((startFromCase_ == 4) && (startTimeBuilder_ != null)) { return startTimeBuilder_.getMessageOrBuilder(); @@ -1776,9 +1814,9 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { } private com.google.protobuf.SingleFieldBuilderV3< - StreamContinuationTokens, - StreamContinuationTokens.Builder, - StreamContinuationTokensOrBuilder> + com.google.bigtable.v2.StreamContinuationTokens, + com.google.bigtable.v2.StreamContinuationTokens.Builder, + com.google.bigtable.v2.StreamContinuationTokensOrBuilder> continuationTokensBuilder_; /** * @@ -1799,7 +1837,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * * @return Whether the continuationTokens field is set. */ - @Override + @java.lang.Override public boolean hasContinuationTokens() { return startFromCase_ == 6; } @@ -1822,18 +1860,18 @@ public boolean hasContinuationTokens() { * * @return The continuationTokens. */ - @Override - public StreamContinuationTokens getContinuationTokens() { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens() { if (continuationTokensBuilder_ == null) { if (startFromCase_ == 6) { - return (StreamContinuationTokens) startFrom_; + return (com.google.bigtable.v2.StreamContinuationTokens) startFrom_; } - return StreamContinuationTokens.getDefaultInstance(); + return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } else { if (startFromCase_ == 6) { return continuationTokensBuilder_.getMessage(); } - return StreamContinuationTokens.getDefaultInstance(); + return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } } /** @@ -1853,7 +1891,7 @@ public StreamContinuationTokens getContinuationTokens() { * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - public Builder setContinuationTokens(StreamContinuationTokens value) { + public Builder setContinuationTokens(com.google.bigtable.v2.StreamContinuationTokens value) { if (continuationTokensBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1883,7 +1921,8 @@ public Builder setContinuationTokens(StreamContinuationTokens value) { * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - public Builder setContinuationTokens(StreamContinuationTokens.Builder builderForValue) { + public Builder setContinuationTokens( + com.google.bigtable.v2.StreamContinuationTokens.Builder builderForValue) { if (continuationTokensBuilder_ == null) { startFrom_ = builderForValue.build(); onChanged(); @@ -1910,11 +1949,13 @@ public Builder setContinuationTokens(StreamContinuationTokens.Builder builderFor * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - public Builder mergeContinuationTokens(StreamContinuationTokens value) { + public Builder mergeContinuationTokens(com.google.bigtable.v2.StreamContinuationTokens value) { if (continuationTokensBuilder_ == null) { - if (startFromCase_ == 6 && startFrom_ != StreamContinuationTokens.getDefaultInstance()) { + if (startFromCase_ == 6 + && startFrom_ != com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance()) { startFrom_ = - StreamContinuationTokens.newBuilder((StreamContinuationTokens) startFrom_) + com.google.bigtable.v2.StreamContinuationTokens.newBuilder( + (com.google.bigtable.v2.StreamContinuationTokens) startFrom_) .mergeFrom(value) .buildPartial(); } else { @@ -1981,7 +2022,7 @@ public Builder clearContinuationTokens() { * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - public StreamContinuationTokens.Builder getContinuationTokensBuilder() { + public com.google.bigtable.v2.StreamContinuationTokens.Builder getContinuationTokensBuilder() { return getContinuationTokensFieldBuilder().getBuilder(); } /** @@ -2001,15 +2042,16 @@ public StreamContinuationTokens.Builder getContinuationTokensBuilder() { * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - @Override - public StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationTokensOrBuilder + getContinuationTokensOrBuilder() { if ((startFromCase_ == 6) && (continuationTokensBuilder_ != null)) { return continuationTokensBuilder_.getMessageOrBuilder(); } else { if (startFromCase_ == 6) { - return (StreamContinuationTokens) startFrom_; + return (com.google.bigtable.v2.StreamContinuationTokens) startFrom_; } - return StreamContinuationTokens.getDefaultInstance(); + return com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } } /** @@ -2030,20 +2072,22 @@ public StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder() { * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ private com.google.protobuf.SingleFieldBuilderV3< - StreamContinuationTokens, - StreamContinuationTokens.Builder, - StreamContinuationTokensOrBuilder> + com.google.bigtable.v2.StreamContinuationTokens, + com.google.bigtable.v2.StreamContinuationTokens.Builder, + com.google.bigtable.v2.StreamContinuationTokensOrBuilder> getContinuationTokensFieldBuilder() { if (continuationTokensBuilder_ == null) { if (!(startFromCase_ == 6)) { - startFrom_ = StreamContinuationTokens.getDefaultInstance(); + startFrom_ = com.google.bigtable.v2.StreamContinuationTokens.getDefaultInstance(); } continuationTokensBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - StreamContinuationTokens, - StreamContinuationTokens.Builder, - StreamContinuationTokensOrBuilder>( - (StreamContinuationTokens) startFrom_, getParentForChildren(), isClean()); + com.google.bigtable.v2.StreamContinuationTokens, + com.google.bigtable.v2.StreamContinuationTokens.Builder, + com.google.bigtable.v2.StreamContinuationTokensOrBuilder>( + (com.google.bigtable.v2.StreamContinuationTokens) startFrom_, + getParentForChildren(), + isClean()); startFrom_ = null; } startFromCase_ = 6; @@ -2443,12 +2487,12 @@ public com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder() { return heartbeatDurationBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -2458,19 +2502,19 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamRequest) - private static final ReadChangeStreamRequest DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ReadChangeStreamRequest(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadChangeStreamRequest(); } - public static ReadChangeStreamRequest getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public ReadChangeStreamRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2483,13 +2527,13 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public ReadChangeStreamRequest getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java index c62293965a..db5b8e7957 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamRequestOrBuilder.java @@ -39,7 +39,7 @@ public interface ReadChangeStreamRequestOrBuilder * * @return The tableName. */ - String getTableName(); + java.lang.String getTableName(); /** * * @@ -71,7 +71,7 @@ public interface ReadChangeStreamRequestOrBuilder * * @return The appProfileId. */ - String getAppProfileId(); + java.lang.String getAppProfileId(); /** * * @@ -110,7 +110,7 @@ public interface ReadChangeStreamRequestOrBuilder * * @return The partition. */ - StreamPartition getPartition(); + com.google.bigtable.v2.StreamPartition getPartition(); /** * * @@ -120,7 +120,7 @@ public interface ReadChangeStreamRequestOrBuilder * * .google.bigtable.v2.StreamPartition partition = 3; */ - StreamPartitionOrBuilder getPartitionOrBuilder(); + com.google.bigtable.v2.StreamPartitionOrBuilder getPartitionOrBuilder(); /** * @@ -205,7 +205,7 @@ public interface ReadChangeStreamRequestOrBuilder * * @return The continuationTokens. */ - StreamContinuationTokens getContinuationTokens(); + com.google.bigtable.v2.StreamContinuationTokens getContinuationTokens(); /** * * @@ -223,7 +223,7 @@ public interface ReadChangeStreamRequestOrBuilder * * .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; */ - StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder(); + com.google.bigtable.v2.StreamContinuationTokensOrBuilder getContinuationTokensOrBuilder(); /** * @@ -304,5 +304,5 @@ public interface ReadChangeStreamRequestOrBuilder */ com.google.protobuf.DurationOrBuilder getHeartbeatDurationOrBuilder(); - public ReadChangeStreamRequest.StartFromCase getStartFromCase(); + public com.google.bigtable.v2.ReadChangeStreamRequest.StartFromCase getStartFromCase(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java index 757cebfca6..98acce8f22 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponse.java @@ -40,13 +40,13 @@ private ReadChangeStreamResponse(com.google.protobuf.GeneratedMessageV3.Builder< private ReadChangeStreamResponse() {} - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ReadChangeStreamResponse(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -57,7 +57,7 @@ private ReadChangeStreamResponse( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -71,13 +71,19 @@ private ReadChangeStreamResponse( break; case 10: { - DataChange.Builder subBuilder = null; + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder subBuilder = null; if (streamRecordCase_ == 1) { - subBuilder = ((DataChange) streamRecord_).toBuilder(); + subBuilder = + ((com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_) + .toBuilder(); } - streamRecord_ = input.readMessage(DataChange.parser(), extensionRegistry); + streamRecord_ = + input.readMessage( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.parser(), + extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((DataChange) streamRecord_); + subBuilder.mergeFrom( + (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_); streamRecord_ = subBuilder.buildPartial(); } streamRecordCase_ = 1; @@ -85,13 +91,19 @@ private ReadChangeStreamResponse( } case 18: { - Heartbeat.Builder subBuilder = null; + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder subBuilder = null; if (streamRecordCase_ == 2) { - subBuilder = ((Heartbeat) streamRecord_).toBuilder(); + subBuilder = + ((com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_) + .toBuilder(); } - streamRecord_ = input.readMessage(Heartbeat.parser(), extensionRegistry); + streamRecord_ = + input.readMessage( + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.parser(), + extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((Heartbeat) streamRecord_); + subBuilder.mergeFrom( + (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_); streamRecord_ = subBuilder.buildPartial(); } streamRecordCase_ = 2; @@ -99,13 +111,19 @@ private ReadChangeStreamResponse( } case 26: { - CloseStream.Builder subBuilder = null; + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder subBuilder = null; if (streamRecordCase_ == 3) { - subBuilder = ((CloseStream) streamRecord_).toBuilder(); + subBuilder = + ((com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_) + .toBuilder(); } - streamRecord_ = input.readMessage(CloseStream.parser(), extensionRegistry); + streamRecord_ = + input.readMessage( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.parser(), + extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((CloseStream) streamRecord_); + subBuilder.mergeFrom( + (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_); streamRecord_ = subBuilder.buildPartial(); } streamRecordCase_ = 3; @@ -133,14 +151,18 @@ private ReadChangeStreamResponse( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized(ReadChangeStreamResponse.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.class, + com.google.bigtable.v2.ReadChangeStreamResponse.Builder.class); } public interface MutationChunkOrBuilder @@ -175,7 +197,7 @@ public interface MutationChunkOrBuilder * * @return The chunkInfo. */ - MutationChunk.ChunkInfo getChunkInfo(); + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo getChunkInfo(); /** * * @@ -187,7 +209,8 @@ public interface MutationChunkOrBuilder * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - MutationChunk.ChunkInfoOrBuilder getChunkInfoOrBuilder(); + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder + getChunkInfoOrBuilder(); /** * @@ -216,7 +239,7 @@ public interface MutationChunkOrBuilder * * @return The mutation. */ - Mutation getMutation(); + com.google.bigtable.v2.Mutation getMutation(); /** * * @@ -228,7 +251,7 @@ public interface MutationChunkOrBuilder * * .google.bigtable.v2.Mutation mutation = 2; */ - MutationOrBuilder getMutationOrBuilder(); + com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder(); } /** * @@ -251,13 +274,13 @@ private MutationChunk(com.google.protobuf.GeneratedMessageV3.Builder builder) private MutationChunk() {} - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new MutationChunk(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -268,7 +291,7 @@ private MutationChunk( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -282,11 +305,16 @@ private MutationChunk( break; case 10: { - ChunkInfo.Builder subBuilder = null; + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder + subBuilder = null; if (chunkInfo_ != null) { subBuilder = chunkInfo_.toBuilder(); } - chunkInfo_ = input.readMessage(ChunkInfo.parser(), extensionRegistry); + chunkInfo_ = + input.readMessage( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + .parser(), + extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(chunkInfo_); chunkInfo_ = subBuilder.buildPartial(); @@ -296,11 +324,12 @@ private MutationChunk( } case 18: { - Mutation.Builder subBuilder = null; + com.google.bigtable.v2.Mutation.Builder subBuilder = null; if (mutation_ != null) { subBuilder = mutation_.toBuilder(); } - mutation_ = input.readMessage(Mutation.parser(), extensionRegistry); + mutation_ = + input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(mutation_); mutation_ = subBuilder.buildPartial(); @@ -330,15 +359,18 @@ private MutationChunk( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable - .ensureFieldAccessorsInitialized(MutationChunk.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.class, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder.class); } public interface ChunkInfoOrBuilder @@ -409,13 +441,13 @@ private ChunkInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { private ChunkInfo() {} - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ChunkInfo(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -426,7 +458,7 @@ private ChunkInfo( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -476,15 +508,19 @@ private ChunkInfo( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized(ChunkInfo.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.class, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder + .class); } public static final int CHUNKED_VALUE_SIZE_FIELD_NUMBER = 1; @@ -500,7 +536,7 @@ protected FieldAccessorTable internalGetFieldAccessorTable() { * * @return The chunkedValueSize. */ - @Override + @java.lang.Override public int getChunkedValueSize() { return chunkedValueSize_; } @@ -519,7 +555,7 @@ public int getChunkedValueSize() { * * @return The chunkedValueOffset. */ - @Override + @java.lang.Override public int getChunkedValueOffset() { return chunkedValueOffset_; } @@ -537,14 +573,14 @@ public int getChunkedValueOffset() { * * @return The lastChunk. */ - @Override + @java.lang.Override public boolean getLastChunk() { return lastChunk_; } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -554,7 +590,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (chunkedValueSize_ != 0) { output.writeInt32(1, chunkedValueSize_); @@ -568,7 +604,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -588,15 +624,17 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof ChunkInfo)) { + if (!(obj + instanceof com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo)) { return super.equals(obj); } - ChunkInfo other = (ChunkInfo) obj; + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo other = + (com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) obj; if (getChunkedValueSize() != other.getChunkedValueSize()) return false; if (getChunkedValueOffset() != other.getChunkedValueOffset()) return false; @@ -605,7 +643,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -623,77 +661,87 @@ public int hashCode() { return hash; } - public static ChunkInfo parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ChunkInfo parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ChunkInfo parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ChunkInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ChunkInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ChunkInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ChunkInfo parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ChunkInfo parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + 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 ChunkInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static ChunkInfo parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + 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 ChunkInfo parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ChunkInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -702,17 +750,19 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(ChunkInfo prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -731,17 +781,21 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) - ChunkInfoOrBuilder { + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized(ChunkInfo.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.class, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder + .class); } // Construct using @@ -750,7 +804,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -759,7 +813,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); chunkedValueSize_ = 0; @@ -771,29 +825,34 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_ChunkInfo_descriptor; } - @Override - public ChunkInfo getDefaultInstanceForType() { - return ChunkInfo.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + .getDefaultInstance(); } - @Override - public ChunkInfo build() { - ChunkInfo result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo build() { + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public ChunkInfo buildPartial() { - ChunkInfo result = new ChunkInfo(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + buildPartial() { + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo result = + new com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo(this); result.chunkedValueSize_ = chunkedValueSize_; result.chunkedValueOffset_ = chunkedValueOffset_; result.lastChunk_ = lastChunk_; @@ -801,51 +860,58 @@ public ChunkInfo buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ChunkInfo) { - return mergeFrom((ChunkInfo) other); + if (other + instanceof com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) { + return mergeFrom( + (com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(ChunkInfo other) { - if (other == ChunkInfo.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo other) { + if (other + == com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + .getDefaultInstance()) return this; if (other.getChunkedValueSize() != 0) { setChunkedValueSize(other.getChunkedValueSize()); } @@ -860,21 +926,24 @@ public Builder mergeFrom(ChunkInfo other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - ChunkInfo parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo parsedMessage = + null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ChunkInfo) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -896,7 +965,7 @@ public Builder mergeFrom( * * @return The chunkedValueSize. */ - @Override + @java.lang.Override public int getChunkedValueSize() { return chunkedValueSize_; } @@ -949,7 +1018,7 @@ public Builder clearChunkedValueSize() { * * @return The chunkedValueOffset. */ - @Override + @java.lang.Override public int getChunkedValueOffset() { return chunkedValueOffset_; } @@ -1003,7 +1072,7 @@ public Builder clearChunkedValueOffset() { * * @return The lastChunk. */ - @Override + @java.lang.Override public boolean getLastChunk() { return lastChunk_; } @@ -1043,13 +1112,13 @@ public Builder clearLastChunk() { return this; } - @Override + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -1059,19 +1128,22 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo) - private static final ChunkInfo DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ChunkInfo(); + DEFAULT_INSTANCE = + new com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo(); } - public static ChunkInfo getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public ChunkInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1084,19 +1156,20 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public ChunkInfo getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int CHUNK_INFO_FIELD_NUMBER = 1; - private ChunkInfo chunkInfo_; + private com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunkInfo_; /** * * @@ -1110,7 +1183,7 @@ public ChunkInfo getDefaultInstanceForType() { * * @return Whether the chunkInfo field is set. */ - @Override + @java.lang.Override public boolean hasChunkInfo() { return chunkInfo_ != null; } @@ -1127,9 +1200,12 @@ public boolean hasChunkInfo() { * * @return The chunkInfo. */ - @Override - public ChunkInfo getChunkInfo() { - return chunkInfo_ == null ? ChunkInfo.getDefaultInstance() : chunkInfo_; + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo getChunkInfo() { + return chunkInfo_ == null + ? com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + .getDefaultInstance() + : chunkInfo_; } /** * @@ -1142,13 +1218,14 @@ public ChunkInfo getChunkInfo() { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - @Override - public ChunkInfoOrBuilder getChunkInfoOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { return getChunkInfo(); } public static final int MUTATION_FIELD_NUMBER = 2; - private Mutation mutation_; + private com.google.bigtable.v2.Mutation mutation_; /** * * @@ -1162,7 +1239,7 @@ public ChunkInfoOrBuilder getChunkInfoOrBuilder() { * * @return Whether the mutation field is set. */ - @Override + @java.lang.Override public boolean hasMutation() { return mutation_ != null; } @@ -1179,9 +1256,9 @@ public boolean hasMutation() { * * @return The mutation. */ - @Override - public Mutation getMutation() { - return mutation_ == null ? Mutation.getDefaultInstance() : mutation_; + @java.lang.Override + public com.google.bigtable.v2.Mutation getMutation() { + return mutation_ == null ? com.google.bigtable.v2.Mutation.getDefaultInstance() : mutation_; } /** * @@ -1194,14 +1271,14 @@ public Mutation getMutation() { * * .google.bigtable.v2.Mutation mutation = 2; */ - @Override - public MutationOrBuilder getMutationOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder() { return getMutation(); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -1211,7 +1288,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (chunkInfo_ != null) { output.writeMessage(1, getChunkInfo()); @@ -1222,7 +1299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -1239,15 +1316,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof MutationChunk)) { + if (!(obj instanceof com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk)) { return super.equals(obj); } - MutationChunk other = (MutationChunk) obj; + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk other = + (com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) obj; if (hasChunkInfo() != other.hasChunkInfo()) return false; if (hasChunkInfo()) { @@ -1261,7 +1339,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -1281,69 +1359,71 @@ public int hashCode() { return hash; } - public static MutationChunk parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static MutationChunk parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static MutationChunk parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static MutationChunk parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static MutationChunk parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static MutationChunk parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static MutationChunk parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static MutationChunk parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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 MutationChunk parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static MutationChunk parseDelimitedFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk 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 MutationChunk parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static MutationChunk parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1351,7 +1431,7 @@ public static MutationChunk parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -1360,17 +1440,19 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(MutationChunk prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1387,17 +1469,20 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) - MutationChunkOrBuilder { + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_fieldAccessorTable - .ensureFieldAccessorsInitialized(MutationChunk.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.class, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder.class); } // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.newBuilder() @@ -1405,7 +1490,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -1414,7 +1499,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); if (chunkInfoBuilder_ == null) { @@ -1432,29 +1517,31 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_MutationChunk_descriptor; } - @Override - public MutationChunk getDefaultInstanceForType() { - return MutationChunk.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance(); } - @Override - public MutationChunk build() { - MutationChunk result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk build() { + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public MutationChunk buildPartial() { - MutationChunk result = new MutationChunk(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk buildPartial() { + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk result = + new com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(this); if (chunkInfoBuilder_ == null) { result.chunkInfo_ = chunkInfo_; } else { @@ -1469,50 +1556,56 @@ public MutationChunk buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof MutationChunk) { - return mergeFrom((MutationChunk) other); + if (other instanceof com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) { + return mergeFrom((com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(MutationChunk other) { - if (other == MutationChunk.getDefaultInstance()) return this; + public Builder mergeFrom( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk other) { + if (other + == com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()) + return this; if (other.hasChunkInfo()) { mergeChunkInfo(other.getChunkInfo()); } @@ -1524,21 +1617,23 @@ public Builder mergeFrom(MutationChunk other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - MutationChunk parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (MutationChunk) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1548,9 +1643,11 @@ public Builder mergeFrom( return this; } - private ChunkInfo chunkInfo_; + private com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunkInfo_; private com.google.protobuf.SingleFieldBuilderV3< - ChunkInfo, ChunkInfo.Builder, ChunkInfoOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder> chunkInfoBuilder_; /** * @@ -1581,9 +1678,13 @@ public boolean hasChunkInfo() { * * @return The chunkInfo. */ - public ChunkInfo getChunkInfo() { + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + getChunkInfo() { if (chunkInfoBuilder_ == null) { - return chunkInfo_ == null ? ChunkInfo.getDefaultInstance() : chunkInfo_; + return chunkInfo_ == null + ? com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + .getDefaultInstance() + : chunkInfo_; } else { return chunkInfoBuilder_.getMessage(); } @@ -1599,7 +1700,8 @@ public ChunkInfo getChunkInfo() { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - public Builder setChunkInfo(ChunkInfo value) { + public Builder setChunkInfo( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo value) { if (chunkInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1623,7 +1725,9 @@ public Builder setChunkInfo(ChunkInfo value) { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - public Builder setChunkInfo(ChunkInfo.Builder builderForValue) { + public Builder setChunkInfo( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder + builderForValue) { if (chunkInfoBuilder_ == null) { chunkInfo_ = builderForValue.build(); onChanged(); @@ -1644,10 +1748,15 @@ public Builder setChunkInfo(ChunkInfo.Builder builderForValue) { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - public Builder mergeChunkInfo(ChunkInfo value) { + public Builder mergeChunkInfo( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo value) { if (chunkInfoBuilder_ == null) { if (chunkInfo_ != null) { - chunkInfo_ = ChunkInfo.newBuilder(chunkInfo_).mergeFrom(value).buildPartial(); + chunkInfo_ = + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.newBuilder( + chunkInfo_) + .mergeFrom(value) + .buildPartial(); } else { chunkInfo_ = value; } @@ -1691,7 +1800,8 @@ public Builder clearChunkInfo() { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - public ChunkInfo.Builder getChunkInfoBuilder() { + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder + getChunkInfoBuilder() { onChanged(); return getChunkInfoFieldBuilder().getBuilder(); @@ -1707,11 +1817,15 @@ public ChunkInfo.Builder getChunkInfoBuilder() { * .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; * */ - public ChunkInfoOrBuilder getChunkInfoOrBuilder() { + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { if (chunkInfoBuilder_ != null) { return chunkInfoBuilder_.getMessageOrBuilder(); } else { - return chunkInfo_ == null ? ChunkInfo.getDefaultInstance() : chunkInfo_; + return chunkInfo_ == null + ? com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo + .getDefaultInstance() + : chunkInfo_; } } /** @@ -1726,21 +1840,27 @@ public ChunkInfoOrBuilder getChunkInfoOrBuilder() { *
    */ private com.google.protobuf.SingleFieldBuilderV3< - ChunkInfo, ChunkInfo.Builder, ChunkInfoOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder> getChunkInfoFieldBuilder() { if (chunkInfoBuilder_ == null) { chunkInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - ChunkInfo, ChunkInfo.Builder, ChunkInfoOrBuilder>( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfoOrBuilder>( getChunkInfo(), getParentForChildren(), isClean()); chunkInfo_ = null; } return chunkInfoBuilder_; } - private Mutation mutation_; + private com.google.bigtable.v2.Mutation mutation_; private com.google.protobuf.SingleFieldBuilderV3< - Mutation, Mutation.Builder, MutationOrBuilder> + com.google.bigtable.v2.Mutation, + com.google.bigtable.v2.Mutation.Builder, + com.google.bigtable.v2.MutationOrBuilder> mutationBuilder_; /** * @@ -1771,9 +1891,11 @@ public boolean hasMutation() { * * @return The mutation. */ - public Mutation getMutation() { + public com.google.bigtable.v2.Mutation getMutation() { if (mutationBuilder_ == null) { - return mutation_ == null ? Mutation.getDefaultInstance() : mutation_; + return mutation_ == null + ? com.google.bigtable.v2.Mutation.getDefaultInstance() + : mutation_; } else { return mutationBuilder_.getMessage(); } @@ -1789,7 +1911,7 @@ public Mutation getMutation() { * * .google.bigtable.v2.Mutation mutation = 2; */ - public Builder setMutation(Mutation value) { + public Builder setMutation(com.google.bigtable.v2.Mutation value) { if (mutationBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1813,7 +1935,7 @@ public Builder setMutation(Mutation value) { * * .google.bigtable.v2.Mutation mutation = 2; */ - public Builder setMutation(Mutation.Builder builderForValue) { + public Builder setMutation(com.google.bigtable.v2.Mutation.Builder builderForValue) { if (mutationBuilder_ == null) { mutation_ = builderForValue.build(); onChanged(); @@ -1834,10 +1956,13 @@ public Builder setMutation(Mutation.Builder builderForValue) { * * .google.bigtable.v2.Mutation mutation = 2; */ - public Builder mergeMutation(Mutation value) { + public Builder mergeMutation(com.google.bigtable.v2.Mutation value) { if (mutationBuilder_ == null) { if (mutation_ != null) { - mutation_ = Mutation.newBuilder(mutation_).mergeFrom(value).buildPartial(); + mutation_ = + com.google.bigtable.v2.Mutation.newBuilder(mutation_) + .mergeFrom(value) + .buildPartial(); } else { mutation_ = value; } @@ -1881,7 +2006,7 @@ public Builder clearMutation() { * * .google.bigtable.v2.Mutation mutation = 2; */ - public Mutation.Builder getMutationBuilder() { + public com.google.bigtable.v2.Mutation.Builder getMutationBuilder() { onChanged(); return getMutationFieldBuilder().getBuilder(); @@ -1897,11 +2022,13 @@ public Mutation.Builder getMutationBuilder() { * * .google.bigtable.v2.Mutation mutation = 2; */ - public MutationOrBuilder getMutationOrBuilder() { + public com.google.bigtable.v2.MutationOrBuilder getMutationOrBuilder() { if (mutationBuilder_ != null) { return mutationBuilder_.getMessageOrBuilder(); } else { - return mutation_ == null ? Mutation.getDefaultInstance() : mutation_; + return mutation_ == null + ? com.google.bigtable.v2.Mutation.getDefaultInstance() + : mutation_; } } /** @@ -1916,25 +2043,29 @@ public MutationOrBuilder getMutationOrBuilder() { * .google.bigtable.v2.Mutation mutation = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - Mutation, Mutation.Builder, MutationOrBuilder> + com.google.bigtable.v2.Mutation, + com.google.bigtable.v2.Mutation.Builder, + com.google.bigtable.v2.MutationOrBuilder> getMutationFieldBuilder() { if (mutationBuilder_ == null) { mutationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - Mutation, Mutation.Builder, MutationOrBuilder>( + com.google.bigtable.v2.Mutation, + com.google.bigtable.v2.Mutation.Builder, + com.google.bigtable.v2.MutationOrBuilder>( getMutation(), getParentForChildren(), isClean()); mutation_ = null; } return mutationBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -1944,19 +2075,21 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.MutationChunk) - private static final MutationChunk DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new MutationChunk(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk(); } - public static MutationChunk getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public MutationChunk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1969,13 +2102,14 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public MutationChunk getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -2008,7 +2142,7 @@ public interface DataChangeOrBuilder * * @return The type. */ - DataChange.Type getType(); + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType(); /** * @@ -2022,7 +2156,7 @@ public interface DataChangeOrBuilder * * @return The sourceClusterId. */ - String getSourceClusterId(); + java.lang.String getSourceClusterId(); /** * * @@ -2117,7 +2251,7 @@ public interface DataChangeOrBuilder * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - java.util.List getChunksList(); + java.util.List getChunksList(); /** * * @@ -2129,7 +2263,7 @@ public interface DataChangeOrBuilder * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - MutationChunk getChunks(int index); + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index); /** * * @@ -2153,7 +2287,8 @@ public interface DataChangeOrBuilder * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - java.util.List getChunksOrBuilderList(); + java.util.List + getChunksOrBuilderList(); /** * * @@ -2165,7 +2300,8 @@ public interface DataChangeOrBuilder * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - MutationChunkOrBuilder getChunksOrBuilder(int index); + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder getChunksOrBuilder( + int index); /** * @@ -2193,7 +2329,7 @@ public interface DataChangeOrBuilder * * @return The token. */ - String getToken(); + java.lang.String getToken(); /** * * @@ -2281,13 +2417,13 @@ private DataChange() { token_ = ""; } - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new DataChange(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -2298,7 +2434,7 @@ private DataChange( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = @@ -2320,7 +2456,7 @@ private DataChange( } case 18: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); sourceClusterId_ = s; break; @@ -2353,10 +2489,15 @@ private DataChange( case 50: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - chunks_ = new java.util.ArrayList(); + chunks_ = + new java.util.ArrayList< + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk>(); mutable_bitField0_ |= 0x00000001; } - chunks_.add(input.readMessage(MutationChunk.parser(), extensionRegistry)); + chunks_.add( + input.readMessage( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.parser(), + extensionRegistry)); break; } case 64: @@ -2366,7 +2507,7 @@ private DataChange( } case 74: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); token_ = s; break; @@ -2411,15 +2552,18 @@ private DataChange( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable - .ensureFieldAccessorsInitialized(DataChange.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.class, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder.class); } /** @@ -2520,7 +2664,8 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { public final int getNumber() { if (this == UNRECOGNIZED) { - throw new IllegalArgumentException("Can't get the number of an unknown enum value."); + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); } return value; } @@ -2530,7 +2675,7 @@ public final int getNumber() { * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ - @Deprecated + @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } @@ -2567,7 +2712,7 @@ public Type findValueByNumber(int number) { public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { - throw new IllegalStateException( + throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); @@ -2578,14 +2723,16 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return DataChange.getDescriptor().getEnumTypes().get(0); + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDescriptor() + .getEnumTypes() + .get(0); } private static final Type[] VALUES = values(); public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { - throw new IllegalArgumentException("EnumValueDescriptor is not for this type."); + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; @@ -2615,7 +2762,7 @@ private Type(int value) { * * @return The enum numeric value on the wire for type. */ - @Override + @java.lang.Override public int getTypeValue() { return type_; } @@ -2630,15 +2777,18 @@ public int getTypeValue() { * * @return The type. */ - @Override - public Type getType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType() { @SuppressWarnings("deprecation") - Type result = Type.valueOf(type_); - return result == null ? Type.UNRECOGNIZED : result; + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type result = + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.valueOf(type_); + return result == null + ? com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.UNRECOGNIZED + : result; } public static final int SOURCE_CLUSTER_ID_FIELD_NUMBER = 2; - private volatile Object sourceClusterId_; + private volatile java.lang.Object sourceClusterId_; /** * * @@ -2651,14 +2801,14 @@ public Type getType() { * * @return The sourceClusterId. */ - @Override - public String getSourceClusterId() { - Object ref = sourceClusterId_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getSourceClusterId() { + java.lang.Object ref = sourceClusterId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); sourceClusterId_ = s; return s; } @@ -2675,12 +2825,12 @@ public String getSourceClusterId() { * * @return The bytes for sourceClusterId. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getSourceClusterIdBytes() { - Object ref = sourceClusterId_; - if (ref instanceof String) { + java.lang.Object ref = sourceClusterId_; + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); sourceClusterId_ = b; return b; } else { @@ -2703,7 +2853,7 @@ public com.google.protobuf.ByteString getSourceClusterIdBytes() { * * @return The rowKey. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getRowKey() { return rowKey_; } @@ -2721,7 +2871,7 @@ public com.google.protobuf.ByteString getRowKey() { * * @return Whether the commitTimestamp field is set. */ - @Override + @java.lang.Override public boolean hasCommitTimestamp() { return commitTimestamp_ != null; } @@ -2736,7 +2886,7 @@ public boolean hasCommitTimestamp() { * * @return The commitTimestamp. */ - @Override + @java.lang.Override public com.google.protobuf.Timestamp getCommitTimestamp() { return commitTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() @@ -2751,7 +2901,7 @@ public com.google.protobuf.Timestamp getCommitTimestamp() { * * .google.protobuf.Timestamp commit_timestamp = 4; */ - @Override + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { return getCommitTimestamp(); } @@ -2775,13 +2925,13 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * * @return The tiebreaker. */ - @Override + @java.lang.Override public int getTiebreaker() { return tiebreaker_; } public static final int CHUNKS_FIELD_NUMBER = 6; - private java.util.List chunks_; + private java.util.List chunks_; /** * * @@ -2793,8 +2943,9 @@ public int getTiebreaker() { * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - @Override - public java.util.List getChunksList() { + @java.lang.Override + public java.util.List + getChunksList() { return chunks_; } /** @@ -2808,8 +2959,10 @@ public java.util.List getChunksList() { * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - @Override - public java.util.List getChunksOrBuilderList() { + @java.lang.Override + public java.util.List< + ? extends com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder> + getChunksOrBuilderList() { return chunks_; } /** @@ -2823,7 +2976,7 @@ public java.util.List getChunksOrBuilderList() * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - @Override + @java.lang.Override public int getChunksCount() { return chunks_.size(); } @@ -2838,8 +2991,8 @@ public int getChunksCount() { * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - @Override - public MutationChunk getChunks(int index) { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index) { return chunks_.get(index); } /** @@ -2853,8 +3006,9 @@ public MutationChunk getChunks(int index) { * * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; */ - @Override - public MutationChunkOrBuilder getChunksOrBuilder(int index) { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder + getChunksOrBuilder(int index) { return chunks_.get(index); } @@ -2872,13 +3026,13 @@ public MutationChunkOrBuilder getChunksOrBuilder(int index) { * * @return The done. */ - @Override + @java.lang.Override public boolean getDone() { return done_; } public static final int TOKEN_FIELD_NUMBER = 9; - private volatile Object token_; + private volatile java.lang.Object token_; /** * * @@ -2891,14 +3045,14 @@ public boolean getDone() { * * @return The token. */ - @Override - public String getToken() { - Object ref = token_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); token_ = s; return s; } @@ -2915,12 +3069,12 @@ public String getToken() { * * @return The bytes for token. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getTokenBytes() { - Object ref = token_; - if (ref instanceof String) { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); token_ = b; return b; } else { @@ -2943,7 +3097,7 @@ public com.google.protobuf.ByteString getTokenBytes() { * * @return Whether the lowWatermark field is set. */ - @Override + @java.lang.Override public boolean hasLowWatermark() { return lowWatermark_ != null; } @@ -2960,7 +3114,7 @@ public boolean hasLowWatermark() { * * @return The lowWatermark. */ - @Override + @java.lang.Override public com.google.protobuf.Timestamp getLowWatermark() { return lowWatermark_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() @@ -2977,14 +3131,14 @@ public com.google.protobuf.Timestamp getLowWatermark() { * * .google.protobuf.Timestamp low_watermark = 10; */ - @Override + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { return getLowWatermark(); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -2994,9 +3148,11 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (type_ != Type.TYPE_UNSPECIFIED.getNumber()) { + if (type_ + != com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.TYPE_UNSPECIFIED + .getNumber()) { output.writeEnum(1, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceClusterId_)) { @@ -3026,13 +3182,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; - if (type_ != Type.TYPE_UNSPECIFIED.getNumber()) { + if (type_ + != com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.TYPE_UNSPECIFIED + .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceClusterId_)) { @@ -3064,15 +3222,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof DataChange)) { + if (!(obj instanceof com.google.bigtable.v2.ReadChangeStreamResponse.DataChange)) { return super.equals(obj); } - DataChange other = (DataChange) obj; + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange other = + (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) obj; if (type_ != other.type_) return false; if (!getSourceClusterId().equals(other.getSourceClusterId())) return false; @@ -3093,7 +3252,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -3129,69 +3288,71 @@ public int hashCode() { return hash; } - public static DataChange parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static DataChange parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static DataChange parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static DataChange parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static DataChange parseFrom(byte[] data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static DataChange parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static DataChange parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static DataChange parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange 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 DataChange parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static DataChange parseDelimitedFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange 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 DataChange parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static DataChange parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3199,7 +3360,7 @@ public static DataChange parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -3208,17 +3369,19 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(DataChange prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -3240,17 +3403,20 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.DataChange) - DataChangeOrBuilder { + com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_fieldAccessorTable - .ensureFieldAccessorsInitialized(DataChange.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.class, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder.class); } // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.newBuilder() @@ -3258,7 +3424,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -3269,7 +3435,7 @@ private void maybeForceBuilderInitialization() { } } - @Override + @java.lang.Override public Builder clear() { super.clear(); type_ = 0; @@ -3305,29 +3471,31 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_DataChange_descriptor; } - @Override - public DataChange getDefaultInstanceForType() { - return DataChange.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange + getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } - @Override - public DataChange build() { - DataChange result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange build() { + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public DataChange buildPartial() { - DataChange result = new DataChange(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange buildPartial() { + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange result = + new com.google.bigtable.v2.ReadChangeStreamResponse.DataChange(this); int from_bitField0_ = bitField0_; result.type_ = type_; result.sourceClusterId_ = sourceClusterId_; @@ -3358,50 +3526,55 @@ public DataChange buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof DataChange) { - return mergeFrom((DataChange) other); + if (other instanceof com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) { + return mergeFrom((com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(DataChange other) { - if (other == DataChange.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.DataChange other) { + if (other + == com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance()) + return this; if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } @@ -3460,21 +3633,22 @@ public Builder mergeFrom(DataChange other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - DataChange parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (DataChange) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -3498,7 +3672,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for type. */ - @Override + @java.lang.Override public int getTypeValue() { return type_; } @@ -3531,11 +3705,14 @@ public Builder setTypeValue(int value) { * * @return The type. */ - @Override - public Type getType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type getType() { @SuppressWarnings("deprecation") - Type result = Type.valueOf(type_); - return result == null ? Type.UNRECOGNIZED : result; + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type result = + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.valueOf(type_); + return result == null + ? com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type.UNRECOGNIZED + : result; } /** * @@ -3549,7 +3726,8 @@ public Type getType() { * @param value The type to set. * @return This builder for chaining. */ - public Builder setType(Type value) { + public Builder setType( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type value) { if (value == null) { throw new NullPointerException(); } @@ -3576,7 +3754,7 @@ public Builder clearType() { return this; } - private Object sourceClusterId_ = ""; + private java.lang.Object sourceClusterId_ = ""; /** * * @@ -3589,15 +3767,15 @@ public Builder clearType() { * * @return The sourceClusterId. */ - public String getSourceClusterId() { - Object ref = sourceClusterId_; - if (!(ref instanceof String)) { + public java.lang.String getSourceClusterId() { + java.lang.Object ref = sourceClusterId_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); sourceClusterId_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** @@ -3613,10 +3791,10 @@ public String getSourceClusterId() { * @return The bytes for sourceClusterId. */ public com.google.protobuf.ByteString getSourceClusterIdBytes() { - Object ref = sourceClusterId_; + java.lang.Object ref = sourceClusterId_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); sourceClusterId_ = b; return b; } else { @@ -3636,7 +3814,7 @@ public com.google.protobuf.ByteString getSourceClusterIdBytes() { * @param value The sourceClusterId to set. * @return This builder for chaining. */ - public Builder setSourceClusterId(String value) { + public Builder setSourceClusterId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -3701,7 +3879,7 @@ public Builder setSourceClusterIdBytes(com.google.protobuf.ByteString value) { * * @return The rowKey. */ - @Override + @java.lang.Override public com.google.protobuf.ByteString getRowKey() { return rowKey_; } @@ -3951,7 +4129,7 @@ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() { * * @return The tiebreaker. */ - @Override + @java.lang.Override public int getTiebreaker() { return tiebreaker_; } @@ -4003,17 +4181,22 @@ public Builder clearTiebreaker() { return this; } - private java.util.List chunks_ = java.util.Collections.emptyList(); + private java.util.List + chunks_ = java.util.Collections.emptyList(); private void ensureChunksIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { - chunks_ = new java.util.ArrayList(chunks_); + chunks_ = + new java.util.ArrayList< + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk>(chunks_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - MutationChunk, MutationChunk.Builder, MutationChunkOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder> chunksBuilder_; /** @@ -4028,7 +4211,8 @@ private void ensureChunksIsMutable() { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public java.util.List getChunksList() { + public java.util.List + getChunksList() { if (chunksBuilder_ == null) { return java.util.Collections.unmodifiableList(chunks_); } else { @@ -4066,7 +4250,7 @@ public int getChunksCount() { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public MutationChunk getChunks(int index) { + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk getChunks(int index) { if (chunksBuilder_ == null) { return chunks_.get(index); } else { @@ -4085,7 +4269,8 @@ public MutationChunk getChunks(int index) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder setChunks(int index, MutationChunk value) { + public Builder setChunks( + int index, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk value) { if (chunksBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -4110,7 +4295,9 @@ public Builder setChunks(int index, MutationChunk value) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder setChunks(int index, MutationChunk.Builder builderForValue) { + public Builder setChunks( + int index, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder builderForValue) { if (chunksBuilder_ == null) { ensureChunksIsMutable(); chunks_.set(index, builderForValue.build()); @@ -4132,7 +4319,8 @@ public Builder setChunks(int index, MutationChunk.Builder builderForValue) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder addChunks(MutationChunk value) { + public Builder addChunks( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk value) { if (chunksBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -4157,7 +4345,8 @@ public Builder addChunks(MutationChunk value) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder addChunks(int index, MutationChunk value) { + public Builder addChunks( + int index, com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk value) { if (chunksBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -4182,7 +4371,8 @@ public Builder addChunks(int index, MutationChunk value) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder addChunks(MutationChunk.Builder builderForValue) { + public Builder addChunks( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder builderForValue) { if (chunksBuilder_ == null) { ensureChunksIsMutable(); chunks_.add(builderForValue.build()); @@ -4204,7 +4394,9 @@ public Builder addChunks(MutationChunk.Builder builderForValue) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder addChunks(int index, MutationChunk.Builder builderForValue) { + public Builder addChunks( + int index, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder builderForValue) { if (chunksBuilder_ == null) { ensureChunksIsMutable(); chunks_.add(index, builderForValue.build()); @@ -4226,7 +4418,10 @@ public Builder addChunks(int index, MutationChunk.Builder builderForValue) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public Builder addAllChunks(Iterable values) { + public Builder addAllChunks( + java.lang.Iterable< + ? extends com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk> + values) { if (chunksBuilder_ == null) { ensureChunksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunks_); @@ -4292,7 +4487,8 @@ public Builder removeChunks(int index) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public MutationChunk.Builder getChunksBuilder(int index) { + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder getChunksBuilder( + int index) { return getChunksFieldBuilder().getBuilder(index); } /** @@ -4307,7 +4503,8 @@ public MutationChunk.Builder getChunksBuilder(int index) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public MutationChunkOrBuilder getChunksOrBuilder(int index) { + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder + getChunksOrBuilder(int index) { if (chunksBuilder_ == null) { return chunks_.get(index); } else { @@ -4326,7 +4523,9 @@ public MutationChunkOrBuilder getChunksOrBuilder(int index) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public java.util.List getChunksOrBuilderList() { + public java.util.List< + ? extends com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder> + getChunksOrBuilderList() { if (chunksBuilder_ != null) { return chunksBuilder_.getMessageOrBuilderList(); } else { @@ -4345,8 +4544,11 @@ public java.util.List getChunksOrBuilderList() * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public MutationChunk.Builder addChunksBuilder() { - return getChunksFieldBuilder().addBuilder(MutationChunk.getDefaultInstance()); + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder + addChunksBuilder() { + return getChunksFieldBuilder() + .addBuilder( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()); } /** * @@ -4360,8 +4562,12 @@ public MutationChunk.Builder addChunksBuilder() { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public MutationChunk.Builder addChunksBuilder(int index) { - return getChunksFieldBuilder().addBuilder(index, MutationChunk.getDefaultInstance()); + public com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder addChunksBuilder( + int index) { + return getChunksFieldBuilder() + .addBuilder( + index, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.getDefaultInstance()); } /** * @@ -4375,17 +4581,22 @@ public MutationChunk.Builder addChunksBuilder(int index) { * repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; * */ - public java.util.List getChunksBuilderList() { + public java.util.List + getChunksBuilderList() { return getChunksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - MutationChunk, MutationChunk.Builder, MutationChunkOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder> getChunksFieldBuilder() { if (chunksBuilder_ == null) { chunksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - MutationChunk, MutationChunk.Builder, MutationChunkOrBuilder>( + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.MutationChunkOrBuilder>( chunks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); chunks_ = null; } @@ -4405,7 +4616,7 @@ public java.util.List getChunksBuilderList() { * * @return The done. */ - @Override + @java.lang.Override public boolean getDone() { return done_; } @@ -4447,7 +4658,7 @@ public Builder clearDone() { return this; } - private Object token_ = ""; + private java.lang.Object token_ = ""; /** * * @@ -4460,15 +4671,15 @@ public Builder clearDone() { * * @return The token. */ - public String getToken() { - Object ref = token_; - if (!(ref instanceof String)) { + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + java.lang.String s = bs.toStringUtf8(); token_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** @@ -4484,10 +4695,10 @@ public String getToken() { * @return The bytes for token. */ public com.google.protobuf.ByteString getTokenBytes() { - Object ref = token_; + java.lang.Object ref = token_; if (ref instanceof String) { com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); token_ = b; return b; } else { @@ -4507,7 +4718,7 @@ public com.google.protobuf.ByteString getTokenBytes() { * @param value The token to set. * @return This builder for chaining. */ - public Builder setToken(String value) { + public Builder setToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); } @@ -4761,13 +4972,13 @@ public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { return lowWatermarkBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -4777,19 +4988,20 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.DataChange) - private static final DataChange DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamResponse.DataChange + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new DataChange(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadChangeStreamResponse.DataChange(); } - public static DataChange getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public DataChange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -4802,13 +5014,13 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public DataChange getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -4843,7 +5055,7 @@ public interface HeartbeatOrBuilder * * @return The continuationToken. */ - StreamContinuationToken getContinuationToken(); + com.google.bigtable.v2.StreamContinuationToken getContinuationToken(); /** * * @@ -4854,7 +5066,7 @@ public interface HeartbeatOrBuilder * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder(); + com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder(); /** * @@ -4919,13 +5131,13 @@ private Heartbeat(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Heartbeat() {} - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Heartbeat(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -4936,7 +5148,7 @@ private Heartbeat( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); @@ -4950,12 +5162,13 @@ private Heartbeat( break; case 10: { - StreamContinuationToken.Builder subBuilder = null; + com.google.bigtable.v2.StreamContinuationToken.Builder subBuilder = null; if (continuationToken_ != null) { subBuilder = continuationToken_.toBuilder(); } continuationToken_ = - input.readMessage(StreamContinuationToken.parser(), extensionRegistry); + input.readMessage( + com.google.bigtable.v2.StreamContinuationToken.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(continuationToken_); continuationToken_ = subBuilder.buildPartial(); @@ -5000,19 +5213,22 @@ private Heartbeat( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable - .ensureFieldAccessorsInitialized(Heartbeat.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.class, + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder.class); } public static final int CONTINUATION_TOKEN_FIELD_NUMBER = 1; - private StreamContinuationToken continuationToken_; + private com.google.bigtable.v2.StreamContinuationToken continuationToken_; /** * * @@ -5025,7 +5241,7 @@ protected FieldAccessorTable internalGetFieldAccessorTable() { * * @return Whether the continuationToken field is set. */ - @Override + @java.lang.Override public boolean hasContinuationToken() { return continuationToken_ != null; } @@ -5041,10 +5257,10 @@ public boolean hasContinuationToken() { * * @return The continuationToken. */ - @Override - public StreamContinuationToken getContinuationToken() { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationToken getContinuationToken() { return continuationToken_ == null - ? StreamContinuationToken.getDefaultInstance() + ? com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance() : continuationToken_; } /** @@ -5057,8 +5273,8 @@ public StreamContinuationToken getContinuationToken() { * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - @Override - public StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { return getContinuationToken(); } @@ -5077,7 +5293,7 @@ public StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { * * @return Whether the lowWatermark field is set. */ - @Override + @java.lang.Override public boolean hasLowWatermark() { return lowWatermark_ != null; } @@ -5094,7 +5310,7 @@ public boolean hasLowWatermark() { * * @return The lowWatermark. */ - @Override + @java.lang.Override public com.google.protobuf.Timestamp getLowWatermark() { return lowWatermark_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() @@ -5111,14 +5327,14 @@ public com.google.protobuf.Timestamp getLowWatermark() { * * .google.protobuf.Timestamp low_watermark = 2; */ - @Override + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { return getLowWatermark(); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -5128,7 +5344,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (continuationToken_ != null) { output.writeMessage(1, getContinuationToken()); @@ -5139,7 +5355,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -5156,15 +5372,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof Heartbeat)) { + if (!(obj instanceof com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat)) { return super.equals(obj); } - Heartbeat other = (Heartbeat) obj; + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat other = + (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) obj; if (hasContinuationToken() != other.hasContinuationToken()) return false; if (hasContinuationToken()) { @@ -5178,7 +5395,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -5198,69 +5415,71 @@ public int hashCode() { return hash; } - public static Heartbeat parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Heartbeat parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Heartbeat parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Heartbeat parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Heartbeat parseFrom(byte[] data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static Heartbeat parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static Heartbeat parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static Heartbeat parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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 Heartbeat parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static Heartbeat parseDelimitedFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat 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 Heartbeat parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static Heartbeat parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5268,7 +5487,7 @@ public static Heartbeat parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -5277,17 +5496,19 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Heartbeat prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -5305,17 +5526,20 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) - HeartbeatOrBuilder { + com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_fieldAccessorTable - .ensureFieldAccessorsInitialized(Heartbeat.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.class, + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder.class); } // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.newBuilder() @@ -5323,7 +5547,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -5332,7 +5556,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); if (continuationTokenBuilder_ == null) { @@ -5350,29 +5574,30 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_Heartbeat_descriptor; } - @Override - public Heartbeat getDefaultInstanceForType() { - return Heartbeat.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } - @Override - public Heartbeat build() { - Heartbeat result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat build() { + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public Heartbeat buildPartial() { - Heartbeat result = new Heartbeat(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat buildPartial() { + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat result = + new com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(this); if (continuationTokenBuilder_ == null) { result.continuationToken_ = continuationToken_; } else { @@ -5387,50 +5612,54 @@ public Heartbeat buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Heartbeat) { - return mergeFrom((Heartbeat) other); + if (other instanceof com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) { + return mergeFrom((com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Heartbeat other) { - if (other == Heartbeat.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat other) { + if (other == com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance()) + return this; if (other.hasContinuationToken()) { mergeContinuationToken(other.getContinuationToken()); } @@ -5442,21 +5671,22 @@ public Builder mergeFrom(Heartbeat other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - Heartbeat parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Heartbeat) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -5466,11 +5696,11 @@ public Builder mergeFrom( return this; } - private StreamContinuationToken continuationToken_; + private com.google.bigtable.v2.StreamContinuationToken continuationToken_; private com.google.protobuf.SingleFieldBuilderV3< - StreamContinuationToken, - StreamContinuationToken.Builder, - StreamContinuationTokenOrBuilder> + com.google.bigtable.v2.StreamContinuationToken, + com.google.bigtable.v2.StreamContinuationToken.Builder, + com.google.bigtable.v2.StreamContinuationTokenOrBuilder> continuationTokenBuilder_; /** * @@ -5499,10 +5729,10 @@ public boolean hasContinuationToken() { * * @return The continuationToken. */ - public StreamContinuationToken getContinuationToken() { + public com.google.bigtable.v2.StreamContinuationToken getContinuationToken() { if (continuationTokenBuilder_ == null) { return continuationToken_ == null - ? StreamContinuationToken.getDefaultInstance() + ? com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance() : continuationToken_; } else { return continuationTokenBuilder_.getMessage(); @@ -5518,7 +5748,7 @@ public StreamContinuationToken getContinuationToken() { * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - public Builder setContinuationToken(StreamContinuationToken value) { + public Builder setContinuationToken(com.google.bigtable.v2.StreamContinuationToken value) { if (continuationTokenBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5541,7 +5771,8 @@ public Builder setContinuationToken(StreamContinuationToken value) { * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - public Builder setContinuationToken(StreamContinuationToken.Builder builderForValue) { + public Builder setContinuationToken( + com.google.bigtable.v2.StreamContinuationToken.Builder builderForValue) { if (continuationTokenBuilder_ == null) { continuationToken_ = builderForValue.build(); onChanged(); @@ -5561,11 +5792,11 @@ public Builder setContinuationToken(StreamContinuationToken.Builder builderForVa * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - public Builder mergeContinuationToken(StreamContinuationToken value) { + public Builder mergeContinuationToken(com.google.bigtable.v2.StreamContinuationToken value) { if (continuationTokenBuilder_ == null) { if (continuationToken_ != null) { continuationToken_ = - StreamContinuationToken.newBuilder(continuationToken_) + com.google.bigtable.v2.StreamContinuationToken.newBuilder(continuationToken_) .mergeFrom(value) .buildPartial(); } else { @@ -5609,7 +5840,7 @@ public Builder clearContinuationToken() { * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - public StreamContinuationToken.Builder getContinuationTokenBuilder() { + public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTokenBuilder() { onChanged(); return getContinuationTokenFieldBuilder().getBuilder(); @@ -5624,12 +5855,13 @@ public StreamContinuationToken.Builder getContinuationTokenBuilder() { * * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ - public StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { + public com.google.bigtable.v2.StreamContinuationTokenOrBuilder + getContinuationTokenOrBuilder() { if (continuationTokenBuilder_ != null) { return continuationTokenBuilder_.getMessageOrBuilder(); } else { return continuationToken_ == null - ? StreamContinuationToken.getDefaultInstance() + ? com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance() : continuationToken_; } } @@ -5644,16 +5876,16 @@ public StreamContinuationTokenOrBuilder getContinuationTokenOrBuilder() { * .google.bigtable.v2.StreamContinuationToken continuation_token = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - StreamContinuationToken, - StreamContinuationToken.Builder, - StreamContinuationTokenOrBuilder> + com.google.bigtable.v2.StreamContinuationToken, + com.google.bigtable.v2.StreamContinuationToken.Builder, + com.google.bigtable.v2.StreamContinuationTokenOrBuilder> getContinuationTokenFieldBuilder() { if (continuationTokenBuilder_ == null) { continuationTokenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - StreamContinuationToken, - StreamContinuationToken.Builder, - StreamContinuationTokenOrBuilder>( + com.google.bigtable.v2.StreamContinuationToken, + com.google.bigtable.v2.StreamContinuationToken.Builder, + com.google.bigtable.v2.StreamContinuationTokenOrBuilder>( getContinuationToken(), getParentForChildren(), isClean()); continuationToken_ = null; } @@ -5863,13 +6095,13 @@ public com.google.protobuf.TimestampOrBuilder getLowWatermarkOrBuilder() { return lowWatermarkBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -5879,19 +6111,19 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) - private static final Heartbeat DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Heartbeat(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat(); } - public static Heartbeat getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public Heartbeat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -5904,13 +6136,13 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public Heartbeat getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -5965,7 +6197,7 @@ public interface CloseStreamOrBuilder * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - java.util.List getContinuationTokensList(); + java.util.List getContinuationTokensList(); /** * * @@ -5976,7 +6208,7 @@ public interface CloseStreamOrBuilder * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - StreamContinuationToken getContinuationTokens(int index); + com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index); /** * * @@ -5998,7 +6230,8 @@ public interface CloseStreamOrBuilder * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - java.util.List getContinuationTokensOrBuilderList(); + java.util.List + getContinuationTokensOrBuilderList(); /** * * @@ -6009,7 +6242,8 @@ public interface CloseStreamOrBuilder * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index); + com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder( + int index); } /** * @@ -6038,13 +6272,13 @@ private CloseStream() { continuationTokens_ = java.util.Collections.emptyList(); } - @Override + @java.lang.Override @SuppressWarnings({"unused"}) - protected Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new CloseStream(); } - @Override + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } @@ -6055,7 +6289,7 @@ private CloseStream( throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { - throw new NullPointerException(); + throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = @@ -6085,11 +6319,14 @@ private CloseStream( case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { - continuationTokens_ = new java.util.ArrayList(); + continuationTokens_ = + new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } continuationTokens_.add( - input.readMessage(StreamContinuationToken.parser(), extensionRegistry)); + input.readMessage( + com.google.bigtable.v2.StreamContinuationToken.parser(), + extensionRegistry)); break; } default: @@ -6117,15 +6354,18 @@ private CloseStream( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable - .ensureFieldAccessorsInitialized(CloseStream.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.class, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder.class); } public static final int STATUS_FIELD_NUMBER = 1; @@ -6141,7 +6381,7 @@ protected FieldAccessorTable internalGetFieldAccessorTable() { * * @return Whether the status field is set. */ - @Override + @java.lang.Override public boolean hasStatus() { return status_ != null; } @@ -6156,7 +6396,7 @@ public boolean hasStatus() { * * @return The status. */ - @Override + @java.lang.Override public com.google.rpc.Status getStatus() { return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; } @@ -6169,13 +6409,13 @@ public com.google.rpc.Status getStatus() { * * .google.rpc.Status status = 1; */ - @Override + @java.lang.Override public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return getStatus(); } public static final int CONTINUATION_TOKENS_FIELD_NUMBER = 2; - private java.util.List continuationTokens_; + private java.util.List continuationTokens_; /** * * @@ -6186,8 +6426,9 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - @Override - public java.util.List getContinuationTokensList() { + @java.lang.Override + public java.util.List + getContinuationTokensList() { return continuationTokens_; } /** @@ -6200,8 +6441,8 @@ public java.util.List getContinuationTokensList() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - @Override - public java.util.List + @java.lang.Override + public java.util.List getContinuationTokensOrBuilderList() { return continuationTokens_; } @@ -6215,7 +6456,7 @@ public java.util.List getContinuationTokensList() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - @Override + @java.lang.Override public int getContinuationTokensCount() { return continuationTokens_.size(); } @@ -6229,8 +6470,8 @@ public int getContinuationTokensCount() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - @Override - public StreamContinuationToken getContinuationTokens(int index) { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index) { return continuationTokens_.get(index); } /** @@ -6243,14 +6484,15 @@ public StreamContinuationToken getContinuationTokens(int index) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - @Override - public StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index) { + @java.lang.Override + public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder( + int index) { return continuationTokens_.get(index); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -6260,7 +6502,7 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (status_ != null) { output.writeMessage(1, getStatus()); @@ -6271,7 +6513,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -6289,15 +6531,16 @@ public int getSerializedSize() { return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof CloseStream)) { + if (!(obj instanceof com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream)) { return super.equals(obj); } - CloseStream other = (CloseStream) obj; + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream other = + (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) obj; if (hasStatus() != other.hasStatus()) return false; if (hasStatus()) { @@ -6308,7 +6551,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -6328,69 +6571,71 @@ public int hashCode() { return hash; } - public static CloseStream parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static CloseStream parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static CloseStream parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static CloseStream parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static CloseStream parseFrom(byte[] data) + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static CloseStream parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static CloseStream parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static CloseStream parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream 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 CloseStream parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static CloseStream parseDelimitedFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream 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 CloseStream parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static CloseStream parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6398,7 +6643,7 @@ public static CloseStream parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -6407,17 +6652,19 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(CloseStream prototype) { + public static Builder newBuilder( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -6438,17 +6685,20 @@ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) - CloseStreamOrBuilder { + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_fieldAccessorTable - .ensureFieldAccessorsInitialized(CloseStream.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.class, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder.class); } // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newBuilder() @@ -6456,7 +6706,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -6467,7 +6717,7 @@ private void maybeForceBuilderInitialization() { } } - @Override + @java.lang.Override public Builder clear() { super.clear(); if (statusBuilder_ == null) { @@ -6485,29 +6735,31 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_CloseStream_descriptor; } - @Override - public CloseStream getDefaultInstanceForType() { - return CloseStream.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream + getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } - @Override - public CloseStream build() { - CloseStream result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream build() { + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public CloseStream buildPartial() { - CloseStream result = new CloseStream(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream buildPartial() { + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream result = + new com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(this); int from_bitField0_ = bitField0_; if (statusBuilder_ == null) { result.status_ = status_; @@ -6527,50 +6779,55 @@ public CloseStream buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof CloseStream) { - return mergeFrom((CloseStream) other); + if (other instanceof com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) { + return mergeFrom((com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(CloseStream other) { - if (other == CloseStream.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream other) { + if (other + == com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance()) + return this; if (other.hasStatus()) { mergeStatus(other.getStatus()); } @@ -6606,21 +6863,23 @@ public Builder mergeFrom(CloseStream other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - CloseStream parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (CloseStream) e.getUnfinishedMessage(); + parsedMessage = + (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) + e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -6805,21 +7064,22 @@ public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { return statusBuilder_; } - private java.util.List continuationTokens_ = + private java.util.List continuationTokens_ = java.util.Collections.emptyList(); private void ensureContinuationTokensIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { continuationTokens_ = - new java.util.ArrayList(continuationTokens_); + new java.util.ArrayList( + continuationTokens_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< - StreamContinuationToken, - StreamContinuationToken.Builder, - StreamContinuationTokenOrBuilder> + com.google.bigtable.v2.StreamContinuationToken, + com.google.bigtable.v2.StreamContinuationToken.Builder, + com.google.bigtable.v2.StreamContinuationTokenOrBuilder> continuationTokensBuilder_; /** @@ -6832,7 +7092,8 @@ private void ensureContinuationTokensIsMutable() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public java.util.List getContinuationTokensList() { + public java.util.List + getContinuationTokensList() { if (continuationTokensBuilder_ == null) { return java.util.Collections.unmodifiableList(continuationTokens_); } else { @@ -6866,7 +7127,7 @@ public int getContinuationTokensCount() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public StreamContinuationToken getContinuationTokens(int index) { + public com.google.bigtable.v2.StreamContinuationToken getContinuationTokens(int index) { if (continuationTokensBuilder_ == null) { return continuationTokens_.get(index); } else { @@ -6883,7 +7144,8 @@ public StreamContinuationToken getContinuationTokens(int index) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public Builder setContinuationTokens(int index, StreamContinuationToken value) { + public Builder setContinuationTokens( + int index, com.google.bigtable.v2.StreamContinuationToken value) { if (continuationTokensBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6907,7 +7169,7 @@ public Builder setContinuationTokens(int index, StreamContinuationToken value) { * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ public Builder setContinuationTokens( - int index, StreamContinuationToken.Builder builderForValue) { + int index, com.google.bigtable.v2.StreamContinuationToken.Builder builderForValue) { if (continuationTokensBuilder_ == null) { ensureContinuationTokensIsMutable(); continuationTokens_.set(index, builderForValue.build()); @@ -6927,7 +7189,7 @@ public Builder setContinuationTokens( * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public Builder addContinuationTokens(StreamContinuationToken value) { + public Builder addContinuationTokens(com.google.bigtable.v2.StreamContinuationToken value) { if (continuationTokensBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6950,7 +7212,8 @@ public Builder addContinuationTokens(StreamContinuationToken value) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public Builder addContinuationTokens(int index, StreamContinuationToken value) { + public Builder addContinuationTokens( + int index, com.google.bigtable.v2.StreamContinuationToken value) { if (continuationTokensBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -6973,7 +7236,8 @@ public Builder addContinuationTokens(int index, StreamContinuationToken value) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public Builder addContinuationTokens(StreamContinuationToken.Builder builderForValue) { + public Builder addContinuationTokens( + com.google.bigtable.v2.StreamContinuationToken.Builder builderForValue) { if (continuationTokensBuilder_ == null) { ensureContinuationTokensIsMutable(); continuationTokens_.add(builderForValue.build()); @@ -6994,7 +7258,7 @@ public Builder addContinuationTokens(StreamContinuationToken.Builder builderForV * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ public Builder addContinuationTokens( - int index, StreamContinuationToken.Builder builderForValue) { + int index, com.google.bigtable.v2.StreamContinuationToken.Builder builderForValue) { if (continuationTokensBuilder_ == null) { ensureContinuationTokensIsMutable(); continuationTokens_.add(index, builderForValue.build()); @@ -7014,7 +7278,8 @@ public Builder addContinuationTokens( * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public Builder addAllContinuationTokens(Iterable values) { + public Builder addAllContinuationTokens( + java.lang.Iterable values) { if (continuationTokensBuilder_ == null) { ensureContinuationTokensIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, continuationTokens_); @@ -7074,7 +7339,8 @@ public Builder removeContinuationTokens(int index) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public StreamContinuationToken.Builder getContinuationTokensBuilder(int index) { + public com.google.bigtable.v2.StreamContinuationToken.Builder getContinuationTokensBuilder( + int index) { return getContinuationTokensFieldBuilder().getBuilder(index); } /** @@ -7087,7 +7353,8 @@ public StreamContinuationToken.Builder getContinuationTokensBuilder(int index) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index) { + public com.google.bigtable.v2.StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder( + int index) { if (continuationTokensBuilder_ == null) { return continuationTokens_.get(index); } else { @@ -7104,7 +7371,7 @@ public StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public java.util.List + public java.util.List getContinuationTokensOrBuilderList() { if (continuationTokensBuilder_ != null) { return continuationTokensBuilder_.getMessageOrBuilderList(); @@ -7122,9 +7389,9 @@ public StreamContinuationTokenOrBuilder getContinuationTokensOrBuilder(int index * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public StreamContinuationToken.Builder addContinuationTokensBuilder() { + public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTokensBuilder() { return getContinuationTokensFieldBuilder() - .addBuilder(StreamContinuationToken.getDefaultInstance()); + .addBuilder(com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } /** * @@ -7136,9 +7403,10 @@ public StreamContinuationToken.Builder addContinuationTokensBuilder() { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public StreamContinuationToken.Builder addContinuationTokensBuilder(int index) { + public com.google.bigtable.v2.StreamContinuationToken.Builder addContinuationTokensBuilder( + int index) { return getContinuationTokensFieldBuilder() - .addBuilder(index, StreamContinuationToken.getDefaultInstance()); + .addBuilder(index, com.google.bigtable.v2.StreamContinuationToken.getDefaultInstance()); } /** * @@ -7150,21 +7418,22 @@ public StreamContinuationToken.Builder addContinuationTokensBuilder(int index) { * * repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; */ - public java.util.List getContinuationTokensBuilderList() { + public java.util.List + getContinuationTokensBuilderList() { return getContinuationTokensFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< - StreamContinuationToken, - StreamContinuationToken.Builder, - StreamContinuationTokenOrBuilder> + com.google.bigtable.v2.StreamContinuationToken, + com.google.bigtable.v2.StreamContinuationToken.Builder, + com.google.bigtable.v2.StreamContinuationTokenOrBuilder> getContinuationTokensFieldBuilder() { if (continuationTokensBuilder_ == null) { continuationTokensBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - StreamContinuationToken, - StreamContinuationToken.Builder, - StreamContinuationTokenOrBuilder>( + com.google.bigtable.v2.StreamContinuationToken, + com.google.bigtable.v2.StreamContinuationToken.Builder, + com.google.bigtable.v2.StreamContinuationTokenOrBuilder>( continuationTokens_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), @@ -7174,13 +7443,13 @@ public java.util.List getContinuationTokensBuil return continuationTokensBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -7190,19 +7459,20 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse.CloseStream) - private static final CloseStream DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream + DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new CloseStream(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream(); } - public static CloseStream getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public CloseStream parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -7215,21 +7485,24 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public CloseStream getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int streamRecordCase_ = 0; - private Object streamRecord_; + private java.lang.Object streamRecord_; - public enum StreamRecordCase implements com.google.protobuf.Internal.EnumLite, InternalOneOfEnum { + public enum StreamRecordCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { DATA_CHANGE(1), HEARTBEAT(2), CLOSE_STREAM(3), @@ -7244,7 +7517,7 @@ private StreamRecordCase(int value) { * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ - @Deprecated + @java.lang.Deprecated public static StreamRecordCase valueOf(int value) { return forNumber(value); } @@ -7285,7 +7558,7 @@ public StreamRecordCase getStreamRecordCase() { * * @return Whether the dataChange field is set. */ - @Override + @java.lang.Override public boolean hasDataChange() { return streamRecordCase_ == 1; } @@ -7300,12 +7573,12 @@ public boolean hasDataChange() { * * @return The dataChange. */ - @Override - public DataChange getDataChange() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange() { if (streamRecordCase_ == 1) { - return (DataChange) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_; } - return DataChange.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } /** * @@ -7316,12 +7589,13 @@ public DataChange getDataChange() { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - @Override - public DataChangeOrBuilder getDataChangeOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder + getDataChangeOrBuilder() { if (streamRecordCase_ == 1) { - return (DataChange) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_; } - return DataChange.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } public static final int HEARTBEAT_FIELD_NUMBER = 2; @@ -7336,7 +7610,7 @@ public DataChangeOrBuilder getDataChangeOrBuilder() { * * @return Whether the heartbeat field is set. */ - @Override + @java.lang.Override public boolean hasHeartbeat() { return streamRecordCase_ == 2; } @@ -7351,12 +7625,12 @@ public boolean hasHeartbeat() { * * @return The heartbeat. */ - @Override - public Heartbeat getHeartbeat() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() { if (streamRecordCase_ == 2) { - return (Heartbeat) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_; } - return Heartbeat.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } /** * @@ -7367,12 +7641,13 @@ public Heartbeat getHeartbeat() { * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - @Override - public HeartbeatOrBuilder getHeartbeatOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder + getHeartbeatOrBuilder() { if (streamRecordCase_ == 2) { - return (Heartbeat) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_; } - return Heartbeat.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } public static final int CLOSE_STREAM_FIELD_NUMBER = 3; @@ -7387,7 +7662,7 @@ public HeartbeatOrBuilder getHeartbeatOrBuilder() { * * @return Whether the closeStream field is set. */ - @Override + @java.lang.Override public boolean hasCloseStream() { return streamRecordCase_ == 3; } @@ -7402,12 +7677,12 @@ public boolean hasCloseStream() { * * @return The closeStream. */ - @Override - public CloseStream getCloseStream() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStream() { if (streamRecordCase_ == 3) { - return (CloseStream) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_; } - return CloseStream.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } /** * @@ -7418,17 +7693,18 @@ public CloseStream getCloseStream() { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - @Override - public CloseStreamOrBuilder getCloseStreamOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder + getCloseStreamOrBuilder() { if (streamRecordCase_ == 3) { - return (CloseStream) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_; } - return CloseStream.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } private byte memoizedIsInitialized = -1; - @Override + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -7438,21 +7714,24 @@ public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (streamRecordCase_ == 1) { - output.writeMessage(1, (DataChange) streamRecord_); + output.writeMessage( + 1, (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_); } if (streamRecordCase_ == 2) { - output.writeMessage(2, (Heartbeat) streamRecord_); + output.writeMessage( + 2, (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_); } if (streamRecordCase_ == 3) { - output.writeMessage(3, (CloseStream) streamRecord_); + output.writeMessage( + 3, (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_); } unknownFields.writeTo(output); } - @Override + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -7460,30 +7739,34 @@ public int getSerializedSize() { size = 0; if (streamRecordCase_ == 1) { size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, (DataChange) streamRecord_); + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_); } if (streamRecordCase_ == 2) { size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, (Heartbeat) streamRecord_); + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_); } if (streamRecordCase_ == 3) { size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, (CloseStream) streamRecord_); + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof ReadChangeStreamResponse)) { + if (!(obj instanceof com.google.bigtable.v2.ReadChangeStreamResponse)) { return super.equals(obj); } - ReadChangeStreamResponse other = (ReadChangeStreamResponse) obj; + com.google.bigtable.v2.ReadChangeStreamResponse other = + (com.google.bigtable.v2.ReadChangeStreamResponse) obj; if (!getStreamRecordCase().equals(other.getStreamRecordCase())) return false; switch (streamRecordCase_) { @@ -7503,7 +7786,7 @@ public boolean equals(final Object obj) { return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; @@ -7531,70 +7814,71 @@ public int hashCode() { return hash; } - public static ReadChangeStreamResponse parseFrom(java.nio.ByteBuffer data) + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ReadChangeStreamResponse parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ReadChangeStreamResponse parseFrom(com.google.protobuf.ByteString data) + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ReadChangeStreamResponse parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ReadChangeStreamResponse parseFrom(byte[] data) + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static ReadChangeStreamResponse parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static ReadChangeStreamResponse parseFrom(java.io.InputStream input) + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ReadChangeStreamResponse parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse 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 ReadChangeStreamResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static ReadChangeStreamResponse parseDelimitedFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse 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 ReadChangeStreamResponse parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static ReadChangeStreamResponse parseFrom( + public static com.google.bigtable.v2.ReadChangeStreamResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7602,7 +7886,7 @@ public static ReadChangeStreamResponse parseFrom( PARSER, input, extensionRegistry); } - @Override + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } @@ -7611,17 +7895,17 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(ReadChangeStreamResponse prototype) { + public static Builder newBuilder(com.google.bigtable.v2.ReadChangeStreamResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @Override + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - @Override - protected Builder newBuilderForType(BuilderParent parent) { + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -7638,16 +7922,20 @@ protected Builder newBuilderForType(BuilderParent parent) { public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadChangeStreamResponse) - ReadChangeStreamResponseOrBuilder { + com.google.bigtable.v2.ReadChangeStreamResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; } - @Override - protected FieldAccessorTable internalGetFieldAccessorTable() { - return BigtableProto + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized(ReadChangeStreamResponse.class, Builder.class); + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadChangeStreamResponse.class, + com.google.bigtable.v2.ReadChangeStreamResponse.Builder.class); } // Construct using com.google.bigtable.v2.ReadChangeStreamResponse.newBuilder() @@ -7655,7 +7943,7 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } @@ -7664,7 +7952,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } - @Override + @java.lang.Override public Builder clear() { super.clear(); streamRecordCase_ = 0; @@ -7672,28 +7960,30 @@ public Builder clear() { return this; } - @Override + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return BigtableProto.internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor; } - @Override - public ReadChangeStreamResponse getDefaultInstanceForType() { - return ReadChangeStreamResponse.getDefaultInstance(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadChangeStreamResponse.getDefaultInstance(); } - @Override - public ReadChangeStreamResponse build() { - ReadChangeStreamResponse result = buildPartial(); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse build() { + com.google.bigtable.v2.ReadChangeStreamResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - @Override - public ReadChangeStreamResponse buildPartial() { - ReadChangeStreamResponse result = new ReadChangeStreamResponse(this); + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse buildPartial() { + com.google.bigtable.v2.ReadChangeStreamResponse result = + new com.google.bigtable.v2.ReadChangeStreamResponse(this); if (streamRecordCase_ == 1) { if (dataChangeBuilder_ == null) { result.streamRecord_ = streamRecord_; @@ -7720,50 +8010,52 @@ public ReadChangeStreamResponse buildPartial() { return result; } - @Override + @java.lang.Override public Builder clone() { return super.clone(); } - @Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } - @Override + @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @Override + @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @Override + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @Override + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } - @Override + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof ReadChangeStreamResponse) { - return mergeFrom((ReadChangeStreamResponse) other); + if (other instanceof com.google.bigtable.v2.ReadChangeStreamResponse) { + return mergeFrom((com.google.bigtable.v2.ReadChangeStreamResponse) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(ReadChangeStreamResponse other) { - if (other == ReadChangeStreamResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.bigtable.v2.ReadChangeStreamResponse other) { + if (other == com.google.bigtable.v2.ReadChangeStreamResponse.getDefaultInstance()) + return this; switch (other.getStreamRecordCase()) { case DATA_CHANGE: { @@ -7790,21 +8082,21 @@ public Builder mergeFrom(ReadChangeStreamResponse other) { return this; } - @Override + @java.lang.Override public final boolean isInitialized() { return true; } - @Override + @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - ReadChangeStreamResponse parsedMessage = null; + com.google.bigtable.v2.ReadChangeStreamResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (ReadChangeStreamResponse) e.getUnfinishedMessage(); + parsedMessage = (com.google.bigtable.v2.ReadChangeStreamResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -7815,7 +8107,7 @@ public Builder mergeFrom( } private int streamRecordCase_ = 0; - private Object streamRecord_; + private java.lang.Object streamRecord_; public StreamRecordCase getStreamRecordCase() { return StreamRecordCase.forNumber(streamRecordCase_); @@ -7829,7 +8121,9 @@ public Builder clearStreamRecord() { } private com.google.protobuf.SingleFieldBuilderV3< - DataChange, DataChange.Builder, DataChangeOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder> dataChangeBuilder_; /** * @@ -7842,7 +8136,7 @@ public Builder clearStreamRecord() { * * @return Whether the dataChange field is set. */ - @Override + @java.lang.Override public boolean hasDataChange() { return streamRecordCase_ == 1; } @@ -7857,18 +8151,18 @@ public boolean hasDataChange() { * * @return The dataChange. */ - @Override - public DataChange getDataChange() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange() { if (dataChangeBuilder_ == null) { if (streamRecordCase_ == 1) { - return (DataChange) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_; } - return DataChange.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } else { if (streamRecordCase_ == 1) { return dataChangeBuilder_.getMessage(); } - return DataChange.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } } /** @@ -7880,7 +8174,7 @@ public DataChange getDataChange() { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - public Builder setDataChange(DataChange value) { + public Builder setDataChange(com.google.bigtable.v2.ReadChangeStreamResponse.DataChange value) { if (dataChangeBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -7902,7 +8196,8 @@ public Builder setDataChange(DataChange value) { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - public Builder setDataChange(DataChange.Builder builderForValue) { + public Builder setDataChange( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder builderForValue) { if (dataChangeBuilder_ == null) { streamRecord_ = builderForValue.build(); onChanged(); @@ -7921,11 +8216,18 @@ public Builder setDataChange(DataChange.Builder builderForValue) { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - public Builder mergeDataChange(DataChange value) { + public Builder mergeDataChange( + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange value) { if (dataChangeBuilder_ == null) { - if (streamRecordCase_ == 1 && streamRecord_ != DataChange.getDefaultInstance()) { + if (streamRecordCase_ == 1 + && streamRecord_ + != com.google.bigtable.v2.ReadChangeStreamResponse.DataChange + .getDefaultInstance()) { streamRecord_ = - DataChange.newBuilder((DataChange) streamRecord_).mergeFrom(value).buildPartial(); + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.newBuilder( + (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_) + .mergeFrom(value) + .buildPartial(); } else { streamRecord_ = value; } @@ -7974,7 +8276,8 @@ public Builder clearDataChange() { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - public DataChange.Builder getDataChangeBuilder() { + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder + getDataChangeBuilder() { return getDataChangeFieldBuilder().getBuilder(); } /** @@ -7986,15 +8289,16 @@ public DataChange.Builder getDataChangeBuilder() { * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - @Override - public DataChangeOrBuilder getDataChangeOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder + getDataChangeOrBuilder() { if ((streamRecordCase_ == 1) && (dataChangeBuilder_ != null)) { return dataChangeBuilder_.getMessageOrBuilder(); } else { if (streamRecordCase_ == 1) { - return (DataChange) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_; } - return DataChange.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } } /** @@ -8007,16 +8311,23 @@ public DataChangeOrBuilder getDataChangeOrBuilder() { * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ private com.google.protobuf.SingleFieldBuilderV3< - DataChange, DataChange.Builder, DataChangeOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder> getDataChangeFieldBuilder() { if (dataChangeBuilder_ == null) { if (!(streamRecordCase_ == 1)) { - streamRecord_ = DataChange.getDefaultInstance(); + streamRecord_ = + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.getDefaultInstance(); } dataChangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - DataChange, DataChange.Builder, DataChangeOrBuilder>( - (DataChange) streamRecord_, getParentForChildren(), isClean()); + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder>( + (com.google.bigtable.v2.ReadChangeStreamResponse.DataChange) streamRecord_, + getParentForChildren(), + isClean()); streamRecord_ = null; } streamRecordCase_ = 1; @@ -8026,7 +8337,9 @@ public DataChangeOrBuilder getDataChangeOrBuilder() { } private com.google.protobuf.SingleFieldBuilderV3< - Heartbeat, Heartbeat.Builder, HeartbeatOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder> heartbeatBuilder_; /** * @@ -8039,7 +8352,7 @@ public DataChangeOrBuilder getDataChangeOrBuilder() { * * @return Whether the heartbeat field is set. */ - @Override + @java.lang.Override public boolean hasHeartbeat() { return streamRecordCase_ == 2; } @@ -8054,18 +8367,18 @@ public boolean hasHeartbeat() { * * @return The heartbeat. */ - @Override - public Heartbeat getHeartbeat() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat() { if (heartbeatBuilder_ == null) { if (streamRecordCase_ == 2) { - return (Heartbeat) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_; } - return Heartbeat.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } else { if (streamRecordCase_ == 2) { return heartbeatBuilder_.getMessage(); } - return Heartbeat.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } } /** @@ -8077,7 +8390,7 @@ public Heartbeat getHeartbeat() { * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - public Builder setHeartbeat(Heartbeat value) { + public Builder setHeartbeat(com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat value) { if (heartbeatBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -8099,7 +8412,8 @@ public Builder setHeartbeat(Heartbeat value) { * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - public Builder setHeartbeat(Heartbeat.Builder builderForValue) { + public Builder setHeartbeat( + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder builderForValue) { if (heartbeatBuilder_ == null) { streamRecord_ = builderForValue.build(); onChanged(); @@ -8118,11 +8432,16 @@ public Builder setHeartbeat(Heartbeat.Builder builderForValue) { * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - public Builder mergeHeartbeat(Heartbeat value) { + public Builder mergeHeartbeat(com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat value) { if (heartbeatBuilder_ == null) { - if (streamRecordCase_ == 2 && streamRecord_ != Heartbeat.getDefaultInstance()) { + if (streamRecordCase_ == 2 + && streamRecord_ + != com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance()) { streamRecord_ = - Heartbeat.newBuilder((Heartbeat) streamRecord_).mergeFrom(value).buildPartial(); + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.newBuilder( + (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_) + .mergeFrom(value) + .buildPartial(); } else { streamRecord_ = value; } @@ -8171,7 +8490,7 @@ public Builder clearHeartbeat() { * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - public Heartbeat.Builder getHeartbeatBuilder() { + public com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder getHeartbeatBuilder() { return getHeartbeatFieldBuilder().getBuilder(); } /** @@ -8183,15 +8502,16 @@ public Heartbeat.Builder getHeartbeatBuilder() { * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - @Override - public HeartbeatOrBuilder getHeartbeatOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder + getHeartbeatOrBuilder() { if ((streamRecordCase_ == 2) && (heartbeatBuilder_ != null)) { return heartbeatBuilder_.getMessageOrBuilder(); } else { if (streamRecordCase_ == 2) { - return (Heartbeat) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_; } - return Heartbeat.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } } /** @@ -8204,16 +8524,23 @@ public HeartbeatOrBuilder getHeartbeatOrBuilder() { * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - Heartbeat, Heartbeat.Builder, HeartbeatOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder> getHeartbeatFieldBuilder() { if (heartbeatBuilder_ == null) { if (!(streamRecordCase_ == 2)) { - streamRecord_ = Heartbeat.getDefaultInstance(); + streamRecord_ = + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.getDefaultInstance(); } heartbeatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - Heartbeat, Heartbeat.Builder, HeartbeatOrBuilder>( - (Heartbeat) streamRecord_, getParentForChildren(), isClean()); + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat, + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder>( + (com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat) streamRecord_, + getParentForChildren(), + isClean()); streamRecord_ = null; } streamRecordCase_ = 2; @@ -8223,7 +8550,9 @@ public HeartbeatOrBuilder getHeartbeatOrBuilder() { } private com.google.protobuf.SingleFieldBuilderV3< - CloseStream, CloseStream.Builder, CloseStreamOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder> closeStreamBuilder_; /** * @@ -8236,7 +8565,7 @@ public HeartbeatOrBuilder getHeartbeatOrBuilder() { * * @return Whether the closeStream field is set. */ - @Override + @java.lang.Override public boolean hasCloseStream() { return streamRecordCase_ == 3; } @@ -8251,18 +8580,18 @@ public boolean hasCloseStream() { * * @return The closeStream. */ - @Override - public CloseStream getCloseStream() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStream() { if (closeStreamBuilder_ == null) { if (streamRecordCase_ == 3) { - return (CloseStream) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_; } - return CloseStream.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } else { if (streamRecordCase_ == 3) { return closeStreamBuilder_.getMessage(); } - return CloseStream.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } } /** @@ -8274,7 +8603,8 @@ public CloseStream getCloseStream() { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - public Builder setCloseStream(CloseStream value) { + public Builder setCloseStream( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream value) { if (closeStreamBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -8296,7 +8626,8 @@ public Builder setCloseStream(CloseStream value) { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - public Builder setCloseStream(CloseStream.Builder builderForValue) { + public Builder setCloseStream( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder builderForValue) { if (closeStreamBuilder_ == null) { streamRecord_ = builderForValue.build(); onChanged(); @@ -8315,11 +8646,18 @@ public Builder setCloseStream(CloseStream.Builder builderForValue) { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - public Builder mergeCloseStream(CloseStream value) { + public Builder mergeCloseStream( + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream value) { if (closeStreamBuilder_ == null) { - if (streamRecordCase_ == 3 && streamRecord_ != CloseStream.getDefaultInstance()) { + if (streamRecordCase_ == 3 + && streamRecord_ + != com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream + .getDefaultInstance()) { streamRecord_ = - CloseStream.newBuilder((CloseStream) streamRecord_).mergeFrom(value).buildPartial(); + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.newBuilder( + (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_) + .mergeFrom(value) + .buildPartial(); } else { streamRecord_ = value; } @@ -8368,7 +8706,8 @@ public Builder clearCloseStream() { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - public CloseStream.Builder getCloseStreamBuilder() { + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder + getCloseStreamBuilder() { return getCloseStreamFieldBuilder().getBuilder(); } /** @@ -8380,15 +8719,16 @@ public CloseStream.Builder getCloseStreamBuilder() { * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - @Override - public CloseStreamOrBuilder getCloseStreamOrBuilder() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder + getCloseStreamOrBuilder() { if ((streamRecordCase_ == 3) && (closeStreamBuilder_ != null)) { return closeStreamBuilder_.getMessageOrBuilder(); } else { if (streamRecordCase_ == 3) { - return (CloseStream) streamRecord_; + return (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_; } - return CloseStream.getDefaultInstance(); + return com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } } /** @@ -8401,16 +8741,23 @@ public CloseStreamOrBuilder getCloseStreamOrBuilder() { * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ private com.google.protobuf.SingleFieldBuilderV3< - CloseStream, CloseStream.Builder, CloseStreamOrBuilder> + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder> getCloseStreamFieldBuilder() { if (closeStreamBuilder_ == null) { if (!(streamRecordCase_ == 3)) { - streamRecord_ = CloseStream.getDefaultInstance(); + streamRecord_ = + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.getDefaultInstance(); } closeStreamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - CloseStream, CloseStream.Builder, CloseStreamOrBuilder>( - (CloseStream) streamRecord_, getParentForChildren(), isClean()); + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream.Builder, + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder>( + (com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream) streamRecord_, + getParentForChildren(), + isClean()); streamRecord_ = null; } streamRecordCase_ = 3; @@ -8419,12 +8766,12 @@ public CloseStreamOrBuilder getCloseStreamOrBuilder() { return closeStreamBuilder_; } - @Override + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } - @Override + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -8434,19 +8781,19 @@ public final Builder mergeUnknownFields( } // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadChangeStreamResponse) - private static final ReadChangeStreamResponse DEFAULT_INSTANCE; + private static final com.google.bigtable.v2.ReadChangeStreamResponse DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new ReadChangeStreamResponse(); + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadChangeStreamResponse(); } - public static ReadChangeStreamResponse getDefaultInstance() { + public static com.google.bigtable.v2.ReadChangeStreamResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - @Override + @java.lang.Override public ReadChangeStreamResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -8459,13 +8806,13 @@ public static com.google.protobuf.Parser parser() { return PARSER; } - @Override + @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } - @Override - public ReadChangeStreamResponse getDefaultInstanceForType() { + @java.lang.Override + public com.google.bigtable.v2.ReadChangeStreamResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java index 96f0b11d26..ad1efd09a4 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadChangeStreamResponseOrBuilder.java @@ -46,7 +46,7 @@ public interface ReadChangeStreamResponseOrBuilder * * @return The dataChange. */ - ReadChangeStreamResponse.DataChange getDataChange(); + com.google.bigtable.v2.ReadChangeStreamResponse.DataChange getDataChange(); /** * * @@ -56,7 +56,7 @@ public interface ReadChangeStreamResponseOrBuilder * * .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; */ - ReadChangeStreamResponse.DataChangeOrBuilder getDataChangeOrBuilder(); + com.google.bigtable.v2.ReadChangeStreamResponse.DataChangeOrBuilder getDataChangeOrBuilder(); /** * @@ -81,7 +81,7 @@ public interface ReadChangeStreamResponseOrBuilder * * @return The heartbeat. */ - ReadChangeStreamResponse.Heartbeat getHeartbeat(); + com.google.bigtable.v2.ReadChangeStreamResponse.Heartbeat getHeartbeat(); /** * * @@ -91,7 +91,7 @@ public interface ReadChangeStreamResponseOrBuilder * * .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; */ - ReadChangeStreamResponse.HeartbeatOrBuilder getHeartbeatOrBuilder(); + com.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatOrBuilder getHeartbeatOrBuilder(); /** * @@ -116,7 +116,7 @@ public interface ReadChangeStreamResponseOrBuilder * * @return The closeStream. */ - ReadChangeStreamResponse.CloseStream getCloseStream(); + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStream getCloseStream(); /** * * @@ -126,7 +126,7 @@ public interface ReadChangeStreamResponseOrBuilder * * .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; */ - ReadChangeStreamResponse.CloseStreamOrBuilder getCloseStreamOrBuilder(); + com.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamOrBuilder getCloseStreamOrBuilder(); - public ReadChangeStreamResponse.StreamRecordCase getStreamRecordCase(); + public com.google.bigtable.v2.ReadChangeStreamResponse.StreamRecordCase getStreamRecordCase(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto index a99bb410a1..8452338077 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto @@ -47,7 +47,7 @@ option (google.api.resource_definition) = { service Bigtable { option (google.api.default_host) = "bigtable.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/bigtable.data," + "https://www.googleapis.com/auth/bigtable.data," "https://www.googleapis.com/auth/bigtable.data.readonly," "https://www.googleapis.com/auth/cloud-bigtable.data," "https://www.googleapis.com/auth/cloud-bigtable.data.readonly," @@ -205,10 +205,9 @@ service Bigtable { // Returns the current list of partitions that make up the table's // change stream. The union of partitions will cover the entire keyspace. // Partitions can be read with `ReadChangeStream`. - rpc ListChangeStreamPartitions(ListChangeStreamPartitionsRequest) - returns (stream ListChangeStreamPartitionsResponse) { + rpc GenerateInitialChangeStreamPartitions(GenerateInitialChangeStreamPartitionsRequest) returns (stream GenerateInitialChangeStreamPartitionsResponse) { option (google.api.http) = { - post: "/v2/{table_name=projects/*/instances/*/tables/*}:listChangeStreamPartitions" + post: "/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions" body: "*" }; option (google.api.method_signature) = "table_name"; @@ -219,8 +218,7 @@ service Bigtable { // Reads changes from a table's change stream. Changes will // reflect both user-initiated mutations and mutations that are caused by // garbage collection. - rpc ReadChangeStream(ReadChangeStreamRequest) - returns (stream ReadChangeStreamResponse) { + rpc ReadChangeStream(ReadChangeStreamRequest) returns (stream ReadChangeStreamResponse) { option (google.api.http) = { post: "/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream" body: "*" @@ -521,9 +519,7 @@ message PingAndWarmRequest { } // Response message for Bigtable.PingAndWarm connection keepalive and warming. -message PingAndWarmResponse { - -} +message PingAndWarmResponse {} // Request message for Bigtable.ReadModifyWriteRow. message ReadModifyWriteRowRequest { @@ -558,10 +554,10 @@ message ReadModifyWriteRowResponse { } // NOTE: This API is not generally available. Users must be allowlisted. -// Request message for Bigtable.ListChangeStreamPartitions. -message ListChangeStreamPartitionsRequest { - // Required. The unique name of the table from which to get change stream - // partitions. Values are of the form +// Request message for Bigtable.GenerateInitialChangeStreamPartitions. +message GenerateInitialChangeStreamPartitionsRequest { + // Required. The unique name of the table from which to get change stream partitions. + // Values are of the form // `projects//instances//tables/
  • `. // Change streaming must be enabled on the table. string table_name = 1 [ @@ -578,8 +574,8 @@ message ListChangeStreamPartitionsRequest { } // NOTE: This API is not generally available. Users must be allowlisted. -// Response message for Bigtable.ListChangeStreamPartitions. -message ListChangeStreamPartitionsResponse { +// Response message for Bigtable.GenerateInitialChangeStreamPartitions. +message GenerateInitialChangeStreamPartitionsResponse { // A partition of the change stream. StreamPartition partition = 1; } From c3086d99fc2009dcc296a6267f83d017f6e789cb Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Mon, 15 Aug 2022 12:34:54 -0400 Subject: [PATCH 11/27] =?UTF-8?q?feat:=20Change=20CDC=20related=20APIs=20t?= =?UTF-8?q?o=20return=20ByteStringRange=20instead=20of=20Ro=E2=80=A6=20(#1?= =?UTF-8?q?355)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Change CDC related APIs to return ByteStringRange instead of RowRange 1. GenerateInitialChangeStreamPartitions 2. ChangeStreamContinuationToken::GetRowRange * fix: Fix tests * fix: Address comments Co-authored-by: Teng Zhong --- .../bigtable/data/v2/BigtableDataClient.java | 23 ++++++++------- .../models/ChangeStreamContinuationToken.java | 16 ++++++---- .../cloud/bigtable/data/v2/models/Range.java | 19 ++++++++++++ .../data/v2/stub/EnhancedBigtableStub.java | 26 +++++++++-------- .../v2/stub/EnhancedBigtableStubSettings.java | 8 ++--- ...ialChangeStreamPartitionsUserCallable.java | 23 +++++++-------- .../data/v2/BigtableDataClientTests.java | 6 ++-- .../ChangeStreamContinuationTokenTest.java | 22 +++++++------- .../v2/models/ChangeStreamRecordTest.java | 11 +++++-- .../bigtable/data/v2/models/RangeTest.java | 11 +++++++ ...ChangeStreamRecordMergingCallableTest.java | 29 ++++++++++--------- ...hangeStreamPartitionsUserCallableTest.java | 17 +++-------- ...ReadChangeStreamMergingAcceptanceTest.java | 14 +++++++-- 13 files changed, 134 insertions(+), 91 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index acfbff0747..77b909b7a1 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -29,7 +29,6 @@ import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; @@ -37,6 +36,7 @@ import com.google.cloud.bigtable.data.v2.models.Filters.Filter; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; @@ -1503,11 +1503,11 @@ public UnaryCallable readModifyWriteRowCallable() { * String tableId = "[TABLE]"; * * try { - * ServerStream stream = bigtableDataClient.generateInitialChangeStreamPartitions(tableId); + * ServerStream stream = bigtableDataClient.generateInitialChangeStreamPartitions(tableId); * int count = 0; * * // Iterator style - * for (RowRange partition : stream) { + * for (ByteStringRange partition : stream) { * if (++count > 10) { * stream.cancel(); * break; @@ -1525,7 +1525,7 @@ public UnaryCallable readModifyWriteRowCallable() { * @see ServerStreamingCallable For call styles. */ @InternalApi("Used in Changestream beam pipeline.") - public ServerStream generateInitialChangeStreamPartitions(String tableId) { + public ServerStream generateInitialChangeStreamPartitions(String tableId) { return generateInitialChangeStreamPartitionsCallable().call(tableId); } @@ -1545,7 +1545,7 @@ public ServerStream generateInitialChangeStreamPartitions(String table * public void onStart(StreamController controller) { * this.controller = controller; * } - * public void onResponse(RowRange partition) { + * public void onResponse(ByteStringRange partition) { * if (++count > 10) { * controller.cancel(); * return; @@ -1568,7 +1568,7 @@ public ServerStream generateInitialChangeStreamPartitions(String table */ @InternalApi("Used in Changestream beam pipeline.") public void generateInitialChangeStreamPartitionsAsync( - String tableId, ResponseObserver observer) { + String tableId, ResponseObserver observer) { generateInitialChangeStreamPartitionsCallable().call(tableId, observer); } @@ -1584,7 +1584,7 @@ public void generateInitialChangeStreamPartitionsAsync( * * // Iterator style * try { - * for(RowRange partition : bigtableDataClient.generateInitialChangeStreamPartitionsCallable().call(tableId)) { + * for(ByteStringRange partition : bigtableDataClient.generateInitialChangeStreamPartitionsCallable().call(tableId)) { * // Do something with partition * } * } catch (NotFoundException e) { @@ -1595,7 +1595,7 @@ public void generateInitialChangeStreamPartitionsAsync( * * // Sync style * try { - * List partitions = bigtableDataClient.generateInitialChangeStreamPartitionsCallable().all().call(tableId); + * List partitions = bigtableDataClient.generateInitialChangeStreamPartitionsCallable().all().call(tableId); * } catch (NotFoundException e) { * System.out.println("Tried to read a non-existent table"); * } catch (RuntimeException e) { @@ -1603,10 +1603,10 @@ public void generateInitialChangeStreamPartitionsAsync( * } * * // Point look up - * ApiFuture partitionFuture = + * ApiFuture partitionFuture = * bigtableDataClient.generateInitialChangeStreamPartitionsCallable().first().futureCall(tableId); * - * ApiFutures.addCallback(partitionFuture, new ApiFutureCallback() { + * ApiFutures.addCallback(partitionFuture, new ApiFutureCallback() { * public void onFailure(Throwable t) { * if (t instanceof NotFoundException) { * System.out.println("Tried to read a non-existent table"); @@ -1626,7 +1626,8 @@ public void generateInitialChangeStreamPartitionsAsync( * @see ServerStreamingCallable For call styles. */ @InternalApi("Used in Changestream beam pipeline.") - public ServerStreamingCallable generateInitialChangeStreamPartitionsCallable() { + public ServerStreamingCallable + generateInitialChangeStreamPartitionsCallable() { return stub.generateInitialChangeStreamPartitionsCallable(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java index af7b15ea4e..06e975c827 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java @@ -54,9 +54,13 @@ public ChangeStreamContinuationToken( .build(); } - // TODO: Change this to return ByteStringRange. - public RowRange getRowRange() { - return this.tokenProto.getPartition().getRowRange(); + /** + * Get the partition of the current continuation token, represented by a {@link ByteStringRange}. + */ + public ByteStringRange getPartition() { + return ByteStringRange.create( + this.tokenProto.getPartition().getRowRange().getStartKeyClosed(), + this.tokenProto.getPartition().getRowRange().getEndKeyOpen()); } public String getToken() { @@ -95,19 +99,19 @@ public boolean equals(Object o) { return false; } ChangeStreamContinuationToken otherToken = (ChangeStreamContinuationToken) o; - return Objects.equal(getRowRange(), otherToken.getRowRange()) + return Objects.equal(getPartition(), otherToken.getPartition()) && Objects.equal(getToken(), otherToken.getToken()); } @Override public int hashCode() { - return Objects.hashCode(getRowRange(), getToken()); + return Objects.hashCode(getPartition(), getToken()); } @Override public String toString() { return MoreObjects.toStringHelper(this) - .add("rowRange", getRowRange()) + .add("partition", getPartition()) .add("token", getToken()) .toString(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java index 4d7a10ab2a..c56a4163b8 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java @@ -15,10 +15,13 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.api.core.InternalExtensionOnly; +import com.google.bigtable.v2.RowRange; import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -395,6 +398,22 @@ private void writeObject(ObjectOutputStream output) throws IOException { output.defaultWriteObject(); } + @InternalApi("Used in Changestream beam pipeline.") + public static ByteString toByteString(ByteStringRange byteStringRange) { + return RowRange.newBuilder() + .setStartKeyClosed(byteStringRange.getStart()) + .setEndKeyOpen(byteStringRange.getEnd()) + .build() + .toByteString(); + } + + @InternalApi("Used in Changestream beam pipeline.") + public static ByteStringRange toByteStringRange(ByteString byteString) + throws InvalidProtocolBufferException { + RowRange rowRange = RowRange.newBuilder().mergeFrom(byteString).build(); + return ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen()); + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 4e29f2a3f5..10eef25e7e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -74,6 +74,7 @@ import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; @@ -155,7 +156,7 @@ public class EnhancedBigtableStub implements AutoCloseable { private final UnaryCallable checkAndMutateRowCallable; private final UnaryCallable readModifyWriteRowCallable; - private final ServerStreamingCallable + private final ServerStreamingCallable generateInitialChangeStreamPartitionsCallable; private final ServerStreamingCallable @@ -833,7 +834,7 @@ public Map extract(ReadModifyWriteRowRequest request) { * RowRange}. * */ - private ServerStreamingCallable + private ServerStreamingCallable createGenerateInitialChangeStreamPartitionsCallable() { ServerStreamingCallable< GenerateInitialChangeStreamPartitionsRequest, @@ -862,22 +863,22 @@ public Map extract( .build(), settings.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()); - ServerStreamingCallable userCallable = + ServerStreamingCallable userCallable = new GenerateInitialChangeStreamPartitionsUserCallable(base, requestContext); - ServerStreamingCallable withStatsHeaders = + ServerStreamingCallable withStatsHeaders = new StatsHeadersServerStreamingCallable<>(userCallable); // Sometimes GenerateInitialChangeStreamPartitions connections are disconnected via an RST // frame. This error is transient and should be treated similar to UNAVAILABLE. However, this // exception has an INTERNAL error code which by default is not retryable. Convert the exception // so it can be retried in the client. - ServerStreamingCallable convertException = + ServerStreamingCallable convertException = new ConvertStreamExceptionCallable<>(withStatsHeaders); // Copy idle timeout settings for watchdog. - ServerStreamingCallSettings innerSettings = - ServerStreamingCallSettings.newBuilder() + ServerStreamingCallSettings innerSettings = + ServerStreamingCallSettings.newBuilder() .setRetryableCodes( settings.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()) .setRetrySettings( @@ -886,17 +887,17 @@ public Map extract( settings.generateInitialChangeStreamPartitionsSettings().getIdleTimeout()) .build(); - ServerStreamingCallable watched = + ServerStreamingCallable watched = Callables.watched(convertException, innerSettings, clientContext); - ServerStreamingCallable withBigtableTracer = + ServerStreamingCallable withBigtableTracer = new BigtableTracerStreamingCallable<>(watched); - ServerStreamingCallable retrying = + ServerStreamingCallable retrying = Callables.retrying(withBigtableTracer, innerSettings, clientContext); SpanName span = getSpanName("GenerateInitialChangeStreamPartitions"); - ServerStreamingCallable traced = + ServerStreamingCallable traced = new TracedServerStreamingCallable<>(retrying, clientContext.getTracerFactory(), span); return traced.withDefaultCallContext(clientContext.getDefaultCallContext()); @@ -1039,7 +1040,8 @@ public UnaryCallable readModifyWriteRowCallable() { } /** Returns a streaming generate initial change stream partitions callable */ - public ServerStreamingCallable generateInitialChangeStreamPartitionsCallable() { + public ServerStreamingCallable + generateInitialChangeStreamPartitionsCallable() { return generateInitialChangeStreamPartitionsCallable; } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 9d2a731018..49eb79f5ca 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -33,12 +33,12 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.auth.Credentials; -import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.Version; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; @@ -212,7 +212,7 @@ public class EnhancedBigtableStubSettings extends StubSettings checkAndMutateRowSettings; private final UnaryCallSettings readModifyWriteRowSettings; - private final ServerStreamingCallSettings + private final ServerStreamingCallSettings generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings readChangeStreamSettings; @@ -537,7 +537,7 @@ public UnaryCallSettings readModifyWriteRowSettings() { return readModifyWriteRowSettings; } - public ServerStreamingCallSettings + public ServerStreamingCallSettings generateInitialChangeStreamPartitionsSettings() { return generateInitialChangeStreamPartitionsSettings; } @@ -571,7 +571,7 @@ public static class Builder extends StubSettings.Builder checkAndMutateRowSettings; private final UnaryCallSettings.Builder readModifyWriteRowSettings; - private final ServerStreamingCallSettings.Builder + private final ServerStreamingCallSettings.Builder generateInitialChangeStreamPartitionsSettings; private final ServerStreamingCallSettings.Builder readChangeStreamSettings; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java index 365cf56ff2..ce07018c52 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallable.java @@ -21,16 +21,16 @@ import com.google.api.gax.rpc.StreamController; import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest; import com.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse; -import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; /** * Simple wrapper for GenerateInitialChangeStreamPartitions to wrap the request and response * protobufs. */ public class GenerateInitialChangeStreamPartitionsUserCallable - extends ServerStreamingCallable { + extends ServerStreamingCallable { private final RequestContext requestContext; private final ServerStreamingCallable< GenerateInitialChangeStreamPartitionsRequest, @@ -49,7 +49,7 @@ public GenerateInitialChangeStreamPartitionsUserCallable( @Override public void call( - String tableId, ResponseObserver responseObserver, ApiCallContext context) { + String tableId, ResponseObserver responseObserver, ApiCallContext context) { String tableName = NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId); @@ -62,12 +62,12 @@ public void call( inner.call(request, new ConvertPartitionToRangeObserver(responseObserver), context); } - private class ConvertPartitionToRangeObserver + private static class ConvertPartitionToRangeObserver implements ResponseObserver { - private final ResponseObserver outerObserver; + private final ResponseObserver outerObserver; - ConvertPartitionToRangeObserver(ResponseObserver observer) { + ConvertPartitionToRangeObserver(ResponseObserver observer) { this.outerObserver = observer; } @@ -78,12 +78,11 @@ public void onStart(final StreamController controller) { @Override public void onResponse(GenerateInitialChangeStreamPartitionsResponse response) { - RowRange rowRange = - RowRange.newBuilder() - .setStartKeyClosed(response.getPartition().getRowRange().getStartKeyClosed()) - .setEndKeyOpen(response.getPartition().getRowRange().getEndKeyOpen()) - .build(); - outerObserver.onResponse(rowRange); + ByteStringRange byteStringRange = + ByteStringRange.create( + response.getPartition().getRowRange().getStartKeyClosed(), + response.getPartition().getRowRange().getEndKeyOpen()); + outerObserver.onResponse(byteStringRange); } @Override diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java index c3850e7e15..f4f23085a2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java @@ -24,7 +24,6 @@ import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.RowRange; import com.google.cloud.bigtable.data.v2.models.BulkMutation; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; @@ -32,6 +31,7 @@ import com.google.cloud.bigtable.data.v2.models.KeyOffset; import com.google.cloud.bigtable.data.v2.models.Mutation; import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; import com.google.cloud.bigtable.data.v2.models.Row; @@ -83,7 +83,7 @@ public class BigtableDataClientTests { @Mock private Batcher mockBulkReadRowsBatcher; @Mock(answer = Answers.RETURNS_DEEP_STUBS) - private ServerStreamingCallable + private ServerStreamingCallable mockGenerateInitialChangeStreamPartitionsCallable; @Mock(answer = Answers.RETURNS_DEEP_STUBS) @@ -342,7 +342,7 @@ public void proxyGenerateInitialChangeStreamPartitionsAsyncTest() { .thenReturn(mockGenerateInitialChangeStreamPartitionsCallable); @SuppressWarnings("unchecked") - ResponseObserver mockObserver = Mockito.mock(ResponseObserver.class); + ResponseObserver mockObserver = Mockito.mock(ResponseObserver.class); bigtableDataClient.generateInitialChangeStreamPartitionsAsync("fake-table", mockObserver); Mockito.verify(mockGenerateInitialChangeStreamPartitionsCallable) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java index e93dfc70bf..7716ec06f7 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java @@ -39,12 +39,10 @@ private ByteStringRange createFakeByteStringRange() { return ByteStringRange.create("a", "b"); } - // TODO: Get rid of this once we change ChangeStreamContinuationToken::getRowRange() - // to ChangeStreamContinuationToken::getByteStringRange(). - private RowRange rowRangeFromByteStringRange(ByteStringRange byteStringRange) { + private RowRange rowRangeFromPartition(ByteStringRange partition) { return RowRange.newBuilder() - .setStartKeyClosed(byteStringRange.getStart()) - .setEndKeyOpen(byteStringRange.getEnd()) + .setStartKeyClosed(partition.getStart()) + .setEndKeyOpen(partition.getEnd()) .build(); } @@ -53,8 +51,7 @@ public void basicTest() throws Exception { ByteStringRange byteStringRange = createFakeByteStringRange(); ChangeStreamContinuationToken changeStreamContinuationToken = new ChangeStreamContinuationToken(byteStringRange, TOKEN); - Assert.assertEquals( - changeStreamContinuationToken.getRowRange(), rowRangeFromByteStringRange(byteStringRange)); + Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -69,15 +66,17 @@ public void basicTest() throws Exception { @Test public void fromProtoTest() { ByteStringRange byteStringRange = createFakeByteStringRange(); - RowRange fakeRowRange = rowRangeFromByteStringRange(byteStringRange); StreamContinuationToken proto = StreamContinuationToken.newBuilder() - .setPartition(StreamPartition.newBuilder().setRowRange(fakeRowRange).build()) + .setPartition( + StreamPartition.newBuilder() + .setRowRange(rowRangeFromPartition(byteStringRange)) + .build()) .setToken(TOKEN) .build(); ChangeStreamContinuationToken changeStreamContinuationToken = ChangeStreamContinuationToken.fromProto(proto); - Assert.assertEquals(changeStreamContinuationToken.getRowRange(), fakeRowRange); + Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); Assert.assertEquals( changeStreamContinuationToken, @@ -89,8 +88,7 @@ public void toByteStringTest() throws Exception { ByteStringRange byteStringRange = createFakeByteStringRange(); ChangeStreamContinuationToken changeStreamContinuationToken = new ChangeStreamContinuationToken(byteStringRange, TOKEN); - Assert.assertEquals( - changeStreamContinuationToken.getRowRange(), rowRangeFromByteStringRange(byteStringRange)); + Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); Assert.assertEquals( changeStreamContinuationToken, diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java index 05df603959..c6aa7580dd 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -21,6 +21,7 @@ import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamPartition; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; import com.google.rpc.Status; @@ -119,7 +120,9 @@ public void heartbeatTest() { Heartbeat actualHeartbeat = Heartbeat.fromProto(heartbeatProto); Assert.assertEquals(actualHeartbeat.getLowWatermark(), lowWatermark); - Assert.assertEquals(actualHeartbeat.getChangeStreamContinuationToken().getRowRange(), rowRange); + Assert.assertEquals( + actualHeartbeat.getChangeStreamContinuationToken().getPartition(), + ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); Assert.assertEquals(actualHeartbeat.getChangeStreamContinuationToken().getToken(), token); } @@ -156,11 +159,13 @@ public void closeStreamTest() { Assert.assertEquals(status, actualCloseStream.getStatus()); Assert.assertEquals( - rowRange1, actualCloseStream.getChangeStreamContinuationTokens().get(0).getRowRange()); + actualCloseStream.getChangeStreamContinuationTokens().get(0).getPartition(), + ByteStringRange.create(rowRange1.getStartKeyClosed(), rowRange1.getEndKeyOpen())); Assert.assertEquals( token1, actualCloseStream.getChangeStreamContinuationTokens().get(0).getToken()); Assert.assertEquals( - rowRange2, actualCloseStream.getChangeStreamContinuationTokens().get(1).getRowRange()); + actualCloseStream.getChangeStreamContinuationTokens().get(1).getPartition(), + ByteStringRange.create(rowRange2.getStartKeyClosed(), rowRange2.getEndKeyOpen())); Assert.assertEquals( token2, actualCloseStream.getChangeStreamContinuationTokens().get(1).getToken()); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java index eebdba5811..96768e1c82 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java @@ -21,6 +21,7 @@ import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -306,4 +307,14 @@ public void byteStringSerializationTest() throws IOException, ClassNotFoundExcep ByteStringRange actual = (ByteStringRange) ois.readObject(); assertThat(actual).isEqualTo(expected); } + + @Test + public void byteStringRangeToByteStringTest() throws InvalidProtocolBufferException { + ByteStringRange expected = ByteStringRange.create("a", "z"); + + ByteString serialized = ByteStringRange.toByteString(expected); + ByteStringRange deserialized = ByteStringRange.toByteStringRange(serialized); + + assertThat(expected).isEqualTo(deserialized); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java index d23eb64765..5cc04f764d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java @@ -25,6 +25,7 @@ import com.google.cloud.bigtable.data.v2.models.CloseStream; import com.google.cloud.bigtable.data.v2.models.DefaultChangeStreamRecordAdapter; import com.google.cloud.bigtable.data.v2.models.Heartbeat; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; import com.google.protobuf.ByteString; @@ -47,11 +48,15 @@ public class ChangeStreamRecordMergingCallableTest { @Test public void heartbeatTest() { + RowRange rowRange = RowRange.newBuilder().getDefaultInstanceForType(); ReadChangeStreamResponse.Heartbeat heartbeatProto = ReadChangeStreamResponse.Heartbeat.newBuilder() .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) .setContinuationToken( - StreamContinuationToken.newBuilder().setToken("random-token").build()) + StreamContinuationToken.newBuilder() + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange)) + .setToken("random-token") + .build()) .build(); ReadChangeStreamResponse response = ReadChangeStreamResponse.newBuilder().setHeartbeat(heartbeatProto).build(); @@ -69,8 +74,8 @@ public void heartbeatTest() { Assert.assertTrue(record instanceof Heartbeat); Heartbeat heartbeat = (Heartbeat) record; Assert.assertEquals( - heartbeat.getChangeStreamContinuationToken().getRowRange(), - heartbeatProto.getContinuationToken().getPartition().getRowRange()); + heartbeat.getChangeStreamContinuationToken().getPartition(), + ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); Assert.assertEquals( heartbeat.getChangeStreamContinuationToken().getToken(), heartbeatProto.getContinuationToken().getToken()); @@ -79,16 +84,14 @@ public void heartbeatTest() { @Test public void closeStreamTest() { + RowRange rowRange = + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("")) + .setEndKeyOpen(ByteString.copyFromUtf8("")) + .build(); StreamContinuationToken streamContinuationToken = StreamContinuationToken.newBuilder() - .setPartition( - StreamPartition.newBuilder() - .setRowRange( - RowRange.newBuilder() - .setStartKeyClosed(ByteString.copyFromUtf8("")) - .setEndKeyOpen(ByteString.copyFromUtf8("")) - .build()) - .build()) + .setPartition(StreamPartition.newBuilder().setRowRange(rowRange).build()) .setToken("random-token") .build(); ReadChangeStreamResponse.CloseStream closeStreamProto = @@ -116,8 +119,8 @@ public void closeStreamTest() { ChangeStreamContinuationToken changeStreamContinuationToken = closeStream.getChangeStreamContinuationTokens().get(0); Assert.assertEquals( - changeStreamContinuationToken.getRowRange(), - streamContinuationToken.getPartition().getRowRange()); + changeStreamContinuationToken.getPartition(), + ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); Assert.assertEquals( changeStreamContinuationToken.getToken(), streamContinuationToken.getToken()); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java index 908961be77..885b1c6355 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/GenerateInitialChangeStreamPartitionsUserCallableTest.java @@ -23,10 +23,10 @@ import com.google.bigtable.v2.StreamPartition; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; +import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi; import com.google.common.collect.Lists; import com.google.common.truth.Truth; -import com.google.protobuf.ByteString; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; @@ -69,24 +69,15 @@ public void responseIsConverted() { GenerateInitialChangeStreamPartitionsResponse.newBuilder() .setPartition( StreamPartition.newBuilder() - .setRowRange( - RowRange.newBuilder() - .setStartKeyClosed(ByteString.copyFromUtf8("apple")) - .setEndKeyOpen(ByteString.copyFromUtf8("banana")) - .build()) + .setRowRange(RowRange.newBuilder().getDefaultInstanceForType()) .build()) .build())); GenerateInitialChangeStreamPartitionsUserCallable generateInitialChangeStreamPartitionsUserCallable = new GenerateInitialChangeStreamPartitionsUserCallable(inner, requestContext); - List results = + List results = generateInitialChangeStreamPartitionsUserCallable.all().call("my-table"); - Truth.assertThat(results) - .containsExactly( - RowRange.newBuilder() - .setStartKeyClosed(ByteString.copyFromUtf8("apple")) - .setEndKeyOpen(ByteString.copyFromUtf8("banana")) - .build()); + Truth.assertThat(results).containsExactly(ByteStringRange.create("", "")); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java index 5ae88a7f9f..ef8b9fec9f 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -24,6 +24,7 @@ import com.google.bigtable.v2.Mutation; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamPartition; import com.google.bigtable.v2.TimestampRange; @@ -123,6 +124,7 @@ public void test() throws Exception { for (ChangeStreamRecord record : stream) { if (record instanceof Heartbeat) { Heartbeat heartbeat = (Heartbeat) record; + ChangeStreamContinuationToken token = heartbeat.getChangeStreamContinuationToken(); ReadChangeStreamResponse.Heartbeat heartbeatProto = ReadChangeStreamResponse.Heartbeat.newBuilder() .setContinuationToken( @@ -130,7 +132,10 @@ public void test() throws Exception { .setPartition( StreamPartition.newBuilder() .setRowRange( - heartbeat.getChangeStreamContinuationToken().getRowRange()) + RowRange.newBuilder() + .setStartKeyClosed(token.getPartition().getStart()) + .setEndKeyOpen(token.getPartition().getEnd()) + .build()) .build()) .setToken(heartbeat.getChangeStreamContinuationToken().getToken()) .build()) @@ -152,7 +157,12 @@ public void test() throws Exception { builder.addContinuationTokens( StreamContinuationToken.newBuilder() .setPartition( - StreamPartition.newBuilder().setRowRange(token.getRowRange()).build()) + StreamPartition.newBuilder() + .setRowRange( + RowRange.newBuilder() + .setStartKeyClosed(token.getPartition().getStart()) + .setEndKeyOpen(token.getPartition().getEnd()) + .build())) .setToken(token.getToken()) .build()); } From 351a1513d75136de3e6147dd4d65600bd2c9d06b Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Tue, 16 Aug 2022 10:49:50 -0400 Subject: [PATCH 12/27] =?UTF-8?q?feat:=20Return=20MutationType=20and=20big?= =?UTF-8?q?table.common.Status=20instead=20of=20raw=20p=E2=80=A6=20(#1359)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Return MutationType and bigtable.common.Status instead of raw protos * fix: remove unused import * fix: fix test Co-authored-by: Teng Zhong --- .../data/v2/models/ChangeStreamMutation.java | 19 +++++++++++-------- .../bigtable/data/v2/models/CloseStream.java | 14 +++++++------- .../v2/models/ChangeStreamMutationTest.java | 7 ++----- .../v2/models/ChangeStreamRecordTest.java | 2 +- ...ChangeStreamRecordMergingCallableTest.java | 2 +- ...ReadChangeStreamMergingAcceptanceTest.java | 13 +++++++++++-- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index cfb8bb30b7..3d11d5d4fc 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -16,7 +16,6 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalExtensionOnly; -import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; import com.google.common.base.MoreObjects; @@ -69,10 +68,14 @@ public class ChangeStreamMutation implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 8419520253162024218L; + public enum MutationType { + USER, + GARBAGE_COLLECTION + } + private final ByteString rowKey; - /** Possible values: USER/GARBAGE_COLLECTION. */ - private final Type type; + private final MutationType type; /** This should only be set when type==USER. */ private final String sourceClusterId; @@ -108,7 +111,7 @@ static Builder createUserMutation( @Nonnull String sourceClusterId, @Nonnull Timestamp commitTimestamp, int tieBreaker) { - return new Builder(rowKey, Type.USER, sourceClusterId, commitTimestamp, tieBreaker); + return new Builder(rowKey, MutationType.USER, sourceClusterId, commitTimestamp, tieBreaker); } /** @@ -118,7 +121,7 @@ static Builder createUserMutation( */ static Builder createGcMutation( @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { - return new Builder(rowKey, Type.GARBAGE_COLLECTION, null, commitTimestamp, tieBreaker); + return new Builder(rowKey, MutationType.GARBAGE_COLLECTION, null, commitTimestamp, tieBreaker); } private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { @@ -142,7 +145,7 @@ public ByteString getRowKey() { /** Get the type of the current mutation. */ @Nonnull - public Type getType() { + public MutationType getType() { return this.type; } @@ -190,7 +193,7 @@ Builder toBuilder() { public static class Builder { private final ByteString rowKey; - private final Type type; + private final MutationType type; private final String sourceClusterId; @@ -206,7 +209,7 @@ public static class Builder { private Builder( ByteString rowKey, - Type type, + MutationType type, String sourceClusterId, Timestamp commitTimestamp, int tieBreaker) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java index 346b0b60a7..795e05029a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -50,8 +50,8 @@ private CloseStream(Status status, List continuationTok } @InternalApi("Used in Changestream beam pipeline.") - public Status getStatus() { - return this.status; + public com.google.cloud.bigtable.common.Status getStatus() { + return com.google.cloud.bigtable.common.Status.fromProto(this.status); } @InternalApi("Used in Changestream beam pipeline.") @@ -88,21 +88,21 @@ public boolean equals(Object o) { return false; } CloseStream record = (CloseStream) o; - return Objects.equal(status, record.getStatus()) + return Objects.equal(getStatus(), record.getStatus()) && Objects.equal( - changeStreamContinuationTokens.build(), record.getChangeStreamContinuationTokens()); + getChangeStreamContinuationTokens(), record.getChangeStreamContinuationTokens()); } @Override public int hashCode() { - return Objects.hashCode(status, changeStreamContinuationTokens); + return Objects.hashCode(getStatus(), getChangeStreamContinuationTokens()); } @Override public String toString() { return MoreObjects.toStringHelper(this) - .add("status", status) - .add("changeStreamContinuationTokens", changeStreamContinuationTokens) + .add("status", getStatus()) + .add("changeStreamContinuationTokens", getChangeStreamContinuationTokens()) .toString(); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index a14fe001cd..1052a1646d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -19,7 +19,6 @@ import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowsRequest; -import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.cloud.bigtable.data.v2.internal.NameUtil; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.common.primitives.Longs; @@ -72,8 +71,7 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti // Test the getters. Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); - Assert.assertEquals( - changeStreamMutation.getType(), ReadChangeStreamResponse.DataChange.Type.USER); + Assert.assertEquals(changeStreamMutation.getType(), ChangeStreamMutation.MutationType.USER); Assert.assertEquals(changeStreamMutation.getSourceClusterId(), "fake-source-cluster-id"); Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); @@ -115,8 +113,7 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { // Test the getters. Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); Assert.assertEquals( - changeStreamMutation.getType(), - ReadChangeStreamResponse.DataChange.Type.GARBAGE_COLLECTION); + changeStreamMutation.getType(), ChangeStreamMutation.MutationType.GARBAGE_COLLECTION); Assert.assertNull(changeStreamMutation.getSourceClusterId()); Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java index c6aa7580dd..ed54628f67 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -157,7 +157,7 @@ public void closeStreamTest() { .build(); CloseStream actualCloseStream = CloseStream.fromProto(closeStreamProto); - Assert.assertEquals(status, actualCloseStream.getStatus()); + Assert.assertEquals(status, actualCloseStream.getStatus().toProto()); Assert.assertEquals( actualCloseStream.getChangeStreamContinuationTokens().get(0).getPartition(), ByteStringRange.create(rowRange1.getStartKeyClosed(), rowRange1.getEndKeyOpen())); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java index 5cc04f764d..56cc5aa845 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java @@ -114,7 +114,7 @@ public void closeStreamTest() { ChangeStreamRecord record = results.get(0); Assert.assertTrue(record instanceof CloseStream); CloseStream closeStream = (CloseStream) record; - Assert.assertEquals(closeStream.getStatus(), closeStreamProto.getStatus()); + Assert.assertEquals(closeStream.getStatus().toProto(), closeStreamProto.getStatus()); Assert.assertEquals(closeStream.getChangeStreamContinuationTokens().size(), 1); ChangeStreamContinuationToken changeStreamContinuationToken = closeStream.getChangeStreamContinuationTokens().get(0); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java index ef8b9fec9f..483562aa4a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -24,6 +24,7 @@ import com.google.bigtable.v2.Mutation; import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; +import com.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamPartition; @@ -151,7 +152,8 @@ public void test() throws Exception { } else if (record instanceof CloseStream) { CloseStream closeStream = (CloseStream) record; ReadChangeStreamResponse.CloseStream.Builder builder = - ReadChangeStreamResponse.CloseStream.newBuilder().setStatus(closeStream.getStatus()); + ReadChangeStreamResponse.CloseStream.newBuilder() + .setStatus(closeStream.getStatus().toProto()); for (ChangeStreamContinuationToken token : closeStream.getChangeStreamContinuationTokens()) { builder.addContinuationTokens( @@ -179,7 +181,14 @@ public void test() throws Exception { ReadChangeStreamTest.TestChangeStreamMutation.Builder builder = ReadChangeStreamTest.TestChangeStreamMutation.newBuilder(); builder.setRowKey(changeStreamMutation.getRowKey()); - builder.setType(changeStreamMutation.getType()); + Type type = Type.UNRECOGNIZED; + if (changeStreamMutation.getType() == ChangeStreamMutation.MutationType.USER) { + type = Type.USER; + } else if (changeStreamMutation.getType() + == ChangeStreamMutation.MutationType.GARBAGE_COLLECTION) { + type = Type.GARBAGE_COLLECTION; + } + builder.setType(type); if (changeStreamMutation.getSourceClusterId() != null) { builder.setSourceClusterId(changeStreamMutation.getSourceClusterId()); } From c631fa4f9e2118806a4aa55c20808ac90afa96b9 Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Thu, 1 Sep 2022 16:16:22 -0400 Subject: [PATCH 13/27] feat: Expose CDC data API settings in EnhancedBigtableStubSettings (#1376) Co-authored-by: Teng Zhong --- .../v2/stub/EnhancedBigtableStubSettings.java | 14 ++++ .../EnhancedBigtableStubSettingsTest.java | 75 +++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index 49eb79f5ca..f31c5308c5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -884,6 +884,20 @@ public UnaryCallSettings.Builder readModifyWriteRowSett return readModifyWriteRowSettings; } + /** Returns the builder for the settings used for calls to ReadChangeStream. */ + public ServerStreamingCallSettings.Builder + readChangeStreamSettings() { + return readChangeStreamSettings; + } + + /** + * Returns the builder for the settings used for calls to GenerateInitialChangeStreamPartitions. + */ + public ServerStreamingCallSettings.Builder + generateInitialChangeStreamPartitionsSettings() { + return generateInitialChangeStreamPartitionsSettings; + } + @SuppressWarnings("unchecked") public EnhancedBigtableStubSettings build() { Preconditions.checkState(projectId != null, "Project id must be set"); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index 731ba7f77e..413bba34d4 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -634,6 +634,81 @@ public void checkAndMutateRowSettingsAreNotLostTest() { .isEqualTo(retrySettings); } + @Test + public void generateInitialChangeStreamPartitionsSettingsAreNotLostTest() { + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; + + EnhancedBigtableStubSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); + + RetrySettings retrySettings = RetrySettings.newBuilder().build(); + builder + .generateInitialChangeStreamPartitionsSettings() + .setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED) + .setRetrySettings(retrySettings) + .build(); + + assertThat(builder.generateInitialChangeStreamPartitionsSettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.generateInitialChangeStreamPartitionsSettings().getRetrySettings()) + .isEqualTo(retrySettings); + + assertThat(builder.build().generateInitialChangeStreamPartitionsSettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().generateInitialChangeStreamPartitionsSettings().getRetrySettings()) + .isEqualTo(retrySettings); + + assertThat( + builder + .build() + .toBuilder() + .generateInitialChangeStreamPartitionsSettings() + .getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat( + builder + .build() + .toBuilder() + .generateInitialChangeStreamPartitionsSettings() + .getRetrySettings()) + .isEqualTo(retrySettings); + } + + @Test + public void readChangeStreamSettingsAreNotLostTest() { + String dummyProjectId = "my-project"; + String dummyInstanceId = "my-instance"; + + EnhancedBigtableStubSettings.Builder builder = + EnhancedBigtableStubSettings.newBuilder() + .setProjectId(dummyProjectId) + .setInstanceId(dummyInstanceId); + + RetrySettings retrySettings = RetrySettings.newBuilder().build(); + builder + .readChangeStreamSettings() + .setRetryableCodes(Code.ABORTED, Code.DEADLINE_EXCEEDED) + .setRetrySettings(retrySettings) + .build(); + + assertThat(builder.readChangeStreamSettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.readChangeStreamSettings().getRetrySettings()).isEqualTo(retrySettings); + + assertThat(builder.build().readChangeStreamSettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().readChangeStreamSettings().getRetrySettings()) + .isEqualTo(retrySettings); + + assertThat(builder.build().toBuilder().readChangeStreamSettings().getRetryableCodes()) + .containsAtLeast(Code.ABORTED, Code.DEADLINE_EXCEEDED); + assertThat(builder.build().toBuilder().readChangeStreamSettings().getRetrySettings()) + .isEqualTo(retrySettings); + } + @Test public void checkAndMutateRowSettingsAreSane() { UnaryCallSettings.Builder builder = From 9e5994fd4007d2c674e16212ee81704a5e208acd Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Wed, 7 Sep 2022 13:49:14 -0400 Subject: [PATCH 14/27] chore: pull in changes from main branch (#1379) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#1304) * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build: enable longpaths support for windows test (#1485) (#1310) Source-Link: https://github.com/googleapis/synthtool/commit/73365620c41d96e97ff474b2c4d39b890ad51967 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 Co-authored-by: Owl Bot * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.0 (#1305) * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 (#1306) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 (#1307) * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.2 (#1297) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.0` -> `0.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/compatibility-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/confidence-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-config ### [`v0.3.1`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​031-httpswwwgithubcomgoogleapisjava-shared-configcomparev030v031-2020-01-03) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v0.3.0...v0.3.1)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: enable integration test for google-cloud-bigtable-stats (#1311) * fix: enable integration test for graal * update * add more comments * chore: mark native image checks as required (#1313) * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.3 (#1314) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.2` -> `0.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/compatibility-slim/0.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/confidence-slim/0.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * ci: update template so GAPIC_AUTO repos do not require special approvers for Java code (#1494) (#1315) Source-Link: https://github.com/googleapis/synthtool/commit/da89e53878d92467eb648c610e64f94a614915cc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 * feat: use PingAndWarm request for channel priming (#1179) Switching channel priming from sending fake ReadRowsRequest to PingAndWarm request, which on the server side will list all the tables for an instance. In the settings we won't need to specify the table Ids to prime. * build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#1316) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add storage utilization gib per node for autoscaling (#1317) * feat: add storage utilization gib per node option for autoscaling * add additional assertion * add additional tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * review comments Co-authored-by: Owl Bot * fix: fix race condition in BuiltinMetricsTracer (#1320) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(main): release 2.10.0 (#1302) :robot: I have created a release *beep* *boop* --- ## [2.10.0](https://github.com/googleapis/java-bigtable/compare/v2.9.0...v2.10.0) (2022-07-26) ### Features * add response protos ([#1246](https://github.com/googleapis/java-bigtable/issues/1246)) ([52d59ce](https://github.com/googleapis/java-bigtable/commit/52d59ce18fb5536a17a5cb59da39e563e4afede4)) * add response_params proto to clients ([#1303](https://github.com/googleapis/java-bigtable/issues/1303)) ([93edfe1](https://github.com/googleapis/java-bigtable/commit/93edfe1e43dcfefda6bba3e9ee53ed80eaf2e5c2)) * add storage utilization gib per node for autoscaling ([#1317](https://github.com/googleapis/java-bigtable/issues/1317)) ([5282589](https://github.com/googleapis/java-bigtable/commit/52825891af0e4ec2dd76c0c6fa1379a98a77a08f)) * use PingAndWarm request for channel priming ([#1179](https://github.com/googleapis/java-bigtable/issues/1179)) ([6629821](https://github.com/googleapis/java-bigtable/commit/6629821ea3200d3a5b93c9d45aab6d57485fcebf)) ### Bug Fixes * enable integration test for google-cloud-bigtable-stats ([#1311](https://github.com/googleapis/java-bigtable/issues/1311)) ([7c77879](https://github.com/googleapis/java-bigtable/commit/7c7787998b164ceb55472c0d06c083a835e5d000)) * fix race condition in BuiltinMetricsTracer ([#1320](https://github.com/googleapis/java-bigtable/issues/1320)) ([644454a](https://github.com/googleapis/java-bigtable/commit/644454a9723da359677052b7a4b9201e91e9a78a)) * ignore repackaged files to fix clirr ([#1300](https://github.com/googleapis/java-bigtable/issues/1300)) ([99b67ba](https://github.com/googleapis/java-bigtable/commit/99b67ba5b1625686ac7802a6e40dafc2edceade0)) ### Dependencies * update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#1306](https://github.com/googleapis/java-bigtable/issues/1306)) ([ddae354](https://github.com/googleapis/java-bigtable/commit/ddae3540fd68e8f79d94d49c96c5685e1bad2f66)) * update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#1307](https://github.com/googleapis/java-bigtable/issues/1307)) ([c0740fe](https://github.com/googleapis/java-bigtable/commit/c0740fe30c5cd2bdf6dedf901e2fdb9a84ce64a1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 (#1323) * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.1-SNAPSHOT (#1321) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: retry rst stream in mutations (#1327) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.0 (#1330) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.1 (#1325) :robot: I have created a release *beep* *boop* --- ## [2.10.1](https://github.com/googleapis/java-bigtable/compare/v2.10.0...v2.10.1) (2022-08-01) ### Bug Fixes * retry rst stream in mutations ([#1327](https://github.com/googleapis/java-bigtable/issues/1327)) ([1a5b3a2](https://github.com/googleapis/java-bigtable/commit/1a5b3a215b5388678241cadec26a962a512157ac)) ### Dependencies * update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 ([#1323](https://github.com/googleapis/java-bigtable/issues/1323)) ([7655747](https://github.com/googleapis/java-bigtable/commit/76557476744a6404b9df30c97c59f0a7e38a1ed8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.1 (#1329) * chore(main): release 2.10.2-SNAPSHOT (#1331) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.1 (#1332) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * fix: add a ReadFirstRow callable to set future in onComplete (#1326) * fix: add a ReadFirstRow callable to set future in onComplete * use ReadRowsFirst callable instead * don't use atomic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats (#1336) * deps: upgrade shared config to 1.5.3, remove google-http-client and google-http-client-gson. * exclude google-http-client and google-http-client-gson from google-cloud-bigtable-stats. * exclude google-http-client and google-http-client-gson from google-cloud-bigtable-stats. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add comments to explain excluded dependencies. Co-authored-by: Owl Bot * fix: The metadata could be returned in trailer or header depends on i… (#1337) * fix: The metadata could be returned in trailer or header depends on if sidecar is enabled. Check both for now. * fix * fix npe * fix NPE when metadata is null * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3 (#1328) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.13.0` -> `3.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​301-httpsgithubcomgoogleapisjava-shared-dependenciescomparev300v301-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.0...v3.0.1) ##### Dependencies - update dependency com.google.code.gson:gson to v2.9.1 ([#​766](https://togithub.com/googleapis/java-shared-dependencies/issues/766)) ([f7b2b06](https://togithub.com/googleapis/java-shared-dependencies/commit/f7b2b06b80e3e95ff8ab9b1d6a2638ef3069298a)) - update gax.version to v2.18.7 ([#​767](https://togithub.com/googleapis/java-shared-dependencies/issues/767)) ([9650368](https://togithub.com/googleapis/java-shared-dependencies/commit/96503682e98cdf348ea2c1365a03a60f4322c712)) - update google.core.version to v2.8.6 ([#​770](https://togithub.com/googleapis/java-shared-dependencies/issues/770)) ([cfd4377](https://togithub.com/googleapis/java-shared-dependencies/commit/cfd4377dc178cebb4724065d55d185ce03988d55)) ### [`v3.0.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​300-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2130v300-2022-07-29) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.13.0...v3.0.0) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-shared-dependencies/issues/1485)) ([#​738](https://togithub.com/googleapis/java-shared-dependencies/issues/738)) ([11bc8f8](https://togithub.com/googleapis/java-shared-dependencies/commit/11bc8f81f28be88a97fdeafca21724e33638770c)) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.2 ([#​729](https://togithub.com/googleapis/java-shared-dependencies/issues/729)) ([1fa59af](https://togithub.com/googleapis/java-shared-dependencies/commit/1fa59af80abb9f278f57658c10158567e825fec6)) - update dependency com.google.api-client:google-api-client-bom to v2 ([#​746](https://togithub.com/googleapis/java-shared-dependencies/issues/746)) ([2dcb2e0](https://togithub.com/googleapis/java-shared-dependencies/commit/2dcb2e071e0ba0eea21bb575bd13cd559d4a1ca6)) - update dependency com.google.api.grpc:grpc-google-common-protos to v2.9.2 ([#​741](https://togithub.com/googleapis/java-shared-dependencies/issues/741)) ([3352d6c](https://togithub.com/googleapis/java-shared-dependencies/commit/3352d6c36111c04e3f6f3e6360470fa3efb10d8f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.0 ([#​726](https://togithub.com/googleapis/java-shared-dependencies/issues/726)) ([2c5d64c](https://togithub.com/googleapis/java-shared-dependencies/commit/2c5d64c127db8384e49113acfeac6928716a2d7f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.1 ([#​742](https://togithub.com/googleapis/java-shared-dependencies/issues/742)) ([4f53527](https://togithub.com/googleapis/java-shared-dependencies/commit/4f53527bda7f40896711b7c1d1c02453321ffbc8)) - update dependency com.google.cloud:first-party-dependencies to v2 ([#​747](https://togithub.com/googleapis/java-shared-dependencies/issues/747)) ([e970ac0](https://togithub.com/googleapis/java-shared-dependencies/commit/e970ac0599941c825dc2516146a7c6673e68a9b9)) - update dependency com.google.cloud:grpc-gcp to v1.2.1 ([#​751](https://togithub.com/googleapis/java-shared-dependencies/issues/751)) ([b3284b6](https://togithub.com/googleapis/java-shared-dependencies/commit/b3284b6ee52a96a6ea8696a05a94443df9ee5b9f)) - update dependency com.google.cloud:third-party-dependencies to v2 ([#​748](https://togithub.com/googleapis/java-shared-dependencies/issues/748)) ([573b41a](https://togithub.com/googleapis/java-shared-dependencies/commit/573b41a69504372741cbeb01dd200e7c71967186)) - update dependency com.google.http-client:google-http-client-bom to v1.42.1 ([#​730](https://togithub.com/googleapis/java-shared-dependencies/issues/730)) ([6b47126](https://togithub.com/googleapis/java-shared-dependencies/commit/6b47126686b603a5d112e097ce6aa3a1880daf6f)) - update dependency com.google.http-client:google-http-client-bom to v1.42.2 ([#​749](https://togithub.com/googleapis/java-shared-dependencies/issues/749)) ([299d7b0](https://togithub.com/googleapis/java-shared-dependencies/commit/299d7b0d4920644e2c3070d12dd1d97da17a5e88)) - update dependency com.google.protobuf:protobuf-bom to v3.21.2 ([#​722](https://togithub.com/googleapis/java-shared-dependencies/issues/722)) ([7a96b12](https://togithub.com/googleapis/java-shared-dependencies/commit/7a96b1259a526b63e9376fd6cc18b27cddeb5f0f)) - update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#​756](https://togithub.com/googleapis/java-shared-dependencies/issues/756)) ([3d0bac2](https://togithub.com/googleapis/java-shared-dependencies/commit/3d0bac23487aebb94267c0708f41ff6c02a028a4)) - update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#​759](https://togithub.com/googleapis/java-shared-dependencies/issues/759)) ([5a54ef1](https://togithub.com/googleapis/java-shared-dependencies/commit/5a54ef1a2d56244166d4fcc46041d62c0dc4b411)) - update dependency io.grpc:grpc-bom to v1.48.0 ([#​752](https://togithub.com/googleapis/java-shared-dependencies/issues/752)) ([20ac908](https://togithub.com/googleapis/java-shared-dependencies/commit/20ac908932a5e7c8e581bdfcd68579d7e1cedd5f)) - update dependency org.checkerframework:checker-qual to v3.23.0 ([#​736](https://togithub.com/googleapis/java-shared-dependencies/issues/736)) ([fc01d8f](https://togithub.com/googleapis/java-shared-dependencies/commit/fc01d8f93f391f12fdb800d5006f0b4505832eeb)) - update gax.version to v2.18.3 ([#​731](https://togithub.com/googleapis/java-shared-dependencies/issues/731)) ([e8ee554](https://togithub.com/googleapis/java-shared-dependencies/commit/e8ee554707acb2f71c739d08e2ff02fbe43ffa52)) - update gax.version to v2.18.4 ([#​735](https://togithub.com/googleapis/java-shared-dependencies/issues/735)) ([11c7415](https://togithub.com/googleapis/java-shared-dependencies/commit/11c74152a84697924de3a0e838b05f606c3098f7)) - update gax.version to v2.18.5 ([#​758](https://togithub.com/googleapis/java-shared-dependencies/issues/758)) ([7469fc1](https://togithub.com/googleapis/java-shared-dependencies/commit/7469fc1cc5095b39a5738e60156711a268f6e052)) - update gax.version to v2.18.6 ([#​763](https://togithub.com/googleapis/java-shared-dependencies/issues/763)) ([b5ca2f7](https://togithub.com/googleapis/java-shared-dependencies/commit/b5ca2f7b4d81c705823253f4f03363a32d2be48b)) - update google.common-protos.version to v2.9.1 ([#​724](https://togithub.com/googleapis/java-shared-dependencies/issues/724)) ([5213dbb](https://togithub.com/googleapis/java-shared-dependencies/commit/5213dbbfa9c9b73d2420ec2be7782f16c9c4955f)) - update google.core.version to v2.8.1 ([#​725](https://togithub.com/googleapis/java-shared-dependencies/issues/725)) ([575858a](https://togithub.com/googleapis/java-shared-dependencies/commit/575858a60f76e46bbc2a2435c2b6c01c8f4ab681)) - update google.core.version to v2.8.3 ([#​760](https://togithub.com/googleapis/java-shared-dependencies/issues/760)) ([cb10ae4](https://togithub.com/googleapis/java-shared-dependencies/commit/cb10ae4b76939215ea465af74163b3d4ad65a548)) - update google.core.version to v2.8.4 ([#​762](https://togithub.com/googleapis/java-shared-dependencies/issues/762)) ([821daaf](https://togithub.com/googleapis/java-shared-dependencies/commit/821daafefdbcfdfe6e363e580747538096a562ef)) - update google.core.version to v2.8.5 ([#​764](https://togithub.com/googleapis/java-shared-dependencies/issues/764)) ([a1f8f50](https://togithub.com/googleapis/java-shared-dependencies/commit/a1f8f501b54143a2cec8e72efd4ceb3ce47f13ae)) - update iam.version to v1.5.0 ([#​732](https://togithub.com/googleapis/java-shared-dependencies/issues/732)) ([9dce0e5](https://togithub.com/googleapis/java-shared-dependencies/commit/9dce0e5199c1e425119adc804304958f58003a27)) - update iam.version to v1.5.1 ([#​737](https://togithub.com/googleapis/java-shared-dependencies/issues/737)) ([df39168](https://togithub.com/googleapis/java-shared-dependencies/commit/df391685d42fcb1b04f03ab1380a594893bdce37)) - update iam.version to v1.5.2 ([#​743](https://togithub.com/googleapis/java-shared-dependencies/issues/743)) ([cdde697](https://togithub.com/googleapis/java-shared-dependencies/commit/cdde697f25a89fc8c2ec7eae6b7c54f69977bb1c))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.10.2 (#1335) :robot: I have created a release *beep* *boop* --- ## [2.10.2](https://github.com/googleapis/java-bigtable/compare/v2.10.1...v2.10.2) (2022-08-03) ### Bug Fixes * add a ReadFirstRow callable to set future in onComplete ([#1326](https://github.com/googleapis/java-bigtable/issues/1326)) ([cb539b5](https://github.com/googleapis/java-bigtable/commit/cb539b50d98ec2a8538ce4691b2639426ca95464)) * The metadata could be returned in trailer or header depends on i… ([#1337](https://github.com/googleapis/java-bigtable/issues/1337)) ([c4b8c03](https://github.com/googleapis/java-bigtable/commit/c4b8c03ece7b3f6ec2cea42ff0ca5ac617528060)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1328](https://github.com/googleapis/java-bigtable/issues/1328)) ([bee0ca0](https://github.com/googleapis/java-bigtable/commit/bee0ca036ab6e711f6069159364f6d3b691e6bfd)) * upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats ([#1336](https://github.com/googleapis/java-bigtable/issues/1336)) ([98b3349](https://github.com/googleapis/java-bigtable/commit/98b33498d85325d22737fb4bd66826519e96755a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.10.3-SNAPSHOT (#1340) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * fix: declaring 2 http libraries as runtime (#1341) * fix: declaring 2 http libraries as runtime Fixing similar issues as googleapis/java-pubsub#1239 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.2 (#1342) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.3 (#1343) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.10.4-SNAPSHOT (#1348) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.3 (#1349) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.10.2` -> `2.10.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/compatibility-slim/2.10.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/confidence-slim/2.10.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-bigtable ### [`v2.10.3`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2103-httpsgithubcomgoogleapisjava-bigtablecomparev2102v2103-2022-08-08) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.10.2...v2.10.3) ##### Bug Fixes - declaring 2 http libraries as runtime ([#​1341](https://togithub.com/googleapis/java-bigtable/issues/1341)) ([8071de6](https://togithub.com/googleapis/java-bigtable/commit/8071de6235a6c1aa5873902ca55beaa2a8d64276))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add stackdriver exporter (#1247) * remove status from application latency * feat: update tracers to use built in metrics * feat: add response protos * feat: add response protos * feat: add stackdriver exporter * fix tests * fix dependency * remove unused dependency * clean up code * udpates on comments * remove unused setting * make metrics consistent with cloud monitoring * convert undefined to global * update * add bigtable tracer back in the base callable * fix format * fix the tag name * add the link to the form * fix format * fix dependency conflicts * fix image tests * update undefined cluster to global * address comments * tweak export interval * remove unused metric kind * get project id from the metrics * clean up imports * remove unused method and rewrite create timeseries exporter * fix integration test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#1354) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: add opencensus lincese and update readme (#1353) * chore: add opencensus lincese and update readme * remove unused implementation * rename method * add back transformer * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: add instructions to enable builtin metrics (#1358) * chore: add instructions to enable builtin metrics * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 (#1352) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.3.6` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/compatibility-slim/3.3.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/confidence-slim/3.3.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.1`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​341-httpsgithubcomgoogleapisjava-monitoringcomparev340v341-2022-08-11) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.0...v3.4.1) ##### Bug Fixes - fix samples and samples tests for UptimeCheck. ([#​909](https://togithub.com/googleapis/java-monitoring/issues/909)) ([7143f96](https://togithub.com/googleapis/java-monitoring/commit/7143f96d3e5b4f7f96f184b6367c45980dbb4140)) - google-auth-library-oauth2-http is runtime scope ([#​911](https://togithub.com/googleapis/java-monitoring/issues/911)) ([fb080db](https://togithub.com/googleapis/java-monitoring/commit/fb080dbac9a11563d3b21b1defe34720bbcd2f91)) ### [`v3.4.0`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​340-httpsgithubcomgoogleapisjava-monitoringcomparev336v340-2022-08-06) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.3.6...v3.4.0) ##### Features - Added support for evaluating missing data in AlertPolicy ([#​906](https://togithub.com/googleapis/java-monitoring/issues/906)) ([e9effc8](https://togithub.com/googleapis/java-monitoring/commit/e9effc85f48d7f64ae5b297bace67e7cbafd27b1)) ##### Documentation - **owlbot-java:** explaining why not using formatter in pom.xml ([#​1511](https://togithub.com/googleapis/java-monitoring/issues/1511)) ([#​901](https://togithub.com/googleapis/java-monitoring/issues/901)) ([02e3f6b](https://togithub.com/googleapis/java-monitoring/commit/02e3f6b8af04ad995a488da9794bf391b4c602e5)), closes [#​1502](https://togithub.com/googleapis/java-monitoring/issues/1502)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency org.mockito:mockito-core to v4.7.0 (#1356) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.6.1` -> `4.7.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/compatibility-slim/4.6.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/confidence-slim/4.6.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    mockito/mockito ### [`v4.7.0`](https://togithub.com/mockito/mockito/releases/tag/v4.7.0) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.6.1...v4.7.0) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.7.0 - 2022-08-13 - [33 commit(s)](https://togithub.com/mockito/mockito/compare/v4.6.1...v4.7.0) by [`1988123`](https://togithub.com/mockito/mockito/commit/198812345678), Andy Coates, Chen Ni, Marius Lichtblau, Nikita Koselev. Developer Advocate, Open Source Ally, Rafael Winterhalter, dependabot\[bot], dstango, fishautumn, heqiang - Bump com.diffplug.spotless from 6.9.0 to 6.9.1 [(#​2725)](https://togithub.com/mockito/mockito/pull/2725) - Bump versions.bytebuddy from 1.12.12 to 1.12.13 [(#​2719)](https://togithub.com/mockito/mockito/pull/2719) - Fix Javadoc for Mockito. [(#​2718)](https://togithub.com/mockito/mockito/pull/2718) - Bump com.diffplug.spotless from 6.8.0 to 6.9.0 [(#​2717)](https://togithub.com/mockito/mockito/pull/2717) - Fix a typo in comment of InternalRunner.java [(#​2715)](https://togithub.com/mockito/mockito/pull/2715) - Bump junit-platform-launcher from 1.8.2 to 1.9.0 [(#​2713)](https://togithub.com/mockito/mockito/pull/2713) - Bump versions.junitJupiter from 5.8.2 to 5.9.0 [(#​2712)](https://togithub.com/mockito/mockito/pull/2712) - Bump groovy from 3.0.11 to 3.0.12 [(#​2711)](https://togithub.com/mockito/mockito/pull/2711) - Bump shipkit-auto-version from 1.2.0 to 1.2.1 [(#​2709)](https://togithub.com/mockito/mockito/pull/2709) - Bump kotlinVersion from 1.7.0 to 1.7.10 [(#​2705)](https://togithub.com/mockito/mockito/pull/2705) - Bump com.diffplug.spotless from 6.7.2 to 6.8.0 [(#​2699)](https://togithub.com/mockito/mockito/pull/2699) - Bump versions.bytebuddy from 1.12.11 to 1.12.12 [(#​2695)](https://togithub.com/mockito/mockito/pull/2695) - Makes error message less misleading and points to github for help. Issue [#​2692](https://togithub.com/mockito/mockito/issues/2692) [(#​2693)](https://togithub.com/mockito/mockito/pull/2693) - Misleading error message when mocking and a class (of a parameter) is not found [(#​2692)](https://togithub.com/mockito/mockito/issues/2692) - Bump kotlinx-coroutines-core from 1.6.1-native-mt to 1.6.3-native-mt [(#​2691)](https://togithub.com/mockito/mockito/pull/2691) - Bump versions.bytebuddy from 1.12.10 to 1.12.11 [(#​2690)](https://togithub.com/mockito/mockito/pull/2690) - Fixes [#​2679](https://togithub.com/mockito/mockito/issues/2679) : Update Javadoc [(#​2689)](https://togithub.com/mockito/mockito/pull/2689) - Bump org.eclipse.osgi from 3.17.200 to 3.18.0 [(#​2688)](https://togithub.com/mockito/mockito/pull/2688) - RETURNS_SELF: Avoids returning mock when mock type is assignable to method return type, but method return type is Object. [(#​2687)](https://togithub.com/mockito/mockito/pull/2687) - RETURNS_SELF breaks methods with generic return type [(#​2686)](https://togithub.com/mockito/mockito/issues/2686) - Fix [#​2616](https://togithub.com/mockito/mockito/issues/2616) wrong stub for nested static [(#​2685)](https://togithub.com/mockito/mockito/pull/2685) - Bump com.diffplug.spotless from 6.7.0 to 6.7.2 [(#​2684)](https://togithub.com/mockito/mockito/pull/2684) - Avoids starting mocks "half-way" if a superclass constructor is mocked but an unmocked subclass is initiated. [(#​2682)](https://togithub.com/mockito/mockito/pull/2682) - Fix typo [(#​2681)](https://togithub.com/mockito/mockito/pull/2681) - Update javadoc of `Strictness.STRICT_STUBS` [(#​2679)](https://togithub.com/mockito/mockito/issues/2679) - Bump kotlinVersion from 1.6.21 to 1.7.0 [(#​2677)](https://togithub.com/mockito/mockito/pull/2677) - Bump biz.aQute.bnd.builder from 6.3.0 to 6.3.1 [(#​2675)](https://togithub.com/mockito/mockito/pull/2675) - Bump biz.aQute.bnd.gradle from 6.3.0 to 6.3.1 [(#​2674)](https://togithub.com/mockito/mockito/pull/2674) - Bump com.diffplug.spotless from 6.6.1 to 6.7.0 [(#​2672)](https://togithub.com/mockito/mockito/pull/2672) - update CONTRIBUTING.md - stackoverflow [(#​2671)](https://togithub.com/mockito/mockito/pull/2671) - stackoverflow.com is a non-actionable text, to be replaced with a hyperlink [(#​2670)](https://togithub.com/mockito/mockito/issues/2670) - Fix typos [(#​2669)](https://togithub.com/mockito/mockito/pull/2669) - Bump biz.aQute.bnd.gradle from 6.2.0 to 6.3.0 [(#​2666)](https://togithub.com/mockito/mockito/pull/2666) - Bump biz.aQute.bnd.builder from 6.2.0 to 6.3.0 [(#​2665)](https://togithub.com/mockito/mockito/pull/2665) - Improve Varargs handling in AdditionalAnswers [(#​2664)](https://togithub.com/mockito/mockito/pull/2664) - Bump appcompat from 1.4.1 to 1.4.2 [(#​2663)](https://togithub.com/mockito/mockito/pull/2663) - Varargs methods cause `ClassCastException` in `AnswerFunctionalInterfaces` [(#​2644)](https://togithub.com/mockito/mockito/issues/2644) - Mock static class seems records wrong invocations if called nested method throws exception [(#​2616)](https://togithub.com/mockito/mockito/issues/2616)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.4 (#1351) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.3` -> `0.3.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/compatibility-slim/0.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/confidence-slim/0.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.1 (#1357) * chore(main): release 2.11.0 (#1350) :robot: I have created a release *beep* *boop* --- ## [2.11.0](https://github.com/googleapis/java-bigtable/compare/v2.10.3...v2.11.0) (2022-08-17) ### Features * add stackdriver exporter ([#1247](https://github.com/googleapis/java-bigtable/issues/1247)) ([7ce915e](https://github.com/googleapis/java-bigtable/commit/7ce915e34c1ccce30bee78bda9e024a620cde737)) ### Dependencies * update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 ([#1352](https://github.com/googleapis/java-bigtable/issues/1352)) ([f8d97e5](https://github.com/googleapis/java-bigtable/commit/f8d97e557318eab214f3d916c029bfa153cf7455)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.11.1-SNAPSHOT (#1361) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.0 (#1362) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * test: add integration test for builtin metrics (#1360) * test: add integration test for builtin metrics * add license * test on staging * udpate * address comments * remove debugging * fix dependency test * update comment * update integration test to only close client if it's not null * explain why we're including grpc-xds * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build(deps): update dependency org.apache.maven.shared:maven-dependency-tree to v3.2.0 (#1363) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.shared:maven-dependency-tree](https://maven.apache.org/shared/) | `3.1.1` -> `3.2.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/compatibility-slim/3.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/confidence-slim/3.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: reset a measure map everytime the stats are recorded (#1364) * chore(main): release 2.11.1 (#1365) :robot: I have created a release *beep* *boop* --- ## [2.11.1](https://github.com/googleapis/java-bigtable/compare/v2.11.0...v2.11.1) (2022-08-26) ### Bug Fixes * reset a measure map everytime the stats are recorded ([#1364](https://github.com/googleapis/java-bigtable/issues/1364)) ([1683365](https://github.com/googleapis/java-bigtable/commit/1683365938178bb61b1e9c871f1971449ee942c2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.11.2-SNAPSHOT (#1366) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.1 (#1367) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#1370) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * fix: make cloud-monitoring a runtime dependency (#1371) * fix: make cloud-monitoring a runtime dependency * fix * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * test: disable integration test (#1375) * test: disable integration test * change to ignore * ignore the class * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 (#1374) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.1` -> `3.4.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/compatibility-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/confidence-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.2`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​342-httpsgithubcomgoogleapisjava-monitoringcomparev341v342-2022-08-31) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.1...v3.4.2) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​910](https://togithub.com/googleapis/java-monitoring/issues/910)) ([c9f0f96](https://togithub.com/googleapis/java-monitoring/commit/c9f0f9602209c077d614245f87e06527b897d461))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test: fix metrics integration test, remove the server latency since this field… (#1377) * fix: fix integration test, remove the server latency since this field may not exist * format code Co-authored-by: WhiteSource Renovate Co-authored-by: Owl Bot Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Mattie Fu Co-authored-by: Mridula <66699525+mpeddada1@users.noreply.github.com> Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Blake Li Co-authored-by: Tomo Suzuki Co-authored-by: Teng Zhong --- .github/.OwlBot.lock.yaml | 4 +- .github/CODEOWNERS | 3 + .github/sync-repo-settings.yaml | 2 + .github/workflows/ci.yaml | 2 + .readme-partials.yml | 13 + CHANGELOG.md | 75 +++++ README.md | 31 +- google-cloud-bigtable-bom/pom.xml | 19 +- google-cloud-bigtable-deps-bom/pom.xml | 5 +- google-cloud-bigtable-emulator-core/pom.xml | 4 +- google-cloud-bigtable-emulator/pom.xml | 10 +- .../clirr-ignored-differences.xml | 6 + google-cloud-bigtable-stats/pom.xml | 164 ++++++++++- .../BigtableCreateTimeSeriesExporter.java | 87 ++++++ .../stats/BigtableStackdriverExportUtils.java | 275 ++++++++++++++++++ .../BigtableStackdriverStatsExporter.java | 93 ++++++ .../stats/BuiltinMeasureConstants.java | 5 +- .../bigtable/stats/BuiltinViewConstants.java | 16 +- .../bigtable/stats/StatsRecorderWrapper.java | 42 ++- .../cloud/bigtable/stats/StatsWrapper.java | 19 +- .../META-INF/license/apache2-LICENSE.txt | 201 +++++++++++++ .../BigtableCreateTimeSeriesExporterTest.java | 148 ++++++++++ ...t.java => ITBuiltinViewConstantsTest.java} | 23 +- .../stats/StatsRecorderWrapperTest.java | 13 +- .../clirr-ignored-differences.xml | 5 + google-cloud-bigtable/pom.xml | 54 +++- .../com/google/cloud/bigtable/Version.java | 2 +- .../admin/v2/BigtableInstanceAdminClient.java | 7 +- .../bigtable/admin/v2/models/Cluster.java | 14 + .../v2/models/ClusterAutoscalingConfig.java | 42 +++ .../admin/v2/models/CreateClusterRequest.java | 9 +- .../data/v2/BigtableDataSettings.java | 57 +++- .../data/v2/stub/BigtableChannelPrimer.java | 116 ++------ .../stub/ConvertStreamExceptionCallable.java | 4 +- .../data/v2/stub/EnhancedBigtableStub.java | 55 +++- .../v2/stub/EnhancedBigtableStubSettings.java | 61 +++- .../BigtableTracerStreamingCallable.java | 46 ++- .../metrics/BigtableTracerUnaryCallable.java | 46 ++- .../v2/stub/metrics/BuiltinMetricsTracer.java | 54 ++-- .../bigtable/data/v2/stub/metrics/Util.java | 4 +- .../stub/readrows/ReadRowsFirstCallable.java | 49 +++- .../stub/readrows/ReadRowsUserCallable.java | 12 - .../v2/BigtableInstanceAdminClientTests.java | 11 +- .../v2/it/BigtableInstanceAdminClientIT.java | 76 ++++- .../v2/BigtableDataClientFactoryTest.java | 54 ++-- .../bigtable/data/v2/it/BuiltinMetricsIT.java | 136 +++++++++ .../v2/it/StreamingMetricsMetadataIT.java | 4 +- .../data/v2/it/UnaryMetricsMetadataIT.java | 4 +- .../v2/stub/BigtableChannelPrimerTest.java | 69 ++--- .../EnhancedBigtableStubSettingsTest.java | 11 + .../v2/stub/EnhancedBigtableStubTest.java | 20 +- .../metrics/BuiltinMetricsTracerTest.java | 17 +- .../stub/mutaterows/MutateRowsRetryTest.java | 116 ++++++++ .../readrows/ReadRowsFirstCallableTest.java | 30 +- .../readrows/ReadRowsUserCallableTest.java | 13 - grpc-google-cloud-bigtable-admin-v2/pom.xml | 10 +- grpc-google-cloud-bigtable-v2/pom.xml | 10 +- pom.xml | 40 ++- proto-google-cloud-bigtable-admin-v2/pom.xml | 8 +- proto-google-cloud-bigtable-v2/pom.xml | 8 +- samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 8 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- versions.txt | 14 +- 66 files changed, 2119 insertions(+), 445 deletions(-) create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporter.java create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java create mode 100644 google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java create mode 100644 google-cloud-bigtable-stats/src/main/resources/META-INF/license/apache2-LICENSE.txt create mode 100644 google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporterTest.java rename google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/{BuiltinViewConstantsTest.java => ITBuiltinViewConstantsTest.java} (59%) create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a454a61e8d..6610882f83 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 -# created: 2022-06-29T23:17:33.110417661Z + digest: sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 +# created: 2022-07-18T21:44:23.94208526Z diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7c4d9ac88e..63b6b62ecf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,7 +6,10 @@ # The @googleapis/api-bigtable is the default owner for changes in this repo * @googleapis/yoshi-java @googleapis/api-bigtable + +# for handwritten libraries, keep codeowner_team in .repo-metadata.json as owner **/*.java @googleapis/api-bigtable + # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index eb1713524e..36d4054793 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -17,6 +17,8 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - cla/google - OwlBot Post Processor + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: 1.22.0-sp isAdminEnforced: true requiredApprovingReviewCount: 1 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83ef7f9c2c..e3bb26e377 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,8 @@ jobs: windows: runs-on: windows-latest steps: + - name: Support longpaths + run: git config --system core.longpaths true - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: diff --git a/.readme-partials.yml b/.readme-partials.yml index dd804349e4..0cf67de41e 100644 --- a/.readme-partials.yml +++ b/.readme-partials.yml @@ -115,6 +115,19 @@ custom_content: | TIP: If you are experiencing version conflicts with gRPC, see [Version Conflicts](#version-conflicts). + ## Enabling client side metrics + + Cloud Bigtable client supports publishing client side metrics to + [Cloud Monitoring](https://cloud.google.com/monitoring/docs/monitoring-overview) under the + `bigtable.googleapis.com/client` namespace. + + Please fill out this [Google Form](https://forms.gle/xuhu6vCunn2MjV2m9) to sign up for the private preview of this + feature. And enable it by setting: + + ```java + BigtableDataSettings.enableBuiltinMetrics(); + ``` + ## Client request tracing: OpenCensus Tracing Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), diff --git a/CHANGELOG.md b/CHANGELOG.md index 78b9bfbe8f..40afb09b71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,80 @@ # Changelog +## [2.11.1](https://github.com/googleapis/java-bigtable/compare/v2.11.0...v2.11.1) (2022-08-26) + + +### Bug Fixes + +* reset a measure map everytime the stats are recorded ([#1364](https://github.com/googleapis/java-bigtable/issues/1364)) ([1683365](https://github.com/googleapis/java-bigtable/commit/1683365938178bb61b1e9c871f1971449ee942c2)) + +## [2.11.0](https://github.com/googleapis/java-bigtable/compare/v2.10.3...v2.11.0) (2022-08-17) + + +### Features + +* add stackdriver exporter ([#1247](https://github.com/googleapis/java-bigtable/issues/1247)) ([7ce915e](https://github.com/googleapis/java-bigtable/commit/7ce915e34c1ccce30bee78bda9e024a620cde737)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 ([#1352](https://github.com/googleapis/java-bigtable/issues/1352)) ([f8d97e5](https://github.com/googleapis/java-bigtable/commit/f8d97e557318eab214f3d916c029bfa153cf7455)) + +## [2.10.3](https://github.com/googleapis/java-bigtable/compare/v2.10.2...v2.10.3) (2022-08-08) + + +### Bug Fixes + +* declaring 2 http libraries as runtime ([#1341](https://github.com/googleapis/java-bigtable/issues/1341)) ([8071de6](https://github.com/googleapis/java-bigtable/commit/8071de6235a6c1aa5873902ca55beaa2a8d64276)) + +## [2.10.2](https://github.com/googleapis/java-bigtable/compare/v2.10.1...v2.10.2) (2022-08-03) + + +### Bug Fixes + +* add a ReadFirstRow callable to set future in onComplete ([#1326](https://github.com/googleapis/java-bigtable/issues/1326)) ([cb539b5](https://github.com/googleapis/java-bigtable/commit/cb539b50d98ec2a8538ce4691b2639426ca95464)) +* The metadata could be returned in trailer or header depends on i… ([#1337](https://github.com/googleapis/java-bigtable/issues/1337)) ([c4b8c03](https://github.com/googleapis/java-bigtable/commit/c4b8c03ece7b3f6ec2cea42ff0ca5ac617528060)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1328](https://github.com/googleapis/java-bigtable/issues/1328)) ([bee0ca0](https://github.com/googleapis/java-bigtable/commit/bee0ca036ab6e711f6069159364f6d3b691e6bfd)) +* upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats ([#1336](https://github.com/googleapis/java-bigtable/issues/1336)) ([98b3349](https://github.com/googleapis/java-bigtable/commit/98b33498d85325d22737fb4bd66826519e96755a)) + +## [2.10.1](https://github.com/googleapis/java-bigtable/compare/v2.10.0...v2.10.1) (2022-08-01) + + +### Bug Fixes + +* retry rst stream in mutations ([#1327](https://github.com/googleapis/java-bigtable/issues/1327)) ([1a5b3a2](https://github.com/googleapis/java-bigtable/commit/1a5b3a215b5388678241cadec26a962a512157ac)) + + +### Dependencies + +* update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 ([#1323](https://github.com/googleapis/java-bigtable/issues/1323)) ([7655747](https://github.com/googleapis/java-bigtable/commit/76557476744a6404b9df30c97c59f0a7e38a1ed8)) + +## [2.10.0](https://github.com/googleapis/java-bigtable/compare/v2.9.0...v2.10.0) (2022-07-26) + + +### Features + +* add response protos ([#1246](https://github.com/googleapis/java-bigtable/issues/1246)) ([52d59ce](https://github.com/googleapis/java-bigtable/commit/52d59ce18fb5536a17a5cb59da39e563e4afede4)) +* add response_params proto to clients ([#1303](https://github.com/googleapis/java-bigtable/issues/1303)) ([93edfe1](https://github.com/googleapis/java-bigtable/commit/93edfe1e43dcfefda6bba3e9ee53ed80eaf2e5c2)) +* add storage utilization gib per node for autoscaling ([#1317](https://github.com/googleapis/java-bigtable/issues/1317)) ([5282589](https://github.com/googleapis/java-bigtable/commit/52825891af0e4ec2dd76c0c6fa1379a98a77a08f)) +* use PingAndWarm request for channel priming ([#1179](https://github.com/googleapis/java-bigtable/issues/1179)) ([6629821](https://github.com/googleapis/java-bigtable/commit/6629821ea3200d3a5b93c9d45aab6d57485fcebf)) + + +### Bug Fixes + +* enable integration test for google-cloud-bigtable-stats ([#1311](https://github.com/googleapis/java-bigtable/issues/1311)) ([7c77879](https://github.com/googleapis/java-bigtable/commit/7c7787998b164ceb55472c0d06c083a835e5d000)) +* fix race condition in BuiltinMetricsTracer ([#1320](https://github.com/googleapis/java-bigtable/issues/1320)) ([644454a](https://github.com/googleapis/java-bigtable/commit/644454a9723da359677052b7a4b9201e91e9a78a)) +* ignore repackaged files to fix clirr ([#1300](https://github.com/googleapis/java-bigtable/issues/1300)) ([99b67ba](https://github.com/googleapis/java-bigtable/commit/99b67ba5b1625686ac7802a6e40dafc2edceade0)) + + +### Dependencies + +* update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#1306](https://github.com/googleapis/java-bigtable/issues/1306)) ([ddae354](https://github.com/googleapis/java-bigtable/commit/ddae3540fd68e8f79d94d49c96c5685e1bad2f66)) +* update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#1307](https://github.com/googleapis/java-bigtable/issues/1307)) ([c0740fe](https://github.com/googleapis/java-bigtable/commit/c0740fe30c5cd2bdf6dedf901e2fdb9a84ce64a1)) + ## [2.9.0](https://github.com/googleapis/java-bigtable/compare/v2.8.0...v2.9.0) (2022-06-30) diff --git a/README.md b/README.md index 2e403afad0..87450e5569 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Java idiomatic client for [Cloud Bigtable][product-docs]. ## Quickstart -If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: ```xml @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 25.4.0 + 26.1.1 pom import @@ -41,28 +41,28 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigtable - 2.9.0 + 2.11.1 ``` -If you are using Gradle 5.x or later, add this to your dependencies +If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.0.0') +implementation platform('com.google.cloud:libraries-bom:26.1.1') implementation 'com.google.cloud:google-cloud-bigtable' ``` -If you are using Gradle without BOM, add this to your dependencies +If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigtable:2.9.0' +implementation 'com.google.cloud:google-cloud-bigtable:2.11.1' ``` -If you are using SBT, add this to your dependencies +If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.9.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.11.1" ``` ## Authentication @@ -213,6 +213,19 @@ try { TIP: If you are experiencing version conflicts with gRPC, see [Version Conflicts](#version-conflicts). +## Enabling client side metrics + +Cloud Bigtable client supports publishing client side metrics to +[Cloud Monitoring](https://cloud.google.com/monitoring/docs/monitoring-overview) under the +`bigtable.googleapis.com/client` namespace. + +Please fill out this [Google Form](https://forms.gle/xuhu6vCunn2MjV2m9) to sign up for the private preview of this +feature. And enable it by setting: + +```java +BigtableDataSettings.enableBuiltinMetrics(); +``` + ## Client request tracing: OpenCensus Tracing Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index 103720ba06..42d5e00ed9 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -3,12 +3,13 @@ 4.0.0 com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom com.google.cloud google-cloud-shared-config 1.5.1 + Google Cloud Bigtable BOM @@ -62,42 +63,42 @@ com.google.cloud google-cloud-bigtable - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator - 0.146.1-SNAPSHOT + 0.148.2-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator-core - 0.146.1-SNAPSHOT + 0.148.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.cloud google-cloud-bigtable-stats - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index a6fc7e987b..c1daa36633 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -8,11 +8,12 @@ com.google.cloud google-cloud-shared-config 1.5.1 + com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom @@ -65,7 +66,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.13.0 + 3.0.1 pom import diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index 8b17245007..e9b6c5c6a2 100644 --- a/google-cloud-bigtable-emulator-core/pom.xml +++ b/google-cloud-bigtable-emulator-core/pom.xml @@ -7,11 +7,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT google-cloud-bigtable-emulator-core - 0.146.1-SNAPSHOT + 0.148.2-SNAPSHOT A Java wrapper for the Cloud Bigtable emulator. diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index efdd414172..6a4454705c 100644 --- a/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-bigtable-emulator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-bigtable-emulator - 0.146.1-SNAPSHOT + 0.148.2-SNAPSHOT Google Cloud Java - Bigtable Emulator https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.146.1-SNAPSHOT + 0.148.2-SNAPSHOT diff --git a/google-cloud-bigtable-stats/clirr-ignored-differences.xml b/google-cloud-bigtable-stats/clirr-ignored-differences.xml index 2c35667623..ff42f58da4 100644 --- a/google-cloud-bigtable-stats/clirr-ignored-differences.xml +++ b/google-cloud-bigtable-stats/clirr-ignored-differences.xml @@ -7,4 +7,10 @@ *StatsRecorderWrapper* *StatsRecorder* + + + 7002 + com/google/cloud/bigtable/stats/StatsRecorderWrapper + void record(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index 44d3a6949d..5b950728a8 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -5,7 +5,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT 4.0.0 @@ -13,15 +13,26 @@ through Stackdriver. Built-in metrics will be implemented with shaded OpenCensus so it won't interfere with customer's application metrics. --> google-cloud-bigtable-stats - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT Experimental project to shade OpenCensus dependencies. + + 3.4.1 + + com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT + pom + import + + + com.google.cloud + google-cloud-monitoring-bom + ${cloud.monitoring.version} pom import @@ -29,29 +40,97 @@ + + + io.opencensus + opencensus-api + + + io.opencensus + opencensus-exporter-stats-stackdriver + + + io.opencensus + opencensus-impl + runtime + + + + + com.google.cloud + google-cloud-monitoring + + + + com.google.http-client + google-http-client-gson + + + com.google.http-client + google-http-client + + + + + com.google.api.grpc + proto-google-cloud-monitoring-v3 + + + com.google.api.grpc + proto-google-common-protos + + + com.google.auth + google-auth-library-credentials + com.google.api gax + + + + com.google.http-client + google-http-client + + + com.google.http-client + google-http-client-gson + + com.google.api api-common - - io.opencensus - opencensus-api + com.google.api + gax-grpc + + + com.google.protobuf + protobuf-java com.google.guava guava + + org.threeten + threetenbp + + + com.google.code.findbugs + jsr305 + + - io.opencensus - opencensus-impl + com.google.http-client + google-http-client runtime + + com.google.truth truth @@ -62,6 +141,11 @@ junit test + + org.mockito + mockito-core + test + @@ -80,6 +164,7 @@ false true + io.opencensus:* @@ -92,6 +177,13 @@ + + + + + @@ -100,6 +192,17 @@ org.apache.maven.plugins maven-dependency-plugin 3.3.0 + + + + + + + + io.opencensus:opencensus-exporter-metrics-util:* + io.opencensus:opencensus-exporter-stats-stackdriver:* + + org.codehaus.mojo @@ -110,6 +213,51 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-version-consistency + + enforce + + + + + + + + + io.opencensus:*:[0.31.1] + io.opencensus:opencensus-proto:[0.2.0] + + + + + + + + + org.codehaus.mojo + license-maven-plugin + 2.0.0 + + + default-cli + generate-resources + + add-third-party + + + test + + io.opencensus:* + true + + + + diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporter.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporter.java new file mode 100644 index 0000000000..ad2e76867c --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporter.java @@ -0,0 +1,87 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import com.google.api.MonitoredResource; +import com.google.cloud.monitoring.v3.MetricServiceClient; +import com.google.monitoring.v3.CreateTimeSeriesRequest; +import com.google.monitoring.v3.ProjectName; +import io.opencensus.exporter.metrics.util.MetricExporter; +import io.opencensus.metrics.export.Metric; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; + +final class BigtableCreateTimeSeriesExporter extends MetricExporter { + private static final Logger logger = + Logger.getLogger(BigtableCreateTimeSeriesExporter.class.getName()); + private final MetricServiceClient metricServiceClient; + private final MonitoredResource monitoredResource; + private final String clientId; + + BigtableCreateTimeSeriesExporter( + MetricServiceClient metricServiceClient, MonitoredResource monitoredResource) { + this.metricServiceClient = metricServiceClient; + this.monitoredResource = monitoredResource; + this.clientId = BigtableStackdriverExportUtils.getDefaultTaskValue(); + } + + public void export(Collection metrics) { + Map> projectToTimeSeries = new HashMap<>(); + + for (Metric metric : metrics) { + // only export bigtable metrics + if (!metric.getMetricDescriptor().getName().contains("bigtable")) { + continue; + } + + try { + projectToTimeSeries = + metric.getTimeSeriesList().stream() + .collect( + Collectors.groupingBy( + timeSeries -> + BigtableStackdriverExportUtils.getProjectId( + metric.getMetricDescriptor(), timeSeries), + Collectors.mapping( + timeSeries -> + BigtableStackdriverExportUtils.convertTimeSeries( + metric.getMetricDescriptor(), + timeSeries, + clientId, + monitoredResource), + Collectors.toList()))); + + for (Map.Entry> entry : + projectToTimeSeries.entrySet()) { + ProjectName projectName = ProjectName.of(entry.getKey()); + CreateTimeSeriesRequest request = + CreateTimeSeriesRequest.newBuilder() + .setName(projectName.toString()) + .addAllTimeSeries(entry.getValue()) + .build(); + this.metricServiceClient.createServiceTimeSeries(request); + } + } catch (Throwable e) { + logger.log(Level.WARNING, "Exception thrown when exporting TimeSeries.", e); + } + } + } +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java new file mode 100644 index 0000000000..bdca097050 --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java @@ -0,0 +1,275 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import com.google.api.Distribution.BucketOptions; +import com.google.api.Distribution.BucketOptions.Explicit; +import com.google.api.Metric; +import com.google.api.MetricDescriptor.MetricKind; +import com.google.api.MonitoredResource; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Maps; +import com.google.monitoring.v3.TimeInterval; +import com.google.monitoring.v3.TypedValue; +import io.opencensus.common.Function; +import io.opencensus.common.Functions; +import io.opencensus.common.Timestamp; +import io.opencensus.metrics.LabelKey; +import io.opencensus.metrics.LabelValue; +import io.opencensus.metrics.export.Distribution; +import io.opencensus.metrics.export.Distribution.Bucket; +import io.opencensus.metrics.export.Distribution.BucketOptions.ExplicitOptions; +import io.opencensus.metrics.export.MetricDescriptor; +import io.opencensus.metrics.export.MetricDescriptor.Type; +import io.opencensus.metrics.export.Point; +import io.opencensus.metrics.export.Summary; +import io.opencensus.metrics.export.TimeSeries; +import io.opencensus.metrics.export.Value; +import java.lang.management.ManagementFactory; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +class BigtableStackdriverExportUtils { + + private static final Logger logger = + Logger.getLogger(BigtableStackdriverExportUtils.class.getName()); + + private static final Function typedValueDoubleFunction = + arg -> { + TypedValue.Builder builder = TypedValue.newBuilder(); + builder.setDoubleValue(arg); + return builder.build(); + }; + private static final Function typedValueLongFunction = + arg -> { + TypedValue.Builder builder = TypedValue.newBuilder(); + builder.setInt64Value(arg); + return builder.build(); + }; + private static final Function typedValueDistributionFunction = + arg -> { + TypedValue.Builder builder = TypedValue.newBuilder(); + return builder + .setDistributionValue(BigtableStackdriverExportUtils.createDistribution(arg)) + .build(); + }; + private static final Function typedValueSummaryFunction = + arg -> { + TypedValue.Builder builder = TypedValue.newBuilder(); + return builder.build(); + }; + private static final Function bucketOptionsExplicitFunction = + arg -> { + BucketOptions.Builder builder = BucketOptions.newBuilder(); + Explicit.Builder explicitBuilder = Explicit.newBuilder(); + explicitBuilder.addBounds(0.0D); + explicitBuilder.addAllBounds(arg.getBucketBoundaries()); + builder.setExplicitBuckets(explicitBuilder.build()); + return builder.build(); + }; + + // promote the following metric labels to monitored resource labels + private static final Set PROMOTED_RESOURCE_LABELS = + ImmutableSet.of( + BuiltinMeasureConstants.PROJECT_ID.getName(), + BuiltinMeasureConstants.INSTANCE_ID.getName(), + BuiltinMeasureConstants.CLUSTER.getName(), + BuiltinMeasureConstants.ZONE.getName(), + BuiltinMeasureConstants.TABLE.getName()); + + private static final LabelKey CLIENT_UID_LABEL_KEY = + LabelKey.create(BuiltinMeasureConstants.CLIENT_UID.getName(), "client uid"); + + static com.google.monitoring.v3.TimeSeries convertTimeSeries( + MetricDescriptor metricDescriptor, + TimeSeries timeSeries, + String clientId, + MonitoredResource monitoredResource) { + String metricName = metricDescriptor.getName(); + List labelKeys = metricDescriptor.getLabelKeys(); + Type metricType = metricDescriptor.getType(); + + MonitoredResource.Builder monitoredResourceBuilder = monitoredResource.toBuilder(); + + List metricTagKeys = new ArrayList<>(); + List metricTagValues = new ArrayList<>(); + + List labelValues = timeSeries.getLabelValues(); + for (int i = 0; i < labelValues.size(); i++) { + // If the label is defined in the monitored resource, convert it to + // a monitored resource label. Otherwise, keep it as a metric label. + if (PROMOTED_RESOURCE_LABELS.contains(labelKeys.get(i).getKey())) { + monitoredResourceBuilder.putLabels( + labelKeys.get(i).getKey(), labelValues.get(i).getValue()); + } else { + metricTagKeys.add(labelKeys.get(i)); + metricTagValues.add(labelValues.get(i)); + } + } + metricTagKeys.add(CLIENT_UID_LABEL_KEY); + metricTagValues.add(LabelValue.create(clientId)); + + com.google.monitoring.v3.TimeSeries.Builder builder = + com.google.monitoring.v3.TimeSeries.newBuilder(); + builder.setResource(monitoredResourceBuilder.build()); + builder.setMetric(createMetric(metricName, metricTagKeys, metricTagValues)); + builder.setMetricKind(createMetricKind(metricType)); + builder.setValueType(createValueType(metricType)); + Timestamp startTimeStamp = timeSeries.getStartTimestamp(); + for (Point point : timeSeries.getPoints()) { + builder.addPoints(createPoint(point, startTimeStamp)); + } + return builder.build(); + } + + static String getProjectId(MetricDescriptor metricDescriptor, TimeSeries timeSeries) { + List labelKeys = metricDescriptor.getLabelKeys(); + List labelValues = timeSeries.getLabelValues(); + for (int i = 0; i < labelKeys.size(); i++) { + if (labelKeys.get(i).getKey().equals(BuiltinMeasureConstants.PROJECT_ID.getName())) { + return labelValues.get(i).getValue(); + } + } + throw new IllegalStateException("Can't find project id for the current timeseries"); + } + + static String getDefaultTaskValue() { + // Something like '@' + final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); + // If not the expected format then generate a random number. + if (jvmName.indexOf('@') < 1) { + String hostname = "localhost"; + try { + hostname = InetAddress.getLocalHost().getHostName(); + } catch (UnknownHostException e) { + logger.log(Level.INFO, "Unable to get the hostname.", e); + } + // Generate a random number and use the same format "random_number@hostname". + return "java-" + new SecureRandom().nextInt() + "@" + hostname; + } + return "java-" + jvmName; + } + + private static MetricKind createMetricKind(Type type) { + switch (type) { + case CUMULATIVE_DOUBLE: + case CUMULATIVE_INT64: + case CUMULATIVE_DISTRIBUTION: + return MetricKind.CUMULATIVE; + default: + return MetricKind.UNRECOGNIZED; + } + } + + private static com.google.api.MetricDescriptor.ValueType createValueType(Type type) { + switch (type) { + case CUMULATIVE_DOUBLE: + return com.google.api.MetricDescriptor.ValueType.DOUBLE; + case CUMULATIVE_INT64: + return com.google.api.MetricDescriptor.ValueType.INT64; + case CUMULATIVE_DISTRIBUTION: + return com.google.api.MetricDescriptor.ValueType.DISTRIBUTION; + default: + return com.google.api.MetricDescriptor.ValueType.UNRECOGNIZED; + } + } + + private static Metric createMetric( + String metricName, List labelKeys, List labelValues) { + Metric.Builder builder = Metric.newBuilder(); + builder.setType(metricName); + Map stringTagMap = Maps.newHashMap(); + + for (int i = 0; i < labelValues.size(); ++i) { + String value = labelValues.get(i).getValue(); + if (value != null) { + stringTagMap.put(labelKeys.get(i).getKey(), value); + } + } + + builder.putAllLabels(stringTagMap); + return builder.build(); + } + + private static com.google.monitoring.v3.Point createPoint(Point point, Timestamp startTimestamp) { + com.google.monitoring.v3.TimeInterval.Builder timeIntervalBuilder = TimeInterval.newBuilder(); + timeIntervalBuilder.setStartTime(convertTimestamp(startTimestamp)); + timeIntervalBuilder.setEndTime(convertTimestamp(point.getTimestamp())); + + com.google.monitoring.v3.Point.Builder builder = com.google.monitoring.v3.Point.newBuilder(); + builder.setInterval(timeIntervalBuilder.build()); + builder.setValue(createTypedValue(point.getValue())); + return builder.build(); + } + + private static TypedValue createTypedValue(Value value) { + return value.match( + typedValueDoubleFunction, + typedValueLongFunction, + typedValueDistributionFunction, + typedValueSummaryFunction, + Functions.throwIllegalArgumentException()); + } + + private static com.google.api.Distribution createDistribution(Distribution distribution) { + com.google.api.Distribution.Builder builder = + com.google.api.Distribution.newBuilder() + .setBucketOptions(createBucketOptions(distribution.getBucketOptions())) + .setCount(distribution.getCount()) + .setMean( + distribution.getCount() == 0L + ? 0.0D + : distribution.getSum() / (double) distribution.getCount()) + .setSumOfSquaredDeviation(distribution.getSumOfSquaredDeviations()); + setBucketCounts(distribution.getBuckets(), builder); + return builder.build(); + } + + private static BucketOptions createBucketOptions( + @Nullable Distribution.BucketOptions bucketOptions) { + com.google.api.Distribution.BucketOptions.Builder builder = BucketOptions.newBuilder(); + return bucketOptions == null + ? builder.build() + : bucketOptions.match( + bucketOptionsExplicitFunction, Functions.throwIllegalArgumentException()); + } + + private static void setBucketCounts( + List buckets, com.google.api.Distribution.Builder builder) { + builder.addBucketCounts(0L); + + for (Bucket bucket : buckets) { + builder.addBucketCounts(bucket.getCount()); + } + } + + private static com.google.protobuf.Timestamp convertTimestamp(Timestamp censusTimestamp) { + return censusTimestamp.getSeconds() < 0L + ? com.google.protobuf.Timestamp.newBuilder().build() + : com.google.protobuf.Timestamp.newBuilder() + .setSeconds(censusTimestamp.getSeconds()) + .setNanos(censusTimestamp.getNanos()) + .build(); + } +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java new file mode 100644 index 0000000000..8896e52d89 --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java @@ -0,0 +1,93 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import com.google.api.MonitoredResource; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.auth.Credentials; +import com.google.cloud.monitoring.v3.MetricServiceClient; +import com.google.cloud.monitoring.v3.MetricServiceSettings; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; +import io.opencensus.common.Duration; +import io.opencensus.exporter.metrics.util.IntervalMetricReader; +import io.opencensus.exporter.metrics.util.MetricReader; +import io.opencensus.metrics.Metrics; +import java.io.IOException; +import javax.annotation.Nullable; +import javax.annotation.concurrent.GuardedBy; + +@InternalApi +public class BigtableStackdriverStatsExporter { + static final Object lock = new Object(); + + @Nullable + @GuardedBy("lock") + private static BigtableStackdriverStatsExporter instance = null; + + // Default export interval is 1 minute + private static final Duration EXPORT_INTERVAL = Duration.create(60, 0); + private static final String RESOURCE_TYPE = "bigtable_client_raw"; + + private final IntervalMetricReader intervalMetricReader; + + private BigtableStackdriverStatsExporter( + MetricServiceClient metricServiceClient, + Duration exportInterval, + MonitoredResource monitoredResource) { + IntervalMetricReader.Options.Builder intervalMetricReaderOptionsBuilder = + IntervalMetricReader.Options.builder(); + intervalMetricReaderOptionsBuilder.setExportInterval(exportInterval); + this.intervalMetricReader = + IntervalMetricReader.create( + new BigtableCreateTimeSeriesExporter(metricServiceClient, monitoredResource), + MetricReader.create( + MetricReader.Options.builder() + .setMetricProducerManager( + Metrics.getExportComponent().getMetricProducerManager()) + .build()), + intervalMetricReaderOptionsBuilder.build()); + } + + public static void register(Credentials credentials) throws IOException { + synchronized (lock) { + Preconditions.checkState( + instance == null, "Bigtable Stackdriver stats exporter is already created"); + // Default timeout for creating a client is 1 minute + MetricServiceClient client = createMetricServiceClient(credentials, Duration.create(60L, 0)); + MonitoredResource resourceType = + MonitoredResource.newBuilder().setType(RESOURCE_TYPE).build(); + instance = new BigtableStackdriverStatsExporter(client, EXPORT_INTERVAL, resourceType); + } + } + + @GuardedBy("lock") + @VisibleForTesting + static MetricServiceClient createMetricServiceClient(Credentials credentials, Duration deadline) + throws IOException { + MetricServiceSettings.Builder settingsBuilder = + MetricServiceSettings.newBuilder() + .setTransportChannelProvider(InstantiatingGrpcChannelProvider.newBuilder().build()); + settingsBuilder.setCredentialsProvider(FixedCredentialsProvider.create(credentials)); + + org.threeten.bp.Duration stackdriverDuration = + org.threeten.bp.Duration.ofMillis(deadline.toMillis()); + settingsBuilder.createTimeSeriesSettings().setSimpleTimeoutNoRetries(stackdriverDuration); + return MetricServiceClient.create(settingsBuilder.build()); + } +} diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java index 06ca674ffc..2f51204d4b 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinMeasureConstants.java @@ -23,12 +23,11 @@ class BuiltinMeasureConstants { // Monitored resource TagKeys static final TagKey PROJECT_ID = TagKey.create("project_id"); - static final TagKey INSTANCE_ID = TagKey.create("instance_id"); + static final TagKey INSTANCE_ID = TagKey.create("instance"); static final TagKey CLUSTER = TagKey.create("cluster"); static final TagKey TABLE = TagKey.create("table"); static final TagKey ZONE = TagKey.create("zone"); - // Placeholder TagKey to be used in Stackdriver exporter - static final TagKey CLIENT_ID = TagKey.create("client_id"); + static final TagKey CLIENT_UID = TagKey.create("client_uid"); // Metrics TagKeys static final TagKey APP_PROFILE = TagKey.create("app_profile"); diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java index beceeeab83..7c9dc34d78 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BuiltinViewConstants.java @@ -59,7 +59,7 @@ class BuiltinViewConstants { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, 100.0))); - private static final Aggregation AGGREGATION_ERROR_COUNT = Sum.create(); + private static final Aggregation AGGREGATION_COUNT = Sum.create(); static final View OPERATION_LATENCIES_VIEW = View.create( @@ -102,7 +102,7 @@ class BuiltinViewConstants { View.Name.create("bigtable.googleapis.com/internal/client/retry_count"), "The number of additional RPCs sent after the initial attempt.", RETRY_COUNT, - AGGREGATION_RETRY_COUNT, + AGGREGATION_COUNT, ImmutableList.of( PROJECT_ID, INSTANCE_ID, @@ -154,7 +154,7 @@ class BuiltinViewConstants { View.Name.create("bigtable.googleapis.com/internal/client/connectivity_error_count"), "Number of requests that failed to reach the Google datacenter. (Requests without google response headers).", CONNECTIVITY_ERROR_COUNT, - AGGREGATION_ERROR_COUNT, + AGGREGATION_COUNT, ImmutableList.of( PROJECT_ID, INSTANCE_ID, @@ -173,15 +173,7 @@ class BuiltinViewConstants { APPLICATION_LATENCIES, AGGREGATION_WITH_MILLIS_HISTOGRAM, ImmutableList.of( - PROJECT_ID, - INSTANCE_ID, - APP_PROFILE, - METHOD, - STREAMING, - CLIENT_NAME, - CLUSTER, - ZONE, - TABLE)); + PROJECT_ID, INSTANCE_ID, APP_PROFILE, METHOD, CLIENT_NAME, CLUSTER, ZONE, TABLE)); static final View THROTTLING_LATENCIES_VIEW = View.create( diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java index ff3568c5f4..eac556502d 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsRecorderWrapper.java @@ -40,7 +40,8 @@ public class StatsRecorderWrapper { private final SpanName spanName; private final Map statsAttributes; - private MeasureMap measureMap; + private MeasureMap attemptMeasureMap; + private MeasureMap operationMeasureMap; public StatsRecorderWrapper( OperationType operationType, @@ -54,10 +55,11 @@ public StatsRecorderWrapper( this.parentContext = tagger.getCurrentTagContext(); this.statsAttributes = statsAttributes; - this.measureMap = statsRecorder.newMeasureMap(); + this.attemptMeasureMap = statsRecorder.newMeasureMap(); + this.operationMeasureMap = statsRecorder.newMeasureMap(); } - public void record(String status, String tableId, String zone, String cluster) { + public void recordOperation(String status, String tableId, String zone, String cluster) { TagContextBuilder tagCtx = newTagContextBuilder(tableId, zone, cluster) .putLocal(BuiltinMeasureConstants.STATUS, TagValue.create(status)); @@ -66,39 +68,55 @@ public void record(String status, String tableId, String zone, String cluster) { tagCtx.putLocal( BuiltinMeasureConstants.STREAMING, TagValue.create(Boolean.toString(isStreaming))); - measureMap.record(tagCtx.build()); + operationMeasureMap.record(tagCtx.build()); + // Reinitialize a new map + operationMeasureMap = statsRecorder.newMeasureMap(); + } + + public void recordAttempt(String status, String tableId, String zone, String cluster) { + TagContextBuilder tagCtx = + newTagContextBuilder(tableId, zone, cluster) + .putLocal(BuiltinMeasureConstants.STATUS, TagValue.create(status)); + + boolean isStreaming = operationType == OperationType.ServerStreaming; + tagCtx.putLocal( + BuiltinMeasureConstants.STREAMING, TagValue.create(Boolean.toString(isStreaming))); + + attemptMeasureMap.record(tagCtx.build()); + // Reinitialize a new map + attemptMeasureMap = statsRecorder.newMeasureMap(); } public void putOperationLatencies(long operationLatency) { - measureMap.put(BuiltinMeasureConstants.OPERATION_LATENCIES, operationLatency); + operationMeasureMap.put(BuiltinMeasureConstants.OPERATION_LATENCIES, operationLatency); } public void putAttemptLatencies(long attemptLatency) { - measureMap.put(BuiltinMeasureConstants.ATTEMPT_LATENCIES, attemptLatency); + attemptMeasureMap.put(BuiltinMeasureConstants.ATTEMPT_LATENCIES, attemptLatency); } public void putRetryCount(int attemptCount) { - measureMap.put(BuiltinMeasureConstants.RETRY_COUNT, attemptCount); + operationMeasureMap.put(BuiltinMeasureConstants.RETRY_COUNT, attemptCount); } public void putApplicationLatencies(long applicationLatency) { - measureMap.put(BuiltinMeasureConstants.APPLICATION_LATENCIES, applicationLatency); + operationMeasureMap.put(BuiltinMeasureConstants.APPLICATION_LATENCIES, applicationLatency); } public void putFirstResponseLatencies(long firstResponseLatency) { - measureMap.put(BuiltinMeasureConstants.FIRST_RESPONSE_LATENCIES, firstResponseLatency); + operationMeasureMap.put(BuiltinMeasureConstants.FIRST_RESPONSE_LATENCIES, firstResponseLatency); } public void putGfeLatencies(long serverLatency) { - measureMap.put(BuiltinMeasureConstants.SERVER_LATENCIES, serverLatency); + attemptMeasureMap.put(BuiltinMeasureConstants.SERVER_LATENCIES, serverLatency); } public void putGfeMissingHeaders(long connectivityErrors) { - measureMap.put(BuiltinMeasureConstants.CONNECTIVITY_ERROR_COUNT, connectivityErrors); + attemptMeasureMap.put(BuiltinMeasureConstants.CONNECTIVITY_ERROR_COUNT, connectivityErrors); } public void putBatchRequestThrottled(long throttledTimeMs) { - measureMap.put(BuiltinMeasureConstants.THROTTLING_LATENCIES, throttledTimeMs); + operationMeasureMap.put(BuiltinMeasureConstants.THROTTLING_LATENCIES, throttledTimeMs); } private TagContextBuilder newTagContextBuilder(String tableId, String zone, String cluster) { diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java index c30dba6e6c..401a1cf975 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/StatsWrapper.java @@ -20,7 +20,10 @@ import com.google.api.core.InternalApi; import com.google.api.gax.tracing.SpanName; import io.opencensus.stats.Stats; +import io.opencensus.stats.View; +import io.opencensus.tags.TagKey; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -31,7 +34,6 @@ */ @InternalApi("For internal use only") public class StatsWrapper { - public static StatsRecorderWrapper createRecorder( OperationType operationType, SpanName spanName, Map statsAttributes) { return new StatsRecorderWrapper( @@ -49,4 +51,19 @@ public static List getOperationLatencyViewTagValueStrings() { .map(x -> x.asString()) .collect(Collectors.toCollection(ArrayList::new)); } + + // A workaround to run ITBuiltinViewConstantsTest as integration test. Integration test runs after + // the packaging step. Opencensus classes will be relocated when they are packaged but the + // integration test files will not be. So the integration tests can't reference any transitive + // dependencies that have been relocated. + static Map> getViewToTagMap() { + Map> map = new HashMap<>(); + for (View view : BuiltinViews.BIGTABLE_BUILTIN_VIEWS) { + List tagKeys = view.getColumns(); + map.put( + view.getName().asString(), + tagKeys.stream().map(tagKey -> tagKey.getName()).collect(Collectors.toList())); + } + return map; + } } diff --git a/google-cloud-bigtable-stats/src/main/resources/META-INF/license/apache2-LICENSE.txt b/google-cloud-bigtable-stats/src/main/resources/META-INF/license/apache2-LICENSE.txt new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/google-cloud-bigtable-stats/src/main/resources/META-INF/license/apache2-LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporterTest.java b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporterTest.java new file mode 100644 index 0000000000..26654c09af --- /dev/null +++ b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BigtableCreateTimeSeriesExporterTest.java @@ -0,0 +1,148 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.stats; + +import static com.google.common.truth.Truth.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import com.google.api.MonitoredResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.monitoring.v3.MetricServiceClient; +import com.google.cloud.monitoring.v3.stub.MetricServiceStub; +import com.google.monitoring.v3.CreateTimeSeriesRequest; +import com.google.protobuf.Empty; +import io.opencensus.common.Timestamp; +import io.opencensus.metrics.LabelKey; +import io.opencensus.metrics.LabelValue; +import io.opencensus.metrics.export.Metric; +import io.opencensus.metrics.export.MetricDescriptor; +import io.opencensus.metrics.export.Point; +import io.opencensus.metrics.export.TimeSeries; +import io.opencensus.metrics.export.Value; +import java.util.Arrays; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.ArgumentCaptor; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +@RunWith(JUnit4.class) +public class BigtableCreateTimeSeriesExporterTest { + + private static final String projectId = "fake-project"; + private static final String instanceId = "fake-instance"; + private static final String appProfileId = "default"; + private static final String tableId = "fake-table"; + private static final String zone = "us-east-1"; + private static final String cluster = "cluster-1"; + + @Rule public final MockitoRule mockitoRule = MockitoJUnit.rule(); + + @Mock private MetricServiceStub mockMetricServiceStub; + private MetricServiceClient fakeMetricServiceClient; + private BigtableCreateTimeSeriesExporter exporter; + + @Before + public void setUp() { + + fakeMetricServiceClient = new FakeMetricServiceClient(mockMetricServiceStub); + + exporter = + new BigtableCreateTimeSeriesExporter( + fakeMetricServiceClient, + MonitoredResource.newBuilder().setType("bigtable-table").build()); + } + + @After + public void tearDown() {} + + @Test + public void testTimeSeries() { + ArgumentCaptor argumentCaptor = + ArgumentCaptor.forClass(CreateTimeSeriesRequest.class); + + UnaryCallable mockCallable = mock(UnaryCallable.class); + when(mockMetricServiceStub.createServiceTimeSeriesCallable()).thenReturn(mockCallable); + when(mockCallable.call(argumentCaptor.capture())).thenReturn(Empty.getDefaultInstance()); + + double fakeValue = 10.0; + Metric fakeMetric = + Metric.create( + MetricDescriptor.create( + "bigtable/test", + "descritpion", + "ms", + MetricDescriptor.Type.CUMULATIVE_DOUBLE, + Arrays.asList( + LabelKey.create(BuiltinMeasureConstants.PROJECT_ID.getName(), ""), + LabelKey.create(BuiltinMeasureConstants.INSTANCE_ID.getName(), ""), + LabelKey.create(BuiltinMeasureConstants.TABLE.getName(), ""), + LabelKey.create(BuiltinMeasureConstants.CLUSTER.getName(), ""), + LabelKey.create(BuiltinMeasureConstants.ZONE.getName(), ""), + LabelKey.create(BuiltinMeasureConstants.APP_PROFILE.getName(), ""))), + Arrays.asList( + TimeSeries.create( + Arrays.asList( + LabelValue.create(projectId), + LabelValue.create(instanceId), + LabelValue.create(tableId), + LabelValue.create(cluster), + LabelValue.create(zone), + LabelValue.create(appProfileId)), + Arrays.asList( + Point.create( + Value.doubleValue(fakeValue), + Timestamp.fromMillis(System.currentTimeMillis()))), + Timestamp.fromMillis(System.currentTimeMillis())))); + + exporter.export(Arrays.asList(fakeMetric)); + + CreateTimeSeriesRequest request = argumentCaptor.getValue(); + + assertThat(request.getTimeSeriesList()).hasSize(1); + + com.google.monitoring.v3.TimeSeries timeSeries = request.getTimeSeriesList().get(0); + + assertThat(timeSeries.getResource().getLabelsMap()) + .containsExactly( + BuiltinMeasureConstants.PROJECT_ID.getName(), projectId, + BuiltinMeasureConstants.INSTANCE_ID.getName(), instanceId, + BuiltinMeasureConstants.TABLE.getName(), tableId, + BuiltinMeasureConstants.CLUSTER.getName(), cluster, + BuiltinMeasureConstants.ZONE.getName(), zone); + + assertThat(timeSeries.getMetric().getLabelsMap()).hasSize(2); + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsAtLeast(BuiltinMeasureConstants.APP_PROFILE.getName(), appProfileId); + assertThat(timeSeries.getMetric().getLabelsMap()) + .containsKey(BuiltinMeasureConstants.CLIENT_UID.getName()); + + assertThat(timeSeries.getPoints(0).getValue().getDoubleValue()).isEqualTo(fakeValue); + } + + private class FakeMetricServiceClient extends MetricServiceClient { + + protected FakeMetricServiceClient(MetricServiceStub stub) { + super(stub); + } + } +} diff --git a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/ITBuiltinViewConstantsTest.java similarity index 59% rename from google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java rename to google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/ITBuiltinViewConstantsTest.java index a7d20f6da1..929ee85f48 100644 --- a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/BuiltinViewConstantsTest.java +++ b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/ITBuiltinViewConstantsTest.java @@ -17,23 +17,22 @@ import static com.google.common.truth.Truth.assertWithMessage; -import io.opencensus.stats.View; +import java.util.List; +import java.util.Map; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; -public class BuiltinViewConstantsTest { +@RunWith(JUnit4.class) +public class ITBuiltinViewConstantsTest { @Test public void testBasicTagsExistForAllViews() { - for (View v : BuiltinViews.BIGTABLE_BUILTIN_VIEWS) { - assertWithMessage(v.getName() + " should have all basic tags") - .that(v.getColumns()) + Map> viewToTagMap = StatsWrapper.getViewToTagMap(); + for (String view : viewToTagMap.keySet()) { + assertWithMessage(view + " should have all basic tags") + .that(viewToTagMap.get(view)) .containsAtLeast( - BuiltinMeasureConstants.PROJECT_ID, - BuiltinMeasureConstants.INSTANCE_ID, - BuiltinMeasureConstants.APP_PROFILE, - BuiltinMeasureConstants.METHOD, - BuiltinMeasureConstants.ZONE, - BuiltinMeasureConstants.CLUSTER, - BuiltinMeasureConstants.TABLE); + "project_id", "instance", "app_profile", "method", "zone", "cluster", "table"); } } } diff --git a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java index ed67472623..a878fc96da 100644 --- a/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java +++ b/google-cloud-bigtable-stats/src/test/java/com/google/cloud/bigtable/stats/StatsRecorderWrapperTest.java @@ -34,7 +34,14 @@ import java.util.Objects; import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +// Can only be run as a unit test. Opencensus classes will be relocated when they are packaged but +// the integration test files will not be. So the integration tests can't reference any transitive +// dependencies that have been relocated. To work around this, we'll have to move all the reference +// to opencensus to StatsWrapper. +@RunWith(JUnit4.class) public class StatsRecorderWrapperTest { private final String PROJECT_ID = "fake-project"; @@ -86,7 +93,8 @@ public void testStreamingOperation() throws InterruptedException { recorderWrapper.putFirstResponseLatencies(firstResponseLatency); recorderWrapper.putBatchRequestThrottled(throttlingLatency); - recorderWrapper.record("OK", TABLE_ID, ZONE, CLUSTER); + recorderWrapper.recordOperation("OK", TABLE_ID, ZONE, CLUSTER); + recorderWrapper.recordAttempt("OK", TABLE_ID, ZONE, CLUSTER); Thread.sleep(100); @@ -284,7 +292,8 @@ public void testUnaryOperations() throws InterruptedException { recorderWrapper.putFirstResponseLatencies(firstResponseLatency); recorderWrapper.putBatchRequestThrottled(throttlingLatency); - recorderWrapper.record("UNAVAILABLE", TABLE_ID, ZONE, CLUSTER); + recorderWrapper.recordOperation("UNAVAILABLE", TABLE_ID, ZONE, CLUSTER); + recorderWrapper.recordAttempt("UNAVAILABLE", TABLE_ID, ZONE, CLUSTER); Thread.sleep(100); diff --git a/google-cloud-bigtable/clirr-ignored-differences.xml b/google-cloud-bigtable/clirr-ignored-differences.xml index 3fa8f3ee1e..80d3d22703 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -76,4 +76,9 @@ 8001 com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerUnaryCallable + + + 8001 + com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsConvertExceptionCallable + diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 1ad646c868..487dfeadf8 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT google-cloud-bigtable @@ -47,14 +47,21 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT + pom + import + + + com.google.cloud + google-cloud-monitoring-bom + 3.4.2 pom import @@ -64,10 +71,18 @@ - com.google.cloud google-cloud-bigtable-stats + + + + io.opencensus + * + + @@ -129,10 +144,12 @@ com.google.http-client google-http-client + runtime com.google.http-client google-http-client-gson + runtime com.google.protobuf @@ -151,6 +168,17 @@ grpc-alts runtime + + + com.google.http-client + google-http-client + runtime + + + com.google.http-client + google-http-client-gson + runtime + + 2.11.2-SNAPSHOT grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import @@ -74,7 +74,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 protected true diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 3928b491d2..7bd61241d7 100644 --- a/grpc-google-cloud-bigtable-v2/pom.xml +++ b/grpc-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 protected true diff --git a/pom.xml b/pom.xml index 7ae4cba9c6..2333898f24 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -14,7 +14,8 @@ com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.3 + @@ -152,33 +153,33 @@ com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.cloud google-cloud-bigtable - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT com.google.cloud google-cloud-conformance-tests - 0.3.0 + 0.3.4 com.google.truth @@ -206,7 +207,7 @@ org.mockito mockito-core - 4.6.1 + 4.7.0 @@ -225,7 +226,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 aggregate @@ -315,7 +316,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 com.microsoft.doclet.DocFxDoclet false @@ -339,6 +340,22 @@ + + + + with-shaded + + + !skip-shaded + + + + google-cloud-bigtable-stats + + @@ -347,7 +364,6 @@ grpc-google-cloud-bigtable-v2 proto-google-cloud-bigtable-admin-v2 proto-google-cloud-bigtable-v2 - google-cloud-bigtable-stats google-cloud-bigtable-emulator-core google-cloud-bigtable-emulator google-cloud-bigtable-bom diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml index efb09e165d..721dee46f3 100644 --- a/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml index 2d1e82fed6..42f7b20c96 100644 --- a/proto-google-cloud-bigtable-v2/pom.xml +++ b/proto-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT pom import diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 088afd3126..0684cdc321 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigtable - 2.9.0 + 2.11.1 diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 861190f078..6fc55d073d 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 25.4.0 + 26.1.1 pom import @@ -83,13 +83,13 @@ org.junit.vintage junit-vintage-engine - 5.8.2 + 5.9.0 test org.graalvm.buildtools junit-platform-native - 0.9.12 + 0.9.13 test @@ -99,7 +99,7 @@ org.graalvm.buildtools native-maven-plugin - 0.9.12 + 0.9.13 true com.example.bigtable.NativeImageBigtableSample diff --git a/samples/pom.xml b/samples/pom.xml index 660f67d35b..4254f54811 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -39,7 +39,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ee6a0e9bfb..d5a74eb608 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.9.1-SNAPSHOT + 2.11.2-SNAPSHOT diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9b5e24c2e7..b75c4c14c8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 25.4.0 + 26.1.1 pom import diff --git a/versions.txt b/versions.txt index 8aa7370dcd..ff186e3606 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.9.0:2.9.1-SNAPSHOT -grpc-google-cloud-bigtable-admin-v2:2.9.0:2.9.1-SNAPSHOT -grpc-google-cloud-bigtable-v2:2.9.0:2.9.1-SNAPSHOT -proto-google-cloud-bigtable-admin-v2:2.9.0:2.9.1-SNAPSHOT -proto-google-cloud-bigtable-v2:2.9.0:2.9.1-SNAPSHOT -google-cloud-bigtable-emulator:0.146.0:0.146.1-SNAPSHOT -google-cloud-bigtable-emulator-core:2.9.0:2.9.1-SNAPSHOT +google-cloud-bigtable:2.11.1:2.11.2-SNAPSHOT +grpc-google-cloud-bigtable-admin-v2:2.11.1:2.11.2-SNAPSHOT +grpc-google-cloud-bigtable-v2:2.11.1:2.11.2-SNAPSHOT +proto-google-cloud-bigtable-admin-v2:2.11.1:2.11.2-SNAPSHOT +proto-google-cloud-bigtable-v2:2.11.1:2.11.2-SNAPSHOT +google-cloud-bigtable-emulator:0.148.1:0.148.2-SNAPSHOT +google-cloud-bigtable-emulator-core:2.11.1:2.11.2-SNAPSHOT From e0f5d842b7705e5d64d180731b84704c37b2917f Mon Sep 17 00:00:00 2001 From: Jack Dingilian Date: Tue, 13 Dec 2022 16:56:48 -0500 Subject: [PATCH 15/27] chore: pull in changes from main branch (#1544) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#1304) * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build: enable longpaths support for windows test (#1485) (#1310) Source-Link: https://github.com/googleapis/synthtool/commit/73365620c41d96e97ff474b2c4d39b890ad51967 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 Co-authored-by: Owl Bot * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.0 (#1305) * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 (#1306) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 (#1307) * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.2 (#1297) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.0` -> `0.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/compatibility-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/confidence-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-config ### [`v0.3.1`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​031-httpswwwgithubcomgoogleapisjava-shared-configcomparev030v031-2020-01-03) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v0.3.0...v0.3.1)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: enable integration test for google-cloud-bigtable-stats (#1311) * fix: enable integration test for graal * update * add more comments * chore: mark native image checks as required (#1313) * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.3 (#1314) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.2` -> `0.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/compatibility-slim/0.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/confidence-slim/0.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * ci: update template so GAPIC_AUTO repos do not require special approvers for Java code (#1494) (#1315) Source-Link: https://github.com/googleapis/synthtool/commit/da89e53878d92467eb648c610e64f94a614915cc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 * feat: use PingAndWarm request for channel priming (#1179) Switching channel priming from sending fake ReadRowsRequest to PingAndWarm request, which on the server side will list all the tables for an instance. In the settings we won't need to specify the table Ids to prime. * build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#1316) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add storage utilization gib per node for autoscaling (#1317) * feat: add storage utilization gib per node option for autoscaling * add additional assertion * add additional tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * review comments Co-authored-by: Owl Bot * fix: fix race condition in BuiltinMetricsTracer (#1320) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(main): release 2.10.0 (#1302) :robot: I have created a release *beep* *boop* --- ## [2.10.0](https://github.com/googleapis/java-bigtable/compare/v2.9.0...v2.10.0) (2022-07-26) ### Features * add response protos ([#1246](https://github.com/googleapis/java-bigtable/issues/1246)) ([52d59ce](https://github.com/googleapis/java-bigtable/commit/52d59ce18fb5536a17a5cb59da39e563e4afede4)) * add response_params proto to clients ([#1303](https://github.com/googleapis/java-bigtable/issues/1303)) ([93edfe1](https://github.com/googleapis/java-bigtable/commit/93edfe1e43dcfefda6bba3e9ee53ed80eaf2e5c2)) * add storage utilization gib per node for autoscaling ([#1317](https://github.com/googleapis/java-bigtable/issues/1317)) ([5282589](https://github.com/googleapis/java-bigtable/commit/52825891af0e4ec2dd76c0c6fa1379a98a77a08f)) * use PingAndWarm request for channel priming ([#1179](https://github.com/googleapis/java-bigtable/issues/1179)) ([6629821](https://github.com/googleapis/java-bigtable/commit/6629821ea3200d3a5b93c9d45aab6d57485fcebf)) ### Bug Fixes * enable integration test for google-cloud-bigtable-stats ([#1311](https://github.com/googleapis/java-bigtable/issues/1311)) ([7c77879](https://github.com/googleapis/java-bigtable/commit/7c7787998b164ceb55472c0d06c083a835e5d000)) * fix race condition in BuiltinMetricsTracer ([#1320](https://github.com/googleapis/java-bigtable/issues/1320)) ([644454a](https://github.com/googleapis/java-bigtable/commit/644454a9723da359677052b7a4b9201e91e9a78a)) * ignore repackaged files to fix clirr ([#1300](https://github.com/googleapis/java-bigtable/issues/1300)) ([99b67ba](https://github.com/googleapis/java-bigtable/commit/99b67ba5b1625686ac7802a6e40dafc2edceade0)) ### Dependencies * update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#1306](https://github.com/googleapis/java-bigtable/issues/1306)) ([ddae354](https://github.com/googleapis/java-bigtable/commit/ddae3540fd68e8f79d94d49c96c5685e1bad2f66)) * update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#1307](https://github.com/googleapis/java-bigtable/issues/1307)) ([c0740fe](https://github.com/googleapis/java-bigtable/commit/c0740fe30c5cd2bdf6dedf901e2fdb9a84ce64a1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 (#1323) * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.1-SNAPSHOT (#1321) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: retry rst stream in mutations (#1327) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.0 (#1330) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.1 (#1325) :robot: I have created a release *beep* *boop* --- ## [2.10.1](https://github.com/googleapis/java-bigtable/compare/v2.10.0...v2.10.1) (2022-08-01) ### Bug Fixes * retry rst stream in mutations ([#1327](https://github.com/googleapis/java-bigtable/issues/1327)) ([1a5b3a2](https://github.com/googleapis/java-bigtable/commit/1a5b3a215b5388678241cadec26a962a512157ac)) ### Dependencies * update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 ([#1323](https://github.com/googleapis/java-bigtable/issues/1323)) ([7655747](https://github.com/googleapis/java-bigtable/commit/76557476744a6404b9df30c97c59f0a7e38a1ed8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.1 (#1329) * chore(main): release 2.10.2-SNAPSHOT (#1331) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.1 (#1332) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * fix: add a ReadFirstRow callable to set future in onComplete (#1326) * fix: add a ReadFirstRow callable to set future in onComplete * use ReadRowsFirst callable instead * don't use atomic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats (#1336) * deps: upgrade shared config to 1.5.3, remove google-http-client and google-http-client-gson. * exclude google-http-client and google-http-client-gson from google-cloud-bigtable-stats. * exclude google-http-client and google-http-client-gson from google-cloud-bigtable-stats. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add comments to explain excluded dependencies. Co-authored-by: Owl Bot * fix: The metadata could be returned in trailer or header depends on i… (#1337) * fix: The metadata could be returned in trailer or header depends on if sidecar is enabled. Check both for now. * fix * fix npe * fix NPE when metadata is null * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3 (#1328) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.13.0` -> `3.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​301-httpsgithubcomgoogleapisjava-shared-dependenciescomparev300v301-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.0...v3.0.1) ##### Dependencies - update dependency com.google.code.gson:gson to v2.9.1 ([#​766](https://togithub.com/googleapis/java-shared-dependencies/issues/766)) ([f7b2b06](https://togithub.com/googleapis/java-shared-dependencies/commit/f7b2b06b80e3e95ff8ab9b1d6a2638ef3069298a)) - update gax.version to v2.18.7 ([#​767](https://togithub.com/googleapis/java-shared-dependencies/issues/767)) ([9650368](https://togithub.com/googleapis/java-shared-dependencies/commit/96503682e98cdf348ea2c1365a03a60f4322c712)) - update google.core.version to v2.8.6 ([#​770](https://togithub.com/googleapis/java-shared-dependencies/issues/770)) ([cfd4377](https://togithub.com/googleapis/java-shared-dependencies/commit/cfd4377dc178cebb4724065d55d185ce03988d55)) ### [`v3.0.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​300-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2130v300-2022-07-29) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.13.0...v3.0.0) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-shared-dependencies/issues/1485)) ([#​738](https://togithub.com/googleapis/java-shared-dependencies/issues/738)) ([11bc8f8](https://togithub.com/googleapis/java-shared-dependencies/commit/11bc8f81f28be88a97fdeafca21724e33638770c)) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.2 ([#​729](https://togithub.com/googleapis/java-shared-dependencies/issues/729)) ([1fa59af](https://togithub.com/googleapis/java-shared-dependencies/commit/1fa59af80abb9f278f57658c10158567e825fec6)) - update dependency com.google.api-client:google-api-client-bom to v2 ([#​746](https://togithub.com/googleapis/java-shared-dependencies/issues/746)) ([2dcb2e0](https://togithub.com/googleapis/java-shared-dependencies/commit/2dcb2e071e0ba0eea21bb575bd13cd559d4a1ca6)) - update dependency com.google.api.grpc:grpc-google-common-protos to v2.9.2 ([#​741](https://togithub.com/googleapis/java-shared-dependencies/issues/741)) ([3352d6c](https://togithub.com/googleapis/java-shared-dependencies/commit/3352d6c36111c04e3f6f3e6360470fa3efb10d8f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.0 ([#​726](https://togithub.com/googleapis/java-shared-dependencies/issues/726)) ([2c5d64c](https://togithub.com/googleapis/java-shared-dependencies/commit/2c5d64c127db8384e49113acfeac6928716a2d7f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.1 ([#​742](https://togithub.com/googleapis/java-shared-dependencies/issues/742)) ([4f53527](https://togithub.com/googleapis/java-shared-dependencies/commit/4f53527bda7f40896711b7c1d1c02453321ffbc8)) - update dependency com.google.cloud:first-party-dependencies to v2 ([#​747](https://togithub.com/googleapis/java-shared-dependencies/issues/747)) ([e970ac0](https://togithub.com/googleapis/java-shared-dependencies/commit/e970ac0599941c825dc2516146a7c6673e68a9b9)) - update dependency com.google.cloud:grpc-gcp to v1.2.1 ([#​751](https://togithub.com/googleapis/java-shared-dependencies/issues/751)) ([b3284b6](https://togithub.com/googleapis/java-shared-dependencies/commit/b3284b6ee52a96a6ea8696a05a94443df9ee5b9f)) - update dependency com.google.cloud:third-party-dependencies to v2 ([#​748](https://togithub.com/googleapis/java-shared-dependencies/issues/748)) ([573b41a](https://togithub.com/googleapis/java-shared-dependencies/commit/573b41a69504372741cbeb01dd200e7c71967186)) - update dependency com.google.http-client:google-http-client-bom to v1.42.1 ([#​730](https://togithub.com/googleapis/java-shared-dependencies/issues/730)) ([6b47126](https://togithub.com/googleapis/java-shared-dependencies/commit/6b47126686b603a5d112e097ce6aa3a1880daf6f)) - update dependency com.google.http-client:google-http-client-bom to v1.42.2 ([#​749](https://togithub.com/googleapis/java-shared-dependencies/issues/749)) ([299d7b0](https://togithub.com/googleapis/java-shared-dependencies/commit/299d7b0d4920644e2c3070d12dd1d97da17a5e88)) - update dependency com.google.protobuf:protobuf-bom to v3.21.2 ([#​722](https://togithub.com/googleapis/java-shared-dependencies/issues/722)) ([7a96b12](https://togithub.com/googleapis/java-shared-dependencies/commit/7a96b1259a526b63e9376fd6cc18b27cddeb5f0f)) - update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#​756](https://togithub.com/googleapis/java-shared-dependencies/issues/756)) ([3d0bac2](https://togithub.com/googleapis/java-shared-dependencies/commit/3d0bac23487aebb94267c0708f41ff6c02a028a4)) - update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#​759](https://togithub.com/googleapis/java-shared-dependencies/issues/759)) ([5a54ef1](https://togithub.com/googleapis/java-shared-dependencies/commit/5a54ef1a2d56244166d4fcc46041d62c0dc4b411)) - update dependency io.grpc:grpc-bom to v1.48.0 ([#​752](https://togithub.com/googleapis/java-shared-dependencies/issues/752)) ([20ac908](https://togithub.com/googleapis/java-shared-dependencies/commit/20ac908932a5e7c8e581bdfcd68579d7e1cedd5f)) - update dependency org.checkerframework:checker-qual to v3.23.0 ([#​736](https://togithub.com/googleapis/java-shared-dependencies/issues/736)) ([fc01d8f](https://togithub.com/googleapis/java-shared-dependencies/commit/fc01d8f93f391f12fdb800d5006f0b4505832eeb)) - update gax.version to v2.18.3 ([#​731](https://togithub.com/googleapis/java-shared-dependencies/issues/731)) ([e8ee554](https://togithub.com/googleapis/java-shared-dependencies/commit/e8ee554707acb2f71c739d08e2ff02fbe43ffa52)) - update gax.version to v2.18.4 ([#​735](https://togithub.com/googleapis/java-shared-dependencies/issues/735)) ([11c7415](https://togithub.com/googleapis/java-shared-dependencies/commit/11c74152a84697924de3a0e838b05f606c3098f7)) - update gax.version to v2.18.5 ([#​758](https://togithub.com/googleapis/java-shared-dependencies/issues/758)) ([7469fc1](https://togithub.com/googleapis/java-shared-dependencies/commit/7469fc1cc5095b39a5738e60156711a268f6e052)) - update gax.version to v2.18.6 ([#​763](https://togithub.com/googleapis/java-shared-dependencies/issues/763)) ([b5ca2f7](https://togithub.com/googleapis/java-shared-dependencies/commit/b5ca2f7b4d81c705823253f4f03363a32d2be48b)) - update google.common-protos.version to v2.9.1 ([#​724](https://togithub.com/googleapis/java-shared-dependencies/issues/724)) ([5213dbb](https://togithub.com/googleapis/java-shared-dependencies/commit/5213dbbfa9c9b73d2420ec2be7782f16c9c4955f)) - update google.core.version to v2.8.1 ([#​725](https://togithub.com/googleapis/java-shared-dependencies/issues/725)) ([575858a](https://togithub.com/googleapis/java-shared-dependencies/commit/575858a60f76e46bbc2a2435c2b6c01c8f4ab681)) - update google.core.version to v2.8.3 ([#​760](https://togithub.com/googleapis/java-shared-dependencies/issues/760)) ([cb10ae4](https://togithub.com/googleapis/java-shared-dependencies/commit/cb10ae4b76939215ea465af74163b3d4ad65a548)) - update google.core.version to v2.8.4 ([#​762](https://togithub.com/googleapis/java-shared-dependencies/issues/762)) ([821daaf](https://togithub.com/googleapis/java-shared-dependencies/commit/821daafefdbcfdfe6e363e580747538096a562ef)) - update google.core.version to v2.8.5 ([#​764](https://togithub.com/googleapis/java-shared-dependencies/issues/764)) ([a1f8f50](https://togithub.com/googleapis/java-shared-dependencies/commit/a1f8f501b54143a2cec8e72efd4ceb3ce47f13ae)) - update iam.version to v1.5.0 ([#​732](https://togithub.com/googleapis/java-shared-dependencies/issues/732)) ([9dce0e5](https://togithub.com/googleapis/java-shared-dependencies/commit/9dce0e5199c1e425119adc804304958f58003a27)) - update iam.version to v1.5.1 ([#​737](https://togithub.com/googleapis/java-shared-dependencies/issues/737)) ([df39168](https://togithub.com/googleapis/java-shared-dependencies/commit/df391685d42fcb1b04f03ab1380a594893bdce37)) - update iam.version to v1.5.2 ([#​743](https://togithub.com/googleapis/java-shared-dependencies/issues/743)) ([cdde697](https://togithub.com/googleapis/java-shared-dependencies/commit/cdde697f25a89fc8c2ec7eae6b7c54f69977bb1c))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.10.2 (#1335) :robot: I have created a release *beep* *boop* --- ## [2.10.2](https://github.com/googleapis/java-bigtable/compare/v2.10.1...v2.10.2) (2022-08-03) ### Bug Fixes * add a ReadFirstRow callable to set future in onComplete ([#1326](https://github.com/googleapis/java-bigtable/issues/1326)) ([cb539b5](https://github.com/googleapis/java-bigtable/commit/cb539b50d98ec2a8538ce4691b2639426ca95464)) * The metadata could be returned in trailer or header depends on i… ([#1337](https://github.com/googleapis/java-bigtable/issues/1337)) ([c4b8c03](https://github.com/googleapis/java-bigtable/commit/c4b8c03ece7b3f6ec2cea42ff0ca5ac617528060)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1328](https://github.com/googleapis/java-bigtable/issues/1328)) ([bee0ca0](https://github.com/googleapis/java-bigtable/commit/bee0ca036ab6e711f6069159364f6d3b691e6bfd)) * upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats ([#1336](https://github.com/googleapis/java-bigtable/issues/1336)) ([98b3349](https://github.com/googleapis/java-bigtable/commit/98b33498d85325d22737fb4bd66826519e96755a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.10.3-SNAPSHOT (#1340) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * fix: declaring 2 http libraries as runtime (#1341) * fix: declaring 2 http libraries as runtime Fixing similar issues as googleapis/java-pubsub#1239 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.2 (#1342) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.3 (#1343) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.10.4-SNAPSHOT (#1348) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.3 (#1349) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.10.2` -> `2.10.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/compatibility-slim/2.10.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/confidence-slim/2.10.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-bigtable ### [`v2.10.3`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2103-httpsgithubcomgoogleapisjava-bigtablecomparev2102v2103-2022-08-08) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.10.2...v2.10.3) ##### Bug Fixes - declaring 2 http libraries as runtime ([#​1341](https://togithub.com/googleapis/java-bigtable/issues/1341)) ([8071de6](https://togithub.com/googleapis/java-bigtable/commit/8071de6235a6c1aa5873902ca55beaa2a8d64276))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add stackdriver exporter (#1247) * remove status from application latency * feat: update tracers to use built in metrics * feat: add response protos * feat: add response protos * feat: add stackdriver exporter * fix tests * fix dependency * remove unused dependency * clean up code * udpates on comments * remove unused setting * make metrics consistent with cloud monitoring * convert undefined to global * update * add bigtable tracer back in the base callable * fix format * fix the tag name * add the link to the form * fix format * fix dependency conflicts * fix image tests * update undefined cluster to global * address comments * tweak export interval * remove unused metric kind * get project id from the metrics * clean up imports * remove unused method and rewrite create timeseries exporter * fix integration test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#1354) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: add opencensus lincese and update readme (#1353) * chore: add opencensus lincese and update readme * remove unused implementation * rename method * add back transformer * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: add instructions to enable builtin metrics (#1358) * chore: add instructions to enable builtin metrics * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 (#1352) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.3.6` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/compatibility-slim/3.3.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/confidence-slim/3.3.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.1`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​341-httpsgithubcomgoogleapisjava-monitoringcomparev340v341-2022-08-11) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.0...v3.4.1) ##### Bug Fixes - fix samples and samples tests for UptimeCheck. ([#​909](https://togithub.com/googleapis/java-monitoring/issues/909)) ([7143f96](https://togithub.com/googleapis/java-monitoring/commit/7143f96d3e5b4f7f96f184b6367c45980dbb4140)) - google-auth-library-oauth2-http is runtime scope ([#​911](https://togithub.com/googleapis/java-monitoring/issues/911)) ([fb080db](https://togithub.com/googleapis/java-monitoring/commit/fb080dbac9a11563d3b21b1defe34720bbcd2f91)) ### [`v3.4.0`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​340-httpsgithubcomgoogleapisjava-monitoringcomparev336v340-2022-08-06) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.3.6...v3.4.0) ##### Features - Added support for evaluating missing data in AlertPolicy ([#​906](https://togithub.com/googleapis/java-monitoring/issues/906)) ([e9effc8](https://togithub.com/googleapis/java-monitoring/commit/e9effc85f48d7f64ae5b297bace67e7cbafd27b1)) ##### Documentation - **owlbot-java:** explaining why not using formatter in pom.xml ([#​1511](https://togithub.com/googleapis/java-monitoring/issues/1511)) ([#​901](https://togithub.com/googleapis/java-monitoring/issues/901)) ([02e3f6b](https://togithub.com/googleapis/java-monitoring/commit/02e3f6b8af04ad995a488da9794bf391b4c602e5)), closes [#​1502](https://togithub.com/googleapis/java-monitoring/issues/1502)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency org.mockito:mockito-core to v4.7.0 (#1356) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.6.1` -> `4.7.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/compatibility-slim/4.6.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/confidence-slim/4.6.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    mockito/mockito ### [`v4.7.0`](https://togithub.com/mockito/mockito/releases/tag/v4.7.0) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.6.1...v4.7.0) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.7.0 - 2022-08-13 - [33 commit(s)](https://togithub.com/mockito/mockito/compare/v4.6.1...v4.7.0) by [`1988123`](https://togithub.com/mockito/mockito/commit/198812345678), Andy Coates, Chen Ni, Marius Lichtblau, Nikita Koselev. Developer Advocate, Open Source Ally, Rafael Winterhalter, dependabot\[bot], dstango, fishautumn, heqiang - Bump com.diffplug.spotless from 6.9.0 to 6.9.1 [(#​2725)](https://togithub.com/mockito/mockito/pull/2725) - Bump versions.bytebuddy from 1.12.12 to 1.12.13 [(#​2719)](https://togithub.com/mockito/mockito/pull/2719) - Fix Javadoc for Mockito. [(#​2718)](https://togithub.com/mockito/mockito/pull/2718) - Bump com.diffplug.spotless from 6.8.0 to 6.9.0 [(#​2717)](https://togithub.com/mockito/mockito/pull/2717) - Fix a typo in comment of InternalRunner.java [(#​2715)](https://togithub.com/mockito/mockito/pull/2715) - Bump junit-platform-launcher from 1.8.2 to 1.9.0 [(#​2713)](https://togithub.com/mockito/mockito/pull/2713) - Bump versions.junitJupiter from 5.8.2 to 5.9.0 [(#​2712)](https://togithub.com/mockito/mockito/pull/2712) - Bump groovy from 3.0.11 to 3.0.12 [(#​2711)](https://togithub.com/mockito/mockito/pull/2711) - Bump shipkit-auto-version from 1.2.0 to 1.2.1 [(#​2709)](https://togithub.com/mockito/mockito/pull/2709) - Bump kotlinVersion from 1.7.0 to 1.7.10 [(#​2705)](https://togithub.com/mockito/mockito/pull/2705) - Bump com.diffplug.spotless from 6.7.2 to 6.8.0 [(#​2699)](https://togithub.com/mockito/mockito/pull/2699) - Bump versions.bytebuddy from 1.12.11 to 1.12.12 [(#​2695)](https://togithub.com/mockito/mockito/pull/2695) - Makes error message less misleading and points to github for help. Issue [#​2692](https://togithub.com/mockito/mockito/issues/2692) [(#​2693)](https://togithub.com/mockito/mockito/pull/2693) - Misleading error message when mocking and a class (of a parameter) is not found [(#​2692)](https://togithub.com/mockito/mockito/issues/2692) - Bump kotlinx-coroutines-core from 1.6.1-native-mt to 1.6.3-native-mt [(#​2691)](https://togithub.com/mockito/mockito/pull/2691) - Bump versions.bytebuddy from 1.12.10 to 1.12.11 [(#​2690)](https://togithub.com/mockito/mockito/pull/2690) - Fixes [#​2679](https://togithub.com/mockito/mockito/issues/2679) : Update Javadoc [(#​2689)](https://togithub.com/mockito/mockito/pull/2689) - Bump org.eclipse.osgi from 3.17.200 to 3.18.0 [(#​2688)](https://togithub.com/mockito/mockito/pull/2688) - RETURNS_SELF: Avoids returning mock when mock type is assignable to method return type, but method return type is Object. [(#​2687)](https://togithub.com/mockito/mockito/pull/2687) - RETURNS_SELF breaks methods with generic return type [(#​2686)](https://togithub.com/mockito/mockito/issues/2686) - Fix [#​2616](https://togithub.com/mockito/mockito/issues/2616) wrong stub for nested static [(#​2685)](https://togithub.com/mockito/mockito/pull/2685) - Bump com.diffplug.spotless from 6.7.0 to 6.7.2 [(#​2684)](https://togithub.com/mockito/mockito/pull/2684) - Avoids starting mocks "half-way" if a superclass constructor is mocked but an unmocked subclass is initiated. [(#​2682)](https://togithub.com/mockito/mockito/pull/2682) - Fix typo [(#​2681)](https://togithub.com/mockito/mockito/pull/2681) - Update javadoc of `Strictness.STRICT_STUBS` [(#​2679)](https://togithub.com/mockito/mockito/issues/2679) - Bump kotlinVersion from 1.6.21 to 1.7.0 [(#​2677)](https://togithub.com/mockito/mockito/pull/2677) - Bump biz.aQute.bnd.builder from 6.3.0 to 6.3.1 [(#​2675)](https://togithub.com/mockito/mockito/pull/2675) - Bump biz.aQute.bnd.gradle from 6.3.0 to 6.3.1 [(#​2674)](https://togithub.com/mockito/mockito/pull/2674) - Bump com.diffplug.spotless from 6.6.1 to 6.7.0 [(#​2672)](https://togithub.com/mockito/mockito/pull/2672) - update CONTRIBUTING.md - stackoverflow [(#​2671)](https://togithub.com/mockito/mockito/pull/2671) - stackoverflow.com is a non-actionable text, to be replaced with a hyperlink [(#​2670)](https://togithub.com/mockito/mockito/issues/2670) - Fix typos [(#​2669)](https://togithub.com/mockito/mockito/pull/2669) - Bump biz.aQute.bnd.gradle from 6.2.0 to 6.3.0 [(#​2666)](https://togithub.com/mockito/mockito/pull/2666) - Bump biz.aQute.bnd.builder from 6.2.0 to 6.3.0 [(#​2665)](https://togithub.com/mockito/mockito/pull/2665) - Improve Varargs handling in AdditionalAnswers [(#​2664)](https://togithub.com/mockito/mockito/pull/2664) - Bump appcompat from 1.4.1 to 1.4.2 [(#​2663)](https://togithub.com/mockito/mockito/pull/2663) - Varargs methods cause `ClassCastException` in `AnswerFunctionalInterfaces` [(#​2644)](https://togithub.com/mockito/mockito/issues/2644) - Mock static class seems records wrong invocations if called nested method throws exception [(#​2616)](https://togithub.com/mockito/mockito/issues/2616)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.4 (#1351) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.3` -> `0.3.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/compatibility-slim/0.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/confidence-slim/0.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.1 (#1357) * chore(main): release 2.11.0 (#1350) :robot: I have created a release *beep* *boop* --- ## [2.11.0](https://github.com/googleapis/java-bigtable/compare/v2.10.3...v2.11.0) (2022-08-17) ### Features * add stackdriver exporter ([#1247](https://github.com/googleapis/java-bigtable/issues/1247)) ([7ce915e](https://github.com/googleapis/java-bigtable/commit/7ce915e34c1ccce30bee78bda9e024a620cde737)) ### Dependencies * update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 ([#1352](https://github.com/googleapis/java-bigtable/issues/1352)) ([f8d97e5](https://github.com/googleapis/java-bigtable/commit/f8d97e557318eab214f3d916c029bfa153cf7455)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.11.1-SNAPSHOT (#1361) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.0 (#1362) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * test: add integration test for builtin metrics (#1360) * test: add integration test for builtin metrics * add license * test on staging * udpate * address comments * remove debugging * fix dependency test * update comment * update integration test to only close client if it's not null * explain why we're including grpc-xds * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build(deps): update dependency org.apache.maven.shared:maven-dependency-tree to v3.2.0 (#1363) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.shared:maven-dependency-tree](https://maven.apache.org/shared/) | `3.1.1` -> `3.2.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/compatibility-slim/3.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/confidence-slim/3.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: reset a measure map everytime the stats are recorded (#1364) * chore(main): release 2.11.1 (#1365) :robot: I have created a release *beep* *boop* --- ## [2.11.1](https://github.com/googleapis/java-bigtable/compare/v2.11.0...v2.11.1) (2022-08-26) ### Bug Fixes * reset a measure map everytime the stats are recorded ([#1364](https://github.com/googleapis/java-bigtable/issues/1364)) ([1683365](https://github.com/googleapis/java-bigtable/commit/1683365938178bb61b1e9c871f1971449ee942c2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.11.2-SNAPSHOT (#1366) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.1 (#1367) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#1370) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * fix: make cloud-monitoring a runtime dependency (#1371) * fix: make cloud-monitoring a runtime dependency * fix * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * test: disable integration test (#1375) * test: disable integration test * change to ignore * ignore the class * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 (#1374) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.1` -> `3.4.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/compatibility-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/confidence-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.2`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​342-httpsgithubcomgoogleapisjava-monitoringcomparev341v342-2022-08-31) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.1...v3.4.2) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​910](https://togithub.com/googleapis/java-monitoring/issues/910)) ([c9f0f96](https://togithub.com/googleapis/java-monitoring/commit/c9f0f9602209c077d614245f87e06527b897d461))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test: fix metrics integration test, remove the server latency since this field… (#1377) * fix: fix integration test, remove the server latency since this field may not exist * format code * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 (#1373) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.1` -> `3.4.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/compatibility-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/confidence-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.2`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​342-httpsgithubcomgoogleapisjava-monitoringcomparev341v342-2022-08-31) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.1...v3.4.2) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​910](https://togithub.com/googleapis/java-monitoring/issues/910)) ([c9f0f96](https://togithub.com/googleapis/java-monitoring/commit/c9f0f9602209c077d614245f87e06527b897d461))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.11.2 (#1372) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.11.3-SNAPSHOT (#1380) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * test(deps): update dependency org.mockito:mockito-core to v4.8.0 (#1382) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.7.0` -> `4.8.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/compatibility-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/confidence-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.2 (#1381) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.11.1` -> `2.11.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/compatibility-slim/2.11.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/confidence-slim/2.11.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 (#1384) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.1` -> `3.0.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/compatibility-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/confidence-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.2`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​302-httpsgithubcomgoogleapisjava-shared-dependenciescomparev301v302-2022-09-08) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.1...v3.0.2) ##### Dependencies - Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4 ([#​789](https://togithub.com/googleapis/java-shared-dependencies/issues/789)) ([6cf91a9](https://togithub.com/googleapis/java-shared-dependencies/commit/6cf91a96b9ea6af0fb845b50582dac7aa2892cab)) - Update dependency com.google.auth:google-auth-library-bom to v1.10.0 ([#​781](https://togithub.com/googleapis/java-shared-dependencies/issues/781)) ([8859e61](https://togithub.com/googleapis/java-shared-dependencies/commit/8859e61808bfc5cd9546e27e945fc855b36d2554)) - Update dependency com.google.auth:google-auth-library-bom to v1.11.0 ([#​790](https://togithub.com/googleapis/java-shared-dependencies/issues/790)) ([3431a47](https://togithub.com/googleapis/java-shared-dependencies/commit/3431a471cbf874a67a4f1a42e31f0ed891dedc92)) - Update dependency com.google.auth:google-auth-library-bom to v1.9.0 ([#​773](https://togithub.com/googleapis/java-shared-dependencies/issues/773)) ([27fc79f](https://togithub.com/googleapis/java-shared-dependencies/commit/27fc79f00ee70011df6a368bb8fcfad7f0ce41f0)) - Update dependency com.google.errorprone:error_prone_annotations to v2.15.0 ([#​776](https://togithub.com/googleapis/java-shared-dependencies/issues/776)) ([bf333b8](https://togithub.com/googleapis/java-shared-dependencies/commit/bf333b8c88072d21cb959db4d3328bbb55d9ef5c)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.5 ([#​780](https://togithub.com/googleapis/java-shared-dependencies/issues/780)) ([da7f44d](https://togithub.com/googleapis/java-shared-dependencies/commit/da7f44d71d6d7f372b5313dab68ce220308614d4)) - Update dependency io.grpc:grpc-bom to v1.48.1 ([#​768](https://togithub.com/googleapis/java-shared-dependencies/issues/768)) ([5c7768d](https://togithub.com/googleapis/java-shared-dependencies/commit/5c7768d3c9665dd356de6c39c0a6a5fa6e992f2e)) - Update dependency io.grpc:grpc-bom to v1.49.0 ([#​786](https://togithub.com/googleapis/java-shared-dependencies/issues/786)) ([8734812](https://togithub.com/googleapis/java-shared-dependencies/commit/8734812f1b4e2faaa48caf41eff59a85892ae344)) - Update dependency org.checkerframework:checker-qual to v3.24.0 ([#​775](https://togithub.com/googleapis/java-shared-dependencies/issues/775)) ([df74b7b](https://togithub.com/googleapis/java-shared-dependencies/commit/df74b7b0dd5dd592523f302d9fb36adb5991cb0b)) - Update dependency org.checkerframework:checker-qual to v3.25.0 ([#​788](https://togithub.com/googleapis/java-shared-dependencies/issues/788)) ([207035b](https://togithub.com/googleapis/java-shared-dependencies/commit/207035bd04c9305899eea540acbefaf06a7b1ec9)) - Update dependency org.threeten:threetenbp to v1.6.1 ([#​782](https://togithub.com/googleapis/java-shared-dependencies/issues/782)) ([0f218ae](https://togithub.com/googleapis/java-shared-dependencies/commit/0f218aeb6aa33cf1da4a8b1d6c82bbf87946dab9)) - Update gax.version to v2.19.0 ([#​785](https://togithub.com/googleapis/java-shared-dependencies/issues/785)) ([4448331](https://togithub.com/googleapis/java-shared-dependencies/commit/4448331c4c6d88ea8076260776d1d47d24aa19fa)) - Update google.core.version to v2.8.10 ([#​787](https://togithub.com/googleapis/java-shared-dependencies/issues/787)) ([3c344d5](https://togithub.com/googleapis/java-shared-dependencies/commit/3c344d515e3b9215db5a1f8ef550d800d974e558)) - Update google.core.version to v2.8.7 ([#​774](https://togithub.com/googleapis/java-shared-dependencies/issues/774)) ([d0cd5e8](https://togithub.com/googleapis/java-shared-dependencies/commit/d0cd5e8f6ca88787fe0dbf7f30c849cb4c4fae5e)) - Update google.core.version to v2.8.8 ([#​777](https://togithub.com/googleapis/java-shared-dependencies/issues/777)) ([f00571c](https://togithub.com/googleapis/java-shared-dependencies/commit/f00571cd1e9f1c4e011fba4a1e1674c1d8d60200)) - Update google.core.version to v2.8.9 ([#​784](https://togithub.com/googleapis/java-shared-dependencies/issues/784)) ([aa8e505](https://togithub.com/googleapis/java-shared-dependencies/commit/aa8e505dbb1214b2239e55d5ac83b00c167d77e4))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: Generated snippets should not be owned by samples reviewers (#1575) (#1389) Source-Link: https://github.com/googleapis/synthtool/commit/2e9ac19d5b8181af77cdc5337cf922517813cc49 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 (#1393) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.2` -> `3.0.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/compatibility-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/confidence-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.3`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​303-httpsgithubcomgoogleapisjava-shared-dependenciescomparev302v303-2022-09-14) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.2...v3.0.3) ##### Dependencies - Google-cloud-core 2.8.12 ([#​799](https://togithub.com/googleapis/java-shared-dependencies/issues/799)) ([1b3db8d](https://togithub.com/googleapis/java-shared-dependencies/commit/1b3db8d1e17c49ebae79fc96164fa9058e1df6e3)) - Moving gson to first-party-dependencies ([#​800](https://togithub.com/googleapis/java-shared-dependencies/issues/800)) ([a41fcc1](https://togithub.com/googleapis/java-shared-dependencies/commit/a41fcc11d32e02e5af2837561792e3919f6d4b3f)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.6 ([#​797](https://togithub.com/googleapis/java-shared-dependencies/issues/797)) ([bc5fdc9](https://togithub.com/googleapis/java-shared-dependencies/commit/bc5fdc9b3af7973c28f063a9ac156fe2af562814)) - Update gax.version to v2.19.1 ([#​798](https://togithub.com/googleapis/java-shared-dependencies/issues/798)) ([84e5487](https://togithub.com/googleapis/java-shared-dependencies/commit/84e5487b2e3dce4bb60badecebde788c3cb702b8)) - Update google.core.version to v2.8.11 ([#​793](https://togithub.com/googleapis/java-shared-dependencies/issues/793)) ([63c1297](https://togithub.com/googleapis/java-shared-dependencies/commit/63c129722aa0b821031ff5b4c11004adf7b12044))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 (#1387) * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 (#1386) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.2` -> `3.4.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/compatibility-slim/3.4.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/confidence-slim/3.4.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.3`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​343-httpsgithubcomgoogleapisjava-monitoringcomparev342v343-2022-09-09) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.2...v3.4.3) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#​922](https://togithub.com/googleapis/java-monitoring/issues/922)) ([447e9c1](https://togithub.com/googleapis/java-monitoring/commit/447e9c10d11934a732112af0ac20b3146396c5e1))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.4 (#1395) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.3` -> `3.4.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/compatibility-slim/3.4.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/confidence-slim/3.4.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.4`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​344-httpsgithubcomgoogleapisjava-monitoringcomparev343v344-2022-09-15) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.3...v3.4.4) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#​927](https://togithub.com/googleapis/java-monitoring/issues/927)) ([804aed6](https://togithub.com/googleapis/java-monitoring/commit/804aed6206156580c1de7174d73c606ed8dfd899))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API in **stable** proto to external customers (#1383) * chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions PiperOrigin-RevId: 472750037 Source-Link: https://github.com/googleapis/googleapis/commit/88f2ea3f53b9712f2e04f28f06210f6f77fa7e24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API in **stable** proto to external customers PiperOrigin-RevId: 474010093 Source-Link: https://github.com/googleapis/googleapis/commit/e210283d7f45232b923d200e90ef57d41d0b3580 Source-Link: https://github.com/googleapis/googleapis-gen/commit/46d5c58b647ea9c050a00c3b6825a3cf316f8948 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDZkNWM1OGI2NDdlYTljMDUwYTAwYzNiNjgyNWEzY2YzMTZmODk0OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add properties to table admin toString * fix * fix Co-authored-by: Owl Bot Co-authored-by: Kristen O'Leary * chore: move cloud monitoring bom to deps bom (#1388) * chore(main): release 2.12.0 (#1396) :robot: I have created a release *beep* *boop* --- ## [2.12.0](https://github.com/googleapis/java-bigtable/compare/v2.11.2...v2.12.0) (2022-09-15) ### Features * **generated:** Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API ([f1f3f05](https://github.com/googleapis/java-bigtable/commit/f1f3f05ae2dc84a8dc853eb5467fbd157b7293c3)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 ([#1386](https://github.com/googleapis/java-bigtable/issues/1386)) ([f460373](https://github.com/googleapis/java-bigtable/commit/f460373eb74776fae1787b74392b508643e6139f)) * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 ([#1387](https://github.com/googleapis/java-bigtable/issues/1387)) ([e339cb1](https://github.com/googleapis/java-bigtable/commit/e339cb186289fa53a0d65c3d77fb7edbae737882)) * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.4 ([#1395](https://github.com/googleapis/java-bigtable/issues/1395)) ([a2db183](https://github.com/googleapis/java-bigtable/commit/a2db183dea46cd83ea70bb89848e0579b9c61fac)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1384](https://github.com/googleapis/java-bigtable/issues/1384)) ([ee3b256](https://github.com/googleapis/java-bigtable/commit/ee3b256a62c2665e2c4230d9acfc14c3d5c2aebf)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1393](https://github.com/googleapis/java-bigtable/issues/1393)) ([df6c6c7](https://github.com/googleapis/java-bigtable/commit/df6c6c79715ecc7b99e026ce8dfa8645765fc9d5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.12.1-SNAPSHOT (#1397) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.12.0 (#1399) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.12.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.2 (#1403) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.5 (#1406) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.4` -> `3.4.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/compatibility-slim/3.4.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/confidence-slim/3.4.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.5`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​345-httpsgithubcomgoogleapisjava-monitoringcomparev344v345-2022-09-20) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.4...v3.4.5) ##### Dependencies - Update dependency com.google.protobuf:protobuf-java-util to v3.21.6 ([#​926](https://togithub.com/googleapis/java-monitoring/issues/926)) ([e61e14c](https://togithub.com/googleapis/java-monitoring/commit/e61e14c8657f2aa6545ec0c8a08c9b4eebe1ee58))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 (#1409) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.junit.vintage:junit-vintage-engine](https://junit.org/junit5/) ([source](https://togithub.com/junit-team/junit5)) | `5.9.0` -> `5.9.1` | [![age](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/compatibility-slim/5.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/confidence-slim/5.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add gRPC RLS dependency (#1248) * feat: add gRPC RLS dependency * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 (#1412) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.13` -> `0.9.14` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/compatibility-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/confidence-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    graalvm/native-build-tools ### [`v0.9.14`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.14) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.13...0.9.14) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Fix how the GRAALVM_QUICK_BUILD env var is read by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/278](https://togithub.com/graalvm/native-build-tools/pull/278) - Make it possible to pass env vars to the builder process by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/280](https://togithub.com/graalvm/native-build-tools/pull/280) - Maven plugin fixes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/274](https://togithub.com/graalvm/native-build-tools/pull/274) - Add support for `test-jar` artifacts by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/281](https://togithub.com/graalvm/native-build-tools/pull/281) - Add Gradle CLI options for quick build and debugging by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/286](https://togithub.com/graalvm/native-build-tools/pull/286) - Add a changelog and docs about build -> compile-no-fork changes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/290](https://togithub.com/graalvm/native-build-tools/pull/290) - Do not filter out entry values starting with `java.` in the metadata post-processing action by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/289](https://togithub.com/graalvm/native-build-tools/pull/289) - Try to fix snapshot publishing by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/244](https://togithub.com/graalvm/native-build-tools/pull/244) - Fix javadoc and warnings by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/291](https://togithub.com/graalvm/native-build-tools/pull/291) - Bump the default metadata repository version to 0.1.2 by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/294](https://togithub.com/graalvm/native-build-tools/pull/294) - Fix metadata repository crash by [@​dnestoro](https://togithub.com/dnestoro) in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) - Add support for override flag by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://github.com/graalvm/native-build-tools/pull/296](https://togithub.com/graalvm/native-build-tools/pull/296) - Fix build time initialization error with JUnit 5.9.0 by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/308](https://togithub.com/graalvm/native-build-tools/pull/308) - Fix compatibility with configuration cache by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/304](https://togithub.com/graalvm/native-build-tools/pull/304) - Bump metadata repository version by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/310](https://togithub.com/graalvm/native-build-tools/pull/310) #### New Contributors - [@​dnestoro](https://togithub.com/dnestoro) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.13...0.9.14
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.14 (#1411) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.13` -> `0.9.14` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/compatibility-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/confidence-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    graalvm/native-build-tools ### [`v0.9.14`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.14) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.13...0.9.14) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Fix how the GRAALVM_QUICK_BUILD env var is read by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/278](https://togithub.com/graalvm/native-build-tools/pull/278) - Make it possible to pass env vars to the builder process by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/280](https://togithub.com/graalvm/native-build-tools/pull/280) - Maven plugin fixes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/274](https://togithub.com/graalvm/native-build-tools/pull/274) - Add support for `test-jar` artifacts by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/281](https://togithub.com/graalvm/native-build-tools/pull/281) - Add Gradle CLI options for quick build and debugging by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/286](https://togithub.com/graalvm/native-build-tools/pull/286) - Add a changelog and docs about build -> compile-no-fork changes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/290](https://togithub.com/graalvm/native-build-tools/pull/290) - Do not filter out entry values starting with `java.` in the metadata post-processing action by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/289](https://togithub.com/graalvm/native-build-tools/pull/289) - Try to fix snapshot publishing by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/244](https://togithub.com/graalvm/native-build-tools/pull/244) - Fix javadoc and warnings by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/291](https://togithub.com/graalvm/native-build-tools/pull/291) - Bump the default metadata repository version to 0.1.2 by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/294](https://togithub.com/graalvm/native-build-tools/pull/294) - Fix metadata repository crash by [@​dnestoro](https://togithub.com/dnestoro) in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) - Add support for override flag by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://github.com/graalvm/native-build-tools/pull/296](https://togithub.com/graalvm/native-build-tools/pull/296) - Fix build time initialization error with JUnit 5.9.0 by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/308](https://togithub.com/graalvm/native-build-tools/pull/308) - Fix compatibility with configuration cache by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/304](https://togithub.com/graalvm/native-build-tools/pull/304) - Bump metadata repository version by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/310](https://togithub.com/graalvm/native-build-tools/pull/310) #### New Contributors - [@​dnestoro](https://togithub.com/dnestoro) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.13...0.9.14
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: pin versions of dependencies for compatibility with Python 3.6 (#1588) (#1415) * chore: pin versions of dependencies for compatibility with Python 3.6 * fix path of requirements file in synthtool Source-Link: https://github.com/googleapis/synthtool/commit/69cdb47824170d0b02bf694649ce66613c889040 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 * fix: add a UUID in the task value (#1430) The jvmName when calling from cloud function will always be 1@localhost. Add a UUID in the default task value string so we won't have multiple tasks writing to the same stream. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(main): release 2.13.0 (#1407) :robot: I have created a release *beep* *boop* --- ## [2.13.0](https://github.com/googleapis/java-bigtable/compare/v2.12.0...v2.13.0) (2022-09-27) ### Features * Add gRPC RLS dependency ([#1248](https://github.com/googleapis/java-bigtable/issues/1248)) ([e829b92](https://github.com/googleapis/java-bigtable/commit/e829b923d97a00dcb55a14b0877bec2c8cf5ece2)) ### Bug Fixes * Add a UUID in the task value ([#1430](https://github.com/googleapis/java-bigtable/issues/1430)) ([3bfc7bc](https://github.com/googleapis/java-bigtable/commit/3bfc7bc246488a37b4470e3a75ffdd34f6761804)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.5 ([#1406](https://github.com/googleapis/java-bigtable/issues/1406)) ([d906729](https://github.com/googleapis/java-bigtable/commit/d906729a4bb9a51907bf4879e8d063d5103565ac)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.14 ([#1411](https://github.com/googleapis/java-bigtable/issues/1411)) ([ef7d741](https://github.com/googleapis/java-bigtable/commit/ef7d7419293f9f046dcf941148a86da713feae17)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 ([#1412](https://github.com/googleapis/java-bigtable/issues/1412)) ([dcae319](https://github.com/googleapis/java-bigtable/commit/dcae3195871b78aa6e102c4bc570b18c303c7760)) * Update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 ([#1409](https://github.com/googleapis/java-bigtable/issues/1409)) ([c1e195d](https://github.com/googleapis/java-bigtable/commit/c1e195d4e0470b30d97231c44b09fcb5c4881514)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.13.1-SNAPSHOT (#1431) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * feat: publish the RequestStats proto (#1400) * docs: Remove unnecessary comment PiperOrigin-RevId: 474807836 Source-Link: https://github.com/googleapis/googleapis/commit/dfd68f74ddecc6d83ec50db6a69f695de9e304c3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fe305e0252bc9a88466e1b96c2f2464dd729b978 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmUzMDVlMDI1MmJjOWE4ODQ2NmUxYjk2YzJmMjQ2NGRkNzI5Yjk3OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: publish the RequestStats proto PiperOrigin-RevId: 476399682 Source-Link: https://github.com/googleapis/googleapis/commit/0c4e682e302268332468f304d0411048e24c85db Source-Link: https://github.com/googleapis/googleapis-gen/commit/ff87f69aad1f2ff06772f917eecbea649797d9d5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmY4N2Y2OWFhZDFmMmZmMDY3NzJmOTE3ZWVjYmVhNjQ5Nzk3ZDlkNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add to clirr ignored differences Co-authored-by: Owl Bot Co-authored-by: Kristen O'Leary * chore: exclude requirements.txt file from renovate-bot (#1594) (#1416) Source-Link: https://github.com/googleapis/synthtool/commit/f58d3135a2fab20e225d98741dbc06d57459b816 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.13.0 (#1442) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.13.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 (#1446) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.3` -> `3.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/compatibility-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/confidence-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.4`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​304-httpsgithubcomgoogleapisjava-shared-dependenciescomparev303v304-2022-10-03) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.3...v3.0.4) ##### Dependencies - Update dependency cachetools to v5 ([#​816](https://togithub.com/googleapis/java-shared-dependencies/issues/816)) ([3f6c408](https://togithub.com/googleapis/java-shared-dependencies/commit/3f6c408210c931c286235f61c7aadea5bf5cfe4d)) - Update dependency certifi to v2022.9.24 ([#​818](https://togithub.com/googleapis/java-shared-dependencies/issues/818)) ([5f04b97](https://togithub.com/googleapis/java-shared-dependencies/commit/5f04b97c2343146600e8c9ee65afdeb58f5743a6)) - Update dependency charset-normalizer to v2.1.1 ([#​822](https://togithub.com/googleapis/java-shared-dependencies/issues/822)) ([6997c5a](https://togithub.com/googleapis/java-shared-dependencies/commit/6997c5acad937ebe3594330de73261a424d42cf3)) - Update dependency click to v8.1.3 ([#​823](https://togithub.com/googleapis/java-shared-dependencies/issues/823)) ([42bf9f8](https://togithub.com/googleapis/java-shared-dependencies/commit/42bf9f834fdafea60f2be7ccbf7d363e058cd7c2)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.7 ([#​837](https://togithub.com/googleapis/java-shared-dependencies/issues/837)) ([d31e507](https://togithub.com/googleapis/java-shared-dependencies/commit/d31e5077c7e036de5e238e9a611df7ced527574a)) - Update dependency gcp-releasetool to v1.8.8 ([#​819](https://togithub.com/googleapis/java-shared-dependencies/issues/819)) ([8245d97](https://togithub.com/googleapis/java-shared-dependencies/commit/8245d975fb12e81454ec7664f9a7c9809bbac697)) - Update dependency gcp-releasetool to v1.8.9 ([#​846](https://togithub.com/googleapis/java-shared-dependencies/issues/846)) ([04e3283](https://togithub.com/googleapis/java-shared-dependencies/commit/04e32831c6e87c372444901013a747d2d02ce38d)) - Update dependency google-api-core to v2.10.1 ([#​824](https://togithub.com/googleapis/java-shared-dependencies/issues/824)) ([818b9aa](https://togithub.com/googleapis/java-shared-dependencies/commit/818b9aa2ac99d8b1f9b39a74b626122aed5f1d94)) - Update dependency google-auth to v2.12.0 ([#​825](https://togithub.com/googleapis/java-shared-dependencies/issues/825)) ([07c544b](https://togithub.com/googleapis/java-shared-dependencies/commit/07c544b5e0fa9f7110bbc957570f7a405962072e)) - Update dependency google-cloud-core to v2.3.2 ([#​820](https://togithub.com/googleapis/java-shared-dependencies/issues/820)) ([2a219e8](https://togithub.com/googleapis/java-shared-dependencies/commit/2a219e86f187ba5ad72f2570bd58ca6100128c43)) - Update dependency google-cloud-storage to v2.5.0 ([#​826](https://togithub.com/googleapis/java-shared-dependencies/issues/826)) ([bb10d18](https://togithub.com/googleapis/java-shared-dependencies/commit/bb10d1858a515f09d365362ffa0110a5b362c96b)) - Update dependency google-crc32c to v1.5.0 ([#​827](https://togithub.com/googleapis/java-shared-dependencies/issues/827)) ([7e5dae6](https://togithub.com/googleapis/java-shared-dependencies/commit/7e5dae60d667cb84b9ee4f6c977bdc35e79e4cf6)) - Update dependency google-resumable-media to v2.4.0 ([#​838](https://togithub.com/googleapis/java-shared-dependencies/issues/838)) ([ad82d63](https://togithub.com/googleapis/java-shared-dependencies/commit/ad82d6378f64039da383509638fb4782908eb4bc)) - Update dependency googleapis-common-protos to v1.56.4 ([#​821](https://togithub.com/googleapis/java-shared-dependencies/issues/821)) ([93d7745](https://togithub.com/googleapis/java-shared-dependencies/commit/93d77458c9bbf84ec367cdb4caaa41e6f71675c6)) - Update dependency importlib-metadata to v4.12.0 ([#​832](https://togithub.com/googleapis/java-shared-dependencies/issues/832)) ([ee19fb1](https://togithub.com/googleapis/java-shared-dependencies/commit/ee19fb1ca5a2a2e1985297e3b72d44de68bc72e3)) - Update dependency importlib-metadata to v4.13.0 ([#​843](https://togithub.com/googleapis/java-shared-dependencies/issues/843)) ([d2ede60](https://togithub.com/googleapis/java-shared-dependencies/commit/d2ede601eee8c875780c7eb5924623537480c509)) - Update dependency importlib-metadata to v5 ([#​845](https://togithub.com/googleapis/java-shared-dependencies/issues/845)) ([03ac7e8](https://togithub.com/googleapis/java-shared-dependencies/commit/03ac7e800274c5f58d2bc4ddd0561bfcdea1bb27)) - Update dependency io.grpc:grpc-bom to v1.49.1 ([#​802](https://togithub.com/googleapis/java-shared-dependencies/issues/802)) ([b8c54bf](https://togithub.com/googleapis/java-shared-dependencies/commit/b8c54bf8f1ddecc788cee151f8afe42de45bdc9d)) - Update dependency io.grpc:grpc-bom to v1.49.2 ([#​842](https://togithub.com/googleapis/java-shared-dependencies/issues/842)) ([1b1cfa2](https://togithub.com/googleapis/java-shared-dependencies/commit/1b1cfa27d05f7732da12721305cf41dcbebda232)) - Update dependency jeepney to v0.8.0 ([#​833](https://togithub.com/googleapis/java-shared-dependencies/issues/833)) ([15d2f9f](https://togithub.com/googleapis/java-shared-dependencies/commit/15d2f9f52b5a3259db0813df3d2424e256ccb372)) - Update dependency jinja2 to v3.1.2 ([#​834](https://togithub.com/googleapis/java-shared-dependencies/issues/834)) ([c188f95](https://togithub.com/googleapis/java-shared-dependencies/commit/c188f95acdb3349f1c4b3ed56e5fffb75e8fbc8d)) - Update dependency keyring to v23.9.3 ([#​828](https://togithub.com/googleapis/java-shared-dependencies/issues/828)) ([b185aaa](https://togithub.com/googleapis/java-shared-dependencies/commit/b185aaae716d4d97cb64f0426cac0e778f11223d)) - Update dependency markupsafe to v2.1.1 ([#​829](https://togithub.com/googleapis/java-shared-dependencies/issues/829)) ([add2825](https://togithub.com/googleapis/java-shared-dependencies/commit/add2825bd34cd80f529dbe0dadb3c84219177916)) - Update dependency org.threeten:threetenbp to v1.6.2 ([#​808](https://togithub.com/googleapis/java-shared-dependencies/issues/808)) ([2d2eabd](https://togithub.com/googleapis/java-shared-dependencies/commit/2d2eabd14d8150207885ea47280c0f7ff3d2962f)) - Update dependency protobuf to v3.20.2 ([#​830](https://togithub.com/googleapis/java-shared-dependencies/issues/830)) ([5afa76f](https://togithub.com/googleapis/java-shared-dependencies/commit/5afa76f9ef4705aecba49abc7bb93982fb1ecf3e)) - Update dependency protobuf to v3.20.3 ([#​839](https://togithub.com/googleapis/java-shared-dependencies/issues/839)) ([d9fc7dd](https://togithub.com/googleapis/java-shared-dependencies/commit/d9fc7ddd3e663458e6ea3f78a3c6241377df0319)) - Update dependency protobuf to v4 ([#​817](https://togithub.com/googleapis/java-shared-dependencies/issues/817)) ([ee8d154](https://togithub.com/googleapis/java-shared-dependencies/commit/ee8d154287ccd256b4dcfa48f28f5ec61a91fe3e)) - Update dependency pyjwt to v2.5.0 ([#​812](https://togithub.com/googleapis/java-shared-dependencies/issues/812)) ([4d4528e](https://togithub.com/googleapis/java-shared-dependencies/commit/4d4528e8ce269d49b99d2dbc4fcda2dc37a058cb)) - Update dependency requests to v2.28.1 ([#​813](https://togithub.com/googleapis/java-shared-dependencies/issues/813)) ([a3a8d89](https://togithub.com/googleapis/java-shared-dependencies/commit/a3a8d89b0117007a7108553c70aa82dd289e1691)) - Update dependency typing-extensions to v4.3.0 ([#​814](https://togithub.com/googleapis/java-shared-dependencies/issues/814)) ([da875e5](https://togithub.com/googleapis/java-shared-dependencies/commit/da875e5e91fa9d8c177e6c3afc9e34242eb914b7)) - Update dependency zipp to v3.8.1 ([#​815](https://togithub.com/googleapis/java-shared-dependencies/issues/815)) ([15585fd](https://togithub.com/googleapis/java-shared-dependencies/commit/15585fd0216013fe93be011f93f391f6269aa777)) - Update gax.version to v2.19.2 ([#​847](https://togithub.com/googleapis/java-shared-dependencies/issues/847)) ([c4afe1f](https://togithub.com/googleapis/java-shared-dependencies/commit/c4afe1fdc88af29ab039cea618d52c15c90e43e9)) - Update google.common-protos.version to v2.9.3 ([#​803](https://togithub.com/googleapis/java-shared-dependencies/issues/803)) ([a3e8e5e](https://togithub.com/googleapis/java-shared-dependencies/commit/a3e8e5eb53a8da14abf3b8d81a4f34fbb2f3b8f9)) - Update google.common-protos.version to v2.9.5 ([#​831](https://togithub.com/googleapis/java-shared-dependencies/issues/831)) ([1c901db](https://togithub.com/googleapis/java-shared-dependencies/commit/1c901db8a7740afaec3e809e51d4d369fbf469c4)) - Update google.common-protos.version to v2.9.6 ([#​844](https://togithub.com/googleapis/java-shared-dependencies/issues/844)) ([9e156be](https://togithub.com/googleapis/java-shared-dependencies/commit/9e156be59bd89959f04252c3045b8cd7a8be8070)) - Update google.core.version to v2.8.13 ([#​804](https://togithub.com/googleapis/java-shared-dependencies/issues/804)) ([45ae571](https://togithub.com/googleapis/java-shared-dependencies/commit/45ae57142bd6d5334eedd46243736b200a459795)) - Update google.core.version to v2.8.14 ([#​805](https://togithub.com/googleapis/java-shared-dependencies/issues/805)) ([02c9397](https://togithub.com/googleapis/java-shared-dependencies/commit/02c9397a84bf3fcca8d04e4c9867cc47689abde2)) - Update google.core.version to v2.8.15 ([#​807](https://togithub.com/googleapis/java-shared-dependencies/issues/807)) ([980856c](https://togithub.com/googleapis/java-shared-dependencies/commit/980856c43981992a3d08f69eac83aeada752d244)) - Update google.core.version to v2.8.16 ([#​810](https://togithub.com/googleapis/java-shared-dependencies/issues/810)) ([c2b2c9a](https://togithub.com/googleapis/java-shared-dependencies/commit/c2b2c9a327fd588f69524bb93a17e5d4ae8f5a42)) - Update google.core.version to v2.8.17 ([#​835](https://togithub.com/googleapis/java-shared-dependencies/issues/835)) ([3def21d](https://togithub.com/googleapis/java-shared-dependencies/commit/3def21df2e4253e3df0da064b6c4e472df079d2b)) - Update google.core.version to v2.8.18 ([#​840](https://togithub.com/googleapis/java-shared-dependencies/issues/840)) ([46566dc](https://togithub.com/googleapis/java-shared-dependencies/commit/46566dc18c4b1ed41c482b4ce21b92651e2f9dc5)) - Update google.core.version to v2.8.19 ([#​841](https://togithub.com/googleapis/java-shared-dependencies/issues/841)) ([99afde9](https://togithub.com/googleapis/java-shared-dependencies/commit/99afde97ea498f549eb75cc58c4ed88edf81b20d)) - Update google.core.version to v2.8.20 ([#​848](https://togithub.com/googleapis/java-shared-dependencies/issues/848)) ([c980c4f](https://togithub.com/googleapis/java-shared-dependencies/commit/c980c4fdfc8890d812b4881ba5b87bfd21269a5f)) - Update iam.version to v1.6.1 ([#​806](https://togithub.com/googleapis/java-shared-dependencies/issues/806)) ([a50158d](https://togithub.com/googleapis/java-shared-dependencies/commit/a50158d3b83cf8e02d8ee08c94e512b5669a927b)) - Update iam.version to v1.6.2 ([#​849](https://togithub.com/googleapis/java-shared-dependencies/issues/849)) ([e43ac96](https://togithub.com/googleapis/java-shared-dependencies/commit/e43ac96bc189a096a9311c9b03e85c86bea07e99))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(bazel): update protobuf to v3.21.7 (#1445) * chore(bazel): update protobuf to v3.21.7 PiperOrigin-RevId: 477955264 Source-Link: https://github.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.14.0 (#1447) :robot: I have created a release *beep* *boop* --- ## [2.14.0](https://togithub.com/googleapis/java-bigtable/compare/v2.13.0...v2.14.0) (2022-10-03) ### Features * Publish the RequestStats proto ([#1400](https://togithub.com/googleapis/java-bigtable/issues/1400)) ([e989200](https://togithub.com/googleapis/java-bigtable/commit/e989200980510b14d602925df7430e01bc2f8db7)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#1446](https://togithub.com/googleapis/java-bigtable/issues/1446)) ([81034c5](https://togithub.com/googleapis/java-bigtable/commit/81034c51722d973cf5545feb33665b4e08265303)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.14.1-SNAPSHOT (#1448) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 (#1450) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.5` -> `3.4.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/compatibility-slim/3.4.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/confidence-slim/3.4.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.14.1 (#1452) :robot: I have created a release *beep* *boop* --- ## [2.14.1](https://togithub.com/googleapis/java-bigtable/compare/v2.14.0...v2.14.1) (2022-10-05) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 ([#1450](https://togithub.com/googleapis/java-bigtable/issues/1450)) ([96b1e80](https://togithub.com/googleapis/java-bigtable/commit/96b1e80af5e17689a84318e9a797195cde3dab45)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.14.2-SNAPSHOT (#1453) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.14.1 (#1449) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.13.0` -> `2.14.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-bigtable ### [`v2.14.1`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2141-httpsgithubcomgoogleapisjava-bigtablecomparev2140v2141-2022-10-05) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.14.0...v2.14.1) ##### Dependencies - Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 ([#​1450](https://togithub.com/googleapis/java-bigtable/issues/1450)) ([96b1e80](https://togithub.com/googleapis/java-bigtable/commit/96b1e80af5e17689a84318e9a797195cde3dab45)) ### [`v2.14.0`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2140-httpsgithubcomgoogleapisjava-bigtablecomparev2130v2140-2022-10-03) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.13.0...v2.14.0) ##### Features - Publish the RequestStats proto ([#​1400](https://togithub.com/googleapis/java-bigtable/issues/1400)) ([e989200](https://togithub.com/googleapis/java-bigtable/commit/e989200980510b14d602925df7430e01bc2f8db7)) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#​1446](https://togithub.com/googleapis/java-bigtable/issues/1446)) ([81034c5](https://togithub.com/googleapis/java-bigtable/commit/81034c51722d973cf5545feb33665b4e08265303))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * samples: Add examples for making requests in a salted row key scenario (#1405) * docs: Add examples for making requests in a salted row key scenario * fix indentation * fix indentation * fix lint * add example for scans * lint: fix import order * Add java doc comment explaining salted keys * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * trigger builds * trigger builds * trigger builds Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.3 (#1456) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: catch all throwables so version mismatch won't hang the client (#1402) * fix: catch all throwables so version mismatch won't hang the client * create a SafeResponseObserver * format * extend SafeResponseObserver * catch stream cancellation * update error log * update * throw on onStart * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix version Co-authored-by: Owl Bot * feat: add apis for Mutation and RowMutationEntry (#1454) * feat: add apis for Mutation and RowMutationEntry * use iterable instead of iterator * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: [java] generation with shared deps 3.0.4 (#1641) (#1451) * chore: [java] generation with shared deps 3.0.4 (#1641) * chore: [java] generation with shared deps 3.0.4 * fix for tests Source-Link: https://github.com/googleapis/synthtool/commit/c3ad3cc9d876a3dd897cc511cf5ef921784851ae Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:5643a4e1b729803e67ddceee450e87052527b37cac394bf900b4f8e3d1bb3e9b * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 (#1463) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 (#1462) * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.5.0 (#1464) * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.4 (#1469) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 (#1467) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 (#1470) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.4` -> `3.0.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/compatibility-slim/3.0.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/confidence-slim/3.0.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.5`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​305-httpsgithubcomgoogleapisjava-shared-dependenciescomparev304v305-2022-10-20) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.4...v3.0.5) ##### Dependencies - Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4.20221013 ([#​868](https://togithub.com/googleapis/java-shared-dependencies/issues/868)) ([ffa7272](https://togithub.com/googleapis/java-shared-dependencies/commit/ffa7272e6d4775905e64173b3617555ee355019d)) - Update dependency com.google.auth:google-auth-library-bom to v1.12.0 ([#​870](https://togithub.com/googleapis/java-shared-dependencies/issues/870)) ([6e76f19](https://togithub.com/googleapis/java-shared-dependencies/commit/6e76f19133515b755b78185ce0135943e878a368)) - Update dependency com.google.auth:google-auth-library-bom to v1.12.1 ([#​871](https://togithub.com/googleapis/java-shared-dependencies/issues/871)) ([f7f5dc2](https://togithub.com/googleapis/java-shared-dependencies/commit/f7f5dc26dd54f33954bdf5d43314020de58e055b)) - Update dependency com.google.cloud:grpc-gcp to v1.3.0 ([#​867](https://togithub.com/googleapis/java-shared-dependencies/issues/867)) ([1927a92](https://togithub.com/googleapis/java-shared-dependencies/commit/1927a926c615eabbf0e7377c65232e0e5268220e)) - Update dependency com.google.errorprone:error_prone_annotations to v2.16 ([#​865](https://togithub.com/googleapis/java-shared-dependencies/issues/865)) ([b1734ec](https://togithub.com/googleapis/java-shared-dependencies/commit/b1734ec1c20e7bdf2582b31fde4648aa9f8de2fe)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.8 ([#​872](https://togithub.com/googleapis/java-shared-dependencies/issues/872)) ([1c303f2](https://togithub.com/googleapis/java-shared-dependencies/commit/1c303f2aa5145da4c93605a2d1088e8a3884de81)) - Update dependency gcp-releasetool to v1.8.10 ([#​853](https://togithub.com/googleapis/java-shared-dependencies/issues/853)) ([c815a59](https://togithub.com/googleapis/java-shared-dependencies/commit/c815a5996d28676de015d5dd41e2b0405f4bb9dc)) - Update dependency google-api-core to v2.10.2 ([#​858](https://togithub.com/googleapis/java-shared-dependencies/issues/858)) ([387a156](https://togithub.com/googleapis/java-shared-dependencies/commit/387a15662db0b20e72fe5bf961c02eb2bc4e75d9)) - Update dependency io.grpc:grpc-bom to v1.50.0 ([#​866](https://togithub.com/googleapis/java-shared-dependencies/issues/866)) ([3d3d443](https://togithub.com/googleapis/java-shared-dependencies/commit/3d3d4434636e605f47082641e8e495bbce8f9515)) - Update dependency io.grpc:grpc-bom to v1.50.1 ([#​873](https://togithub.com/googleapis/java-shared-dependencies/issues/873)) ([956309d](https://togithub.com/googleapis/java-shared-dependencies/commit/956309d76c9de46885711a77afbfce0d28971096)) - Update dependency org.checkerframework:checker-qual to v3.26.0 ([#​852](https://togithub.com/googleapis/java-shared-dependencies/issues/852)) ([6926b33](https://togithub.com/googleapis/java-shared-dependencies/commit/6926b33b83d1aa63e0c78b7b8c72cd1d80e28ef3)) - Update dependency org.threeten:threetenbp to v1.6.3 ([#​869](https://togithub.com/googleapis/java-shared-dependencies/issues/869)) ([fa4999b](https://togithub.com/googleapis/java-shared-dependencies/commit/fa4999b6310940e62456e83dad3ec76a7406a218)) - Update dependency typing-extensions to v4.4.0 ([#​854](https://togithub.com/googleapis/java-shared-dependencies/issues/854)) ([43bd31b](https://togithub.com/googleapis/java-shared-dependencies/commit/43bd31b66eef50d82ecf8a692053f10eb385d5c1)) - Update dependency zipp to v3.9.0 ([#​859](https://togithub.com/googleapis/java-shared-dependencies/issues/859)) ([a070ad0](https://togithub.com/googleapis/java-shared-dependencies/commit/a070ad04ef1bab5690487ba13dd4060827851edf)) - Update gax.version to v2.19.4 ([#​875](https://togithub.com/googleapis/java-shared-dependencies/issues/875)) ([227bdd8](https://togithub.com/googleapis/java-shared-dependencies/commit/227bdd86f368b89309814c615828544c29871a5d)) - Update google.core.version to v2.8.21 ([#​861](https://togithub.com/googleapis/java-shared-dependencies/issues/861)) ([8b502bd](https://togithub.com/googleapis/java-shared-dependencies/commit/8b502bd43760a2e52cf107567011d9c5132e74bd)) - Update google.core.version to v2.8.22 ([#​879](https://togithub.com/googleapis/java-shared-dependencies/issues/879)) ([0360e93](https://togithub.com/googleapis/java-shared-dependencies/commit/0360e931dc45034d3c3c554f2c29ad7ea4a0a9bb)) - Update iam.version to v1.6.3 ([#​857](https://togithub.com/googleapis/java-shared-dependencies/issues/857)) ([b39e683](https://togithub.com/googleapis/java-shared-dependencies/commit/b39e6838c3f3f6ef2b350efe8aec1b622893421a)) - Update iam.version to v1.6.4 ([#​862](https://togithub.com/googleapis/java-shared-dependencies/issues/862)) ([85c9794](https://togithub.com/googleapis/java-shared-dependencies/commit/85c979401c34454b2d5681eed9d8b3b3679413be))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency org.mockito:mockito-core to v4.8.1 (#1471) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.8.0` -> `4.8.1` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/compatibility-slim/4.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/confidence-slim/4.8.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    mockito/mockito ### [`v4.8.1`](https://togithub.com/mockito/mockito/releases/tag/v4.8.1) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.8.0...v4.8.1) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.8.1 - 2022-10-17 - [6 commit(s)](https://togithub.com/mockito/mockito/compare/v4.8.0...v4.8.1) by andrepaschoal, dependabot\[bot] - Possible fix [#​2765](https://togithub.com/mockito/mockito/issues/2765): Add task to download package-list file from java as element-list [(#​2766)](https://togithub.com/mockito/mockito/pull/2766) - JavaDoc warning is blocking all pull requests [(#​2765)](https://togithub.com/mockito/mockito/issues/2765) - Bump versions.junitJupiter from 5.9.0 to 5.9.1 [(#​2758)](https://togithub.com/mockito/mockito/pull/2758) - Bump groovy from 3.0.12 to 3.0.13 [(#​2756)](https://togithub.com/mockito/mockito/pull/2756) - Bump com.diffplug.spotless from 6.10.0 to 6.11.0 [(#​2753)](https://togithub.com/mockito/mockito/pull/2753) - Bump org.eclipse.osgi from 3.18.0 to 3.18.100 [(#​2751)](https://togithub.com/mockito/mockito/pull/2751) - Bump versions.bytebuddy from 1.12.14 to 1.12.16 [(#​2747)](https://togithub.com/mockito/mockito/pull/2747)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: pin versions of certifi and google-resumable-media (#1660) (#1466) chore: pin versions of certifi and google-resumable-media Source-Link: https://togithub.com/googleapis/synthtool/commit/09c4fcd0c6a0a880cf73662e118a8e8019da947c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8 * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 (#1468) * chore: Fix typo in PartialListClustersException and PartialListInstancesException message (#1473) * Fix typo in PartialListClustersException message * Update PartialListInstancesException.java * Update PartialListClustersException.java * chore: [java] remove flatten plugin dependency check (#1663) (#1474) chore: remove check for flatten plugin We have had the check for the flatten-maven-plugin in each Cloud Java client repository. However, the behavior of the plugin has been stable and its not each repository's responsibility to assert the plugin's behavior. A new check is going to be added at the googleapis/java-shared-config repository to assert the plugin's behavior when we upgrade its version. Source-Link: https://github.com/googleapis/synthtool/commit/9266ddc3b17fc15f34d2fb88ce8c5f1a4bfe64b0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.6.0 (#1476) * fix: fix attempt status tag for metrics (#1477) * fix: set a longer timeout to wait for callbacks to be executed (#1478) * fix: set a longer timeout to wait for callbacks to be executed * fix format * chore: Adding unavailableZones to PartialList*Exception message (#1475) * chore: Adding unavailableZones to PartialList*Exception message * Update PartialListInstancesException.java * fix: rename metric names to match the external name (#1479) * chore(main): release 2.15.0 (#1457) :robot: I have created a release *beep* *boop* --- ## [2.15.0](https://togithub.com/googleapis/java-bigtable/compare/v2.14.1...v2.15.0) (2022-10-26) ### Features * Add apis for Mutation and RowMutationEntry ([#1454](https://togithub.com/googleapis/java-bigtable/issues/1454)) ([a86934f](https://togithub.com/googleapis/java-bigtable/commit/a86934f4f70e1998e7368688df8695a4bac7006e)) ### Bug Fixes * Catch all throwables so version mismatch won't hang the client ([#1402](https://togithub.com/googleapis/java-bigtable/issues/1402)) ([c03b8a4](https://togithub.com/googleapis/java-bigtable/commit/c03b8a4245beab7258b8ed8ec76153e6a0275211)) * Fix attempt status tag for metrics ([#1477](https://togithub.com/googleapis/java-bigtable/issues/1477)) ([e54cf7d](https://togithub.com/googleapis/java-bigtable/commit/e54cf7d61128049cea2817b409a8524636b4a6cf)) * Rename metric names to match the external name ([#1479](https://togithub.com/googleapis/java-bigtable/issues/1479)) ([28ca7c3](https://togithub.com/googleapis/java-bigtable/commit/28ca7c310d9a157529555ab6865f89802161443b)) * Set a longer timeout to wait for callbacks to be executed ([#1478](https://togithub.com/googleapis/java-bigtable/issues/1478)) ([0d9ff6a](https://togithub.com/googleapis/java-bigtable/commit/0d9ff6ab3bd5bf853f1d371312036b14c924ae5e)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.5.0 ([#1464](https://togithub.com/googleapis/java-bigtable/issues/1464)) ([d8e58a5](https://togithub.com/googleapis/java-bigtable/commit/d8e58a5d88de7ea249d7bc141f1ac65592088da6)) * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.6.0 ([#1476](https://togithub.com/googleapis/java-bigtable/issues/1476)) ([331dcfb](https://togithub.com/googleapis/java-bigtable/commit/331dcfbd06ab578cfe9673ca70cab1f6abd5ddcd)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 ([#1470](https://togithub.com/googleapis/java-bigtable/issues/1470)) ([557a4fb](https://togithub.com/googleapis/java-bigtable/commit/557a4fbed77157c3ccfc3e84a0c952b647844f9b)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 ([#1462](https://togithub.com/googleapis/java-bigtable/issues/1462)) ([69540cb](https://togithub.com/googleapis/java-bigtable/commit/69540cb2df25d5fb716e81e7513930b01c310b72)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 ([#1467](https://togithub.com/googleapis/java-bigtable/issues/1467)) ([53599ca](https://togithub.com/googleapis/java-bigtable/commit/53599caa0f92bad1365adbc4b58a1dcb1e8a393e)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 ([#1463](https://togithub.com/googleapis/java-bigtable/issues/1463)) ([a6612f9](https://togithub.com/googleapis/java-bigtable/commit/a6612f90cd4a0ec9589ca797ff3a42d23478a6e6)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 ([#1468](https://togithub.com/googleapis/java-bigtable/issues/1468)) ([fe0ddb1](https://togithub.com/googleapis/java-bigtable/commit/fe0ddb1b183cfdf368c2387a645a613bbfd52a69)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.15.1-SNAPSHOT (#1481) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.15.0 (#1483) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.15.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency protobuf to v3.20.2 (#1659) (#1485) Co-authored-by: Jeffrey Rennie Co-authored-by: Tomo Suzuki Source-Link: https://togithub.com/googleapis/synthtool/commit/b59cf7b5a91ecab29e21fdfbb7e3b81066229be4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:894d56f45fc3f4f0d5f3bcf790846419ee2d8e44715eae8917d6a1bba2b7283d * Revert "chore(deps): update dependency protobuf to v3.20.2" (#1674) (#1486) Revert "chore(deps): update dependency protobuf to v3.20.2 (#1659)" This reverts commit b59cf7b5a91ecab29e21fdfbb7e3b81066229be4. Source-Link: https://github.com/googleapis/synthtool/commit/a66e34625d760ad299627f6613a1bd438c1b62a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:bd316b9a591c45264775ecaba72e37d65905925c323b68e51a08c4126e4b6d0a Co-authored-by: Owl Bot * chore: add internal api for row merging (#1465) This is a feature for an internal google integration Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * fix: only record retry count when it's > 0 (#1488) * fix: only record retry count when it's > 0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 (#1487) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: Fix the cloud bigtable link in readme (#1492) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.17 (#1495) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.17 (#1496) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.16` -> `0.9.17` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/compatibility-slim/0.9.16)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/confidence-slim/0.9.16)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    graalvm/native-build-tools ### [`v0.9.17`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.17) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.16...0.9.17) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Make GraalVM installation check lazy by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://togithub.com/graalvm/native-build-tools/pull/345](https://togithub.com/graalvm/native-build-tools/pull/345) - Add a check for the minimal GraalVM version by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://togithub.com/graalvm/native-build-tools/pull/353](https://togithub.com/graalvm/native-build-tools/pull/353) - Bump metadata repo version to 0.2.4 by [@​dnestoro](https://togithub.com/dnestoro) in [https://togithub.com/graalvm/native-build-tools/pull/356](https://togithub.com/graalvm/native-build-tools/pull/356) **Full Changelog**: https://togithub.com/graalvm/native-build-tools/compare/0.9.16...0.9.17
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: fix the connectivity error count caculation (#1401) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * test: add a test for fix #1477 and few other tests to increase coverage (#1499) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(java): update dependencies in java requirements file (#1695) (#1500) * chore(java): update gcp-releasetool and cryptography in java requirements file Source-Link: https://togithub.com/googleapis/synthtool/commit/74d0956884c1bb9dc901b52de35ca2bca025a74e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:142286d973c7b6d58186070f203b50058a20a7d7b42147996db24921a18da1b0 * fix: call record attempt compeletion on permanent failures (#1502) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.6 (#1501) * chore(main): release 2.15.1 (#1490) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: fix metric client settings (#1509) * fix: fix metric client settings * fix format * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: update google-auth to 2.14.1 (#1703) (#1507) Co-authored-by: Anthonios Partheniou Source-Link: https://github.com/googleapis/synthtool/commit/9457e69470097f8e71b6b497ceece5bc423eaf3a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:a3fe0b4c75f322520f548e535ed329df1e475ace3cb4a979b78e003cb822636a Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou * feat: remove proto ReadEfficiencyStats (#1455) * feat: remove proto ReadEfficiencyStats feat: remove field RequestStats.read_efficiency_stats feat: rename proto AllReadStats to FullReadStatsView feat: rename field RequestStats.all_read_stats to full_read_stats_view feat: rename proto ReadIteratorStats to ReadIterationStats feat: remove enum value ReadRowsRequest.RequestStatsView.REQUEST_STATS_EFFICIENCY feat: remove field ReadIterationStats.deletes_seen PiperOrigin-RevId: 479370243 Source-Link: https://github.com/googleapis/googleapis/commit/959d789bef1cb2a7706c474f8db36a04dc0724de Source-Link: https://github.com/googleapis/googleapis-gen/commit/38b425264c03f3cdca279503c801c86604c8a67a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzhiNDI1MjY0YzAzZjNjZGNhMjc5NTAzYzgwMWM4NjYwNGM4YTY3YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update clirr ignored differences * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add note Co-authored-by: Owl Bot Co-authored-by: Kristen O'Leary Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> * chore: use gcp-docuploader 0.6.3 (#1708) (#1511) Source-Link: https://github.com/googleapis/synthtool/commit/fbc8bfe364d70c38fbffbf68ebe1cfdae54d3447 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:e76136cc48f90aa19ba29cdfbd4002111467e44a1c9d905867d98dafafbd03bb Co-authored-by: Owl Bot * chore(main): release 2.15.2-SNAPSHOT (#1506) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.16.0 (#1512) :robot: I have created a release *beep* *boop* --- ## [2.16.0](https://togithub.com/googleapis/java-bigtable/compare/v2.15.1...v2.16.0) (2022-11-11) ### Features * Remove proto ReadEfficiencyStats ([#1455](https://togithub.com/googleapis/java-bigtable/issues/1455)) ([f6b243d](https://togithub.com/googleapis/java-bigtable/commit/f6b243db39c0370f0d9a4e47e553cfe62493b240)) ### Bug Fixes * Fix metric client settings ([#1509](https://togithub.com/googleapis/java-bigtable/issues/1509)) ([38ac115](https://togithub.com/googleapis/java-bigtable/commit/38ac115af07432e9c178064b59729a0b358105cd)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.16.1-SNAPSHOT (#1513) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.16.0 (#1508) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.16.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * feat: next release from main branch is 2.17.0 (#1514) * test(deps): update dependency org.mockito:mockito-core to v4.9.0 (#1517) * feat: add test proxy to java-bigtable client (#1498) * feat: add test proxy to java-bigtable client * udpate * update * remove shading plugin * make client version a variable * add a read me * rebase and update version * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * nit Co-authored-by: Owl Bot * deps: update dependency kr.motd.maven:os-maven-plugin to v1.7.1 (#1518) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.5 (#1521) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.5 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build(deps): update dependency org.apache.maven.shared:maven-dependency-tree to v3.2.1 (#1523) * chore: update readme to build the root directory first (#1526) * test(deps): update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.18 (#1528) * test(deps): update dependency org.graalvm.buildtools:junit-platform-native to v0.9.18 (#1527) * test(fix): update the test proxy to set app profile id and connect to emulator correctly (#1529) This change makes the test proxy work with the hermetic testing that exercises app_profile_id and emulator (https://togithub.com/googleapis/cloud-bigtable-clients-test) * deps: update dependency com.google.cloud:google-cloud-monitoring-bom … (#1531) …to v3.7.0 (Port #1519) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * feat: add a query paginator (#1530) * feat: add a query paginator * add some comments * add a test for full table scan * fix format * address comments * update * fix test * fix nit * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: update native image checks to use graalvm-22.3.0 (#1534) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.5 (#1535) * build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.4.0 (#1533) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 (#1538) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 (#1537) * feat: implement cross-project table restore (#1536) * feat: implement cross-project table restore * move test case around. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Tracy Cui Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 (#1539) * chore(main): release 2.17.0 (#1516) :robot: I have created a release *beep* *boop* --- ## [2.17.0](https://togithub.com/googleapis/java-bigtable/compare/v2.16.0...v2.17.0) (2022-12-07) ### Features * Add a query paginator ([#1530](https://togithub.com/googleapis/java-bigtable/issues/1530)) ([5c8e1f6](https://togithub.com/googleapis/java-bigtable/commit/5c8e1f656b15177ecef4709b9e502cef58cca479)) * Add test proxy to java-bigtable client ([#1498](https://togithub.com/googleapis/java-bigtable/issues/1498)) ([132b4e4](https://togithub.com/googleapis/java-bigtable/commit/132b4e4fe340ca316de8eef2e2133b6dabd9dec3)) * Implement cross-project table restore ([#1536](https://togithub.com/googleapis/java-bigtable/issues/1536)) ([335977c](https://togithub.com/googleapis/java-bigtable/commit/335977c499b1776c8fa861d13195ffc49e468e0a)) * Next release from main branch is 2.17.0 ([#1514](https://togithub.com/googleapis/java-bigtable/issues/1514)) ([4fc6a93](https://togithub.com/googleapis/java-bigtable/commit/4fc6a93a25362df7bc107d48f94e1c00b6bd608d)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom … ([#1531](https://togithub.com/googleapis/java-bigtable/issues/1531)) ([ee98338](https://togithub.com/googleapis/java-bigtable/commit/ee9833835a84cee202b142950b28704db682ac0c)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#1539](https://togithub.com/googleapis/java-bigtable/issues/1539)) ([3244cef](https://togithub.com/googleapis/java-bigtable/commit/3244cefd4d77a44bab6ccaa8f5c03e3d31575625)) * Update dependency kr.motd.maven:os-maven-plugin to v1.7.1 ([#1518](https://togithub.com/googleapis/java-bigtable/issues/1518)) ([8309681](https://togithub.com/googleapis/java-bigtable/commit/830968109a3754a12bd0bc92674fe42ae529b924)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#1537](https://togithub.com/googleapis/java-bigtable/issues/1537)) ([7f7c478](https://togithub.com/googleapis/java-bigtable/commit/7f7c478a2163c46d10ed39ea3c1b046f971d4569)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#1538](https://togithub.com/googleapis/java-bigtable/issues/1538)) ([9d3df57](https://togithub.com/googleapis/java-bigtable/commit/9d3df57d7bfeafd9cbcf56ecd58b52cc1b14ba7b)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.17.1-SNAPSHOT (#1540) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.17.0 (#1541) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.16.0` -> `2.17.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/compatibility-slim/2.16.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/confidence-slim/2.16.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). Co-authored-by: WhiteSource Renovate Co-authored-by: Owl Bot Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Mattie Fu Co-authored-by: Mridula <66699525+mpeddada1@users.noreply.github.com> Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Blake Li Co-authored-by: Tomo Suzuki Co-authored-by: Kristen O'Leary Co-authored-by: Mohan Li <67390330+mohanli-ml@users.noreply.github.com> Co-authored-by: Billy Jacobson Co-authored-by: shantstepanian <17996546+shantstepanian@users.noreply.github.com> Co-authored-by: Jeffrey Rennie Co-authored-by: Igor Bernstein Co-authored-by: Anthonios Partheniou Co-authored-by: Prashant Mishra <11733935+prash-mi@users.noreply.github.com> Co-authored-by: J. Liu Co-authored-by: TracyCuiCan Co-authored-by: Tracy Cui --- .github/.OwlBot.lock.yaml | 3 +- .github/CODEOWNERS | 3 + .github/release-please.yml | 7 + .github/sync-repo-settings.yaml | 17 + .kokoro/dependencies.sh | 51 - .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 3 +- .kokoro/requirements.in | 34 + .kokoro/requirements.txt | 456 +++++++ .readme-partials.yml | 2 +- CHANGELOG.md | 141 ++ README.md | 13 +- google-cloud-bigtable-bom/pom.xml | 20 +- google-cloud-bigtable-deps-bom/pom.xml | 20 +- google-cloud-bigtable-emulator-core/pom.xml | 4 +- google-cloud-bigtable-emulator/pom.xml | 10 +- google-cloud-bigtable-stats/pom.xml | 20 +- .../stats/BigtableStackdriverExportUtils.java | 3 +- .../BigtableStackdriverStatsExporter.java | 5 +- .../clirr-ignored-differences.xml | 7 +- google-cloud-bigtable/pom.xml | 36 +- .../com/google/cloud/bigtable/Version.java | 2 +- .../v2/BaseBigtableInstanceAdminClient.java | 597 ++++++--- .../v2/BaseBigtableTableAdminClient.java | 824 +++++++++--- .../v2/BaseBigtableTableAdminSettings.java | 24 + .../admin/v2/BigtableTableAdminSettings.java | 2 + .../bigtable/admin/v2/gapic_metadata.json | 3 + .../models/PartialListClustersException.java | 2 +- .../models/PartialListInstancesException.java | 2 +- .../admin/v2/models/RestoreTableRequest.java | 45 +- .../BigtableInstanceAdminStubSettings.java | 7 +- .../admin/v2/stub/BigtableTableAdminStub.java | 11 + .../stub/BigtableTableAdminStubSettings.java | 75 +- .../v2/stub/GrpcBigtableTableAdminStub.java | 43 + .../data/v2/internal/RowMergerUtil.java | 55 + .../data/v2/models/DefaultRowAdapter.java | 3 +- .../bigtable/data/v2/models/Mutation.java | 13 + .../cloud/bigtable/data/v2/models/Query.java | 91 ++ .../data/v2/models/RowMutationEntry.java | 8 + ...ble.java => ConvertExceptionCallable.java} | 24 +- .../data/v2/stub/EnhancedBigtableStub.java | 8 +- .../data/v2/stub/SafeResponseObserver.java | 123 ++ .../BigtableTracerStreamingCallable.java | 68 +- .../metrics/BigtableTracerUnaryCallable.java | 51 +- .../v2/stub/metrics/BuiltinMetricsTracer.java | 20 +- .../data/v2/stub/metrics/MetricsTracer.java | 8 + .../bigtable/data/v2/stub/metrics/Util.java | 67 +- .../readrows/FilterMarkerRowsCallable.java | 12 +- .../reframing/ReframingResponseObserver.java | 6 +- .../BaseBigtableInstanceAdminClientTest.java | 9 + .../v2/BaseBigtableTableAdminClientTest.java | 67 + .../v2/BigtableTableAdminClientTests.java | 48 + .../v2/BigtableTableAdminSettingsTest.java | 6 +- .../admin/v2/MockBigtableTableAdminImpl.java | 21 + .../v2/models/RestoreTableRequestTest.java | 56 + .../data/v2/internal/RowMergerUtilTest.java | 148 +++ .../bigtable/data/v2/it/BuiltinMetricsIT.java | 7 +- .../bigtable/data/v2/models/QueryTest.java | 178 +++ ...java => ConvertExceptionCallableTest.java} | 6 +- .../metrics/BuiltinMetricsTracerTest.java | 157 ++- grpc-google-cloud-bigtable-admin-v2/pom.xml | 8 +- .../admin/v2/BigtableTableAdminGrpc.java | 149 ++- grpc-google-cloud-bigtable-v2/pom.xml | 8 +- pom.xml | 16 +- proto-google-cloud-bigtable-admin-v2/pom.xml | 8 +- .../google/bigtable/admin/v2/AppProfile.java | 451 +++---- .../bigtable/admin/v2/AutoscalingLimits.java | 121 +- .../bigtable/admin/v2/AutoscalingTargets.java | 121 +- .../com/google/bigtable/admin/v2/Backup.java | 234 ++-- .../google/bigtable/admin/v2/BackupInfo.java | 167 +-- .../admin/v2/BigtableTableAdminProto.java | 477 +++---- .../admin/v2/CheckConsistencyRequest.java | 126 +- .../admin/v2/CheckConsistencyResponse.java | 111 +- .../com/google/bigtable/admin/v2/Cluster.java | 602 ++++----- .../bigtable/admin/v2/ColumnFamily.java | 121 +- .../admin/v2/CreateAppProfileRequest.java | 159 +-- .../admin/v2/CreateBackupMetadata.java | 168 +-- .../admin/v2/CreateBackupRequest.java | 147 +-- .../admin/v2/CreateClusterMetadata.java | 334 ++--- .../admin/v2/CreateClusterRequest.java | 148 +-- .../admin/v2/CreateInstanceMetadata.java | 165 +-- .../admin/v2/CreateInstanceRequest.java | 177 +-- .../v2/CreateTableFromSnapshotMetadata.java | 165 +-- .../v2/CreateTableFromSnapshotRequest.java | 139 +- .../bigtable/admin/v2/CreateTableRequest.java | 295 ++--- .../admin/v2/DeleteAppProfileRequest.java | 124 +- .../admin/v2/DeleteBackupRequest.java | 112 +- .../admin/v2/DeleteClusterRequest.java | 113 +- .../admin/v2/DeleteInstanceRequest.java | 113 +- .../admin/v2/DeleteSnapshotRequest.java | 113 +- .../bigtable/admin/v2/DeleteTableRequest.java | 112 +- .../admin/v2/DropRowRangeRequest.java | 136 +- .../bigtable/admin/v2/EncryptionInfo.java | 147 +-- .../com/google/bigtable/admin/v2/GcRule.java | 451 +++---- .../v2/GenerateConsistencyTokenRequest.java | 113 +- .../v2/GenerateConsistencyTokenResponse.java | 114 +- .../admin/v2/GetAppProfileRequest.java | 113 +- .../bigtable/admin/v2/GetBackupRequest.java | 112 +- .../bigtable/admin/v2/GetClusterRequest.java | 112 +- .../bigtable/admin/v2/GetInstanceRequest.java | 112 +- .../bigtable/admin/v2/GetSnapshotRequest.java | 112 +- .../bigtable/admin/v2/GetTableRequest.java | 125 +- .../google/bigtable/admin/v2/HotTablet.java | 204 ++- .../google/bigtable/admin/v2/Instance.java | 329 +++-- .../bigtable/admin/v2/InstanceOrBuilder.java | 25 + .../bigtable/admin/v2/InstanceProto.java | 147 ++- .../admin/v2/ListAppProfilesRequest.java | 137 +- .../admin/v2/ListAppProfilesResponse.java | 166 +-- .../bigtable/admin/v2/ListBackupsRequest.java | 162 +-- .../admin/v2/ListBackupsResponse.java | 145 +-- .../admin/v2/ListClustersRequest.java | 125 +- .../admin/v2/ListClustersResponse.java | 166 +-- .../admin/v2/ListHotTabletsRequest.java | 179 +-- .../admin/v2/ListHotTabletsResponse.java | 146 +-- .../admin/v2/ListInstancesRequest.java | 126 +- .../admin/v2/ListInstancesResponse.java | 166 +-- .../admin/v2/ListSnapshotsRequest.java | 137 +- .../admin/v2/ListSnapshotsResponse.java | 146 +-- .../bigtable/admin/v2/ListTablesRequest.java | 149 +-- .../bigtable/admin/v2/ListTablesResponse.java | 145 +-- .../admin/v2/ModifyColumnFamiliesRequest.java | 329 ++--- .../bigtable/admin/v2/OperationProgress.java | 152 +-- .../v2/OptimizeRestoredTableMetadata.java | 135 +- .../v2/PartialUpdateClusterMetadata.java | 165 +-- .../admin/v2/PartialUpdateClusterRequest.java | 143 +-- .../v2/PartialUpdateInstanceRequest.java | 143 +-- .../google/bigtable/admin/v2/RestoreInfo.java | 137 +- .../admin/v2/RestoreTableMetadata.java | 186 ++- .../admin/v2/RestoreTableRequest.java | 139 +- .../google/bigtable/admin/v2/Snapshot.java | 212 ++- .../admin/v2/SnapshotTableMetadata.java | 165 +-- .../admin/v2/SnapshotTableRequest.java | 172 +-- .../com/google/bigtable/admin/v2/Table.java | 471 +++---- .../bigtable/admin/v2/TableOrBuilder.java | 18 + .../google/bigtable/admin/v2/TableProto.java | 172 +-- .../admin/v2/UndeleteTableMetadata.java | 155 +-- .../admin/v2/UndeleteTableRequest.java | 113 +- .../admin/v2/UpdateAppProfileMetadata.java | 100 +- .../admin/v2/UpdateAppProfileRequest.java | 154 +-- .../admin/v2/UpdateBackupRequest.java | 142 +-- .../admin/v2/UpdateClusterMetadata.java | 164 +-- .../admin/v2/UpdateInstanceMetadata.java | 165 +-- .../admin/v2/UpdateTableMetadata.java | 1135 +++++++++++++++++ .../v2/UpdateTableMetadataOrBuilder.java | 120 ++ .../bigtable/admin/v2/UpdateTableRequest.java | 1080 ++++++++++++++++ .../admin/v2/UpdateTableRequestOrBuilder.java | 125 ++ .../admin/v2/bigtable_table_admin.proto | 45 + .../google/bigtable/admin/v2/instance.proto | 3 + .../google/bigtable/admin/v2/table.proto | 8 + .../clirr-ignored-differences.xml | 61 +- proto-google-cloud-bigtable-v2/pom.xml | 8 +- .../com/google/bigtable/v2/BigtableProto.java | 383 +++--- .../java/com/google/bigtable/v2/Cell.java | 142 +-- .../bigtable/v2/CheckAndMutateRowRequest.java | 217 ++-- .../v2/CheckAndMutateRowResponse.java | 110 +- .../java/com/google/bigtable/v2/Column.java | 141 +- .../com/google/bigtable/v2/ColumnRange.java | 160 +-- .../java/com/google/bigtable/v2/Family.java | 143 +-- .../google/bigtable/v2/FullReadStatsView.java | 1020 +++++++++++++++ .../v2/FullReadStatsViewOrBuilder.java | 107 ++ .../google/bigtable/v2/MutateRowRequest.java | 167 ++- .../google/bigtable/v2/MutateRowResponse.java | 99 +- .../google/bigtable/v2/MutateRowsRequest.java | 302 ++--- .../bigtable/v2/MutateRowsResponse.java | 266 ++-- .../java/com/google/bigtable/v2/Mutation.java | 711 +++++------ .../bigtable/v2/PingAndWarmRequest.java | 125 +- .../bigtable/v2/PingAndWarmResponse.java | 99 +- .../bigtable/v2/ReadIterationStats.java | 811 ++++++++++++ .../v2/ReadIterationStatsOrBuilder.java | 79 ++ .../v2/ReadModifyWriteRowRequest.java | 169 ++- .../v2/ReadModifyWriteRowResponse.java | 120 +- .../bigtable/v2/ReadModifyWriteRule.java | 147 +-- .../google/bigtable/v2/ReadRowsRequest.java | 527 ++++++-- .../bigtable/v2/ReadRowsRequestOrBuilder.java | 33 +- .../google/bigtable/v2/ReadRowsResponse.java | 837 ++++++++---- .../v2/ReadRowsResponseOrBuilder.java | 83 ++ .../bigtable/v2/RequestLatencyStats.java | 876 +++++++++++++ .../v2/RequestLatencyStatsOrBuilder.java | 102 ++ .../com/google/bigtable/v2/RequestStats.java | 824 ++++++++++++ .../bigtable/v2/RequestStatsOrBuilder.java | 65 + .../google/bigtable/v2/RequestStatsProto.java | 118 ++ .../google/bigtable/v2/ResponseParams.java | 126 +- .../main/java/com/google/bigtable/v2/Row.java | 141 +- .../com/google/bigtable/v2/RowFilter.java | 840 +++++------- .../java/com/google/bigtable/v2/RowRange.java | 147 +-- .../java/com/google/bigtable/v2/RowSet.java | 149 +-- .../bigtable/v2/SampleRowKeysRequest.java | 125 +- .../bigtable/v2/SampleRowKeysResponse.java | 121 +- .../google/bigtable/v2/TimestampRange.java | 121 +- .../com/google/bigtable/v2/ValueRange.java | 147 +-- .../proto/google/bigtable/v2/bigtable.proto | 55 +- .../google/bigtable/v2/request_stats.proto | 113 ++ renovate.json | 1 + samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 14 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- .../java/com/example/bigtable/KeySalting.java | 95 ++ .../com/example/bigtable/KeySaltingTest.java | 92 ++ test-proxy/EnableAutoValue.txt | 2 + test-proxy/README.md | 48 + test-proxy/pom.xml | 140 ++ .../bigtable/testproxy/CbtTestProxy.java | 758 +++++++++++ .../bigtable/testproxy/CbtTestProxyMain.java | 51 + test-proxy/src/main/proto/v2_test_proxy.proto | 223 ++++ versions.txt | 14 +- 209 files changed, 20325 insertions(+), 12015 deletions(-) create mode 100644 .kokoro/requirements.in create mode 100644 .kokoro/requirements.txt create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtil.java rename google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/{ConvertStreamExceptionCallable.java => ConvertExceptionCallable.java} (76%) create mode 100644 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java create mode 100644 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java rename google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/{ConvertStreamExceptionCallableTest.java => ConvertExceptionCallableTest.java} (92%) create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java create mode 100644 proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto create mode 100644 samples/snippets/src/main/java/com/example/bigtable/KeySalting.java create mode 100644 samples/snippets/src/test/java/com/example/bigtable/KeySaltingTest.java create mode 100644 test-proxy/EnableAutoValue.txt create mode 100644 test-proxy/README.md create mode 100644 test-proxy/pom.xml create mode 100644 test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java create mode 100644 test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java create mode 100644 test-proxy/src/main/proto/v2_test_proxy.proto diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 6610882f83..0f0647b00e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 -# created: 2022-07-18T21:44:23.94208526Z + digest: sha256:e76136cc48f90aa19ba29cdfbd4002111467e44a1c9d905867d98dafafbd03bb diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 63b6b62ecf..a194648554 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,3 +13,6 @@ # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers + +# Generated snippets should not be owned by samples reviewers +samples/snippets/generated/ @googleapis/yoshi-java diff --git a/.github/release-please.yml b/.github/release-please.yml index ba18707fd2..6db6b50898 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -30,5 +30,12 @@ branches: - >- google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java branch: v2.6.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + extraFiles: + - >- + google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java + branch: 2.16.x extraFiles: - google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 36d4054793..f871299692 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -77,6 +77,23 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - cla/google - OwlBot Post Processor + - pattern: 2.16.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - dependencies (8) + - dependencies (11) + - lint + - clirr + - units (8) + - units (11) + - 'Kokoro - Test: Integration' + - cla/google + - OwlBot Post Processor + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' permissionRules: - team: yoshi-admins permission: admin diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index d7476cfe97..bd8960246f 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -57,54 +57,3 @@ retry_with_backoff 3 10 \ -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true - -echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" -## Run dependency list completeness check -function completenessCheck() { - # Output dep list with compile scope generated using the original pom - # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. - # This is stripped from the output as it is not present in the flattened pom. - # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. - msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt - - # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) - msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt - - # Compare two dependency lists - msg "Comparing dependency lists..." - diff .org-list.txt .new-list.txt >.diff.txt - if [[ $? == 0 ]] - then - msg "Success. No diff!" - else - msg "Diff found. See below: " - msg "You can also check .diff.txt file located in $1." - cat .diff.txt - return 1 - fi -} - -# Allow failures to continue running the script -set +e - -error_count=0 -for path in **/.flattened-pom.xml -do - # Check flattened pom in each dir that contains it for completeness - dir=$(dirname "$path") - pushd "$dir" - completenessCheck "$dir" - error_count=$(($error_count + $?)) - popd -done - -if [[ $error_count == 0 ]] -then - msg "All checks passed." - exit 0 -else - msg "Errors found. See log statements above." - exit 1 -fi diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index c91ac4f993..d33de23da9 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index dcae17d91b..7b8e7f0fb0 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.0" } env_vars: { diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index a6782c6cfd..587f196a94 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 2af6c7caba..c0eda642e3 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 1dba8de108..61e714d6ba 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,7 +16,8 @@ set -eo pipefail # Start the releasetool reporter -python3 -m pip install gcp-releasetool +requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) +python3 -m pip install --require-hashes -r $requirementsFile python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in new file mode 100644 index 0000000000..924f94ae6f --- /dev/null +++ b/.kokoro/requirements.in @@ -0,0 +1,34 @@ +gcp-docuploader==0.6.3 +google-crc32c==1.3.0 +googleapis-common-protos==1.56.3 +gcp-releasetool==1.9.1 +cryptography==38.0.3 +cachetools==4.2.4 +cffi==1.15.1 +jeepney==0.7.1 +jinja2==3.0.3 +markupsafe==2.0.1 +keyring==23.4.1 +packaging==21.3 +protobuf==3.19.5 +pyjwt==2.4.0 +pyparsing==3.0.9 +pycparser==2.21 +pyperclip==1.8.2 +python-dateutil==2.8.2 +requests==2.27.1 +certifi==2022.9.24 +importlib-metadata==4.8.3 +zipp==3.6.0 +google_api_core==2.8.2 +google-cloud-storage==2.0.0 +google-resumable-media==2.3.3 +google-cloud-core==2.3.1 +typing-extensions==4.1.1 +urllib3==1.26.12 +zipp==3.6.0 +rsa==4.9 +six==1.16.0 +attrs==22.1.0 +google-auth==2.14.1 +idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt new file mode 100644 index 0000000000..71fcafc703 --- /dev/null +++ b/.kokoro/requirements.txt @@ -0,0 +1,456 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile --generate-hashes requirements.in +# +attrs==22.1.0 \ + --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ + --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c + # via + # -r requirements.in + # gcp-releasetool +cachetools==4.2.4 \ + --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ + --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 + # via + # -r requirements.in + # google-auth +certifi==2022.9.24 \ + --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ + --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 + # via + # -r requirements.in + # requests +cffi==1.15.1 \ + --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ + --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ + --hash=sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104 \ + --hash=sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426 \ + --hash=sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405 \ + --hash=sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375 \ + --hash=sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a \ + --hash=sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e \ + --hash=sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc \ + --hash=sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf \ + --hash=sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185 \ + --hash=sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497 \ + --hash=sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3 \ + --hash=sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35 \ + --hash=sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c \ + --hash=sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83 \ + --hash=sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21 \ + --hash=sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca \ + --hash=sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984 \ + --hash=sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac \ + --hash=sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd \ + --hash=sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee \ + --hash=sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a \ + --hash=sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2 \ + --hash=sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192 \ + --hash=sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7 \ + --hash=sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585 \ + --hash=sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f \ + --hash=sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e \ + --hash=sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27 \ + --hash=sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b \ + --hash=sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e \ + --hash=sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e \ + --hash=sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d \ + --hash=sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c \ + --hash=sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415 \ + --hash=sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82 \ + --hash=sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02 \ + --hash=sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314 \ + --hash=sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325 \ + --hash=sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c \ + --hash=sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3 \ + --hash=sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914 \ + --hash=sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045 \ + --hash=sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d \ + --hash=sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9 \ + --hash=sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5 \ + --hash=sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2 \ + --hash=sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c \ + --hash=sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3 \ + --hash=sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2 \ + --hash=sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8 \ + --hash=sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d \ + --hash=sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d \ + --hash=sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9 \ + --hash=sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162 \ + --hash=sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76 \ + --hash=sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4 \ + --hash=sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e \ + --hash=sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9 \ + --hash=sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6 \ + --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ + --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ + --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 + # via + # -r requirements.in + # cryptography +charset-normalizer==2.0.12 \ + --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ + --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df + # via requests +click==8.0.4 \ + --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ + --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb + # via + # gcp-docuploader + # gcp-releasetool +colorlog==6.7.0 \ + --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ + --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 + # via gcp-docuploader +cryptography==38.0.3 \ + --hash=sha256:068147f32fa662c81aebab95c74679b401b12b57494872886eb5c1139250ec5d \ + --hash=sha256:06fc3cc7b6f6cca87bd56ec80a580c88f1da5306f505876a71c8cfa7050257dd \ + --hash=sha256:25c1d1f19729fb09d42e06b4bf9895212292cb27bb50229f5aa64d039ab29146 \ + --hash=sha256:402852a0aea73833d982cabb6d0c3bb582c15483d29fb7085ef2c42bfa7e38d7 \ + --hash=sha256:4e269dcd9b102c5a3d72be3c45d8ce20377b8076a43cbed6f660a1afe365e436 \ + --hash=sha256:5419a127426084933076132d317911e3c6eb77568a1ce23c3ac1e12d111e61e0 \ + --hash=sha256:554bec92ee7d1e9d10ded2f7e92a5d70c1f74ba9524947c0ba0c850c7b011828 \ + --hash=sha256:5e89468fbd2fcd733b5899333bc54d0d06c80e04cd23d8c6f3e0542358c6060b \ + --hash=sha256:65535bc550b70bd6271984d9863a37741352b4aad6fb1b3344a54e6950249b55 \ + --hash=sha256:6ab9516b85bebe7aa83f309bacc5f44a61eeb90d0b4ec125d2d003ce41932d36 \ + --hash=sha256:6addc3b6d593cd980989261dc1cce38263c76954d758c3c94de51f1e010c9a50 \ + --hash=sha256:728f2694fa743a996d7784a6194da430f197d5c58e2f4e278612b359f455e4a2 \ + --hash=sha256:785e4056b5a8b28f05a533fab69febf5004458e20dad7e2e13a3120d8ecec75a \ + --hash=sha256:78cf5eefac2b52c10398a42765bfa981ce2372cbc0457e6bf9658f41ec3c41d8 \ + --hash=sha256:7f836217000342d448e1c9a342e9163149e45d5b5eca76a30e84503a5a96cab0 \ + --hash=sha256:8d41a46251bf0634e21fac50ffd643216ccecfaf3701a063257fe0b2be1b6548 \ + --hash=sha256:984fe150f350a3c91e84de405fe49e688aa6092b3525f407a18b9646f6612320 \ + --hash=sha256:9b24bcff7853ed18a63cfb0c2b008936a9554af24af2fb146e16d8e1aed75748 \ + --hash=sha256:b1b35d9d3a65542ed2e9d90115dfd16bbc027b3f07ee3304fc83580f26e43249 \ + --hash=sha256:b1b52c9e5f8aa2b802d48bd693190341fae201ea51c7a167d69fc48b60e8a959 \ + --hash=sha256:bbf203f1a814007ce24bd4d51362991d5cb90ba0c177a9c08825f2cc304d871f \ + --hash=sha256:be243c7e2bfcf6cc4cb350c0d5cdf15ca6383bbcb2a8ef51d3c9411a9d4386f0 \ + --hash=sha256:bfbe6ee19615b07a98b1d2287d6a6073f734735b49ee45b11324d85efc4d5cbd \ + --hash=sha256:c46837ea467ed1efea562bbeb543994c2d1f6e800785bd5a2c98bc096f5cb220 \ + --hash=sha256:dfb4f4dd568de1b6af9f4cda334adf7d72cf5bc052516e1b2608b683375dd95c \ + --hash=sha256:ed7b00096790213e09eb11c97cc6e2b757f15f3d2f85833cd2d3ec3fe37c1722 + # via + # -r requirements.in + # gcp-releasetool + # secretstorage +gcp-docuploader==0.6.3 \ + --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ + --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b + # via -r requirements.in +gcp-releasetool==1.9.1 \ + --hash=sha256:952f4055d5d986b070ae2a71c4410b250000f9cc5a1e26398fcd55a5bbc5a15f \ + --hash=sha256:d0d3c814a97c1a237517e837d8cfa668ced8df4b882452578ecef4a4e79c583b + # via -r requirements.in +google-api-core==2.8.2 \ + --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ + --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 + # via + # -r requirements.in + # google-cloud-core + # google-cloud-storage +google-auth==2.14.1 \ + --hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016 + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-core + # google-cloud-storage +google-cloud-core==2.3.1 \ + --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ + --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 + # via + # -r requirements.in + # google-cloud-storage +google-cloud-storage==2.0.0 \ + --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ + --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 + # via + # -r requirements.in + # gcp-docuploader +google-crc32c==1.3.0 \ + --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ + --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ + --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ + --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ + --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ + --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ + --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ + --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ + --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ + --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ + --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ + --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ + --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ + --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ + --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ + --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ + --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ + --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ + --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ + --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ + --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ + --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ + --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ + --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ + --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ + --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ + --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ + --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ + --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ + --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ + --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ + --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ + --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ + --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ + --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ + --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ + --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ + --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ + --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ + --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ + --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ + --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ + --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 + # via + # -r requirements.in + # google-resumable-media +google-resumable-media==2.3.3 \ + --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ + --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 + # via + # -r requirements.in + # google-cloud-storage +googleapis-common-protos==1.56.3 \ + --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ + --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 + # via + # -r requirements.in + # google-api-core +idna==3.4 \ + --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ + --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 + # via + # -r requirements.in + # requests +importlib-metadata==4.8.3 \ + --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ + --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 + # via + # -r requirements.in + # keyring +jeepney==0.7.1 \ + --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ + --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f + # via + # -r requirements.in + # keyring + # secretstorage +jinja2==3.0.3 \ + --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ + --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 + # via + # -r requirements.in + # gcp-releasetool +keyring==23.4.1 \ + --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ + --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 + # via + # -r requirements.in + # gcp-releasetool +markupsafe==2.0.1 \ + --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ + --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ + --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ + --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ + --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ + --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ + --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ + --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ + --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ + --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ + --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ + --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ + --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ + --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ + --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ + --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ + --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ + --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ + --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ + --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ + --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ + --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ + --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ + --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ + --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ + --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ + --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ + --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ + --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ + --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ + --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ + --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ + --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ + --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ + --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ + --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ + --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ + --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ + --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ + --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ + --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ + --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ + --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ + --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ + --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ + --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ + --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ + --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ + --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ + --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ + --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ + --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ + --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ + --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ + --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ + --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ + --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ + --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ + --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ + --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ + --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ + --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ + --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ + --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ + --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ + --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ + --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ + --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ + --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 + # via + # -r requirements.in + # jinja2 +packaging==21.3 \ + --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ + --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 + # via + # -r requirements.in + # gcp-releasetool +protobuf==3.19.5 \ + --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ + --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ + --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ + --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ + --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ + --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ + --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ + --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ + --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ + --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ + --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ + --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ + --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ + --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ + --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ + --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ + --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ + --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ + --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ + --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ + --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ + --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ + --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ + --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ + --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ + --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de + # via + # -r requirements.in + # gcp-docuploader + # gcp-releasetool + # google-api-core + # google-cloud-storage + # googleapis-common-protos +pyasn1==0.4.8 \ + --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ + --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba + # via + # pyasn1-modules + # rsa +pyasn1-modules==0.2.8 \ + --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ + --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 + # via google-auth +pycparser==2.21 \ + --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ + --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 + # via + # -r requirements.in + # cffi +pyjwt==2.4.0 \ + --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ + --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba + # via + # -r requirements.in + # gcp-releasetool +pyparsing==3.0.9 \ + --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ + --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc + # via + # -r requirements.in + # packaging +pyperclip==1.8.2 \ + --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 + # via + # -r requirements.in + # gcp-releasetool +python-dateutil==2.8.2 \ + --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ + --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 + # via + # -r requirements.in + # gcp-releasetool +requests==2.27.1 \ + --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ + --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-storage +rsa==4.9 \ + --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ + --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 + # via + # -r requirements.in + # google-auth +secretstorage==3.3.3 \ + --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ + --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 + # via keyring +six==1.16.0 \ + --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ + --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 + # via + # -r requirements.in + # gcp-docuploader + # google-auth + # python-dateutil +typing-extensions==4.1.1 \ + --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ + --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 + # via -r requirements.in +urllib3==1.26.12 \ + --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ + --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 + # via + # -r requirements.in + # requests +zipp==3.6.0 \ + --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ + --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc + # via + # -r requirements.in + # importlib-metadata diff --git a/.readme-partials.yml b/.readme-partials.yml index 0cf67de41e..db6f2b40d4 100644 --- a/.readme-partials.yml +++ b/.readme-partials.yml @@ -1,7 +1,7 @@ custom_content: | ## About Cloud Bigtable - [Cloud Bigtable][cloud-bigtable] is Google's NoSQL Big Data database service. It's + [Cloud Bigtable][product-docs] is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. diff --git a/CHANGELOG.md b/CHANGELOG.md index 40afb09b71..2c07611802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,146 @@ # Changelog +## [2.17.0](https://github.com/googleapis/java-bigtable/compare/v2.16.0...v2.17.0) (2022-12-07) + + +### Features + +* Add a query paginator ([#1530](https://github.com/googleapis/java-bigtable/issues/1530)) ([5c8e1f6](https://github.com/googleapis/java-bigtable/commit/5c8e1f656b15177ecef4709b9e502cef58cca479)) +* Add test proxy to java-bigtable client ([#1498](https://github.com/googleapis/java-bigtable/issues/1498)) ([132b4e4](https://github.com/googleapis/java-bigtable/commit/132b4e4fe340ca316de8eef2e2133b6dabd9dec3)) +* Implement cross-project table restore ([#1536](https://github.com/googleapis/java-bigtable/issues/1536)) ([335977c](https://github.com/googleapis/java-bigtable/commit/335977c499b1776c8fa861d13195ffc49e468e0a)) +* Next release from main branch is 2.17.0 ([#1514](https://github.com/googleapis/java-bigtable/issues/1514)) ([4fc6a93](https://github.com/googleapis/java-bigtable/commit/4fc6a93a25362df7bc107d48f94e1c00b6bd608d)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom … ([#1531](https://github.com/googleapis/java-bigtable/issues/1531)) ([ee98338](https://github.com/googleapis/java-bigtable/commit/ee9833835a84cee202b142950b28704db682ac0c)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#1539](https://github.com/googleapis/java-bigtable/issues/1539)) ([3244cef](https://github.com/googleapis/java-bigtable/commit/3244cefd4d77a44bab6ccaa8f5c03e3d31575625)) +* Update dependency kr.motd.maven:os-maven-plugin to v1.7.1 ([#1518](https://github.com/googleapis/java-bigtable/issues/1518)) ([8309681](https://github.com/googleapis/java-bigtable/commit/830968109a3754a12bd0bc92674fe42ae529b924)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#1537](https://github.com/googleapis/java-bigtable/issues/1537)) ([7f7c478](https://github.com/googleapis/java-bigtable/commit/7f7c478a2163c46d10ed39ea3c1b046f971d4569)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#1538](https://github.com/googleapis/java-bigtable/issues/1538)) ([9d3df57](https://github.com/googleapis/java-bigtable/commit/9d3df57d7bfeafd9cbcf56ecd58b52cc1b14ba7b)) + +## [2.16.0](https://github.com/googleapis/java-bigtable/compare/v2.15.1...v2.16.0) (2022-11-11) + + +### Features + +* Remove proto ReadEfficiencyStats ([#1455](https://github.com/googleapis/java-bigtable/issues/1455)) ([f6b243d](https://github.com/googleapis/java-bigtable/commit/f6b243db39c0370f0d9a4e47e553cfe62493b240)) + + +### Bug Fixes + +* Fix metric client settings ([#1509](https://github.com/googleapis/java-bigtable/issues/1509)) ([38ac115](https://github.com/googleapis/java-bigtable/commit/38ac115af07432e9c178064b59729a0b358105cd)) + +## [2.15.1](https://github.com/googleapis/java-bigtable/compare/v2.15.0...v2.15.1) (2022-11-08) + + +### Bug Fixes + +* Call record attempt compeletion on permanent failures ([#1502](https://github.com/googleapis/java-bigtable/issues/1502)) ([f409c47](https://github.com/googleapis/java-bigtable/commit/f409c4769b526b38590671178c007a9c57f9c182)) +* Fix the connectivity error count caculation ([#1401](https://github.com/googleapis/java-bigtable/issues/1401)) ([1f8cfd7](https://github.com/googleapis/java-bigtable/commit/1f8cfd722c749a8d3e30572fbdda6a2e3594d7a6)) +* Only record retry count when it's > 0 ([#1488](https://github.com/googleapis/java-bigtable/issues/1488)) ([445a667](https://github.com/googleapis/java-bigtable/commit/445a66737b45835444b26261b6f017f7fc278f45)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.6 ([#1501](https://github.com/googleapis/java-bigtable/issues/1501)) ([8f61c64](https://github.com/googleapis/java-bigtable/commit/8f61c64aba815a942daae17ccb024d325c03df8a)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.17 ([#1495](https://github.com/googleapis/java-bigtable/issues/1495)) ([1b7c21a](https://github.com/googleapis/java-bigtable/commit/1b7c21abc793db0e4706f119e934eecdcfce9994)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.17 ([#1496](https://github.com/googleapis/java-bigtable/issues/1496)) ([74779e3](https://github.com/googleapis/java-bigtable/commit/74779e3621c9893bf3a84dc68ddcb624785c8d71)) + +## [2.15.0](https://github.com/googleapis/java-bigtable/compare/v2.14.1...v2.15.0) (2022-10-26) + + +### Features + +* Add apis for Mutation and RowMutationEntry ([#1454](https://github.com/googleapis/java-bigtable/issues/1454)) ([a86934f](https://github.com/googleapis/java-bigtable/commit/a86934f4f70e1998e7368688df8695a4bac7006e)) + + +### Bug Fixes + +* Catch all throwables so version mismatch won't hang the client ([#1402](https://github.com/googleapis/java-bigtable/issues/1402)) ([c03b8a4](https://github.com/googleapis/java-bigtable/commit/c03b8a4245beab7258b8ed8ec76153e6a0275211)) +* Fix attempt status tag for metrics ([#1477](https://github.com/googleapis/java-bigtable/issues/1477)) ([e54cf7d](https://github.com/googleapis/java-bigtable/commit/e54cf7d61128049cea2817b409a8524636b4a6cf)) +* Rename metric names to match the external name ([#1479](https://github.com/googleapis/java-bigtable/issues/1479)) ([28ca7c3](https://github.com/googleapis/java-bigtable/commit/28ca7c310d9a157529555ab6865f89802161443b)) +* Set a longer timeout to wait for callbacks to be executed ([#1478](https://github.com/googleapis/java-bigtable/issues/1478)) ([0d9ff6a](https://github.com/googleapis/java-bigtable/commit/0d9ff6ab3bd5bf853f1d371312036b14c924ae5e)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.5.0 ([#1464](https://github.com/googleapis/java-bigtable/issues/1464)) ([d8e58a5](https://github.com/googleapis/java-bigtable/commit/d8e58a5d88de7ea249d7bc141f1ac65592088da6)) +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.6.0 ([#1476](https://github.com/googleapis/java-bigtable/issues/1476)) ([331dcfb](https://github.com/googleapis/java-bigtable/commit/331dcfbd06ab578cfe9673ca70cab1f6abd5ddcd)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 ([#1470](https://github.com/googleapis/java-bigtable/issues/1470)) ([557a4fb](https://github.com/googleapis/java-bigtable/commit/557a4fbed77157c3ccfc3e84a0c952b647844f9b)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 ([#1462](https://github.com/googleapis/java-bigtable/issues/1462)) ([69540cb](https://github.com/googleapis/java-bigtable/commit/69540cb2df25d5fb716e81e7513930b01c310b72)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 ([#1467](https://github.com/googleapis/java-bigtable/issues/1467)) ([53599ca](https://github.com/googleapis/java-bigtable/commit/53599caa0f92bad1365adbc4b58a1dcb1e8a393e)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 ([#1463](https://github.com/googleapis/java-bigtable/issues/1463)) ([a6612f9](https://github.com/googleapis/java-bigtable/commit/a6612f90cd4a0ec9589ca797ff3a42d23478a6e6)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 ([#1468](https://github.com/googleapis/java-bigtable/issues/1468)) ([fe0ddb1](https://github.com/googleapis/java-bigtable/commit/fe0ddb1b183cfdf368c2387a645a613bbfd52a69)) + +## [2.14.1](https://github.com/googleapis/java-bigtable/compare/v2.14.0...v2.14.1) (2022-10-05) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 ([#1450](https://github.com/googleapis/java-bigtable/issues/1450)) ([96b1e80](https://github.com/googleapis/java-bigtable/commit/96b1e80af5e17689a84318e9a797195cde3dab45)) + +## [2.14.0](https://github.com/googleapis/java-bigtable/compare/v2.13.0...v2.14.0) (2022-10-03) + + +### Features + +* Publish the RequestStats proto ([#1400](https://github.com/googleapis/java-bigtable/issues/1400)) ([e989200](https://github.com/googleapis/java-bigtable/commit/e989200980510b14d602925df7430e01bc2f8db7)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#1446](https://github.com/googleapis/java-bigtable/issues/1446)) ([81034c5](https://github.com/googleapis/java-bigtable/commit/81034c51722d973cf5545feb33665b4e08265303)) + +## [2.13.0](https://github.com/googleapis/java-bigtable/compare/v2.12.0...v2.13.0) (2022-09-27) + + +### Features + +* Add gRPC RLS dependency ([#1248](https://github.com/googleapis/java-bigtable/issues/1248)) ([e829b92](https://github.com/googleapis/java-bigtable/commit/e829b923d97a00dcb55a14b0877bec2c8cf5ece2)) + + +### Bug Fixes + +* Add a UUID in the task value ([#1430](https://github.com/googleapis/java-bigtable/issues/1430)) ([3bfc7bc](https://github.com/googleapis/java-bigtable/commit/3bfc7bc246488a37b4470e3a75ffdd34f6761804)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.5 ([#1406](https://github.com/googleapis/java-bigtable/issues/1406)) ([d906729](https://github.com/googleapis/java-bigtable/commit/d906729a4bb9a51907bf4879e8d063d5103565ac)) +* Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.14 ([#1411](https://github.com/googleapis/java-bigtable/issues/1411)) ([ef7d741](https://github.com/googleapis/java-bigtable/commit/ef7d7419293f9f046dcf941148a86da713feae17)) +* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 ([#1412](https://github.com/googleapis/java-bigtable/issues/1412)) ([dcae319](https://github.com/googleapis/java-bigtable/commit/dcae3195871b78aa6e102c4bc570b18c303c7760)) +* Update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 ([#1409](https://github.com/googleapis/java-bigtable/issues/1409)) ([c1e195d](https://github.com/googleapis/java-bigtable/commit/c1e195d4e0470b30d97231c44b09fcb5c4881514)) + +## [2.12.0](https://github.com/googleapis/java-bigtable/compare/v2.11.2...v2.12.0) (2022-09-15) + + +### Features + +* **generated:** Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API ([f1f3f05](https://github.com/googleapis/java-bigtable/commit/f1f3f05ae2dc84a8dc853eb5467fbd157b7293c3)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 ([#1386](https://github.com/googleapis/java-bigtable/issues/1386)) ([f460373](https://github.com/googleapis/java-bigtable/commit/f460373eb74776fae1787b74392b508643e6139f)) +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 ([#1387](https://github.com/googleapis/java-bigtable/issues/1387)) ([e339cb1](https://github.com/googleapis/java-bigtable/commit/e339cb186289fa53a0d65c3d77fb7edbae737882)) +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.4 ([#1395](https://github.com/googleapis/java-bigtable/issues/1395)) ([a2db183](https://github.com/googleapis/java-bigtable/commit/a2db183dea46cd83ea70bb89848e0579b9c61fac)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1384](https://github.com/googleapis/java-bigtable/issues/1384)) ([ee3b256](https://github.com/googleapis/java-bigtable/commit/ee3b256a62c2665e2c4230d9acfc14c3d5c2aebf)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1393](https://github.com/googleapis/java-bigtable/issues/1393)) ([df6c6c7](https://github.com/googleapis/java-bigtable/commit/df6c6c79715ecc7b99e026ce8dfa8645765fc9d5)) + +## [2.11.2](https://github.com/googleapis/java-bigtable/compare/v2.11.1...v2.11.2) (2022-09-07) + + +### Bug Fixes + +* Make cloud-monitoring a runtime dependency ([#1371](https://github.com/googleapis/java-bigtable/issues/1371)) ([930d043](https://github.com/googleapis/java-bigtable/commit/930d0439086d2b43735f9583175adf0626952c9b)) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 ([#1373](https://github.com/googleapis/java-bigtable/issues/1373)) ([43b8052](https://github.com/googleapis/java-bigtable/commit/43b80523cc00932a414702ad96cfd86984c0f649)) +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 ([#1374](https://github.com/googleapis/java-bigtable/issues/1374)) ([4174f0d](https://github.com/googleapis/java-bigtable/commit/4174f0dc1b61f954ccd1c2fcf88066179a4d430b)) + ## [2.11.1](https://github.com/googleapis/java-bigtable/compare/v2.11.0...v2.11.1) (2022-08-26) diff --git a/README.md b/README.md index 87450e5569..be062c7f26 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.1.1 + 26.1.5 pom import @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigtable - 2.11.1 + 2.17.0 ``` @@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.1.1') +implementation platform('com.google.cloud:libraries-bom:26.1.5') implementation 'com.google.cloud:google-cloud-bigtable' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigtable:2.11.1' +implementation 'com.google.cloud:google-cloud-bigtable:2.17.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.11.1" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.17.0" ``` ## Authentication @@ -99,7 +99,7 @@ use this Cloud Bigtable Client Library. ## About Cloud Bigtable -[Cloud Bigtable][cloud-bigtable] is Google's NoSQL Big Data database service. It's +[Cloud Bigtable][product-docs] is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. @@ -490,6 +490,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-bigtable/tree | Filters | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/Filters.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/Filters.java) | | Hello World | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/HelloWorld.java) | | Instance Admin Example | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/InstanceAdminExample.java) | +| Key Salting | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/KeySalting.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/KeySalting.java) | | Quickstart | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/Quickstart.java) | | Reads | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/Reads.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/Reads.java) | | Table Admin Example | [source code](https://github.com/googleapis/java-bigtable/blob/main/samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigtable&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigtable/TableAdminExample.java) | diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index 42d5e00ed9..7659a8b216 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.5 @@ -63,42 +63,42 @@ com.google.cloud google-cloud-bigtable - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator - 0.148.2-SNAPSHOT + 0.154.1-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator-core - 0.148.2-SNAPSHOT + 0.154.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.cloud google-cloud-bigtable-stats - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT
    diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index c1daa36633..d485846d78 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -7,13 +7,13 @@ com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.5 com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom @@ -66,7 +66,21 @@ com.google.cloud google-cloud-shared-dependencies - 3.0.1 + 3.1.0 + pom + import + + + com.google.cloud + google-cloud-monitoring-bom + 3.7.0 + + + + io.perfmark + perfmark-api + + pom import diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index e9b6c5c6a2..5cc1dfa1ef 100644 --- a/google-cloud-bigtable-emulator-core/pom.xml +++ b/google-cloud-bigtable-emulator-core/pom.xml @@ -7,11 +7,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT google-cloud-bigtable-emulator-core - 0.148.2-SNAPSHOT + 0.154.1-SNAPSHOT A Java wrapper for the Cloud Bigtable emulator. diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index 6a4454705c..05e0f41109 100644 --- a/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-bigtable-emulator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-bigtable-emulator - 0.148.2-SNAPSHOT + 0.154.1-SNAPSHOT Google Cloud Java - Bigtable Emulator https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.148.2-SNAPSHOT + 0.154.1-SNAPSHOT diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index 5b950728a8..357520c53e 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -5,7 +5,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT 4.0.0 @@ -13,7 +13,7 @@ through Stackdriver. Built-in metrics will be implemented with shaded OpenCensus so it won't interfere with customer's application metrics. --> google-cloud-bigtable-stats - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT Experimental project to shade OpenCensus dependencies. @@ -25,14 +25,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT - pom - import - - - com.google.cloud - google-cloud-monitoring-bom - ${cloud.monitoring.version} + 2.17.1-SNAPSHOT pom import @@ -69,6 +62,11 @@ com.google.http-client google-http-client + + + io.perfmark + perfmark-api + @@ -191,7 +189,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.3.0 + 3.4.0 diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java index bdca097050..ff3e93158b 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java @@ -46,6 +46,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; @@ -168,7 +169,7 @@ static String getDefaultTaskValue() { // Generate a random number and use the same format "random_number@hostname". return "java-" + new SecureRandom().nextInt() + "@" + hostname; } - return "java-" + jvmName; + return "java-" + UUID.randomUUID() + jvmName; } private static MetricKind createMetricKind(Type type) { diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java index 8896e52d89..f6c80fdf88 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java @@ -85,9 +85,8 @@ static MetricServiceClient createMetricServiceClient(Credentials credentials, Du .setTransportChannelProvider(InstantiatingGrpcChannelProvider.newBuilder().build()); settingsBuilder.setCredentialsProvider(FixedCredentialsProvider.create(credentials)); - org.threeten.bp.Duration stackdriverDuration = - org.threeten.bp.Duration.ofMillis(deadline.toMillis()); - settingsBuilder.createTimeSeriesSettings().setSimpleTimeoutNoRetries(stackdriverDuration); + org.threeten.bp.Duration timeout = org.threeten.bp.Duration.ofMillis(deadline.toMillis()); + settingsBuilder.createServiceTimeSeriesSettings().setSimpleTimeoutNoRetries(timeout); return MetricServiceClient.create(settingsBuilder.build()); } } diff --git a/google-cloud-bigtable/clirr-ignored-differences.xml b/google-cloud-bigtable/clirr-ignored-differences.xml index 80d3d22703..5e5f8c9733 100644 --- a/google-cloud-bigtable/clirr-ignored-differences.xml +++ b/google-cloud-bigtable/clirr-ignored-differences.xml @@ -54,7 +54,7 @@ 8001 com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracer$Builder - change method args is ok because HeaderTracerStreamingCallable is InternalApi + 7004 com/google/cloud/bigtable/data/v2/stub/metrics/HeaderTracerStreamingCallable @@ -81,4 +81,9 @@ 8001 com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsConvertExceptionCallable + + 5001 + com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserver + com/google/api/gax/rpc/StateCheckingResponseObserver + diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 487dfeadf8..3ecf2ede99 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT google-cloud-bigtable @@ -47,21 +47,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT - pom - import - - - com.google.cloud - google-cloud-monitoring-bom - 3.4.2 + 2.17.1-SNAPSHOT pom import @@ -210,6 +203,16 @@ grpc-grpclb runtime + + io.grpc + grpc-googleapis + runtime + + + io.grpc + grpc-rls + runtime + io.grpc grpc-netty-shaded @@ -269,6 +272,13 @@ com.google.cloud google-cloud-monitoring + + + + io.perfmark + perfmark-api + + runtime @@ -679,7 +689,7 @@ org.apache.maven.shared maven-dependency-tree - 3.2.0 + 3.2.1
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java index 1b0c34607f..e546a333ba 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java @@ -20,6 +20,6 @@ @InternalApi("For internal use only") public final class Version { // {x-version-update-start:google-cloud-bigtable:current} - public static String VERSION = "2.11.2-SNAPSHOT"; + public static String VERSION = "2.17.1-SNAPSHOT"; // {x-version-update-end} } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java index 4a29a8bf4a..a3f0a5a60e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java @@ -158,8 +158,11 @@ public final OperationsClient getOperationsClient() { *

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ProjectName parent = ProjectName.of("[PROJECT]");
    @@ -209,8 +212,11 @@ public final OperationFuture createInstanceAsy
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = ProjectName.of("[PROJECT]").toString();
    @@ -260,8 +266,11 @@ public final OperationFuture createInstanceAsy
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateInstanceRequest request =
    @@ -295,8 +304,11 @@ public final OperationFuture createInstanceAsy
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateInstanceRequest request =
    @@ -330,8 +342,11 @@ public final OperationFuture createInstanceAsy
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateInstanceRequest request =
    @@ -359,8 +374,11 @@ public final UnaryCallable createInstanceCalla
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -385,8 +403,11 @@ public final Instance getInstance(InstanceName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -410,8 +431,11 @@ public final Instance getInstance(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetInstanceRequest request =
    @@ -436,8 +460,11 @@ public final Instance getInstance(GetInstanceRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetInstanceRequest request =
    @@ -462,8 +489,11 @@ public final UnaryCallable getInstanceCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ProjectName parent = ProjectName.of("[PROJECT]");
    @@ -490,8 +520,11 @@ public final ListInstancesResponse listInstances(ProjectName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = ProjectName.of("[PROJECT]").toString();
    @@ -515,8 +548,11 @@ public final ListInstancesResponse listInstances(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListInstancesRequest request =
    @@ -542,8 +578,11 @@ public final ListInstancesResponse listInstances(ListInstancesRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListInstancesRequest request =
    @@ -570,8 +609,11 @@ public final UnaryCallable listInst
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Instance request =
    @@ -580,6 +622,7 @@ public final UnaryCallable listInst
        *           .setDisplayName("displayName1714148973")
        *           .putAllLabels(new HashMap())
        *           .setCreateTime(Timestamp.newBuilder().build())
    +   *           .setSatisfiesPzs(true)
        *           .build();
        *   Instance response = baseBigtableInstanceAdminClient.updateInstance(request);
        * }
    @@ -600,8 +643,11 @@ public final Instance updateInstance(Instance request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Instance request =
    @@ -610,6 +656,7 @@ public final Instance updateInstance(Instance request) {
        *           .setDisplayName("displayName1714148973")
        *           .putAllLabels(new HashMap())
        *           .setCreateTime(Timestamp.newBuilder().build())
    +   *           .setSatisfiesPzs(true)
        *           .build();
        *   ApiFuture future =
        *       baseBigtableInstanceAdminClient.updateInstanceCallable().futureCall(request);
    @@ -630,8 +677,11 @@ public final UnaryCallable updateInstanceCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Instance instance = Instance.newBuilder().build();
    @@ -664,8 +714,11 @@ public final OperationFuture partialUpdateInst
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   PartialUpdateInstanceRequest request =
    @@ -693,8 +746,11 @@ public final OperationFuture partialUpdateInst
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   PartialUpdateInstanceRequest request =
    @@ -724,8 +780,11 @@ public final OperationFuture partialUpdateInst
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   PartialUpdateInstanceRequest request =
    @@ -752,8 +811,11 @@ public final OperationFuture partialUpdateInst
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -778,8 +840,11 @@ public final void deleteInstance(InstanceName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -803,8 +868,11 @@ public final void deleteInstance(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   DeleteInstanceRequest request =
    @@ -829,8 +897,11 @@ public final void deleteInstance(DeleteInstanceRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   DeleteInstanceRequest request =
    @@ -860,8 +931,11 @@ public final UnaryCallable deleteInstanceCallable(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -904,8 +978,11 @@ public final OperationFuture createClusterAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -948,8 +1025,11 @@ public final OperationFuture createClusterAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateClusterRequest request =
    @@ -982,8 +1062,11 @@ public final OperationFuture createClusterAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateClusterRequest request =
    @@ -1016,8 +1099,11 @@ public final OperationFuture createClusterAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateClusterRequest request =
    @@ -1044,8 +1130,11 @@ public final UnaryCallable createClusterCallabl
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
    @@ -1070,8 +1159,11 @@ public final Cluster getCluster(ClusterName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
    @@ -1095,8 +1187,11 @@ public final Cluster getCluster(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetClusterRequest request =
    @@ -1121,8 +1216,11 @@ public final Cluster getCluster(GetClusterRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetClusterRequest request =
    @@ -1147,8 +1245,11 @@ public final UnaryCallable getClusterCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -1177,8 +1278,11 @@ public final ListClustersResponse listClusters(InstanceName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -1204,8 +1308,11 @@ public final ListClustersResponse listClusters(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListClustersRequest request =
    @@ -1231,8 +1338,11 @@ public final ListClustersResponse listClusters(ListClustersRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListClustersRequest request =
    @@ -1261,8 +1371,11 @@ public final UnaryCallable listCluste
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Cluster request =
    @@ -1294,8 +1407,11 @@ public final OperationFuture updateClusterAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Cluster request =
    @@ -1328,8 +1444,11 @@ public final OperationFuture updateClusterAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Cluster request =
    @@ -1368,8 +1487,11 @@ public final UnaryCallable updateClusterCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   Cluster cluster = Cluster.newBuilder().build();
    @@ -1411,8 +1533,11 @@ public final OperationFuture partialUpdat
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   PartialUpdateClusterRequest request =
    @@ -1449,8 +1574,11 @@ public final OperationFuture partialUpdat
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   PartialUpdateClusterRequest request =
    @@ -1489,8 +1617,11 @@ public final OperationFuture partialUpdat
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   PartialUpdateClusterRequest request =
    @@ -1517,8 +1648,11 @@ public final OperationFuture partialUpdat
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
    @@ -1543,8 +1677,11 @@ public final void deleteCluster(ClusterName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
    @@ -1568,8 +1705,11 @@ public final void deleteCluster(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   DeleteClusterRequest request =
    @@ -1594,8 +1734,11 @@ public final void deleteCluster(DeleteClusterRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   DeleteClusterRequest request =
    @@ -1620,8 +1763,11 @@ public final UnaryCallable deleteClusterCallable()
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -1659,8 +1805,11 @@ public final AppProfile createAppProfile(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -1698,8 +1847,11 @@ public final AppProfile createAppProfile(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateAppProfileRequest request =
    @@ -1727,8 +1879,11 @@ public final AppProfile createAppProfile(CreateAppProfileRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   CreateAppProfileRequest request =
    @@ -1756,8 +1911,11 @@ public final UnaryCallable createAppProfile
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
    @@ -1782,8 +1940,11 @@ public final AppProfile getAppProfile(AppProfileName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -1807,8 +1968,11 @@ public final AppProfile getAppProfile(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetAppProfileRequest request =
    @@ -1833,8 +1997,11 @@ public final AppProfile getAppProfile(GetAppProfileRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetAppProfileRequest request =
    @@ -1859,8 +2026,11 @@ public final UnaryCallable getAppProfileCallab
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -1892,8 +2062,11 @@ public final ListAppProfilesPagedResponse listAppProfiles(InstanceName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -1922,8 +2095,11 @@ public final ListAppProfilesPagedResponse listAppProfiles(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListAppProfilesRequest request =
    @@ -1953,8 +2129,11 @@ public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListAppProfilesRequest request =
    @@ -1984,8 +2163,11 @@ public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListAppProfilesRequest request =
    @@ -2022,8 +2204,11 @@ public final ListAppProfilesPagedResponse listAppProfiles(ListAppProfilesRequest
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   AppProfile appProfile = AppProfile.newBuilder().build();
    @@ -2055,8 +2240,11 @@ public final OperationFuture updateAppProf
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   UpdateAppProfileRequest request =
    @@ -2084,8 +2272,11 @@ public final OperationFuture updateAppProf
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   UpdateAppProfileRequest request =
    @@ -2113,8 +2304,11 @@ public final OperationFuture updateAppProf
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   UpdateAppProfileRequest request =
    @@ -2141,8 +2335,11 @@ public final UnaryCallable updateAppProfileC
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
    @@ -2167,8 +2364,11 @@ public final void deleteAppProfile(AppProfileName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -2192,8 +2392,11 @@ public final void deleteAppProfile(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   DeleteAppProfileRequest request =
    @@ -2219,8 +2422,11 @@ public final void deleteAppProfile(DeleteAppProfileRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   DeleteAppProfileRequest request =
    @@ -2247,8 +2453,11 @@ public final UnaryCallable deleteAppProfileCalla
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -2276,8 +2485,11 @@ public final Policy getIamPolicy(ResourceName resource) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -2302,8 +2514,11 @@ public final Policy getIamPolicy(String resource) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetIamPolicyRequest request =
    @@ -2330,8 +2545,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   GetIamPolicyRequest request =
    @@ -2357,8 +2575,11 @@ public final UnaryCallable getIamPolicyCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -2390,8 +2611,11 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -2420,8 +2644,11 @@ public final Policy setIamPolicy(String resource, Policy policy) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   SetIamPolicyRequest request =
    @@ -2448,8 +2675,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   SetIamPolicyRequest request =
    @@ -2476,8 +2706,11 @@ public final UnaryCallable setIamPolicyCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ResourceName resource = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -2511,8 +2744,11 @@ public final TestIamPermissionsResponse testIamPermissions(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -2546,8 +2782,11 @@ public final TestIamPermissionsResponse testIamPermissions(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   TestIamPermissionsRequest request =
    @@ -2574,8 +2813,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   TestIamPermissionsRequest request =
    @@ -2603,8 +2845,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
    @@ -2635,8 +2880,11 @@ public final ListHotTabletsPagedResponse listHotTablets(ClusterName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
    @@ -2664,8 +2912,11 @@ public final ListHotTabletsPagedResponse listHotTablets(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListHotTabletsRequest request =
    @@ -2698,8 +2949,11 @@ public final ListHotTabletsPagedResponse listHotTablets(ListHotTabletsRequest re
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListHotTabletsRequest request =
    @@ -2732,8 +2986,11 @@ public final ListHotTabletsPagedResponse listHotTablets(ListHotTabletsRequest re
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
        *     BaseBigtableInstanceAdminClient.create()) {
        *   ListHotTabletsRequest request =
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
    index bc52bde120..fd44fb0843 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
    @@ -66,6 +66,8 @@
     import com.google.bigtable.admin.v2.UndeleteTableMetadata;
     import com.google.bigtable.admin.v2.UndeleteTableRequest;
     import com.google.bigtable.admin.v2.UpdateBackupRequest;
    +import com.google.bigtable.admin.v2.UpdateTableMetadata;
    +import com.google.bigtable.admin.v2.UpdateTableRequest;
     import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStub;
     import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings;
     import com.google.common.util.concurrent.MoreExecutors;
    @@ -156,8 +158,11 @@ public final OperationsClient getOperationsClient() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -193,8 +198,11 @@ public final Table createTable(InstanceName parent, String tableId, Table table)
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -230,8 +238,11 @@ public final Table createTable(String parent, String tableId, Table table) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateTableRequest request =
    @@ -260,8 +271,11 @@ public final Table createTable(CreateTableRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateTableRequest request =
    @@ -295,8 +309,11 @@ public final UnaryCallable createTableCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -343,8 +360,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -391,8 +411,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -439,8 +462,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -487,8 +513,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateTableFromSnapshotRequest request =
    @@ -523,8 +552,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateTableFromSnapshotRequest request =
    @@ -562,8 +594,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateTableFromSnapshotRequest request =
    @@ -592,8 +627,11 @@ public final OperationFuture createTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
    @@ -620,8 +658,11 @@ public final ListTablesPagedResponse listTables(InstanceName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
    @@ -647,8 +688,11 @@ public final ListTablesPagedResponse listTables(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListTablesRequest request =
    @@ -677,8 +721,11 @@ public final ListTablesPagedResponse listTables(ListTablesRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListTablesRequest request =
    @@ -707,8 +754,11 @@ public final UnaryCallable listTable
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListTablesRequest request =
    @@ -744,8 +794,11 @@ public final UnaryCallable listTablesCall
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -770,8 +823,11 @@ public final Table getTable(TableName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -795,8 +851,11 @@ public final Table getTable(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetTableRequest request =
    @@ -821,8 +880,11 @@ public final Table getTable(GetTableRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetTableRequest request =
    @@ -839,6 +901,135 @@ public final UnaryCallable getTableCallable() {
         return stub.getTableCallable();
       }
     
    +  // AUTO-GENERATED DOCUMENTATION AND METHOD.
    +  /**
    +   * Updates a specified table.
    +   *
    +   * 

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   Table table = Table.newBuilder().build();
    +   *   FieldMask updateMask = FieldMask.newBuilder().build();
    +   *   Table response = baseBigtableTableAdminClient.updateTableAsync(table, updateMask).get();
    +   * }
    +   * }
    + * + * @param table Required. The table to update. The table's `name` field is used to identify the + * table to update. + * @param updateMask Required. The list of fields to update. A mask specifying which fields (e.g. + * `deletion_protection`) in the `table` field should be updated. This mask is relative to the + * `table` field, not to the request message. The wildcard (*) path is currently not + * supported. Currently UpdateTable is only supported for the following field: * + * `deletion_protection` If `column_families` is set in `update_mask`, it will return an + * UNIMPLEMENTED error. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateTableAsync( + Table table, FieldMask updateMask) { + UpdateTableRequest request = + UpdateTableRequest.newBuilder().setTable(table).setUpdateMask(updateMask).build(); + return updateTableAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UpdateTableRequest request =
    +   *       UpdateTableRequest.newBuilder()
    +   *           .setTable(Table.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   Table response = baseBigtableTableAdminClient.updateTableAsync(request).get();
    +   * }
    +   * }
    + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateTableAsync( + UpdateTableRequest request) { + return updateTableOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UpdateTableRequest request =
    +   *       UpdateTableRequest.newBuilder()
    +   *           .setTable(Table.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   OperationFuture future =
    +   *       baseBigtableTableAdminClient.updateTableOperationCallable().futureCall(request);
    +   *   // Do something.
    +   *   Table response = future.get();
    +   * }
    +   * }
    + */ + public final OperationCallable + updateTableOperationCallable() { + return stub.updateTableOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a specified table. + * + *

    Sample code: + * + *

    {@code
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    +   * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
    +   *     BaseBigtableTableAdminClient.create()) {
    +   *   UpdateTableRequest request =
    +   *       UpdateTableRequest.newBuilder()
    +   *           .setTable(Table.newBuilder().build())
    +   *           .setUpdateMask(FieldMask.newBuilder().build())
    +   *           .build();
    +   *   ApiFuture future =
    +   *       baseBigtableTableAdminClient.updateTableCallable().futureCall(request);
    +   *   // Do something.
    +   *   Operation response = future.get();
    +   * }
    +   * }
    + */ + public final UnaryCallable updateTableCallable() { + return stub.updateTableCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Permanently deletes a specified table and all of its data. @@ -846,8 +1037,11 @@ public final UnaryCallable getTableCallable() { *

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -872,8 +1066,11 @@ public final void deleteTable(TableName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -897,8 +1094,11 @@ public final void deleteTable(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DeleteTableRequest request =
    @@ -923,8 +1123,11 @@ public final void deleteTable(DeleteTableRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DeleteTableRequest request =
    @@ -949,8 +1152,11 @@ public final UnaryCallable deleteTableCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -975,8 +1181,11 @@ public final OperationFuture undeleteTableAsync(Ta
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -1000,8 +1209,11 @@ public final OperationFuture undeleteTableAsync(St
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   UndeleteTableRequest request =
    @@ -1027,8 +1239,11 @@ public final OperationFuture undeleteTableAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   UndeleteTableRequest request =
    @@ -1054,8 +1269,11 @@ public final OperationFuture undeleteTableAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   UndeleteTableRequest request =
    @@ -1082,8 +1300,11 @@ public final UnaryCallable undeleteTableCallabl
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -1118,8 +1339,11 @@ public final Table modifyColumnFamilies(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -1154,8 +1378,11 @@ public final Table modifyColumnFamilies(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ModifyColumnFamiliesRequest request =
    @@ -1183,8 +1410,11 @@ public final Table modifyColumnFamilies(ModifyColumnFamiliesRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ModifyColumnFamiliesRequest request =
    @@ -1211,8 +1441,11 @@ public final UnaryCallable modifyColumnFamil
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DropRowRangeRequest request =
    @@ -1238,8 +1471,11 @@ public final void dropRowRange(DropRowRangeRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DropRowRangeRequest request =
    @@ -1266,8 +1502,11 @@ public final UnaryCallable dropRowRangeCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -1297,8 +1536,11 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(TableName
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -1326,8 +1568,11 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(String na
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GenerateConsistencyTokenRequest request =
    @@ -1356,8 +1601,11 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GenerateConsistencyTokenRequest request =
    @@ -1384,8 +1632,11 @@ public final GenerateConsistencyTokenResponse generateConsistencyToken(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -1418,8 +1669,11 @@ public final CheckConsistencyResponse checkConsistency(TableName name, String co
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -1452,8 +1706,11 @@ public final CheckConsistencyResponse checkConsistency(String name, String consi
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CheckConsistencyRequest request =
    @@ -1480,8 +1737,11 @@ public final CheckConsistencyResponse checkConsistency(CheckConsistencyRequest r
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CheckConsistencyRequest request =
    @@ -1514,8 +1774,11 @@ public final CheckConsistencyResponse checkConsistency(CheckConsistencyRequest r
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -1564,8 +1827,11 @@ public final OperationFuture snapshotTableAsync
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
    @@ -1614,8 +1880,11 @@ public final OperationFuture snapshotTableAsync
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -1664,8 +1933,11 @@ public final OperationFuture snapshotTableAsync
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
    @@ -1714,8 +1986,11 @@ public final OperationFuture snapshotTableAsync
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SnapshotTableRequest request =
    @@ -1751,8 +2026,11 @@ public final OperationFuture snapshotTableAsync
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SnapshotTableRequest request =
    @@ -1788,8 +2066,11 @@ public final OperationFuture snapshotTableAsync
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SnapshotTableRequest request =
    @@ -1823,8 +2104,11 @@ public final UnaryCallable snapshotTableCallabl
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
    @@ -1854,8 +2138,11 @@ public final Snapshot getSnapshot(SnapshotName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name =
    @@ -1885,8 +2172,11 @@ public final Snapshot getSnapshot(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetSnapshotRequest request =
    @@ -1917,8 +2207,11 @@ public final Snapshot getSnapshot(GetSnapshotRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetSnapshotRequest request =
    @@ -1949,8 +2242,11 @@ public final UnaryCallable getSnapshotCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
    @@ -1986,8 +2282,11 @@ public final ListSnapshotsPagedResponse listSnapshots(ClusterName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
    @@ -2020,8 +2319,11 @@ public final ListSnapshotsPagedResponse listSnapshots(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListSnapshotsRequest request =
    @@ -2055,8 +2357,11 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListSnapshotsRequest request =
    @@ -2091,8 +2396,11 @@ public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest reque
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListSnapshotsRequest request =
    @@ -2133,8 +2441,11 @@ public final UnaryCallable listSnap
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]");
    @@ -2164,8 +2475,11 @@ public final void deleteSnapshot(SnapshotName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name =
    @@ -2195,8 +2509,11 @@ public final void deleteSnapshot(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DeleteSnapshotRequest request =
    @@ -2227,8 +2544,11 @@ public final void deleteSnapshot(DeleteSnapshotRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DeleteSnapshotRequest request =
    @@ -2260,8 +2580,11 @@ public final UnaryCallable deleteSnapshotCallable(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
    @@ -2308,8 +2631,11 @@ public final OperationFuture createBackupAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
    @@ -2356,8 +2682,11 @@ public final OperationFuture createBackupAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateBackupRequest request =
    @@ -2391,8 +2720,11 @@ public final OperationFuture createBackupAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateBackupRequest request =
    @@ -2426,8 +2758,11 @@ public final OperationFuture createBackupAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   CreateBackupRequest request =
    @@ -2454,8 +2789,11 @@ public final UnaryCallable createBackupCallable(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
    @@ -2480,8 +2818,11 @@ public final Backup getBackup(BackupName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
    @@ -2505,8 +2846,11 @@ public final Backup getBackup(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetBackupRequest request =
    @@ -2531,8 +2875,11 @@ public final Backup getBackup(GetBackupRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetBackupRequest request =
    @@ -2557,8 +2904,11 @@ public final UnaryCallable getBackupCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   Backup backup = Backup.newBuilder().build();
    @@ -2589,8 +2939,11 @@ public final Backup updateBackup(Backup backup, FieldMask updateMask) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   UpdateBackupRequest request =
    @@ -2616,8 +2969,11 @@ public final Backup updateBackup(UpdateBackupRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   UpdateBackupRequest request =
    @@ -2643,8 +2999,11 @@ public final UnaryCallable updateBackupCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
    @@ -2669,8 +3028,11 @@ public final void deleteBackup(BackupName name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
    @@ -2694,8 +3056,11 @@ public final void deleteBackup(String name) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DeleteBackupRequest request =
    @@ -2720,8 +3085,11 @@ public final void deleteBackup(DeleteBackupRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   DeleteBackupRequest request =
    @@ -2746,8 +3114,11 @@ public final UnaryCallable deleteBackupCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
    @@ -2778,8 +3149,11 @@ public final ListBackupsPagedResponse listBackups(ClusterName parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
    @@ -2807,8 +3181,11 @@ public final ListBackupsPagedResponse listBackups(String parent) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListBackupsRequest request =
    @@ -2839,8 +3216,11 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListBackupsRequest request =
    @@ -2872,8 +3252,11 @@ public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ListBackupsRequest request =
    @@ -2917,8 +3300,11 @@ public final UnaryCallable listBackupsC
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   RestoreTableRequest request =
    @@ -2951,8 +3337,11 @@ public final OperationFuture restoreTableAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   RestoreTableRequest request =
    @@ -2985,8 +3374,11 @@ public final OperationFuture restoreTableAsync(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   RestoreTableRequest request =
    @@ -3013,8 +3405,11 @@ public final UnaryCallable restoreTableCallable(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
    @@ -3042,8 +3437,11 @@ public final Policy getIamPolicy(ResourceName resource) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -3068,8 +3466,11 @@ public final Policy getIamPolicy(String resource) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetIamPolicyRequest request =
    @@ -3097,8 +3498,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   GetIamPolicyRequest request =
    @@ -3125,8 +3529,11 @@ public final UnaryCallable getIamPolicyCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
    @@ -3158,8 +3565,11 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -3188,8 +3598,11 @@ public final Policy setIamPolicy(String resource, Policy policy) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SetIamPolicyRequest request =
    @@ -3217,8 +3630,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   SetIamPolicyRequest request =
    @@ -3246,8 +3662,11 @@ public final UnaryCallable setIamPolicyCallable() {
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   ResourceName resource = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
    @@ -3281,8 +3700,11 @@ public final TestIamPermissionsResponse testIamPermissions(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   String resource = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
    @@ -3316,8 +3738,11 @@ public final TestIamPermissionsResponse testIamPermissions(
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TestIamPermissionsRequest request =
    @@ -3345,8 +3770,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
        * 

    Sample code: * *

    {@code
    -   * // This snippet has been automatically generated for illustrative purposes only.
    -   * // It may require modifications to work in your environment.
    +   * // This snippet has been automatically generated and should be regarded as a code template only.
    +   * // It will require modifications to work:
    +   * // - It may require correct/in-range values for request initialization.
    +   * // - It may require specifying regional endpoints when creating the service client as shown in
    +   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
        * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
        *     BaseBigtableTableAdminClient.create()) {
        *   TestIamPermissionsRequest request =
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
    index 97cc6bb5d6..7f353a0d68 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
    @@ -66,6 +66,8 @@
     import com.google.bigtable.admin.v2.UndeleteTableMetadata;
     import com.google.bigtable.admin.v2.UndeleteTableRequest;
     import com.google.bigtable.admin.v2.UpdateBackupRequest;
    +import com.google.bigtable.admin.v2.UpdateTableMetadata;
    +import com.google.bigtable.admin.v2.UpdateTableRequest;
     import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings;
     import com.google.iam.v1.GetIamPolicyRequest;
     import com.google.iam.v1.Policy;
    @@ -114,6 +116,17 @@ public UnaryCallSettings getTableSettings() {
         return ((BigtableTableAdminStubSettings) getStubSettings()).getTableSettings();
       }
     
    +  /** Returns the object with the settings used for calls to updateTable. */
    +  public UnaryCallSettings updateTableSettings() {
    +    return ((BigtableTableAdminStubSettings) getStubSettings()).updateTableSettings();
    +  }
    +
    +  /** Returns the object with the settings used for calls to updateTable. */
    +  public OperationCallSettings
    +      updateTableOperationSettings() {
    +    return ((BigtableTableAdminStubSettings) getStubSettings()).updateTableOperationSettings();
    +  }
    +
       /** Returns the object with the settings used for calls to deleteTable. */
       public UnaryCallSettings deleteTableSettings() {
         return ((BigtableTableAdminStubSettings) getStubSettings()).deleteTableSettings();
    @@ -365,6 +378,17 @@ public UnaryCallSettings.Builder getTableSettings() {
           return getStubSettingsBuilder().getTableSettings();
         }
     
    +    /** Returns the builder for the settings used for calls to updateTable. */
    +    public UnaryCallSettings.Builder updateTableSettings() {
    +      return getStubSettingsBuilder().updateTableSettings();
    +    }
    +
    +    /** Returns the builder for the settings used for calls to updateTable. */
    +    public OperationCallSettings.Builder
    +        updateTableOperationSettings() {
    +      return getStubSettingsBuilder().updateTableOperationSettings();
    +    }
    +
         /** Returns the builder for the settings used for calls to deleteTable. */
         public UnaryCallSettings.Builder deleteTableSettings() {
           return getStubSettingsBuilder().deleteTableSettings();
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
    index 2d7f1d5803..ce05f0a2d8 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
    @@ -122,6 +122,8 @@ public String toString() {
             .add("stubSettings", stubSettings)
             .add("undeleteTableSettings", stubSettings.undeleteTableSettings())
             .add("undeleteTableOperationSettings", stubSettings.undeleteTableOperationSettings())
    +        .add("updateTableSettings", stubSettings.updateTableSettings())
    +        .add("updateTableOperationSettings", stubSettings.updateTableOperationSettings())
             .toString();
       }
     
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
    index fbaa5e3bea..bda1f8b016 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
    @@ -150,6 +150,9 @@
                 },
                 "UpdateBackup": {
                   "methods": ["updateBackup", "updateBackup", "updateBackupCallable"]
    +            },
    +            "UpdateTable": {
    +              "methods": ["updateTableAsync", "updateTableAsync", "updateTableOperationCallable", "updateTableCallable"]
                 }
               }
             }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListClustersException.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListClustersException.java
    index 7b95983225..f04bdf326e 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListClustersException.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListClustersException.java
    @@ -33,7 +33,7 @@ public class PartialListClustersException extends RuntimeException {
        */
       @InternalApi
       public PartialListClustersException(List unavailableZones, List clusters) {
    -    super("Failed to list all instances, some zones where unavailable");
    +    super("Failed to list all clusters, some zones were unavailable: " + unavailableZones);
         this.unavailableZones = ImmutableList.copyOf(unavailableZones);
         this.clusters = ImmutableList.copyOf(clusters);
       }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListInstancesException.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListInstancesException.java
    index d4d5d4e992..a24d66fb27 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListInstancesException.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/PartialListInstancesException.java
    @@ -31,7 +31,7 @@ public class PartialListInstancesException extends RuntimeException {
       @InternalApi
       public PartialListInstancesException(
           @Nonnull List unavailableZones, @Nonnull List instances) {
    -    super("Failed to list all instances, some zones where unavailable");
    +    super("Failed to list all instances, some zones were unavailable: " + unavailableZones);
     
         this.unavailableZones = ImmutableList.copyOf(unavailableZones);
         this.instances = ImmutableList.copyOf(instances);
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequest.java
    index 0547ebae01..b801b0db3b 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequest.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequest.java
    @@ -29,37 +29,57 @@ public final class RestoreTableRequest {
       private final String sourceBackupId;
       private final String sourceClusterId;
       private final String sourceInstanceId;
    +  private final String sourceProjectId;
     
       /**
        * Create a {@link RestoreTableRequest} object. It assumes the source backup locates in the same
    -   * instance as the destination table. To restore a table from a backup in another instance, use
    -   * {@link #of(String, String, String) of} method.
    +   * instance and project as the destination table. To restore a table from a backup in another
    +   * instance, use {@link #of(String, String, String) of} method. To restore a table from a backup
    +   * in another project, use {@link #of(String, String, String, String) of} method.
        */
       public static RestoreTableRequest of(String sourceClusterId, String sourceBackupId) {
    -    RestoreTableRequest request = new RestoreTableRequest(null, sourceClusterId, sourceBackupId);
    +    RestoreTableRequest request =
    +        new RestoreTableRequest(null, sourceClusterId, sourceBackupId, null);
         return request;
       }
     
       /**
    -   * Create a {@link RestoreTableRequest} object. The source backup could locate in a the same or a
    -   * different instance.
    +   * Create a {@link RestoreTableRequest} object. The source backup could locate in the same or a
    +   * different instance but the same project as the destination table. To restore a table from a
    +   * backup in another project, use {@link #of(String, String, String, String) of} method.
        */
       public static RestoreTableRequest of(
           String sourceInstanceId, String sourceClusterId, String sourceBackupId) {
         RestoreTableRequest request =
    -        new RestoreTableRequest(sourceInstanceId, sourceClusterId, sourceBackupId);
    +        new RestoreTableRequest(sourceInstanceId, sourceClusterId, sourceBackupId, null);
    +    return request;
    +  }
    +
    +  /**
    +   * Create a {@link RestoreTableRequest} object. The source backup could locate in the same or a
    +   * different instance and/or project.
    +   */
    +  public static RestoreTableRequest of(
    +      String sourceInstanceId,
    +      String sourceClusterId,
    +      String sourceBackupId,
    +      String sourceProjectId) {
    +    RestoreTableRequest request =
    +        new RestoreTableRequest(sourceInstanceId, sourceClusterId, sourceBackupId, sourceProjectId);
         return request;
       }
     
       private RestoreTableRequest(
           @Nullable String sourceInstanceId,
           @Nonnull String sourceClusterId,
    -      @Nonnull String sourceBackupId) {
    +      @Nonnull String sourceBackupId,
    +      @Nullable String sourceProjectId) {
         Preconditions.checkNotNull(sourceClusterId);
         Preconditions.checkNotNull(sourceBackupId);
         this.sourceBackupId = sourceBackupId;
         this.sourceInstanceId = sourceInstanceId;
         this.sourceClusterId = sourceClusterId;
    +    this.sourceProjectId = sourceProjectId;
       }
     
       public RestoreTableRequest setTableId(String tableId) {
    @@ -80,13 +100,18 @@ public boolean equals(Object o) {
         return Objects.equal(requestBuilder.getTableId(), that.requestBuilder.getTableId())
             && Objects.equal(sourceInstanceId, that.sourceInstanceId)
             && Objects.equal(sourceClusterId, that.sourceClusterId)
    -        && Objects.equal(sourceBackupId, that.sourceBackupId);
    +        && Objects.equal(sourceBackupId, that.sourceBackupId)
    +        && Objects.equal(sourceProjectId, that.sourceProjectId);
       }
     
       @Override
       public int hashCode() {
         return Objects.hashCode(
    -        requestBuilder.getTableId(), sourceInstanceId, sourceClusterId, sourceBackupId);
    +        requestBuilder.getTableId(),
    +        sourceInstanceId,
    +        sourceClusterId,
    +        sourceBackupId,
    +        sourceProjectId);
       }
     
       @InternalApi
    @@ -99,7 +124,7 @@ public com.google.bigtable.admin.v2.RestoreTableRequest toProto(
             .setParent(NameUtil.formatInstanceName(projectId, instanceId))
             .setBackup(
                 NameUtil.formatBackupName(
    -                projectId,
    +                sourceProjectId == null ? projectId : sourceProjectId,
                     sourceInstanceId == null ? instanceId : sourceInstanceId,
                     sourceClusterId,
                     sourceBackupId))
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
    index 5d6102f321..028d244292 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
    @@ -109,8 +109,11 @@
      * 

    For example, to set the total timeout of getInstance to 30 seconds: * *

    {@code
    - * // This snippet has been automatically generated for illustrative purposes only.
    - * // It may require modifications to work in your environment.
    + * // This snippet has been automatically generated and should be regarded as a code template only.
    + * // It will require modifications to work:
    + * // - It may require correct/in-range values for request initialization.
    + * // - It may require specifying regional endpoints when creating the service client as shown in
    + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
      * BigtableInstanceAdminStubSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
      *     BigtableInstanceAdminStubSettings.newBuilder();
      * baseBigtableInstanceAdminSettingsBuilder
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
    index d278228522..5f4bcd05a6 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
    @@ -57,6 +57,8 @@
     import com.google.bigtable.admin.v2.UndeleteTableMetadata;
     import com.google.bigtable.admin.v2.UndeleteTableRequest;
     import com.google.bigtable.admin.v2.UpdateBackupRequest;
    +import com.google.bigtable.admin.v2.UpdateTableMetadata;
    +import com.google.bigtable.admin.v2.UpdateTableRequest;
     import com.google.iam.v1.GetIamPolicyRequest;
     import com.google.iam.v1.Policy;
     import com.google.iam.v1.SetIamPolicyRequest;
    @@ -104,6 +106,15 @@ public UnaryCallable getTableCallable() {
         throw new UnsupportedOperationException("Not implemented: getTableCallable()");
       }
     
    +  public OperationCallable
    +      updateTableOperationCallable() {
    +    throw new UnsupportedOperationException("Not implemented: updateTableOperationCallable()");
    +  }
    +
    +  public UnaryCallable updateTableCallable() {
    +    throw new UnsupportedOperationException("Not implemented: updateTableCallable()");
    +  }
    +
       public UnaryCallable deleteTableCallable() {
         throw new UnsupportedOperationException("Not implemented: deleteTableCallable()");
       }
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
    index 6d750a5d35..ede9ad10c9 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
    @@ -79,6 +79,8 @@
     import com.google.bigtable.admin.v2.UndeleteTableMetadata;
     import com.google.bigtable.admin.v2.UndeleteTableRequest;
     import com.google.bigtable.admin.v2.UpdateBackupRequest;
    +import com.google.bigtable.admin.v2.UpdateTableMetadata;
    +import com.google.bigtable.admin.v2.UpdateTableRequest;
     import com.google.common.collect.ImmutableList;
     import com.google.common.collect.ImmutableMap;
     import com.google.common.collect.ImmutableSet;
    @@ -113,8 +115,11 @@
      * 

    For example, to set the total timeout of createTable to 30 seconds: * *

    {@code
    - * // This snippet has been automatically generated for illustrative purposes only.
    - * // It may require modifications to work in your environment.
    + * // This snippet has been automatically generated and should be regarded as a code template only.
    + * // It will require modifications to work:
    + * // - It may require correct/in-range values for request initialization.
    + * // - It may require specifying regional endpoints when creating the service client as shown in
    + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
      * BigtableTableAdminStubSettings.Builder baseBigtableTableAdminSettingsBuilder =
      *     BigtableTableAdminStubSettings.newBuilder();
      * baseBigtableTableAdminSettingsBuilder
    @@ -152,6 +157,9 @@ public class BigtableTableAdminStubSettings extends StubSettings
           listTablesSettings;
       private final UnaryCallSettings getTableSettings;
    +  private final UnaryCallSettings updateTableSettings;
    +  private final OperationCallSettings
    +      updateTableOperationSettings;
       private final UnaryCallSettings deleteTableSettings;
       private final UnaryCallSettings undeleteTableSettings;
       private final OperationCallSettings
    @@ -374,6 +382,17 @@ public UnaryCallSettings getTableSettings() {
         return getTableSettings;
       }
     
    +  /** Returns the object with the settings used for calls to updateTable. */
    +  public UnaryCallSettings updateTableSettings() {
    +    return updateTableSettings;
    +  }
    +
    +  /** Returns the object with the settings used for calls to updateTable. */
    +  public OperationCallSettings
    +      updateTableOperationSettings() {
    +    return updateTableOperationSettings;
    +  }
    +
       /** Returns the object with the settings used for calls to deleteTable. */
       public UnaryCallSettings deleteTableSettings() {
         return deleteTableSettings;
    @@ -579,6 +598,8 @@ protected BigtableTableAdminStubSettings(Builder settingsBuilder) throws IOExcep
             settingsBuilder.createTableFromSnapshotOperationSettings().build();
         listTablesSettings = settingsBuilder.listTablesSettings().build();
         getTableSettings = settingsBuilder.getTableSettings().build();
    +    updateTableSettings = settingsBuilder.updateTableSettings().build();
    +    updateTableOperationSettings = settingsBuilder.updateTableOperationSettings().build();
         deleteTableSettings = settingsBuilder.deleteTableSettings().build();
         undeleteTableSettings = settingsBuilder.undeleteTableSettings().build();
         undeleteTableOperationSettings = settingsBuilder.undeleteTableOperationSettings().build();
    @@ -618,6 +639,9 @@ public static class Builder
                 ListTablesRequest, ListTablesResponse, ListTablesPagedResponse>
             listTablesSettings;
         private final UnaryCallSettings.Builder getTableSettings;
    +    private final UnaryCallSettings.Builder updateTableSettings;
    +    private final OperationCallSettings.Builder
    +        updateTableOperationSettings;
         private final UnaryCallSettings.Builder deleteTableSettings;
         private final UnaryCallSettings.Builder undeleteTableSettings;
         private final OperationCallSettings.Builder
    @@ -749,6 +773,8 @@ protected Builder(ClientContext clientContext) {
           createTableFromSnapshotOperationSettings = OperationCallSettings.newBuilder();
           listTablesSettings = PagedCallSettings.newBuilder(LIST_TABLES_PAGE_STR_FACT);
           getTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
    +      updateTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
    +      updateTableOperationSettings = OperationCallSettings.newBuilder();
           deleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
           undeleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
           undeleteTableOperationSettings = OperationCallSettings.newBuilder();
    @@ -779,6 +805,7 @@ protected Builder(ClientContext clientContext) {
                   createTableFromSnapshotSettings,
                   listTablesSettings,
                   getTableSettings,
    +              updateTableSettings,
                   deleteTableSettings,
                   undeleteTableSettings,
                   modifyColumnFamiliesSettings,
    @@ -810,6 +837,8 @@ protected Builder(BigtableTableAdminStubSettings settings) {
               settings.createTableFromSnapshotOperationSettings.toBuilder();
           listTablesSettings = settings.listTablesSettings.toBuilder();
           getTableSettings = settings.getTableSettings.toBuilder();
    +      updateTableSettings = settings.updateTableSettings.toBuilder();
    +      updateTableOperationSettings = settings.updateTableOperationSettings.toBuilder();
           deleteTableSettings = settings.deleteTableSettings.toBuilder();
           undeleteTableSettings = settings.undeleteTableSettings.toBuilder();
           undeleteTableOperationSettings = settings.undeleteTableOperationSettings.toBuilder();
    @@ -840,6 +869,7 @@ protected Builder(BigtableTableAdminStubSettings settings) {
                   createTableFromSnapshotSettings,
                   listTablesSettings,
                   getTableSettings,
    +              updateTableSettings,
                   deleteTableSettings,
                   undeleteTableSettings,
                   modifyColumnFamiliesSettings,
    @@ -895,6 +925,11 @@ private static Builder initDefaults(Builder builder) {
               .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes"))
               .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params"));
     
    +      builder
    +          .updateTableSettings()
    +          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
    +          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
    +
           builder
               .deleteTableSettings()
               .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
    @@ -1015,6 +1050,29 @@ private static Builder initDefaults(Builder builder) {
                           .setTotalTimeout(Duration.ofMillis(3600000L))
                           .build()));
     
    +      builder
    +          .updateTableOperationSettings()
    +          .setInitialCallSettings(
    +              UnaryCallSettings.newUnaryCallSettingsBuilder()
    +                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
    +                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
    +                  .build())
    +          .setResponseTransformer(
    +              ProtoOperationTransformers.ResponseTransformer.create(Table.class))
    +          .setMetadataTransformer(
    +              ProtoOperationTransformers.MetadataTransformer.create(UpdateTableMetadata.class))
    +          .setPollingAlgorithm(
    +              OperationTimedPollAlgorithm.create(
    +                  RetrySettings.newBuilder()
    +                      .setInitialRetryDelay(Duration.ofMillis(5000L))
    +                      .setRetryDelayMultiplier(1.5)
    +                      .setMaxRetryDelay(Duration.ofMillis(45000L))
    +                      .setInitialRpcTimeout(Duration.ZERO)
    +                      .setRpcTimeoutMultiplier(1.0)
    +                      .setMaxRpcTimeout(Duration.ZERO)
    +                      .setTotalTimeout(Duration.ofMillis(300000L))
    +                      .build()));
    +
           builder
               .undeleteTableOperationSettings()
               .setInitialCallSettings(
    @@ -1160,6 +1218,19 @@ public UnaryCallSettings.Builder getTableSettings() {
           return getTableSettings;
         }
     
    +    /** Returns the builder for the settings used for calls to updateTable. */
    +    public UnaryCallSettings.Builder updateTableSettings() {
    +      return updateTableSettings;
    +    }
    +
    +    /** Returns the builder for the settings used for calls to updateTable. */
    +    @BetaApi(
    +        "The surface for use by generated code is not stable yet and may change in the future.")
    +    public OperationCallSettings.Builder
    +        updateTableOperationSettings() {
    +      return updateTableOperationSettings;
    +    }
    +
         /** Returns the builder for the settings used for calls to deleteTable. */
         public UnaryCallSettings.Builder deleteTableSettings() {
           return deleteTableSettings;
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
    index f75f5fe399..c6be2b72b9 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
    @@ -61,6 +61,8 @@
     import com.google.bigtable.admin.v2.UndeleteTableMetadata;
     import com.google.bigtable.admin.v2.UndeleteTableRequest;
     import com.google.bigtable.admin.v2.UpdateBackupRequest;
    +import com.google.bigtable.admin.v2.UpdateTableMetadata;
    +import com.google.bigtable.admin.v2.UpdateTableRequest;
     import com.google.common.collect.ImmutableMap;
     import com.google.iam.v1.GetIamPolicyRequest;
     import com.google.iam.v1.Policy;
    @@ -117,6 +119,14 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub {
               .setResponseMarshaller(ProtoUtils.marshaller(Table.getDefaultInstance()))
               .build();
     
    +  private static final MethodDescriptor updateTableMethodDescriptor =
    +      MethodDescriptor.newBuilder()
    +          .setType(MethodDescriptor.MethodType.UNARY)
    +          .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/UpdateTable")
    +          .setRequestMarshaller(ProtoUtils.marshaller(UpdateTableRequest.getDefaultInstance()))
    +          .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
    +          .build();
    +
       private static final MethodDescriptor deleteTableMethodDescriptor =
           MethodDescriptor.newBuilder()
               .setType(MethodDescriptor.MethodType.UNARY)
    @@ -305,6 +315,9 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub {
       private final UnaryCallable listTablesCallable;
       private final UnaryCallable listTablesPagedCallable;
       private final UnaryCallable getTableCallable;
    +  private final UnaryCallable updateTableCallable;
    +  private final OperationCallable
    +      updateTableOperationCallable;
       private final UnaryCallable deleteTableCallable;
       private final UnaryCallable undeleteTableCallable;
       private final OperationCallable
    @@ -425,6 +438,16 @@ protected GrpcBigtableTableAdminStub(
                       return params.build();
                     })
                 .build();
    +    GrpcCallSettings updateTableTransportSettings =
    +        GrpcCallSettings.newBuilder()
    +            .setMethodDescriptor(updateTableMethodDescriptor)
    +            .setParamsExtractor(
    +                request -> {
    +                  ImmutableMap.Builder params = ImmutableMap.builder();
    +                  params.put("table.name", String.valueOf(request.getTable().getName()));
    +                  return params.build();
    +                })
    +            .build();
         GrpcCallSettings deleteTableTransportSettings =
             GrpcCallSettings.newBuilder()
                 .setMethodDescriptor(deleteTableMethodDescriptor)
    @@ -643,6 +666,15 @@ protected GrpcBigtableTableAdminStub(
         this.getTableCallable =
             callableFactory.createUnaryCallable(
                 getTableTransportSettings, settings.getTableSettings(), clientContext);
    +    this.updateTableCallable =
    +        callableFactory.createUnaryCallable(
    +            updateTableTransportSettings, settings.updateTableSettings(), clientContext);
    +    this.updateTableOperationCallable =
    +        callableFactory.createOperationCallable(
    +            updateTableTransportSettings,
    +            settings.updateTableOperationSettings(),
    +            clientContext,
    +            operationsStub);
         this.deleteTableCallable =
             callableFactory.createUnaryCallable(
                 deleteTableTransportSettings, settings.deleteTableSettings(), clientContext);
    @@ -777,6 +809,17 @@ public UnaryCallable getTableCallable() {
         return getTableCallable;
       }
     
    +  @Override
    +  public UnaryCallable updateTableCallable() {
    +    return updateTableCallable;
    +  }
    +
    +  @Override
    +  public OperationCallable
    +      updateTableOperationCallable() {
    +    return updateTableOperationCallable;
    +  }
    +
       @Override
       public UnaryCallable deleteTableCallable() {
         return deleteTableCallable;
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtil.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtil.java
    new file mode 100644
    index 0000000000..9fbc356d53
    --- /dev/null
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtil.java
    @@ -0,0 +1,55 @@
    +/*
    + * Copyright 2022 Google LLC
    + *
    + * Licensed under the Apache License, Version 2.0 (the "License");
    + * you may not use this file except in compliance with the License.
    + * You may obtain a copy of the License at
    + *
    + *     https://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package com.google.cloud.bigtable.data.v2.internal;
    +
    +import com.google.api.core.InternalApi;
    +import com.google.bigtable.v2.ReadRowsResponse;
    +import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter;
    +import com.google.cloud.bigtable.data.v2.models.Row;
    +import com.google.cloud.bigtable.data.v2.models.RowAdapter.RowBuilder;
    +import com.google.cloud.bigtable.data.v2.stub.readrows.RowMerger;
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +@InternalApi("For internal google use only")
    +public class RowMergerUtil implements AutoCloseable {
    +  private final RowMerger merger;
    +
    +  public RowMergerUtil() {
    +    RowBuilder rowBuilder = new DefaultRowAdapter().createRowBuilder();
    +    merger = new RowMerger<>(rowBuilder);
    +  }
    +
    +  @Override
    +  public void close() {
    +    if (merger.hasPartialFrame()) {
    +      throw new IllegalStateException("Tried to close merger with unmerged partial data");
    +    }
    +  }
    +
    +  public List parseReadRowsResponses(Iterable responses) {
    +    List rows = new ArrayList<>();
    +
    +    for (ReadRowsResponse response : responses) {
    +      merger.push(response);
    +      while (merger.hasFullFrame()) {
    +        rows.add(merger.pop());
    +      }
    +    }
    +
    +    return rows;
    +  }
    +}
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java
    index 279ebf6407..2ff139081c 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultRowAdapter.java
    @@ -75,7 +75,8 @@ public Row createRowFromProto(com.google.bigtable.v2.Row row) {
         return builder.finishRow();
       }
     
    -  /** {@inheritDoc} */
    +  /** Internal implementation detail for {@link DefaultRowAdapter}. */
    +  @InternalApi()
       public class DefaultRowBuilder implements RowBuilder {
         private ByteString currentKey;
         private TreeMap> cellsByFamily;
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java
    index 326d78cfe0..6c1402685d 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Mutation.java
    @@ -87,6 +87,19 @@ public static Mutation fromProtoUnsafe(List pro
         return mutation;
       }
     
    +  /**
    +   * Wraps the List of protobuf {@link com.google.bigtable.v2.Mutation}. This methods, like {@link
    +   * #createUnsafe()}, allows setCell operation to use server side timestamp. This is dangerous
    +   * because mutations will no longer be idempotent, which might cause multiple duplicate values to
    +   * be stored in Bigtable. This option should only be used for advanced usecases with extreme care.
    +   */
    +  @BetaApi
    +  public static Mutation fromProtoUnsafe(Iterable protos) {
    +    Mutation mutation = new Mutation(true);
    +    mutation.mutations.addAll(protos);
    +    return mutation;
    +  }
    +
       /**
        * Constructs a row mutation from an existing protobuf object.
        *
    diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java
    index 986a0ca1a5..271ffe3adf 100644
    --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java
    +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Query.java
    @@ -15,6 +15,7 @@
      */
     package com.google.cloud.bigtable.data.v2.models;
     
    +import com.google.api.core.BetaApi;
     import com.google.api.core.InternalApi;
     import com.google.bigtable.v2.ReadRowsRequest;
     import com.google.bigtable.v2.RowFilter;
    @@ -248,6 +249,29 @@ public List shard(SortedSet splitPoints) {
         return shards;
       }
     
    +  /**
    +   * Create a query paginator that'll split the query into smaller chunks.
    +   *
    +   * 

    Example usage: + * + *

    {@code
    +   * Query query = Query.create(...).range("a", "z");
    +   * Query.QueryPaginator paginator = query.createQueryPaginator(100);
    +   * ByteString lastSeenRowKey = ByteString.EMPTY;
    +   * do {
    +   *     List rows = client.readRowsCallable().all().call(paginator.getNextQuery());
    +   *     for (Row row : rows) {
    +   *        // do some processing
    +   *        lastSeenRow = row;
    +   *     }
    +   * } while (paginator.advance(lastSeenRowKey));
    +   * }
    + */ + @BetaApi("This surface is stable yet it might be removed in the future.") + public QueryPaginator createPaginator(int pageSize) { + return new QueryPaginator(this, pageSize); + } + /** Get the minimal range that encloses all of the row keys and ranges in this Query. */ public ByteStringRange getBound() { return RowSetUtil.getBound(builder.getRows()); @@ -297,6 +321,73 @@ private static ByteString wrapKey(String key) { return ByteString.copyFromUtf8(key); } + /** + * A Query Paginator that will split a query into small chunks. See {@link + * Query#createPaginator(int)} for example usage. + */ + @BetaApi("This surface is stable yet it might be removed in the future.") + public static class QueryPaginator { + + private final boolean hasOverallLimit; + private long remainingRows; + private Query query; + private final int pageSize; + private ByteString prevSplitPoint; + + QueryPaginator(@Nonnull Query query, int pageSize) { + this.hasOverallLimit = query.builder.getRowsLimit() > 0; + this.remainingRows = query.builder.getRowsLimit(); + this.query = query.limit(pageSize); + if (hasOverallLimit) { + remainingRows -= pageSize; + } + this.pageSize = pageSize; + this.prevSplitPoint = ByteString.EMPTY; + } + + /** Return the next query. */ + public Query getNextQuery() { + return query; + } + + /** + * Construct the next query. Return true if there are more queries to return. False if we've + * read everything. + */ + public boolean advance(@Nonnull ByteString lastSeenRowKey) { + Preconditions.checkNotNull( + lastSeenRowKey, "lastSeenRowKey cannot be null, use ByteString.EMPTY instead."); + // Full table scans don't have ranges or limits. Running the query again will return an empty + // list when we reach the end of the table. lastSeenRowKey won't be updated in this case, and + // we can break out of the loop. + if (lastSeenRowKey.equals(prevSplitPoint)) { + return false; + } + this.prevSplitPoint = lastSeenRowKey; + + // Set the query limit. If the original limit is set, return false if the new + // limit is <= 0 to avoid returning more rows than intended. + if (hasOverallLimit && remainingRows <= 0) { + return false; + } + if (hasOverallLimit) { + query.limit(Math.min(this.pageSize, remainingRows)); + remainingRows -= pageSize; + } else { + query.limit(pageSize); + } + + // Split the row ranges / row keys. Return false if there's nothing + // left on the right of the split point. + RowSetUtil.Split split = RowSetUtil.split(query.builder.getRows(), lastSeenRowKey); + if (split.getRight() == null) { + return false; + } + query.builder.setRows(split.getRight()); + return true; + } + } + @Override public boolean equals(Object o) { if (this == o) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java index 9239b30497..63ffe708a5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/RowMutationEntry.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.bigtable.v2.MutateRowsRequest; import com.google.common.base.Preconditions; @@ -54,6 +55,13 @@ public static RowMutationEntry create(@Nonnull ByteString key) { return new RowMutationEntry(key, Mutation.create()); } + /** Creates a new instance from existing mutation. */ + @BetaApi + public static RowMutationEntry createFromMutationUnsafe( + @Nonnull ByteString key, @Nonnull Mutation mutation) { + return new RowMutationEntry(key, mutation); + } + /** * Creates new instance of mutation builder which allows server timestamp for setCell operations. * diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java similarity index 76% rename from google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallable.java rename to google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java index 0358fe3a69..9c4359ef99 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallable.java @@ -25,50 +25,50 @@ /** * This callable converts the "Received rst stream" exception into a retryable {@link ApiException}. */ -final class ConvertStreamExceptionCallable +final class ConvertExceptionCallable extends ServerStreamingCallable { private final ServerStreamingCallable innerCallable; - public ConvertStreamExceptionCallable( - ServerStreamingCallable innerCallable) { + public ConvertExceptionCallable(ServerStreamingCallable innerCallable) { this.innerCallable = innerCallable; } @Override public void call( RequestT request, ResponseObserver responseObserver, ApiCallContext context) { - ConvertStreamExceptionResponseObserver observer = - new ConvertStreamExceptionResponseObserver<>(responseObserver); + ConvertExceptionResponseObserver observer = + new ConvertExceptionResponseObserver<>(responseObserver); innerCallable.call(request, observer, context); } - private class ConvertStreamExceptionResponseObserver - implements ResponseObserver { + private class ConvertExceptionResponseObserver + extends SafeResponseObserver { private final ResponseObserver outerObserver; - ConvertStreamExceptionResponseObserver(ResponseObserver outerObserver) { + ConvertExceptionResponseObserver(ResponseObserver outerObserver) { + super(outerObserver); this.outerObserver = outerObserver; } @Override - public void onStart(StreamController controller) { + protected void onStartImpl(StreamController controller) { outerObserver.onStart(controller); } @Override - public void onResponse(ResponseT response) { + protected void onResponseImpl(ResponseT response) { outerObserver.onResponse(response); } @Override - public void onError(Throwable t) { + protected void onErrorImpl(Throwable t) { outerObserver.onError(convertException(t)); } @Override - public void onComplete() { + protected void onCompleteImpl() { outerObserver.onComplete(); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java index 66c20e4033..0c0d011213 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java @@ -445,7 +445,7 @@ public Map extract(ReadRowsRequest readRowsRequest) { // should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code // which by default is not retryable. Convert the exception so it can be retried in the client. ServerStreamingCallable convertException = - new ConvertStreamExceptionCallable<>(withStatsHeaders); + new ConvertExceptionCallable<>(withStatsHeaders); ServerStreamingCallable merging = new RowMergingCallable<>(convertException, rowAdapter); @@ -740,7 +740,7 @@ public Map extract(MutateRowsRequest mutateRowsRequest) { // should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code // which by default is not retryable. Convert the exception so it can be retried in the client. ServerStreamingCallable convertException = - new ConvertStreamExceptionCallable<>(withStatsHeaders); + new ConvertExceptionCallable<>(withStatsHeaders); RetryAlgorithm retryAlgorithm = new RetryAlgorithm<>( @@ -892,7 +892,7 @@ public Map extract( // exception has an INTERNAL error code which by default is not retryable. Convert the exception // so it can be retried in the client. ServerStreamingCallable convertException = - new ConvertStreamExceptionCallable<>(withStatsHeaders); + new ConvertExceptionCallable<>(withStatsHeaders); // Copy idle timeout settings for watchdog. ServerStreamingCallSettings innerSettings = @@ -964,7 +964,7 @@ public Map extract( // INTERNAL error code which by default is not retryable. Convert the exception it can be // retried in the client. ServerStreamingCallable convertException = - new ConvertStreamExceptionCallable<>(withStatsHeaders); + new ConvertExceptionCallable<>(withStatsHeaders); ServerStreamingCallable merging = new ChangeStreamRecordMergingCallable<>(convertException, changeStreamRecordAdapter); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java new file mode 100644 index 0000000000..7c65bdf95a --- /dev/null +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/SafeResponseObserver.java @@ -0,0 +1,123 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.stub; + +import com.google.api.core.InternalApi; +import com.google.api.gax.rpc.ResponseObserver; +import com.google.api.gax.rpc.StreamController; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Base implementation of {@link ResponseObserver} that checks the state and catches all the + * throwables. + */ +@InternalApi +public abstract class SafeResponseObserver implements ResponseObserver { + + private static final Logger LOGGER = Logger.getLogger(SafeResponseObserver.class.getName()); + private AtomicBoolean isStarted = new AtomicBoolean(false); + private AtomicBoolean isClosed = new AtomicBoolean(false); + private StreamController streamController; + private ResponseObserver outerObserver; + + public SafeResponseObserver(ResponseObserver outerObserver) { + this.outerObserver = outerObserver; + } + + @Override + public final void onStart(StreamController streamController) { + if (!isStarted.compareAndSet(false, true)) { + throw new IllegalStateException("A stream is already started"); + } + + this.streamController = streamController; + try { + onStartImpl(streamController); + } catch (Throwable t) { + if (!isClosed.compareAndSet(false, true)) { + logException("Tried to cancel a closed stream"); + return; + } + streamController.cancel(); + outerObserver.onError(t); + } + } + + @Override + public final void onResponse(ResponseT response) { + if (isClosed.get()) { + logException("Received a response after the stream is closed"); + return; + } + try { + onResponseImpl(response); + } catch (Throwable t1) { + try { + if (!isClosed.compareAndSet(false, true)) { + logException("Tried to cancel a closed stream"); + return; + } + streamController.cancel(); + } catch (Throwable t2) { + t1.addSuppressed(t2); + } + outerObserver.onError(t1); + } + } + + @Override + public final void onError(Throwable throwable) { + if (!isClosed.compareAndSet(false, true)) { + logException("Received error after the stream is closed"); + return; + } + + try { + onErrorImpl(throwable); + } catch (Throwable t) { + throwable.addSuppressed(t); + outerObserver.onError(throwable); + } + } + + @Override + public final void onComplete() { + if (!isClosed.compareAndSet(false, true)) { + logException("Tried to double close the stream"); + return; + } + + try { + onCompleteImpl(); + } catch (Throwable t) { + outerObserver.onError(t); + } + } + + private void logException(String message) { + LOGGER.log(Level.WARNING, message, new IllegalStateException(message)); + } + + protected abstract void onStartImpl(StreamController streamController); + + protected abstract void onResponseImpl(ResponseT response); + + protected abstract void onErrorImpl(Throwable throwable); + + protected abstract void onCompleteImpl(); +} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java index c7f09c4db1..17c968c60f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerStreamingCallable.java @@ -21,11 +21,9 @@ import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StreamController; -import com.google.bigtable.v2.ResponseParams; +import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; import com.google.common.base.Preconditions; import com.google.common.base.Stopwatch; -import com.google.protobuf.InvalidProtocolBufferException; -import io.grpc.Metadata; import java.util.concurrent.TimeUnit; import javax.annotation.Nonnull; @@ -68,7 +66,7 @@ public void call( } } - private class BigtableTracerResponseObserver implements ResponseObserver { + private class BigtableTracerResponseObserver extends SafeResponseObserver { private final BigtableTracer tracer; private final ResponseObserver outerObserver; @@ -78,81 +76,35 @@ private class BigtableTracerResponseObserver implements ResponseObser ResponseObserver observer, BigtableTracer tracer, GrpcResponseMetadata metadata) { + super(observer); + this.tracer = tracer; this.outerObserver = observer; this.responseMetadata = metadata; } @Override - public void onStart(final StreamController controller) { + protected void onStartImpl(final StreamController controller) { TracedStreamController tracedController = new TracedStreamController(controller, tracer); outerObserver.onStart(tracedController); } @Override - public void onResponse(ResponseT response) { + protected void onResponseImpl(ResponseT response) { Stopwatch stopwatch = Stopwatch.createStarted(); outerObserver.onResponse(response); tracer.afterResponse(stopwatch.elapsed(TimeUnit.MILLISECONDS)); } @Override - public void onError(Throwable t) { - // server-timing metric will be added through GrpcResponseMetadata#onHeaders(Metadata), - // so it's not checking trailing metadata here. - Metadata metadata = responseMetadata.getMetadata(); - Long latency = Util.getGfeLatency(metadata); - tracer.recordGfeMetadata(latency, t); - try { - // Check both headers and trailers because in different environments the metadata - // could be returned in headers or trailers - if (metadata != null) { - byte[] trailers = metadata.get(Util.METADATA_KEY); - if (trailers == null) { - Metadata trailingMetadata = responseMetadata.getTrailingMetadata(); - if (trailingMetadata != null) { - trailers = trailingMetadata.get(Util.METADATA_KEY); - } - } - // If the response is terminated abnormally and we didn't get location information in - // trailers or headers, skip setting the locations - if (trailers != null) { - ResponseParams decodedTrailers = ResponseParams.parseFrom(trailers); - tracer.setLocations(decodedTrailers.getZoneId(), decodedTrailers.getClusterId()); - } - } - } catch (InvalidProtocolBufferException e) { - } - + protected void onErrorImpl(Throwable t) { + Util.recordMetricsFromMetadata(responseMetadata, tracer, t); outerObserver.onError(t); } @Override - public void onComplete() { - Metadata metadata = responseMetadata.getMetadata(); - Long latency = Util.getGfeLatency(metadata); - tracer.recordGfeMetadata(latency, null); - try { - // Check both headers and trailers because in different environments the metadata - // could be returned in headers or trailers - if (metadata != null) { - byte[] trailers = metadata.get(Util.METADATA_KEY); - if (trailers == null) { - Metadata trailingMetadata = responseMetadata.getTrailingMetadata(); - if (trailingMetadata != null) { - trailers = trailingMetadata.get(Util.METADATA_KEY); - } - } - // If the response is terminated abnormally and we didn't get location information in - // trailers or headers, skip setting the locations - if (trailers != null) { - ResponseParams decodedTrailers = ResponseParams.parseFrom(trailers); - tracer.setLocations(decodedTrailers.getZoneId(), decodedTrailers.getClusterId()); - } - } - } catch (InvalidProtocolBufferException e) { - } - + protected void onCompleteImpl() { + Util.recordMetricsFromMetadata(responseMetadata, tracer, null); outerObserver.onComplete(); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java index 50d24ecbaf..4b73a34797 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableTracerUnaryCallable.java @@ -22,11 +22,8 @@ import com.google.api.gax.grpc.GrpcResponseMetadata; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.UnaryCallable; -import com.google.bigtable.v2.ResponseParams; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.InvalidProtocolBufferException; -import io.grpc.Metadata; import javax.annotation.Nonnull; /** @@ -79,56 +76,12 @@ class BigtableTracerUnaryCallback implements ApiFutureCallback 1) { + recorder.putRetryCount(attemptCount - 1); + } // serverLatencyTimer should already be stopped in recordAttemptCompletion recorder.putOperationLatencies(operationLatency); @@ -256,6 +266,14 @@ private void recordAttemptCompletion(@Nullable Throwable status) { serverLatencyTimerIsRunning = false; } } + + // Patch the status until it's fixed in gax. When an attempt failed, + // it'll throw a ServerStreamingAttemptException. Unwrap the exception + // so it could get processed by extractStatus + if (status instanceof ServerStreamingAttemptException) { + status = status.getCause(); + } + recorder.putAttemptLatencies(attemptTimer.elapsed(TimeUnit.MILLISECONDS)); recorder.recordAttempt(Util.extractStatus(status), tableId, zone, cluster); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java index 3c63b1b5f7..3b6b1b40ae 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/MetricsTracer.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.stub.metrics; +import com.google.api.gax.retrying.ServerStreamingAttemptException; import com.google.api.gax.tracing.ApiTracerFactory.OperationType; import com.google.api.gax.tracing.SpanName; import com.google.common.base.Stopwatch; @@ -166,6 +167,13 @@ private void recordAttemptCompletion(@Nullable Throwable throwable) { RpcMeasureConstants.BIGTABLE_ATTEMPT_LATENCY, attemptTimer.elapsed(TimeUnit.MILLISECONDS)); + // Patch the throwable until it's fixed in gax. When an attempt failed, + // it'll throw a ServerStreamingAttemptException. Unwrap the exception + // so it could get processed by extractStatus + if (throwable instanceof ServerStreamingAttemptException) { + throwable = throwable.getCause(); + } + TagContextBuilder tagCtx = newTagCtxBuilder() .putLocal( diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java index 0e356ebaf9..5b045f15ef 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/Util.java @@ -16,6 +16,7 @@ package com.google.cloud.bigtable.data.v2.stub.metrics; import com.google.api.core.InternalApi; +import com.google.api.gax.grpc.GrpcResponseMetadata; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.StatusCode; @@ -25,10 +26,12 @@ import com.google.bigtable.v2.MutateRowsRequest; import com.google.bigtable.v2.ReadModifyWriteRowRequest; import com.google.bigtable.v2.ReadRowsRequest; +import com.google.bigtable.v2.ResponseParams; import com.google.bigtable.v2.SampleRowKeysRequest; import com.google.bigtable.v2.TableName; import com.google.common.base.Strings; import com.google.common.collect.ImmutableMap; +import com.google.protobuf.InvalidProtocolBufferException; import io.grpc.Metadata; import io.grpc.Status; import io.grpc.StatusException; @@ -57,7 +60,7 @@ public class Util { private static final Metadata.Key SERVER_TIMING_HEADER_KEY = Metadata.Key.of("server-timing", Metadata.ASCII_STRING_MARSHALLER); private static final Pattern SERVER_TIMING_HEADER_PATTERN = Pattern.compile(".*dur=(?\\d+)"); - static final Metadata.Key METADATA_KEY = + static final Metadata.Key LOCATION_METADATA_KEY = Metadata.Key.of("x-goog-ext-425905942-bin", Metadata.BINARY_BYTE_MARSHALLER); /** Convert an exception into a value that can be used to create an OpenCensus tag value. */ @@ -136,16 +139,62 @@ static Map> createStatsHeaders(ApiCallContext apiCallContex return headers.build(); } - static Long getGfeLatency(Metadata metadata) { - if (metadata != null && metadata.get(SERVER_TIMING_HEADER_KEY) != null) { - String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY); - Matcher matcher = SERVER_TIMING_HEADER_PATTERN.matcher(serverTiming); - // this should always be true - if (matcher.find()) { - long latency = Long.valueOf(matcher.group("dur")); - return latency; + private static Long getGfeLatency(@Nullable Metadata metadata) { + if (metadata == null) { + return null; + } + String serverTiming = metadata.get(SERVER_TIMING_HEADER_KEY); + if (serverTiming == null) { + return null; + } + Matcher matcher = SERVER_TIMING_HEADER_PATTERN.matcher(serverTiming); + // this should always be true + if (matcher.find()) { + long latency = Long.valueOf(matcher.group("dur")); + return latency; + } + return null; + } + + private static ResponseParams getResponseParams(@Nullable Metadata metadata) { + if (metadata == null) { + return null; + } + byte[] responseParams = metadata.get(Util.LOCATION_METADATA_KEY); + if (responseParams != null) { + try { + return ResponseParams.parseFrom(responseParams); + } catch (InvalidProtocolBufferException e) { } } return null; } + + static void recordMetricsFromMetadata( + GrpcResponseMetadata responseMetadata, BigtableTracer tracer, Throwable throwable) { + Metadata metadata = responseMetadata.getMetadata(); + + // Get the response params from the metadata. Check both headers and trailers + // because in different environments the metadata could be returned in headers or trailers + @Nullable ResponseParams responseParams = getResponseParams(responseMetadata.getMetadata()); + if (responseParams == null) { + responseParams = getResponseParams(responseMetadata.getTrailingMetadata()); + } + // Set tracer locations if response params is not null + if (responseParams != null) { + tracer.setLocations(responseParams.getZoneId(), responseParams.getClusterId()); + } + + // server-timing metric will be added through GrpcResponseMetadata#onHeaders(Metadata), + // so it's not checking trailing metadata here. + @Nullable Long latency = getGfeLatency(metadata); + // For direct path, we won't see GFE server-timing header. However, if we received the + // location info, we know that there isn't a connectivity issue. Set the latency to + // 0 so gfe missing header won't get incremented. + if (responseParams != null && latency == null) { + latency = 0L; + } + // Record gfe metrics + tracer.recordGfeMetadata(latency, throwable); + } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/FilterMarkerRowsCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/FilterMarkerRowsCallable.java index 57f987fb7c..181006b6c3 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/FilterMarkerRowsCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/FilterMarkerRowsCallable.java @@ -22,6 +22,7 @@ import com.google.api.gax.rpc.StreamController; import com.google.bigtable.v2.ReadRowsRequest; import com.google.cloud.bigtable.data.v2.models.RowAdapter; +import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; /** * Remove the special marker rows generated by {@link RowMergingCallable}. @@ -47,17 +48,18 @@ public void call( innerCallable.call(request, innerObserver, context); } - private class FilteringResponseObserver implements ResponseObserver { + private class FilteringResponseObserver extends SafeResponseObserver { private final ResponseObserver outerObserver; private StreamController innerController; private boolean autoFlowControl = true; FilteringResponseObserver(ResponseObserver outerObserver) { + super(outerObserver); this.outerObserver = outerObserver; } @Override - public void onStart(final StreamController controller) { + protected void onStartImpl(final StreamController controller) { innerController = controller; outerObserver.onStart( @@ -81,7 +83,7 @@ public void request(int count) { } @Override - public void onResponse(RowT response) { + protected void onResponseImpl(RowT response) { if (rowAdapter.isScanMarkerRow(response)) { if (!autoFlowControl) { innerController.request(1); @@ -92,12 +94,12 @@ public void onResponse(RowT response) { } @Override - public void onError(Throwable t) { + protected void onErrorImpl(Throwable t) { outerObserver.onError(t); } @Override - public void onComplete() { + protected void onCompleteImpl() { outerObserver.onComplete(); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserver.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserver.java index c46eb55ff9..6f2440fff7 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserver.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/ReframingResponseObserver.java @@ -17,8 +17,8 @@ import com.google.api.core.InternalApi; import com.google.api.gax.rpc.ResponseObserver; -import com.google.api.gax.rpc.StateCheckingResponseObserver; import com.google.api.gax.rpc.StreamController; +import com.google.cloud.bigtable.data.v2.stub.SafeResponseObserver; import com.google.common.base.Preconditions; import com.google.common.math.IntMath; import java.util.concurrent.CancellationException; @@ -56,8 +56,7 @@ * }
    */ @InternalApi -public class ReframingResponseObserver - extends StateCheckingResponseObserver { +public class ReframingResponseObserver extends SafeResponseObserver { // Used as a nonblocking mutex for deliver(). // 0 means unlocked // 1 means locked without contention @@ -97,6 +96,7 @@ public class ReframingResponseObserver public ReframingResponseObserver( ResponseObserver observer, Reframer reframer) { + super(observer); this.outerResponseObserver = observer; this.reframer = reframer; } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java index 26cbcf77cd..9717021f5d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java @@ -137,6 +137,7 @@ public void createInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -196,6 +197,7 @@ public void createInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -255,6 +257,7 @@ public void getInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); @@ -296,6 +299,7 @@ public void getInstanceTest2() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); @@ -417,6 +421,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); mockBigtableInstanceAdmin.addResponse(expectedResponse); @@ -426,6 +431,7 @@ public void updateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Instance actualResponse = client.updateInstance(request); @@ -441,6 +447,7 @@ public void updateInstanceTest() throws Exception { Assert.assertEquals(request.getType(), actualRequest.getType()); Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap()); Assert.assertEquals(request.getCreateTime(), actualRequest.getCreateTime()); + Assert.assertEquals(request.getSatisfiesPzs(), actualRequest.getSatisfiesPzs()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -459,6 +466,7 @@ public void updateInstanceExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); client.updateInstance(request); Assert.fail("No exception raised"); @@ -475,6 +483,7 @@ public void partialUpdateInstanceTest() throws Exception { .setDisplayName("displayName1714148973") .putAllLabels(new HashMap()) .setCreateTime(Timestamp.newBuilder().build()) + .setSatisfiesPzs(true) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java index e0ee12fa12..6a79402f73 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java @@ -65,6 +65,7 @@ import com.google.bigtable.admin.v2.TableName; import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.common.collect.Lists; import com.google.iam.v1.AuditConfig; import com.google.iam.v1.Binding; @@ -142,6 +143,7 @@ public void createTableTest() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -189,6 +191,7 @@ public void createTableTest2() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -236,6 +239,7 @@ public void createTableFromSnapshotTest() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -295,6 +299,7 @@ public void createTableFromSnapshotTest2() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -352,6 +357,7 @@ public void createTableFromSnapshotTest3() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -411,6 +417,7 @@ public void createTableFromSnapshotTest4() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -556,6 +563,7 @@ public void getTableTest() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -597,6 +605,7 @@ public void getTableTest2() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -630,6 +639,59 @@ public void getTableExceptionTest2() throws Exception { } } + @Test + public void updateTableTest() throws Exception { + Table expectedResponse = + Table.newBuilder() + .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()) + .putAllClusterStates(new HashMap()) + .putAllColumnFamilies(new HashMap()) + .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateTableTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockBigtableTableAdmin.addResponse(resultOperation); + + Table table = Table.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Table actualResponse = client.updateTableAsync(table, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBigtableTableAdmin.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTableRequest actualRequest = ((UpdateTableRequest) actualRequests.get(0)); + + Assert.assertEquals(table, actualRequest.getTable()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTableExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBigtableTableAdmin.addException(exception); + + try { + Table table = Table.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTableAsync(table, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void deleteTableTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); @@ -706,6 +768,7 @@ public void undeleteTableTest() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -755,6 +818,7 @@ public void undeleteTableTest2() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -804,6 +868,7 @@ public void modifyColumnFamiliesTest() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -849,6 +914,7 @@ public void modifyColumnFamiliesTest2() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); mockBigtableTableAdmin.addResponse(expectedResponse); @@ -1992,6 +2058,7 @@ public void restoreTableTest() throws Exception { .putAllClusterStates(new HashMap()) .putAllColumnFamilies(new HashMap()) .setRestoreInfo(RestoreInfo.newBuilder().build()) + .setDeletionProtection(true) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java index f3d2261869..a5ada34be5 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java @@ -613,6 +613,54 @@ public void testRestoreTable() throws ExecutionException, InterruptedException { assertThat(actualResult.getTable().getId()).isEqualTo(TABLE_ID); } + @Test + public void testRestoreTableCrossProject() throws ExecutionException, InterruptedException { + // Setup + Mockito.when(mockStub.restoreTableOperationCallable()) + .thenReturn(mockRestoreTableOperationCallable); + + Timestamp startTime = Timestamp.newBuilder().setSeconds(1234).build(); + Timestamp endTime = Timestamp.newBuilder().setSeconds(5678).build(); + String operationName = "my-operation"; + + // Use existing adminClient as destination project: + String dstProjectId = PROJECT_ID; + String dstInstanceId = INSTANCE_ID; + String dstTableName = TABLE_NAME; + + // Create RestoreTableRequest from different source project: + String srcProjectId = "src-project"; + String srcInstanceId = "src-instance"; + String srcClusterId = "src-cluster"; + + RestoreTableRequest req = + RestoreTableRequest.of(srcInstanceId, srcClusterId, BACKUP_ID, srcProjectId) + .setTableId(TABLE_ID); + mockOperationResult( + mockRestoreTableOperationCallable, + req.toProto(dstProjectId, dstInstanceId), + com.google.bigtable.admin.v2.Table.newBuilder().setName(dstTableName).build(), + RestoreTableMetadata.newBuilder() + .setName(dstTableName) + .setOptimizeTableOperationName(operationName) + .setSourceType(RestoreSourceType.BACKUP) + .setBackupInfo( + BackupInfo.newBuilder() + .setBackup(BACKUP_ID) + .setSourceTable(NameUtil.formatTableName(srcProjectId, srcInstanceId, TABLE_ID)) + .setStartTime(startTime) + .setEndTime(endTime) + .build()) + .build()); + + // Execute + RestoredTableResult actualResult = adminClient.restoreTable(req); + + // Verify + assertThat(actualResult.getTable().getId()).isEqualTo(TABLE_ID); + assertThat(actualResult.getTable().getInstanceId()).isEqualTo(dstInstanceId); + } + @Test public void testDeleteBackup() { // Setup diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java index 28038d1db4..1aacb7f606 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java @@ -134,7 +134,9 @@ public void testStubSettings() throws IOException { "restoreTableSettings", "restoreTableOperationSettings", "undeleteTableSettings", - "undeleteTableOperationSettings" + "undeleteTableOperationSettings", + "updateTableSettings", + "updateTableOperationSettings" }; @Test @@ -184,6 +186,6 @@ void checkToString(BigtableTableAdminSettings settings) { for (String subSettings : SETTINGS_LIST) { assertThat(toString).contains(subSettings + "="); } - assertThat(toString.contains(settings.getStubSettings().toString())); + assertThat(toString).contains(settings.getStubSettings().toString()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java index f33b96aea4..211197811a 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java @@ -46,6 +46,7 @@ import com.google.bigtable.admin.v2.Table; import com.google.bigtable.admin.v2.UndeleteTableRequest; import com.google.bigtable.admin.v2.UpdateBackupRequest; +import com.google.bigtable.admin.v2.UpdateTableRequest; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -175,6 +176,26 @@ public void getTable(GetTableRequest request, StreamObserver
    responseObse } } + @Override + public void updateTable(UpdateTableRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTable, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void deleteTable(DeleteTableRequest request, StreamObserver responseObserver) { Object response = responses.poll(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequestTest.java index 232902f585..30a2274c7e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequestTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/RestoreTableRequestTest.java @@ -31,6 +31,7 @@ public class RestoreTableRequestTest { private static final String INSTANCE_ID = "my-instance"; private static final String CLUSTER_ID = "my-cluster"; private static final String SOURCE_INSTANCE_ID = "source-instance-id"; + private static final String SOURCE_PROJECT_ID = "source-project-id"; @Test public void testToProto() { @@ -61,6 +62,23 @@ public void testToProtoCrossInstance() { assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); } + @Test + public void testToProtoCrossProject() { + RestoreTableRequest request = + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId(TABLE_ID); + + com.google.bigtable.admin.v2.RestoreTableRequest requestProto = + com.google.bigtable.admin.v2.RestoreTableRequest.newBuilder() + .setParent(NameUtil.formatInstanceName(PROJECT_ID, INSTANCE_ID)) + .setBackup( + NameUtil.formatBackupName( + SOURCE_PROJECT_ID, SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID)) + .setTableId(TABLE_ID) + .build(); + assertThat(request.toProto(PROJECT_ID, INSTANCE_ID)).isEqualTo(requestProto); + } + @Test public void testEquality() { RestoreTableRequest request = @@ -88,6 +106,24 @@ public void testEqualityCrossInstance() { .setTableId("another-table")); } + @Test + public void testEqualityCrossProject() { + RestoreTableRequest request = + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId(TABLE_ID); + + assertThat(request) + .isEqualTo( + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId(TABLE_ID)); + assertThat(request) + .isNotEqualTo(RestoreTableRequest.of(CLUSTER_ID, BACKUP_ID).setTableId(TABLE_ID)); + assertThat(request) + .isNotEqualTo( + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId("another-table")); + } + @Test public void testHashCode() { RestoreTableRequest request = @@ -117,4 +153,24 @@ public void testHashCodeCrossInstance() { .setTableId("another-table") .hashCode()); } + + @Test + public void testHashCodeCrossProject() { + RestoreTableRequest request = + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId(TABLE_ID); + assertThat(request.hashCode()) + .isEqualTo( + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId(TABLE_ID) + .hashCode()); + assertThat(request.hashCode()) + .isNotEqualTo( + RestoreTableRequest.of(CLUSTER_ID, BACKUP_ID).setTableId(TABLE_ID).hashCode()); + assertThat(request.hashCode()) + .isNotEqualTo( + RestoreTableRequest.of(SOURCE_INSTANCE_ID, CLUSTER_ID, BACKUP_ID, SOURCE_PROJECT_ID) + .setTableId("another-table") + .hashCode()); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java new file mode 100644 index 0000000000..a734ea068a --- /dev/null +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/internal/RowMergerUtilTest.java @@ -0,0 +1,148 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.data.v2.internal; + +import static com.google.common.truth.Truth.assertThat; + +import com.google.bigtable.v2.ReadRowsResponse; +import com.google.bigtable.v2.ReadRowsResponse.CellChunk; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowCell; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.ByteString; +import com.google.protobuf.BytesValue; +import com.google.protobuf.StringValue; +import java.util.List; +import junit.framework.TestCase; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class RowMergerUtilTest extends TestCase { + + @Test + public void testEmpty() { + try (RowMergerUtil util = new RowMergerUtil()) {} + + try (RowMergerUtil util = new RowMergerUtil()) { + util.parseReadRowsResponses(ImmutableList.of()); + } + } + + @Test + public void testSingle() { + List responses = + ImmutableList.of( + ReadRowsResponse.newBuilder() + .addChunks( + CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("key")) + .setFamilyName(StringValue.newBuilder().setValue("family")) + .setQualifier( + BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("qualifier"))) + .setTimestampMicros(1000) + .setValue(ByteString.copyFromUtf8("value")) + .setCommitRow(true)) + .build()); + try (RowMergerUtil util = new RowMergerUtil()) { + List rows = util.parseReadRowsResponses(responses); + assertThat(rows) + .containsExactly( + Row.create( + ByteString.copyFromUtf8("key"), + ImmutableList.of( + RowCell.create( + "family", + ByteString.copyFromUtf8("qualifier"), + 1000, + ImmutableList.of(), + ByteString.copyFromUtf8("value"))))); + } + } + + @Test + public void testMultiple() { + List responses = + ImmutableList.of( + ReadRowsResponse.newBuilder() + .addChunks( + CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("key")) + .setFamilyName(StringValue.newBuilder().setValue("family")) + .setQualifier( + BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("qualifier"))) + .setTimestampMicros(1000) + .setValue(ByteString.copyFromUtf8("value")) + .setCommitRow(true)) + .build(), + ReadRowsResponse.newBuilder() + .addChunks( + CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("key2")) + .setFamilyName(StringValue.newBuilder().setValue("family")) + .setQualifier( + BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("qualifier"))) + .setTimestampMicros(1000) + .setValue(ByteString.copyFromUtf8("value")) + .setCommitRow(true)) + .build()); + try (RowMergerUtil util = new RowMergerUtil()) { + assertThat(util.parseReadRowsResponses(responses)) + .containsExactly( + Row.create( + ByteString.copyFromUtf8("key"), + ImmutableList.of( + RowCell.create( + "family", + ByteString.copyFromUtf8("qualifier"), + 1000, + ImmutableList.of(), + ByteString.copyFromUtf8("value")))), + Row.create( + ByteString.copyFromUtf8("key2"), + ImmutableList.of( + RowCell.create( + "family", + ByteString.copyFromUtf8("qualifier"), + 1000, + ImmutableList.of(), + ByteString.copyFromUtf8("value"))))); + } + } + + @Test + public void testPartial() { + List responses = + ImmutableList.of( + ReadRowsResponse.newBuilder() + .addChunks( + CellChunk.newBuilder() + .setRowKey(ByteString.copyFromUtf8("key")) + .setFamilyName(StringValue.newBuilder().setValue("family")) + .setQualifier( + BytesValue.newBuilder().setValue(ByteString.copyFromUtf8("qualifier"))) + .setTimestampMicros(1000) + .setValue(ByteString.copyFromUtf8("value")) + .setCommitRow(false)) + .build()); + + RowMergerUtil util = new RowMergerUtil(); + util.parseReadRowsResponses(responses); + Assert.assertThrows(IllegalStateException.class, util::close); + } +} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java index 76c2adfb52..e55f3a160d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/BuiltinMetricsIT.java @@ -48,10 +48,9 @@ public class BuiltinMetricsIT { public static String[] VIEWS = { "operation_latencies", - "retry_count", "attempt_latencies", "connectivity_error_count", - "application_latencies" + "application_blocking_latencies" }; @BeforeClass @@ -125,9 +124,9 @@ public void testBuiltinMetrics() throws Exception { // Verify that metrics are published for ReadRows request metricFilter = String.format( - "metric.type=\"bigtable.googleapis.com/client/operation_latencies\" " + "metric.type=\"bigtable.googleapis.com/client/%s\" " + "AND resource.labels.instance=\"%s\" AND metric.labels.method=\"Bigtable.ReadRows\"", - testEnvRule.env().getInstanceId()); + view, testEnvRule.env().getInstanceId()); requestBuilder.setFilter(metricFilter); response = metricClient.listTimeSeriesCallable().call(requestBuilder.build()); assertThat(response.getTimeSeriesCount()).isGreaterThan(0); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java index ccb0441c71..655aeda688 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/QueryTest.java @@ -327,4 +327,182 @@ public void testClone() { assertThat(clonedReq).isEqualTo(query); assertThat(clonedReq.toProto(requestContext)).isEqualTo(request); } + + @Test + public void testQueryPaginatorRangeLimitReached() { + int chunkSize = 10, limit = 15; + Query query = Query.create(TABLE_ID).range("a", "z").limit(limit); + Query.QueryPaginator paginator = query.createPaginator(chunkSize); + + Query nextQuery = paginator.getNextQuery(); + + Builder expectedProto = + expectedProtoBuilder() + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("a")) + .setEndKeyOpen(ByteString.copyFromUtf8("z")) + .build())) + .setRowsLimit(chunkSize); + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("c"))).isTrue(); + int expectedLimit = limit - chunkSize; + nextQuery = paginator.getNextQuery(); + expectedProto = + expectedProtoBuilder() + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder() + .setStartKeyOpen(ByteString.copyFromUtf8("c")) + .setEndKeyOpen(ByteString.copyFromUtf8("z")) + .build())) + .setRowsLimit(expectedLimit); + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("d"))).isFalse(); + } + + @Test + public void testQueryPaginatorRangeLimitMultiplyOfChunkSize() { + int chunkSize = 10, limit = 20; + Query query = Query.create(TABLE_ID).range("a", "z").limit(limit); + Query.QueryPaginator paginator = query.createPaginator(chunkSize); + + Query nextQuery = paginator.getNextQuery(); + + Builder expectedProto = + expectedProtoBuilder() + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("a")) + .setEndKeyOpen(ByteString.copyFromUtf8("z")) + .build())) + .setRowsLimit(chunkSize); + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("c"))).isTrue(); + int expectedLimit = limit - chunkSize; + nextQuery = paginator.getNextQuery(); + expectedProto = + expectedProtoBuilder() + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder() + .setStartKeyOpen(ByteString.copyFromUtf8("c")) + .setEndKeyOpen(ByteString.copyFromUtf8("z")) + .build())) + .setRowsLimit(expectedLimit); + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("d"))).isFalse(); + } + + @Test + public void testQueryPaginatorRagneNoLimit() { + int chunkSize = 10; + Query query = Query.create(TABLE_ID).range("a", "z"); + Query.QueryPaginator paginator = query.createPaginator(chunkSize); + + Query nextQuery = paginator.getNextQuery(); + + Builder expectedProto = + expectedProtoBuilder() + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder() + .setStartKeyClosed(ByteString.copyFromUtf8("a")) + .setEndKeyOpen(ByteString.copyFromUtf8("z")) + .build())) + .setRowsLimit(chunkSize); + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("c"))).isTrue(); + nextQuery = paginator.getNextQuery(); + expectedProto + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder() + .setStartKeyOpen(ByteString.copyFromUtf8("c")) + .setEndKeyOpen(ByteString.copyFromUtf8("z")) + .build())) + .setRowsLimit(chunkSize); + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("z"))).isFalse(); + } + + @Test + public void testQueryPaginatorRowsNoLimit() { + int chunkSize = 10; + Query query = Query.create(TABLE_ID).rowKey("a").rowKey("b").rowKey("c"); + + Query.QueryPaginator paginator = query.createPaginator(chunkSize); + + Query nextQuery = paginator.getNextQuery(); + + ReadRowsRequest.Builder expectedProto = expectedProtoBuilder(); + expectedProto + .getRowsBuilder() + .addRowKeys(ByteString.copyFromUtf8("a")) + .addRowKeys(ByteString.copyFromUtf8("b")) + .addRowKeys(ByteString.copyFromUtf8("c")); + expectedProto.setRowsLimit(chunkSize); + + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + paginator.advance(ByteString.copyFromUtf8("b")); + nextQuery = paginator.getNextQuery(); + expectedProto = expectedProtoBuilder(); + expectedProto.getRowsBuilder().addRowKeys(ByteString.copyFromUtf8("c")); + expectedProto.setRowsLimit(chunkSize); + + assertThat(nextQuery.toProto(requestContext)).isEqualTo(expectedProto.build()); + + assertThat(paginator.advance(ByteString.copyFromUtf8("c"))).isFalse(); + } + + @Test + public void testQueryPaginatorFullTableScan() { + int chunkSize = 10; + Query query = Query.create(TABLE_ID); + Query.QueryPaginator queryPaginator = query.createPaginator(chunkSize); + + ReadRowsRequest.Builder expectedProto = expectedProtoBuilder().setRowsLimit(chunkSize); + assertThat(queryPaginator.getNextQuery().toProto(requestContext)) + .isEqualTo(expectedProto.build()); + + assertThat(queryPaginator.advance(ByteString.copyFromUtf8("a"))).isTrue(); + expectedProto + .setRows( + RowSet.newBuilder() + .addRowRanges( + RowRange.newBuilder().setStartKeyOpen(ByteString.copyFromUtf8("a")).build())) + .setRowsLimit(chunkSize); + assertThat(queryPaginator.getNextQuery().toProto(requestContext)) + .isEqualTo(expectedProto.build()); + + assertThat(queryPaginator.advance(ByteString.copyFromUtf8("a"))).isFalse(); + } + + @Test + public void testQueryPaginatorEmptyTable() { + int chunkSize = 10; + Query query = Query.create(TABLE_ID); + Query.QueryPaginator queryPaginator = query.createPaginator(chunkSize); + + ReadRowsRequest.Builder expectedProto = expectedProtoBuilder().setRowsLimit(chunkSize); + assertThat(queryPaginator.getNextQuery().toProto(requestContext)) + .isEqualTo(expectedProto.build()); + + assertThat(queryPaginator.advance(ByteString.EMPTY)).isFalse(); + } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallableTest.java similarity index 92% rename from google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java rename to google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallableTest.java index 8f08e15b23..534d341914 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertStreamExceptionCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/ConvertExceptionCallableTest.java @@ -31,7 +31,7 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) -public class ConvertStreamExceptionCallableTest { +public class ConvertExceptionCallableTest { @Test public void rstStreamExceptionConvertedToRetryableTest() { @@ -45,8 +45,8 @@ public void rstStreamExceptionConvertedToRetryableTest() { assertFalse(originalException.isRetryable()); SettableExceptionCallable settableExceptionCallable = new SettableExceptionCallable<>(originalException); - ConvertStreamExceptionCallable convertStreamExceptionCallable = - new ConvertStreamExceptionCallable<>(settableExceptionCallable); + ConvertExceptionCallable convertStreamExceptionCallable = + new ConvertExceptionCallable<>(settableExceptionCallable); Throwable actualError = null; try { diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java index d64570488a..a2c6d417b3 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java @@ -25,13 +25,19 @@ import com.google.api.client.util.Lists; import com.google.api.core.SettableApiFuture; +import com.google.api.gax.batching.Batcher; +import com.google.api.gax.batching.BatchingSettings; +import com.google.api.gax.batching.FlowControlSettings; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.NotFoundException; import com.google.api.gax.rpc.ResponseObserver; import com.google.api.gax.rpc.StreamController; import com.google.api.gax.tracing.SpanName; import com.google.bigtable.v2.BigtableGrpc; import com.google.bigtable.v2.MutateRowRequest; import com.google.bigtable.v2.MutateRowResponse; +import com.google.bigtable.v2.MutateRowsRequest; +import com.google.bigtable.v2.MutateRowsResponse; import com.google.bigtable.v2.ReadRowsRequest; import com.google.bigtable.v2.ReadRowsResponse; import com.google.bigtable.v2.ResponseParams; @@ -40,6 +46,7 @@ import com.google.cloud.bigtable.data.v2.models.Query; import com.google.cloud.bigtable.data.v2.models.Row; import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.models.RowMutationEntry; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub; import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; import com.google.cloud.bigtable.stats.StatsRecorderWrapper; @@ -66,6 +73,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -85,6 +93,8 @@ public class BuiltinMetricsTracerTest { private static final String INSTANCE_ID = "fake-instance"; private static final String APP_PROFILE_ID = "default"; private static final String TABLE_ID = "fake-table"; + + private static final String BAD_TABLE_ID = "non-exist-table"; private static final String ZONE = "us-west-1"; private static final String CLUSTER = "cluster-0"; private static final long FAKE_SERVER_TIMING = 50; @@ -106,6 +116,8 @@ public class BuiltinMetricsTracerTest { @Captor private ArgumentCaptor zone; @Captor private ArgumentCaptor cluster; + private int batchElementCount = 2; + @Before public void setUp() throws Exception { // Add an interceptor to add server-timing in headers @@ -127,7 +139,7 @@ public void sendHeaders(Metadata headers) { ResponseParams params = ResponseParams.newBuilder().setZoneId(ZONE).setClusterId(CLUSTER).build(); byte[] byteArray = params.toByteArray(); - headers.put(Util.METADATA_KEY, byteArray); + headers.put(Util.LOCATION_METADATA_KEY, byteArray); super.sendHeaders(headers); } @@ -150,6 +162,22 @@ public void sendHeaders(Metadata headers) { .mutateRowSettings() .retrySettings() .setInitialRetryDelay(Duration.ofMillis(200)); + + stubSettingsBuilder + .bulkMutateRowsSettings() + .setBatchingSettings( + // Each batch has 2 mutations, batch has 1 in-flight request, disable auto flush by + // setting the delay to 1 hour. + BatchingSettings.newBuilder() + .setElementCountThreshold((long) batchElementCount) + .setRequestByteThreshold(1000L) + .setDelayThreshold(Duration.ofHours(1)) + .setFlowControlSettings( + FlowControlSettings.newBuilder() + .setMaxOutstandingElementCount((long) batchElementCount) + .setMaxOutstandingRequestBytes(1000L) + .build()) + .build()); stubSettingsBuilder.setTracerFactory(mockFactory); EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build(); @@ -163,7 +191,7 @@ public void tearDown() { } @Test - public void testOperationLatencies() { + public void testReadRowsOperationLatencies() { when(mockFactory.newTracer(any(), any(), any())) .thenAnswer( (Answer) @@ -179,8 +207,15 @@ public void testOperationLatencies() { long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS); verify(statsRecorderWrapper).putOperationLatencies(operationLatency.capture()); + // verify record operation is only called once + verify(statsRecorderWrapper) + .recordOperation(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); assertThat(operationLatency.getValue()).isIn(Range.closed(SERVER_LATENCY, elapsed)); + assertThat(status.getAllValues()).containsExactly("OK"); + assertThat(tableId.getAllValues()).containsExactly(TABLE_ID); + assertThat(zone.getAllValues()).containsExactly(ZONE); + assertThat(cluster.getAllValues()).containsExactly(CLUSTER); } @Test @@ -198,6 +233,10 @@ public void testGfeMetrics() { Lists.newArrayList(stub.readRowsCallable().call(Query.create(TABLE_ID))); + // Verify record attempt are called multiple times + verify(statsRecorderWrapper, times(fakeService.getAttemptCounter().get())) + .recordAttempt(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); + // The request was retried and gfe latency is only recorded in the retry attempt verify(statsRecorderWrapper).putGfeLatencies(gfeLatency.capture()); assertThat(gfeLatency.getValue()).isEqualTo(FAKE_SERVER_TIMING); @@ -206,6 +245,11 @@ public void testGfeMetrics() { verify(statsRecorderWrapper, times(fakeService.getAttemptCounter().get())) .putGfeMissingHeaders(gfeMissingHeaders.capture()); assertThat(gfeMissingHeaders.getValue()).isEqualTo(1); + + assertThat(status.getAllValues()).containsExactly("UNAVAILABLE", "OK"); + assertThat(tableId.getAllValues()).containsExactly(TABLE_ID, TABLE_ID); + assertThat(zone.getAllValues()).containsExactly("global", ZONE); + assertThat(cluster.getAllValues()).containsExactly("unspecified", CLUSTER); } @Test @@ -255,6 +299,8 @@ public void onComplete() { verify(statsRecorderWrapper).putApplicationLatencies(applicationLatency.capture()); verify(statsRecorderWrapper).putOperationLatencies(operationLatency.capture()); + verify(statsRecorderWrapper) + .recordOperation(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); assertThat(counter.get()).isEqualTo(fakeService.getResponseCounter().get()); assertThat(applicationLatency.getValue()).isAtLeast(APPLICATION_LATENCY * counter.get()); @@ -287,6 +333,8 @@ public void testReadRowsApplicationLatencyWithManualFlowControl() throws Excepti verify(statsRecorderWrapper).putApplicationLatencies(applicationLatency.capture()); verify(statsRecorderWrapper).putOperationLatencies(operationLatency.capture()); + verify(statsRecorderWrapper) + .recordOperation(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); // For manual flow control, the last application latency shouldn't count, because at that point // the server already sent back all the responses. @@ -313,16 +361,18 @@ public void testRetryCount() { stub.mutateRowCallable() .call(RowMutation.create(TABLE_ID, "random-row").setCell("cf", "q", "value")); - // onOperationComplete() is called in TracerFinisher which will be called after the mutateRow - // call is returned. So there's a race between when the call returns and when the putRetryCount - // is called in onOperationCompletion(). - verify(statsRecorderWrapper, timeout(20)).putRetryCount(retryCount.capture()); + // In TracedUnaryCallable, we create a future and add a TraceFinisher to the callback. Main + // thread is blocked on waiting for the future to be completed. When onComplete is called on + // the grpc thread, the future is completed, however we might not have enough time for + // TraceFinisher to run. Add a 1 second time out to wait for the callback. This shouldn't have + // any impact on production code. + verify(statsRecorderWrapper, timeout(1000)).putRetryCount(retryCount.capture()); assertThat(retryCount.getValue()).isEqualTo(fakeService.getAttemptCounter().get() - 1); } @Test - public void testMutateRowAttempts() { + public void testMutateRowAttemptsTagValues() { when(mockFactory.newTracer(any(), any(), any())) .thenReturn( new BuiltinMetricsTracer( @@ -341,6 +391,84 @@ public void testMutateRowAttempts() { assertThat(zone.getAllValues()).containsExactly("global", "global", ZONE); assertThat(cluster.getAllValues()).containsExactly("unspecified", "unspecified", CLUSTER); assertThat(status.getAllValues()).containsExactly("UNAVAILABLE", "UNAVAILABLE", "OK"); + assertThat(tableId.getAllValues()).containsExactly(TABLE_ID, TABLE_ID, TABLE_ID); + } + + @Test + public void testReadRowsAttemptsTagValues() { + when(mockFactory.newTracer(any(), any(), any())) + .thenReturn( + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + + Lists.newArrayList(stub.readRowsCallable().call(Query.create("fake-table")).iterator()); + + // Set a timeout to reduce flakiness of this test. BasicRetryingFuture will set + // attempt succeeded and set the response which will call complete() in AbstractFuture which + // calls releaseWaiters(). onOperationComplete() is called in TracerFinisher which will be + // called after the mutateRow call is returned. So there's a race between when the call returns + // and when the record() is called in onOperationCompletion(). + verify(statsRecorderWrapper, timeout(50).times(fakeService.getAttemptCounter().get())) + .recordAttempt(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); + assertThat(zone.getAllValues()).containsExactly("global", ZONE); + assertThat(cluster.getAllValues()).containsExactly("unspecified", CLUSTER); + assertThat(status.getAllValues()).containsExactly("UNAVAILABLE", "OK"); + } + + @Test + public void testClientBlockingLatencies() throws InterruptedException { + when(mockFactory.newTracer(any(), any(), any())) + .thenReturn( + new BuiltinMetricsTracer( + OperationType.Unary, SpanName.of("Bigtable", "MutateRows"), statsRecorderWrapper)); + try (Batcher batcher = stub.newMutateRowsBatcher(TABLE_ID, null)) { + for (int i = 0; i < 6; i++) { + batcher.add(RowMutationEntry.create("key").setCell("f", "q", "v")); + } + + int expectedNumRequests = 6 / batchElementCount; + ArgumentCaptor throttledTime = ArgumentCaptor.forClass(Long.class); + verify(statsRecorderWrapper, times(expectedNumRequests)) + .putBatchRequestThrottled(throttledTime.capture()); + + // Adding the first 2 elements should not get throttled since the batch is empty + assertThat(throttledTime.getAllValues().get(0)).isEqualTo(0); + // After the first request is sent, batcher will block on add because of the server latency. + // Blocking latency should be around server latency. + assertThat(throttledTime.getAllValues().get(1)).isAtLeast(SERVER_LATENCY - 10); + assertThat(throttledTime.getAllValues().get(2)).isAtLeast(SERVER_LATENCY - 10); + } + } + + @Test + public void testPermanentFailure() { + when(mockFactory.newTracer(any(), any(), any())) + .thenReturn( + new BuiltinMetricsTracer( + OperationType.ServerStreaming, + SpanName.of("Bigtable", "ReadRows"), + statsRecorderWrapper)); + + try { + Lists.newArrayList(stub.readRowsCallable().call(Query.create(BAD_TABLE_ID)).iterator()); + Assert.fail("Request should throw not found error"); + } catch (NotFoundException e) { + } + + ArgumentCaptor attemptLatency = ArgumentCaptor.forClass(Long.class); + ArgumentCaptor operationLatency = ArgumentCaptor.forClass(Long.class); + + verify(statsRecorderWrapper, timeout(50)).putAttemptLatencies(attemptLatency.capture()); + verify(statsRecorderWrapper, timeout(50)).putOperationLatencies(operationLatency.capture()); + verify(statsRecorderWrapper, timeout(50)) + .recordAttempt(status.capture(), tableId.capture(), zone.capture(), cluster.capture()); + + assertThat(status.getValue()).isEqualTo("NOT_FOUND"); + assertThat(tableId.getValue()).isEqualTo(BAD_TABLE_ID); + assertThat(cluster.getValue()).isEqualTo("unspecified"); + assertThat(zone.getValue()).isEqualTo("global"); } private static class FakeService extends BigtableGrpc.BigtableImplBase { @@ -373,6 +501,10 @@ static List createFakeResponse() { @Override public void readRows( ReadRowsRequest request, StreamObserver responseObserver) { + if (request.getTableName().contains(BAD_TABLE_ID)) { + responseObserver.onError(new StatusRuntimeException(Status.NOT_FOUND)); + return; + } final AtomicBoolean done = new AtomicBoolean(); final ServerCallStreamObserver target = (ServerCallStreamObserver) responseObserver; @@ -411,6 +543,17 @@ public void mutateRow( responseObserver.onCompleted(); } + @Override + public void mutateRows( + MutateRowsRequest request, StreamObserver responseObserver) { + try { + Thread.sleep(SERVER_LATENCY); + } catch (InterruptedException e) { + } + responseObserver.onNext(MutateRowsResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + public AtomicInteger getAttemptCounter() { return attemptCounter; } diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml index 7845df6ba4..717bb9fd44 100644 --- a/grpc-google-cloud-bigtable-admin-v2/pom.xml +++ b/grpc-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import diff --git a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java index 69de131981..b4d101214c 100644 --- a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java +++ b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java @@ -216,6 +216,48 @@ private BigtableTableAdminGrpc() {} return getGetTableMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateTableRequest, com.google.longrunning.Operation> + getUpdateTableMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTable", + requestType = com.google.bigtable.admin.v2.UpdateTableRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateTableRequest, com.google.longrunning.Operation> + getUpdateTableMethod() { + io.grpc.MethodDescriptor< + com.google.bigtable.admin.v2.UpdateTableRequest, com.google.longrunning.Operation> + getUpdateTableMethod; + if ((getUpdateTableMethod = BigtableTableAdminGrpc.getUpdateTableMethod) == null) { + synchronized (BigtableTableAdminGrpc.class) { + if ((getUpdateTableMethod = BigtableTableAdminGrpc.getUpdateTableMethod) == null) { + BigtableTableAdminGrpc.getUpdateTableMethod = + getUpdateTableMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTable")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.bigtable.admin.v2.UpdateTableRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new BigtableTableAdminMethodDescriptorSupplier("UpdateTable")) + .build(); + } + } + } + return getUpdateTableMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.bigtable.admin.v2.DeleteTableRequest, com.google.protobuf.Empty> getDeleteTableMethod; @@ -1164,6 +1206,20 @@ public void getTable( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTableMethod(), responseObserver); } + /** + * + * + *
    +     * Updates a specified table.
    +     * 
    + */ + public void updateTable( + com.google.bigtable.admin.v2.UpdateTableRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateTableMethod(), responseObserver); + } + /** * * @@ -1510,6 +1566,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.bigtable.admin.v2.GetTableRequest, com.google.bigtable.admin.v2.Table>(this, METHODID_GET_TABLE))) + .addMethod( + getUpdateTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.bigtable.admin.v2.UpdateTableRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_TABLE))) .addMethod( getDeleteTableMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1723,6 +1785,22 @@ public void getTable( getChannel().newCall(getGetTableMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
    +     * Updates a specified table.
    +     * 
    + */ + public void updateTable( + com.google.bigtable.admin.v2.UpdateTableRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTableMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2162,6 +2240,19 @@ public com.google.bigtable.admin.v2.Table getTable( getChannel(), getGetTableMethod(), getCallOptions(), request); } + /** + * + * + *
    +     * Updates a specified table.
    +     * 
    + */ + public com.google.longrunning.Operation updateTable( + com.google.bigtable.admin.v2.UpdateTableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTableMethod(), getCallOptions(), request); + } + /** * * @@ -2540,6 +2631,19 @@ protected BigtableTableAdminFutureStub build( getChannel().newCall(getGetTableMethod(), getCallOptions()), request); } + /** + * + * + *
    +     * Updates a specified table.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture + updateTable(com.google.bigtable.admin.v2.UpdateTableRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTableMethod(), getCallOptions()), request); + } + /** * * @@ -2847,25 +2951,26 @@ protected BigtableTableAdminFutureStub build( private static final int METHODID_CREATE_TABLE_FROM_SNAPSHOT = 1; private static final int METHODID_LIST_TABLES = 2; private static final int METHODID_GET_TABLE = 3; - private static final int METHODID_DELETE_TABLE = 4; - private static final int METHODID_UNDELETE_TABLE = 5; - private static final int METHODID_MODIFY_COLUMN_FAMILIES = 6; - private static final int METHODID_DROP_ROW_RANGE = 7; - private static final int METHODID_GENERATE_CONSISTENCY_TOKEN = 8; - private static final int METHODID_CHECK_CONSISTENCY = 9; - private static final int METHODID_SNAPSHOT_TABLE = 10; - private static final int METHODID_GET_SNAPSHOT = 11; - private static final int METHODID_LIST_SNAPSHOTS = 12; - private static final int METHODID_DELETE_SNAPSHOT = 13; - private static final int METHODID_CREATE_BACKUP = 14; - private static final int METHODID_GET_BACKUP = 15; - private static final int METHODID_UPDATE_BACKUP = 16; - private static final int METHODID_DELETE_BACKUP = 17; - private static final int METHODID_LIST_BACKUPS = 18; - private static final int METHODID_RESTORE_TABLE = 19; - private static final int METHODID_GET_IAM_POLICY = 20; - private static final int METHODID_SET_IAM_POLICY = 21; - private static final int METHODID_TEST_IAM_PERMISSIONS = 22; + private static final int METHODID_UPDATE_TABLE = 4; + private static final int METHODID_DELETE_TABLE = 5; + private static final int METHODID_UNDELETE_TABLE = 6; + private static final int METHODID_MODIFY_COLUMN_FAMILIES = 7; + private static final int METHODID_DROP_ROW_RANGE = 8; + private static final int METHODID_GENERATE_CONSISTENCY_TOKEN = 9; + private static final int METHODID_CHECK_CONSISTENCY = 10; + private static final int METHODID_SNAPSHOT_TABLE = 11; + private static final int METHODID_GET_SNAPSHOT = 12; + private static final int METHODID_LIST_SNAPSHOTS = 13; + private static final int METHODID_DELETE_SNAPSHOT = 14; + private static final int METHODID_CREATE_BACKUP = 15; + private static final int METHODID_GET_BACKUP = 16; + private static final int METHODID_UPDATE_BACKUP = 17; + private static final int METHODID_DELETE_BACKUP = 18; + private static final int METHODID_LIST_BACKUPS = 19; + private static final int METHODID_RESTORE_TABLE = 20; + private static final int METHODID_GET_IAM_POLICY = 21; + private static final int METHODID_SET_IAM_POLICY = 22; + private static final int METHODID_TEST_IAM_PERMISSIONS = 23; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2905,6 +3010,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.bigtable.admin.v2.GetTableRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_UPDATE_TABLE: + serviceImpl.updateTable( + (com.google.bigtable.admin.v2.UpdateTableRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_DELETE_TABLE: serviceImpl.deleteTable( (com.google.bigtable.admin.v2.DeleteTableRequest) request, @@ -3075,6 +3185,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateTableFromSnapshotMethod()) .addMethod(getListTablesMethod()) .addMethod(getGetTableMethod()) + .addMethod(getUpdateTableMethod()) .addMethod(getDeleteTableMethod()) .addMethod(getUndeleteTableMethod()) .addMethod(getModifyColumnFamiliesMethod()) diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 7bd61241d7..19bc2d8a8f 100644 --- a/grpc-google-cloud-bigtable-v2/pom.xml +++ b/grpc-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import diff --git a/pom.xml b/pom.xml index 2333898f24..6f0221a3d7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.3 + 1.5.5 @@ -153,27 +153,27 @@ com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT com.google.cloud google-cloud-bigtable - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT @@ -207,7 +207,7 @@ org.mockito mockito-core - 4.7.0 + 4.9.0 diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml index 721dee46f3..afc2a59e79 100644 --- a/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java index c984c1b601..b8dd885f7a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfile.java @@ -55,110 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AppProfile( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 42: - { - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder subBuilder = - null; - if (routingPolicyCase_ == 5) { - subBuilder = - ((com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) - routingPolicy_) - .toBuilder(); - } - routingPolicy_ = - input.readMessage( - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) - routingPolicy_); - routingPolicy_ = subBuilder.buildPartial(); - } - routingPolicyCase_ = 5; - break; - } - case 50: - { - com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder subBuilder = - null; - if (routingPolicyCase_ == 6) { - subBuilder = - ((com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_) - .toBuilder(); - } - routingPolicy_ = - input.readMessage( - com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_); - routingPolicy_ = subBuilder.buildPartial(); - } - routingPolicyCase_ = 6; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_descriptor; @@ -272,59 +168,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MultiClusterRoutingUseAny( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clusterIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - clusterIds_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - clusterIds_ = clusterIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor; @@ -422,7 +265,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < clusterIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterIds_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -439,7 +282,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getClusterIdsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) obj; if (!getClusterIdsList().equals(other.getClusterIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +314,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_IDS_FIELD_NUMBER; hash = (53 * hash) + getClusterIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -609,17 +452,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -727,7 +563,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -742,19 +578,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureClusterIdsIsMutable(); + clusterIds_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -972,7 +827,19 @@ public MultiClusterRoutingUseAny parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MultiClusterRoutingUseAny(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1073,57 +940,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SingleClusterRouting( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterId_ = s; - break; - } - case 16: - { - allowTransactionalWrites_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor; @@ -1228,7 +1044,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowTransactionalWrites_ != false) { output.writeBool(2, allowTransactionalWrites_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1243,7 +1059,7 @@ public int getSerializedSize() { if (allowTransactionalWrites_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowTransactionalWrites_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1261,7 +1077,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClusterId().equals(other.getClusterId())) return false; if (getAllowTransactionalWrites() != other.getAllowTransactionalWrites()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1276,7 +1092,7 @@ public int hashCode() { hash = (53 * hash) + getClusterId().hashCode(); hash = (37 * hash) + ALLOW_TRANSACTIONAL_WRITES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowTransactionalWrites()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1410,17 +1226,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1520,7 +1329,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile.SingleClusterRo if (other.getAllowTransactionalWrites() != false) { setAllowTransactionalWrites(other.getAllowTransactionalWrites()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1535,19 +1344,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + clusterId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + allowTransactionalWrites_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1750,7 +1583,19 @@ public SingleClusterRouting parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SingleClusterRouting(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2125,7 +1970,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 6, (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2154,7 +1999,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2184,7 +2029,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2213,7 +2058,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2343,17 +2188,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.AppProfile.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2365,6 +2203,12 @@ public Builder clear() { description_ = ""; + if (multiClusterRoutingUseAnyBuilder_ != null) { + multiClusterRoutingUseAnyBuilder_.clear(); + } + if (singleClusterRoutingBuilder_ != null) { + singleClusterRoutingBuilder_.clear(); + } routingPolicyCase_ = 0; routingPolicy_ = null; return this; @@ -2489,7 +2333,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2504,17 +2348,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.AppProfile parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 42: + { + input.readMessage( + getMultiClusterRoutingUseAnyFieldBuilder().getBuilder(), extensionRegistry); + routingPolicyCase_ = 5; + break; + } // case 42 + case 50: + { + input.readMessage( + getSingleClusterRoutingFieldBuilder().getBuilder(), extensionRegistry); + routingPolicyCase_ = 6; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.AppProfile) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3389,7 +3279,18 @@ public AppProfile parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AppProfile(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java index 3e88d33d78..d6130f49e9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingLimits.java @@ -50,55 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingLimits( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - minServeNodes_ = input.readInt32(); - break; - } - case 16: - { - maxServeNodes_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingLimits_descriptor; @@ -170,7 +121,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxServeNodes_ != 0) { output.writeInt32(2, maxServeNodes_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -185,7 +136,7 @@ public int getSerializedSize() { if (maxServeNodes_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxServeNodes_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -203,7 +154,7 @@ public boolean equals(final java.lang.Object obj) { if (getMinServeNodes() != other.getMinServeNodes()) return false; if (getMaxServeNodes() != other.getMaxServeNodes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -218,7 +169,7 @@ public int hashCode() { hash = (53 * hash) + getMinServeNodes(); hash = (37 * hash) + MAX_SERVE_NODES_FIELD_NUMBER; hash = (53 * hash) + getMaxServeNodes(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -347,17 +298,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.AutoscalingLimits.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -451,7 +395,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.AutoscalingLimits other) { if (other.getMaxServeNodes() != 0) { setMaxServeNodes(other.getMaxServeNodes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -466,17 +410,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.AutoscalingLimits parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + minServeNodes_ = input.readInt32(); + + break; + } // case 8 + case 16: + { + maxServeNodes_ = input.readInt32(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.AutoscalingLimits) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -616,7 +586,18 @@ public AutoscalingLimits parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingLimits(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java index c0d6cb0b8c..d7c4351c78 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AutoscalingTargets.java @@ -50,55 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingTargets( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: - { - cpuUtilizationPercent_ = input.readInt32(); - break; - } - case 24: - { - storageUtilizationGibPerNode_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_AutoscalingTargets_descriptor; @@ -178,7 +129,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (storageUtilizationGibPerNode_ != 0) { output.writeInt32(3, storageUtilizationGibPerNode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -194,7 +145,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, storageUtilizationGibPerNode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +163,7 @@ public boolean equals(final java.lang.Object obj) { if (getCpuUtilizationPercent() != other.getCpuUtilizationPercent()) return false; if (getStorageUtilizationGibPerNode() != other.getStorageUtilizationGibPerNode()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +178,7 @@ public int hashCode() { hash = (53 * hash) + getCpuUtilizationPercent(); hash = (37 * hash) + STORAGE_UTILIZATION_GIB_PER_NODE_FIELD_NUMBER; hash = (53 * hash) + getStorageUtilizationGibPerNode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.AutoscalingTargets.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +405,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.AutoscalingTargets other) if (other.getStorageUtilizationGibPerNode() != 0) { setStorageUtilizationGibPerNode(other.getStorageUtilizationGibPerNode()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,17 +420,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.AutoscalingTargets parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + cpuUtilizationPercent_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + storageUtilizationGibPerNode_ = input.readInt32(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.AutoscalingTargets) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -650,7 +620,18 @@ public AutoscalingTargets parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingTargets(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java index b68fe55e1b..95df3f17d8 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Backup.java @@ -54,132 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Backup( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceTable_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (expireTime_ != null) { - subBuilder = expireTime_.toBuilder(); - } - expireTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expireTime_); - expireTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - sizeBytes_ = input.readInt64(); - break; - } - case 56: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 74: - { - com.google.bigtable.admin.v2.EncryptionInfo.Builder subBuilder = null; - if (encryptionInfo_ != null) { - subBuilder = encryptionInfo_.toBuilder(); - } - encryptionInfo_ = - input.readMessage( - com.google.bigtable.admin.v2.EncryptionInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(encryptionInfo_); - encryptionInfo_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Backup_descriptor; @@ -797,7 +671,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (encryptionInfo_ != null) { output.writeMessage(9, getEncryptionInfo()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -830,7 +704,7 @@ public int getSerializedSize() { if (encryptionInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEncryptionInfo()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -865,7 +739,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEncryptionInfo()) { if (!getEncryptionInfo().equals(other.getEncryptionInfo())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -900,7 +774,7 @@ public int hashCode() { hash = (37 * hash) + ENCRYPTION_INFO_FIELD_NUMBER; hash = (53 * hash) + getEncryptionInfo().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1028,17 +902,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Backup.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1201,7 +1068,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Backup other) { if (other.hasEncryptionInfo()) { mergeEncryptionInfo(other.getEncryptionInfo()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1216,17 +1083,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Backup parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + sourceTable_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + sizeBytes_ = input.readInt64(); + + break; + } // case 48 + case 56: + { + state_ = input.readEnum(); + + break; + } // case 56 + case 74: + { + input.readMessage(getEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.Backup) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2531,7 +2460,18 @@ public Backup parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Backup(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java index c962305cc2..e06a057291 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupInfo.java @@ -53,89 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackupInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - backup_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceTable_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_BackupInfo_descriptor; @@ -379,7 +296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceTable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -400,7 +317,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceTable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -425,7 +342,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEndTime().equals(other.getEndTime())) return false; } if (!getSourceTable().equals(other.getSourceTable())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -448,7 +365,7 @@ public int hashCode() { } hash = (37 * hash) + SOURCE_TABLE_FIELD_NUMBER; hash = (53 * hash) + getSourceTable().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,17 +494,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.BackupInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -711,7 +621,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.BackupInfo other) { sourceTable_ = other.sourceTable_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -726,17 +636,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.BackupInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + backup_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + sourceTable_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.BackupInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1378,7 +1326,18 @@ public BackupInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackupInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java index 082eaffde9..7fe2354129 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminProto.java @@ -67,6 +67,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_bigtable_admin_v2_GetTableRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_bigtable_admin_v2_GetTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -220,209 +228,220 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "leRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtabl" + "eadmin.googleapis.com/Table\0222\n\004view\030\002 \001(" + "\0162$.google.bigtable.admin.v2.Table.View\"" - + "N\n\022DeleteTableRequest\0228\n\004name\030\001 \001(\tB*\340A\002" - + "\372A$\n\"bigtableadmin.googleapis.com/Table\"" - + "P\n\024UndeleteTableRequest\0228\n\004name\030\001 \001(\tB*\340" - + "A\002\372A$\n\"bigtableadmin.googleapis.com/Tabl" - + "e\"\203\001\n\025UndeleteTableMetadata\022\014\n\004name\030\001 \001(" - + "\t\022.\n\nstart_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\022,\n\010end_time\030\003 \001(\0132\032.google.pro" - + "tobuf.Timestamp\"\337\002\n\033ModifyColumnFamilies" - + "Request\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtablea" - + "dmin.googleapis.com/Table\022^\n\rmodificatio" - + "ns\030\002 \003(\0132B.google.bigtable.admin.v2.Modi" - + "fyColumnFamiliesRequest.ModificationB\003\340A" - + "\002\032\245\001\n\014Modification\022\n\n\002id\030\001 \001(\t\0228\n\006create" - + "\030\002 \001(\0132&.google.bigtable.admin.v2.Column" - + "FamilyH\000\0228\n\006update\030\003 \001(\0132&.google.bigtab" - + "le.admin.v2.ColumnFamilyH\000\022\016\n\004drop\030\004 \001(\010" - + "H\000B\005\n\003mod\"[\n\037GenerateConsistencyTokenReq" + + "\177\n\022UpdateTableRequest\0223\n\005table\030\001 \001(\0132\037.g" + + "oogle.bigtable.admin.v2.TableB\003\340A\002\0224\n\013up" + + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" + + "askB\003\340A\002\"\201\001\n\023UpdateTableMetadata\022\014\n\004name" + + "\030\001 \001(\t\022.\n\nstart_time\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\022,\n\010end_time\030\003 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"N\n\022DeleteTableReque" + + "st\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin." + + "googleapis.com/Table\"P\n\024UndeleteTableReq" + "uest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmi" - + "n.googleapis.com/Table\"=\n GenerateConsis" - + "tencyTokenResponse\022\031\n\021consistency_token\030" - + "\001 \001(\t\"s\n\027CheckConsistencyRequest\0228\n\004name" - + "\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis" - + ".com/Table\022\036\n\021consistency_token\030\002 \001(\tB\003\340" - + "A\002\".\n\030CheckConsistencyResponse\022\022\n\nconsis" - + "tent\030\001 \001(\010\"\346\001\n\024SnapshotTableRequest\0228\n\004n" - + "ame\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googlea" - + "pis.com/Table\022=\n\007cluster\030\002 \001(\tB,\340A\002\372A&\n$" - + "bigtableadmin.googleapis.com/Cluster\022\030\n\013" - + "snapshot_id\030\003 \001(\tB\003\340A\002\022&\n\003ttl\030\004 \001(\0132\031.go" - + "ogle.protobuf.Duration\022\023\n\013description\030\005 " - + "\001(\t\"Q\n\022GetSnapshotRequest\022;\n\004name\030\001 \001(\tB" - + "-\340A\002\372A\'\n%bigtableadmin.googleapis.com/Sn" - + "apshot\"{\n\024ListSnapshotsRequest\022<\n\006parent" - + "\030\001 \001(\tB,\340A\002\372A&\n$bigtableadmin.googleapis" - + ".com/Cluster\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" - + "token\030\003 \001(\t\"g\n\025ListSnapshotsResponse\0225\n\t" - + "snapshots\030\001 \003(\0132\".google.bigtable.admin." - + "v2.Snapshot\022\027\n\017next_page_token\030\002 \001(\t\"T\n\025" - + "DeleteSnapshotRequest\022;\n\004name\030\001 \001(\tB-\340A\002" - + "\372A\'\n%bigtableadmin.googleapis.com/Snapsh" - + "ot\"\304\001\n\025SnapshotTableMetadata\022H\n\020original" - + "_request\030\001 \001(\0132..google.bigtable.admin.v" - + "2.SnapshotTableRequest\0220\n\014request_time\030\002" + + "n.googleapis.com/Table\"\203\001\n\025UndeleteTable" + + "Metadata\022\014\n\004name\030\001 \001(\t\022.\n\nstart_time\030\002 \001" + + "(\0132\032.google.protobuf.Timestamp\022,\n\010end_ti" + + "me\030\003 \001(\0132\032.google.protobuf.Timestamp\"\337\002\n" + + "\033ModifyColumnFamiliesRequest\0228\n\004name\030\001 \001" + + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com" + + "/Table\022^\n\rmodifications\030\002 \003(\0132B.google.b" + + "igtable.admin.v2.ModifyColumnFamiliesReq" + + "uest.ModificationB\003\340A\002\032\245\001\n\014Modification\022" + + "\n\n\002id\030\001 \001(\t\0228\n\006create\030\002 \001(\0132&.google.big" + + "table.admin.v2.ColumnFamilyH\000\0228\n\006update\030" + + "\003 \001(\0132&.google.bigtable.admin.v2.ColumnF" + + "amilyH\000\022\016\n\004drop\030\004 \001(\010H\000B\005\n\003mod\"[\n\037Genera" + + "teConsistencyTokenRequest\0228\n\004name\030\001 \001(\tB" + + "*\340A\002\372A$\n\"bigtableadmin.googleapis.com/Ta" + + "ble\"=\n GenerateConsistencyTokenResponse\022" + + "\031\n\021consistency_token\030\001 \001(\t\"s\n\027CheckConsi" + + "stencyRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"big" + + "tableadmin.googleapis.com/Table\022\036\n\021consi" + + "stency_token\030\002 \001(\tB\003\340A\002\".\n\030CheckConsiste" + + "ncyResponse\022\022\n\nconsistent\030\001 \001(\010\"\346\001\n\024Snap" + + "shotTableRequest\0228\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"" + + "bigtableadmin.googleapis.com/Table\022=\n\007cl" + + "uster\030\002 \001(\tB,\340A\002\372A&\n$bigtableadmin.googl" + + "eapis.com/Cluster\022\030\n\013snapshot_id\030\003 \001(\tB\003" + + "\340A\002\022&\n\003ttl\030\004 \001(\0132\031.google.protobuf.Durat" + + "ion\022\023\n\013description\030\005 \001(\t\"Q\n\022GetSnapshotR" + + "equest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%bigtablead" + + "min.googleapis.com/Snapshot\"{\n\024ListSnaps" + + "hotsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$big" + + "tableadmin.googleapis.com/Cluster\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"g\n\025List" + + "SnapshotsResponse\0225\n\tsnapshots\030\001 \003(\0132\".g" + + "oogle.bigtable.admin.v2.Snapshot\022\027\n\017next" + + "_page_token\030\002 \001(\t\"T\n\025DeleteSnapshotReque" + + "st\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin." + + "googleapis.com/Snapshot\"\304\001\n\025SnapshotTabl" + + "eMetadata\022H\n\020original_request\030\001 \001(\0132..go" + + "ogle.bigtable.admin.v2.SnapshotTableRequ" + + "est\0220\n\014request_time\030\002 \001(\0132\032.google.proto" + + "buf.Timestamp\022/\n\013finish_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\"\330\001\n\037CreateTableFr" + + "omSnapshotMetadata\022R\n\020original_request\030\001" + + " \001(\01328.google.bigtable.admin.v2.CreateTa" + + "bleFromSnapshotRequest\0220\n\014request_time\030\002" + " \001(\0132\032.google.protobuf.Timestamp\022/\n\013fini" + "sh_time\030\003 \001(\0132\032.google.protobuf.Timestam" - + "p\"\330\001\n\037CreateTableFromSnapshotMetadata\022R\n" - + "\020original_request\030\001 \001(\01328.google.bigtabl" - + "e.admin.v2.CreateTableFromSnapshotReques" - + "t\0220\n\014request_time\030\002 \001(\0132\032.google.protobu" - + "f.Timestamp\022/\n\013finish_time\030\003 \001(\0132\032.googl" - + "e.protobuf.Timestamp\"\242\001\n\023CreateBackupReq" - + "uest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$bigtablead" - + "min.googleapis.com/Cluster\022\026\n\tbackup_id\030" - + "\002 \001(\tB\003\340A\002\0225\n\006backup\030\003 \001(\0132 .google.bigt" - + "able.admin.v2.BackupB\003\340A\002\"\230\001\n\024CreateBack" - + "upMetadata\022\014\n\004name\030\001 \001(\t\022\024\n\014source_table" - + "\030\002 \001(\t\022.\n\nstart_time\030\003 \001(\0132\032.google.prot" - + "obuf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.googl" - + "e.protobuf.Timestamp\"\202\001\n\023UpdateBackupReq" - + "uest\0225\n\006backup\030\001 \001(\0132 .google.bigtable.a" - + "dmin.v2.BackupB\003\340A\002\0224\n\013update_mask\030\002 \001(\013" - + "2\032.google.protobuf.FieldMaskB\003\340A\002\"M\n\020Get" - + "BackupRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#big" - + "tableadmin.googleapis.com/Backup\"P\n\023Dele" - + "teBackupRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#b" - + "igtableadmin.googleapis.com/Backup\"\233\001\n\022L" - + "istBackupsRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A" - + "&\n$bigtableadmin.googleapis.com/Cluster\022" - + "\016\n\006filter\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022\021\n\tpag" - + "e_size\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"a\n\023List" - + "BackupsResponse\0221\n\007backups\030\001 \003(\0132 .googl" - + "e.bigtable.admin.v2.Backup\022\027\n\017next_page_" - + "token\030\002 \001(\t2\341&\n\022BigtableTableAdmin\022\253\001\n\013C" - + "reateTable\022,.google.bigtable.admin.v2.Cr" - + "eateTableRequest\032\037.google.bigtable.admin" - + ".v2.Table\"M\202\323\344\223\002/\"*/v2/{parent=projects/" - + "*/instances/*}/tables:\001*\332A\025parent,table_" - + "id,table\022\212\002\n\027CreateTableFromSnapshot\0228.g" - + "oogle.bigtable.admin.v2.CreateTableFromS" - + "napshotRequest\032\035.google.longrunning.Oper" - + "ation\"\225\001\202\323\344\223\002B\"=/v2/{parent=projects/*/i" - + "nstances/*}/tables:createFromSnapshot:\001*" - + "\332A\037parent,table_id,source_snapshot\312A(\n\005T" - + "able\022\037CreateTableFromSnapshotMetadata\022\244\001" - + "\n\nListTables\022+.google.bigtable.admin.v2." - + "ListTablesRequest\032,.google.bigtable.admi" - + "n.v2.ListTablesResponse\";\202\323\344\223\002,\022*/v2/{pa" - + "rent=projects/*/instances/*}/tables\332A\006pa" - + "rent\022\221\001\n\010GetTable\022).google.bigtable.admi" - + "n.v2.GetTableRequest\032\037.google.bigtable.a" - + "dmin.v2.Table\"9\202\323\344\223\002,\022*/v2/{name=project" - + "s/*/instances/*/tables/*}\332A\004name\022\216\001\n\013Del" - + "eteTable\022,.google.bigtable.admin.v2.Dele" - + "teTableRequest\032\026.google.protobuf.Empty\"9" - + "\202\323\344\223\002,**/v2/{name=projects/*/instances/*" - + "/tables/*}\332A\004name\022\306\001\n\rUndeleteTable\022..go" - + "ogle.bigtable.admin.v2.UndeleteTableRequ" - + "est\032\035.google.longrunning.Operation\"f\202\323\344\223" - + "\0028\"3/v2/{name=projects/*/instances/*/tab" - + "les/*}:undelete:\001*\332A\004name\312A\036\n\005Table\022\025Und" - + "eleteTableMetadata\022\317\001\n\024ModifyColumnFamil" - + "ies\0225.google.bigtable.admin.v2.ModifyCol" - + "umnFamiliesRequest\032\037.google.bigtable.adm" - + "in.v2.Table\"_\202\323\344\223\002D\"?/v2/{name=projects/" - + "*/instances/*/tables/*}:modifyColumnFami" - + "lies:\001*\332A\022name,modifications\022\231\001\n\014DropRow" - + "Range\022-.google.bigtable.admin.v2.DropRow" - + "RangeRequest\032\026.google.protobuf.Empty\"B\202\323" - + "\344\223\002<\"7/v2/{name=projects/*/instances/*/t" - + "ables/*}:dropRowRange:\001*\022\350\001\n\030GenerateCon" - + "sistencyToken\0229.google.bigtable.admin.v2" - + ".GenerateConsistencyTokenRequest\032:.googl" - + "e.bigtable.admin.v2.GenerateConsistencyT" - + "okenResponse\"U\202\323\344\223\002H\"C/v2/{name=projects" - + "/*/instances/*/tables/*}:generateConsist" - + "encyToken:\001*\332A\004name\022\332\001\n\020CheckConsistency" - + "\0221.google.bigtable.admin.v2.CheckConsist" - + "encyRequest\0322.google.bigtable.admin.v2.C" - + "heckConsistencyResponse\"_\202\323\344\223\002@\";/v2/{na" - + "me=projects/*/instances/*/tables/*}:chec" - + "kConsistency:\001*\332A\026name,consistency_token" - + "\022\352\001\n\rSnapshotTable\022..google.bigtable.adm" - + "in.v2.SnapshotTableRequest\032\035.google.long" - + "running.Operation\"\211\001\202\323\344\223\0028\"3/v2/{name=pr" - + "ojects/*/instances/*/tables/*}:snapshot:" - + "\001*\332A$name,cluster,snapshot_id,descriptio" - + "n\312A!\n\010Snapshot\022\025SnapshotTableMetadata\022\250\001" - + "\n\013GetSnapshot\022,.google.bigtable.admin.v2" - + ".GetSnapshotRequest\032\".google.bigtable.ad" - + "min.v2.Snapshot\"G\202\323\344\223\002:\0228/v2/{name=proje" - + "cts/*/instances/*/clusters/*/snapshots/*" - + "}\332A\004name\022\273\001\n\rListSnapshots\022..google.bigt" - + "able.admin.v2.ListSnapshotsRequest\032/.goo" - + "gle.bigtable.admin.v2.ListSnapshotsRespo" - + "nse\"I\202\323\344\223\002:\0228/v2/{parent=projects/*/inst" - + "ances/*/clusters/*}/snapshots\332A\006parent\022\242" - + "\001\n\016DeleteSnapshot\022/.google.bigtable.admi" - + "n.v2.DeleteSnapshotRequest\032\026.google.prot" - + "obuf.Empty\"G\202\323\344\223\002:*8/v2/{name=projects/*" - + "/instances/*/clusters/*/snapshots/*}\332A\004n" - + "ame\022\340\001\n\014CreateBackup\022-.google.bigtable.a" - + "dmin.v2.CreateBackupRequest\032\035.google.lon" - + "grunning.Operation\"\201\001\202\323\344\223\002@\"6/v2/{parent" - + "=projects/*/instances/*/clusters/*}/back" - + "ups:\006backup\332A\027parent,backup_id,backup\312A\036" - + "\n\006Backup\022\024CreateBackupMetadata\022\240\001\n\tGetBa" - + "ckup\022*.google.bigtable.admin.v2.GetBacku" - + "pRequest\032 .google.bigtable.admin.v2.Back" - + "up\"E\202\323\344\223\0028\0226/v2/{name=projects/*/instanc" - + "es/*/clusters/*/backups/*}\332A\004name\022\303\001\n\014Up" - + "dateBackup\022-.google.bigtable.admin.v2.Up" - + "dateBackupRequest\032 .google.bigtable.admi" - + "n.v2.Backup\"b\202\323\344\223\002G2=/v2/{backup.name=pr" - + "ojects/*/instances/*/clusters/*/backups/" - + "*}:\006backup\332A\022backup,update_mask\022\234\001\n\014Dele" - + "teBackup\022-.google.bigtable.admin.v2.Dele" - + "teBackupRequest\032\026.google.protobuf.Empty\"" - + "E\202\323\344\223\0028*6/v2/{name=projects/*/instances/" - + "*/clusters/*/backups/*}\332A\004name\022\263\001\n\013ListB" - + "ackups\022,.google.bigtable.admin.v2.ListBa" - + "ckupsRequest\032-.google.bigtable.admin.v2." - + "ListBackupsResponse\"G\202\323\344\223\0028\0226/v2/{parent" - + "=projects/*/instances/*/clusters/*}/back" - + "ups\332A\006parent\022\273\001\n\014RestoreTable\022-.google.b" - + "igtable.admin.v2.RestoreTableRequest\032\035.g" - + "oogle.longrunning.Operation\"]\202\323\344\223\0027\"2/v2" + + "p\"\242\001\n\023CreateBackupRequest\022<\n\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\n$bigtableadmin.googleapis.com/" + + "Cluster\022\026\n\tbackup_id\030\002 \001(\tB\003\340A\002\0225\n\006backu" + + "p\030\003 \001(\0132 .google.bigtable.admin.v2.Backu" + + "pB\003\340A\002\"\230\001\n\024CreateBackupMetadata\022\014\n\004name\030" + + "\001 \001(\t\022\024\n\014source_table\030\002 \001(\t\022.\n\nstart_tim" + + "e\030\003 \001(\0132\032.google.protobuf.Timestamp\022,\n\010e" + + "nd_time\030\004 \001(\0132\032.google.protobuf.Timestam" + + "p\"\202\001\n\023UpdateBackupRequest\0225\n\006backup\030\001 \001(" + + "\0132 .google.bigtable.admin.v2.BackupB\003\340A\002" + + "\0224\n\013update_mask\030\002 \001(\0132\032.google.protobuf." + + "FieldMaskB\003\340A\002\"M\n\020GetBackupRequest\0229\n\004na" + + "me\030\001 \001(\tB+\340A\002\372A%\n#bigtableadmin.googleap" + + "is.com/Backup\"P\n\023DeleteBackupRequest\0229\n\004" + + "name\030\001 \001(\tB+\340A\002\372A%\n#bigtableadmin.google" + + "apis.com/Backup\"\233\001\n\022ListBackupsRequest\022<" + + "\n\006parent\030\001 \001(\tB,\340A\002\372A&\n$bigtableadmin.go" + + "ogleapis.com/Cluster\022\016\n\006filter\030\002 \001(\t\022\020\n\010" + + "order_by\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npag" + + "e_token\030\005 \001(\t\"a\n\023ListBackupsResponse\0221\n\007" + + "backups\030\001 \003(\0132 .google.bigtable.admin.v2" + + ".Backup\022\027\n\017next_page_token\030\002 \001(\t2\262(\n\022Big" + + "tableTableAdmin\022\253\001\n\013CreateTable\022,.google" + + ".bigtable.admin.v2.CreateTableRequest\032\037." + + "google.bigtable.admin.v2.Table\"M\202\323\344\223\002/\"*" + + "/v2/{parent=projects/*/instances/*}/tabl" + + "es:\001*\332A\025parent,table_id,table\022\212\002\n\027Create" + + "TableFromSnapshot\0228.google.bigtable.admi" + + "n.v2.CreateTableFromSnapshotRequest\032\035.go" + + "ogle.longrunning.Operation\"\225\001\202\323\344\223\002B\"=/v2" + "/{parent=projects/*/instances/*}/tables:" - + "restore:\001*\312A\035\n\005Table\022\024RestoreTableMetada" - + "ta\022\354\001\n\014GetIamPolicy\022\".google.iam.v1.GetI" - + "amPolicyRequest\032\025.google.iam.v1.Policy\"\240" - + "\001\202\323\344\223\002\216\001\";/v2/{resource=projects/*/insta" - + "nces/*/tables/*}:getIamPolicy:\001*ZL\"G/v2/" - + "{resource=projects/*/instances/*/cluster" - + "s/*/backups/*}:getIamPolicy:\001*\332A\010resourc" - + "e\022\363\001\n\014SetIamPolicy\022\".google.iam.v1.SetIa" - + "mPolicyRequest\032\025.google.iam.v1.Policy\"\247\001" - + "\202\323\344\223\002\216\001\";/v2/{resource=projects/*/instan" - + "ces/*/tables/*}:setIamPolicy:\001*ZL\"G/v2/{" - + "resource=projects/*/instances/*/clusters" - + "/*/backups/*}:setIamPolicy:\001*\332A\017resource" - + ",policy\022\244\002\n\022TestIamPermissions\022(.google." - + "iam.v1.TestIamPermissionsRequest\032).googl" - + "e.iam.v1.TestIamPermissionsResponse\"\270\001\202\323" - + "\344\223\002\232\001\"A/v2/{resource=projects/*/instance" - + "s/*/tables/*}:testIamPermissions:\001*ZR\"M/" - + "v2/{resource=projects/*/instances/*/clus" - + "ters/*/backups/*}:testIamPermissions:\001*\332" - + "A\024resource,permissions\032\336\002\312A\034bigtableadmi" - + "n.googleapis.com\322A\273\002https://www.googleap" - + "is.com/auth/bigtable.admin,https://www.g" - + "oogleapis.com/auth/bigtable.admin.table," - + "https://www.googleapis.com/auth/cloud-bi" - + "gtable.admin,https://www.googleapis.com/" - + "auth/cloud-bigtable.admin.table,https://" - + "www.googleapis.com/auth/cloud-platform,h" - + "ttps://www.googleapis.com/auth/cloud-pla" - + "tform.read-onlyB\337\001\n\034com.google.bigtable." - + "admin.v2B\027BigtableTableAdminProtoP\001Z=goo" - + "gle.golang.org/genproto/googleapis/bigta" - + "ble/admin/v2;admin\252\002\036Google.Cloud.Bigtab" - + "le.Admin.V2\312\002\036Google\\Cloud\\Bigtable\\Admi" - + "n\\V2\352\002\"Google::Cloud::Bigtable::Admin::V" - + "2b\006proto3" + + "createFromSnapshot:\001*\332A\037parent,table_id," + + "source_snapshot\312A(\n\005Table\022\037CreateTableFr" + + "omSnapshotMetadata\022\244\001\n\nListTables\022+.goog" + + "le.bigtable.admin.v2.ListTablesRequest\032," + + ".google.bigtable.admin.v2.ListTablesResp" + + "onse\";\202\323\344\223\002,\022*/v2/{parent=projects/*/ins" + + "tances/*}/tables\332A\006parent\022\221\001\n\010GetTable\022)" + + ".google.bigtable.admin.v2.GetTableReques" + + "t\032\037.google.bigtable.admin.v2.Table\"9\202\323\344\223" + + "\002,\022*/v2/{name=projects/*/instances/*/tab" + + "les/*}\332A\004name\022\316\001\n\013UpdateTable\022,.google.b" + + "igtable.admin.v2.UpdateTableRequest\032\035.go" + + "ogle.longrunning.Operation\"r\202\323\344\223\002920/v2/" + + "{table.name=projects/*/instances/*/table" + + "s/*}:\005table\332A\021table,update_mask\312A\034\n\005Tabl" + + "e\022\023UpdateTableMetadata\022\216\001\n\013DeleteTable\022," + + ".google.bigtable.admin.v2.DeleteTableReq" + + "uest\032\026.google.protobuf.Empty\"9\202\323\344\223\002,**/v" + + "2/{name=projects/*/instances/*/tables/*}" + + "\332A\004name\022\306\001\n\rUndeleteTable\022..google.bigta" + + "ble.admin.v2.UndeleteTableRequest\032\035.goog" + + "le.longrunning.Operation\"f\202\323\344\223\0028\"3/v2/{n" + + "ame=projects/*/instances/*/tables/*}:und" + + "elete:\001*\332A\004name\312A\036\n\005Table\022\025UndeleteTable" + + "Metadata\022\317\001\n\024ModifyColumnFamilies\0225.goog" + + "le.bigtable.admin.v2.ModifyColumnFamilie" + + "sRequest\032\037.google.bigtable.admin.v2.Tabl" + + "e\"_\202\323\344\223\002D\"?/v2/{name=projects/*/instance" + + "s/*/tables/*}:modifyColumnFamilies:\001*\332A\022" + + "name,modifications\022\231\001\n\014DropRowRange\022-.go" + + "ogle.bigtable.admin.v2.DropRowRangeReque" + + "st\032\026.google.protobuf.Empty\"B\202\323\344\223\002<\"7/v2/" + + "{name=projects/*/instances/*/tables/*}:d" + + "ropRowRange:\001*\022\350\001\n\030GenerateConsistencyTo" + + "ken\0229.google.bigtable.admin.v2.GenerateC" + + "onsistencyTokenRequest\032:.google.bigtable" + + ".admin.v2.GenerateConsistencyTokenRespon" + + "se\"U\202\323\344\223\002H\"C/v2/{name=projects/*/instanc" + + "es/*/tables/*}:generateConsistencyToken:" + + "\001*\332A\004name\022\332\001\n\020CheckConsistency\0221.google." + + "bigtable.admin.v2.CheckConsistencyReques" + + "t\0322.google.bigtable.admin.v2.CheckConsis" + + "tencyResponse\"_\202\323\344\223\002@\";/v2/{name=project" + + "s/*/instances/*/tables/*}:checkConsisten" + + "cy:\001*\332A\026name,consistency_token\022\352\001\n\rSnaps" + + "hotTable\022..google.bigtable.admin.v2.Snap" + + "shotTableRequest\032\035.google.longrunning.Op" + + "eration\"\211\001\202\323\344\223\0028\"3/v2/{name=projects/*/i" + + "nstances/*/tables/*}:snapshot:\001*\332A$name," + + "cluster,snapshot_id,description\312A!\n\010Snap" + + "shot\022\025SnapshotTableMetadata\022\250\001\n\013GetSnaps" + + "hot\022,.google.bigtable.admin.v2.GetSnapsh" + + "otRequest\032\".google.bigtable.admin.v2.Sna" + + "pshot\"G\202\323\344\223\002:\0228/v2/{name=projects/*/inst" + + "ances/*/clusters/*/snapshots/*}\332A\004name\022\273" + + "\001\n\rListSnapshots\022..google.bigtable.admin" + + ".v2.ListSnapshotsRequest\032/.google.bigtab" + + "le.admin.v2.ListSnapshotsResponse\"I\202\323\344\223\002" + + ":\0228/v2/{parent=projects/*/instances/*/cl" + + "usters/*}/snapshots\332A\006parent\022\242\001\n\016DeleteS" + + "napshot\022/.google.bigtable.admin.v2.Delet" + + "eSnapshotRequest\032\026.google.protobuf.Empty" + + "\"G\202\323\344\223\002:*8/v2/{name=projects/*/instances" + + "/*/clusters/*/snapshots/*}\332A\004name\022\340\001\n\014Cr" + + "eateBackup\022-.google.bigtable.admin.v2.Cr" + + "eateBackupRequest\032\035.google.longrunning.O" + + "peration\"\201\001\202\323\344\223\002@\"6/v2/{parent=projects/" + + "*/instances/*/clusters/*}/backups:\006backu" + + "p\332A\027parent,backup_id,backup\312A\036\n\006Backup\022\024" + + "CreateBackupMetadata\022\240\001\n\tGetBackup\022*.goo" + + "gle.bigtable.admin.v2.GetBackupRequest\032 " + + ".google.bigtable.admin.v2.Backup\"E\202\323\344\223\0028" + + "\0226/v2/{name=projects/*/instances/*/clust" + + "ers/*/backups/*}\332A\004name\022\303\001\n\014UpdateBackup" + + "\022-.google.bigtable.admin.v2.UpdateBackup" + + "Request\032 .google.bigtable.admin.v2.Backu" + + "p\"b\202\323\344\223\002G2=/v2/{backup.name=projects/*/i" + + "nstances/*/clusters/*/backups/*}:\006backup" + + "\332A\022backup,update_mask\022\234\001\n\014DeleteBackup\022-" + + ".google.bigtable.admin.v2.DeleteBackupRe" + + "quest\032\026.google.protobuf.Empty\"E\202\323\344\223\0028*6/" + + "v2/{name=projects/*/instances/*/clusters" + + "/*/backups/*}\332A\004name\022\263\001\n\013ListBackups\022,.g" + + "oogle.bigtable.admin.v2.ListBackupsReque" + + "st\032-.google.bigtable.admin.v2.ListBackup" + + "sResponse\"G\202\323\344\223\0028\0226/v2/{parent=projects/" + + "*/instances/*/clusters/*}/backups\332A\006pare" + + "nt\022\273\001\n\014RestoreTable\022-.google.bigtable.ad" + + "min.v2.RestoreTableRequest\032\035.google.long" + + "running.Operation\"]\202\323\344\223\0027\"2/v2/{parent=p" + + "rojects/*/instances/*}/tables:restore:\001*" + + "\312A\035\n\005Table\022\024RestoreTableMetadata\022\354\001\n\014Get" + + "IamPolicy\022\".google.iam.v1.GetIamPolicyRe" + + "quest\032\025.google.iam.v1.Policy\"\240\001\202\323\344\223\002\216\001\";" + + "/v2/{resource=projects/*/instances/*/tab" + + "les/*}:getIamPolicy:\001*ZL\"G/v2/{resource=" + + "projects/*/instances/*/clusters/*/backup" + + "s/*}:getIamPolicy:\001*\332A\010resource\022\363\001\n\014SetI" + + "amPolicy\022\".google.iam.v1.SetIamPolicyReq" + + "uest\032\025.google.iam.v1.Policy\"\247\001\202\323\344\223\002\216\001\";/" + + "v2/{resource=projects/*/instances/*/tabl" + + "es/*}:setIamPolicy:\001*ZL\"G/v2/{resource=p" + + "rojects/*/instances/*/clusters/*/backups" + + "/*}:setIamPolicy:\001*\332A\017resource,policy\022\244\002" + + "\n\022TestIamPermissions\022(.google.iam.v1.Tes" + + "tIamPermissionsRequest\032).google.iam.v1.T" + + "estIamPermissionsResponse\"\270\001\202\323\344\223\002\232\001\"A/v2" + + "/{resource=projects/*/instances/*/tables" + + "/*}:testIamPermissions:\001*ZR\"M/v2/{resour" + + "ce=projects/*/instances/*/clusters/*/bac" + + "kups/*}:testIamPermissions:\001*\332A\024resource" + + ",permissions\032\336\002\312A\034bigtableadmin.googleap" + + "is.com\322A\273\002https://www.googleapis.com/aut" + + "h/bigtable.admin,https://www.googleapis." + + "com/auth/bigtable.admin.table,https://ww" + + "w.googleapis.com/auth/cloud-bigtable.adm" + + "in,https://www.googleapis.com/auth/cloud" + + "-bigtable.admin.table,https://www.google" + + "apis.com/auth/cloud-platform,https://www" + + ".googleapis.com/auth/cloud-platform.read" + + "-onlyB\337\001\n\034com.google.bigtable.admin.v2B\027" + + "BigtableTableAdminProtoP\001Z=google.golang" + + ".org/genproto/googleapis/bigtable/admin/" + + "v2;admin\252\002\036Google.Cloud.Bigtable.Admin.V" + + "2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2\352\002\"Goo" + + "gle::Cloud::Bigtable::Admin::V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -529,8 +548,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "View", }); - internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor = + internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor = getDescriptor().getMessageTypes().get(9); + internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor, + new java.lang.String[] { + "Table", "UpdateMask", + }); + internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor, + new java.lang.String[] { + "Name", "StartTime", "EndTime", + }); + internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor = + getDescriptor().getMessageTypes().get(11); internal_static_google_bigtable_admin_v2_DeleteTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor, @@ -538,7 +573,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_bigtable_admin_v2_UndeleteTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor, @@ -546,7 +581,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor, @@ -554,7 +589,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "StartTime", "EndTime", }); internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor, @@ -572,7 +607,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Id", "Create", "Update", "Drop", "Mod", }); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor, @@ -580,7 +615,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor, @@ -588,7 +623,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConsistencyToken", }); internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor, @@ -596,7 +631,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "ConsistencyToken", }); internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor, @@ -604,7 +639,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Consistent", }); internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_bigtable_admin_v2_SnapshotTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor, @@ -612,7 +647,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Cluster", "SnapshotId", "Ttl", "Description", }); internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_bigtable_admin_v2_GetSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor, @@ -620,7 +655,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor, @@ -628,7 +663,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor, @@ -636,7 +671,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Snapshots", "NextPageToken", }); internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor, @@ -644,7 +679,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor, @@ -652,7 +687,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor, @@ -660,7 +695,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OriginalRequest", "RequestTime", "FinishTime", }); internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_bigtable_admin_v2_CreateBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor, @@ -668,7 +703,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "BackupId", "Backup", }); internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_bigtable_admin_v2_CreateBackupMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor, @@ -676,7 +711,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SourceTable", "StartTime", "EndTime", }); internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_bigtable_admin_v2_UpdateBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor, @@ -684,7 +719,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Backup", "UpdateMask", }); internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_bigtable_admin_v2_GetBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor, @@ -692,7 +727,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_bigtable_admin_v2_DeleteBackupRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor, @@ -700,7 +735,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(31); internal_static_google_bigtable_admin_v2_ListBackupsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor, @@ -708,7 +743,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "OrderBy", "PageSize", "PageToken", }); internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(32); internal_static_google_bigtable_admin_v2_ListBackupsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor, diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java index f2b472ad5d..000ecfa098 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CheckConsistencyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - consistencyToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyRequest_descriptor; @@ -248,7 +195,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consistencyToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +210,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consistencyToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -281,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getConsistencyToken().equals(other.getConsistencyToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -296,7 +243,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + CONSISTENCY_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getConsistencyToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -426,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CheckConsistencyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -533,7 +473,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CheckConsistencyRequest ot consistencyToken_ = other.consistencyToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,18 +488,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CheckConsistencyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + consistencyToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CheckConsistencyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -827,7 +792,18 @@ public CheckConsistencyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CheckConsistencyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java index 889537e892..1a074ebc66 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CheckConsistencyResponse.java @@ -51,50 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CheckConsistencyResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - consistent_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CheckConsistencyResponse_descriptor; @@ -146,7 +102,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (consistent_ != false) { output.writeBool(1, consistent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -158,7 +114,7 @@ public int getSerializedSize() { if (consistent_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, consistent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -175,7 +131,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.CheckConsistencyResponse) obj; if (getConsistent() != other.getConsistent()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -188,7 +144,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CONSISTENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getConsistent()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -319,17 +275,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CheckConsistencyResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -418,7 +367,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CheckConsistencyResponse o if (other.getConsistent() != false) { setConsistent(other.getConsistent()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -433,18 +382,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CheckConsistencyResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + consistent_ = input.readBool(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CheckConsistencyResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -535,7 +503,18 @@ public CheckConsistencyResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CheckConsistencyResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java index 47788cac38..f4f95f51a8 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Cluster.java @@ -57,113 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Cluster( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 32: - { - serveNodes_ = input.readInt32(); - break; - } - case 40: - { - int rawValue = input.readEnum(); - - defaultStorageType_ = rawValue; - break; - } - case 50: - { - com.google.bigtable.admin.v2.Cluster.EncryptionConfig.Builder subBuilder = null; - if (encryptionConfig_ != null) { - subBuilder = encryptionConfig_.toBuilder(); - } - encryptionConfig_ = - input.readMessage( - com.google.bigtable.admin.v2.Cluster.EncryptionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(encryptionConfig_); - encryptionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.bigtable.admin.v2.Cluster.ClusterConfig.Builder subBuilder = null; - if (configCase_ == 7) { - subBuilder = - ((com.google.bigtable.admin.v2.Cluster.ClusterConfig) config_).toBuilder(); - } - config_ = - input.readMessage( - com.google.bigtable.admin.v2.Cluster.ClusterConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.Cluster.ClusterConfig) config_); - config_ = subBuilder.buildPartial(); - } - configCase_ = 7; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_descriptor; @@ -513,78 +406,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ClusterAutoscalingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.AutoscalingLimits.Builder subBuilder = null; - if (autoscalingLimits_ != null) { - subBuilder = autoscalingLimits_.toBuilder(); - } - autoscalingLimits_ = - input.readMessage( - com.google.bigtable.admin.v2.AutoscalingLimits.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalingLimits_); - autoscalingLimits_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.bigtable.admin.v2.AutoscalingTargets.Builder subBuilder = null; - if (autoscalingTargets_ != null) { - subBuilder = autoscalingTargets_.toBuilder(); - } - autoscalingTargets_ = - input.readMessage( - com.google.bigtable.admin.v2.AutoscalingTargets.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalingTargets_); - autoscalingTargets_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterAutoscalingConfig_descriptor; @@ -729,7 +550,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoscalingTargets_ != null) { output.writeMessage(2, getAutoscalingTargets()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -745,7 +566,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutoscalingTargets()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -769,7 +590,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAutoscalingTargets()) { if (!getAutoscalingTargets().equals(other.getAutoscalingTargets())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -788,7 +609,7 @@ public int hashCode() { hash = (37 * hash) + AUTOSCALING_TARGETS_FIELD_NUMBER; hash = (53 * hash) + getAutoscalingTargets().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -920,17 +741,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1046,7 +860,7 @@ public Builder mergeFrom( if (other.hasAutoscalingTargets()) { mergeAutoscalingTargets(other.getAutoscalingTargets()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1061,19 +875,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getAutoscalingLimitsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getAutoscalingTargetsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1524,7 +1364,19 @@ public ClusterAutoscalingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterAutoscalingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1623,63 +1475,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ClusterConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.Builder subBuilder = - null; - if (clusterAutoscalingConfig_ != null) { - subBuilder = clusterAutoscalingConfig_.toBuilder(); - } - clusterAutoscalingConfig_ = - input.readMessage( - com.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(clusterAutoscalingConfig_); - clusterAutoscalingConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_ClusterConfig_descriptor; @@ -1768,7 +1563,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (clusterAutoscalingConfig_ != null) { output.writeMessage(1, getClusterAutoscalingConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1782,7 +1577,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, getClusterAutoscalingConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1803,7 +1598,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClusterAutoscalingConfig().equals(other.getClusterAutoscalingConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1818,7 +1613,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_AUTOSCALING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getClusterAutoscalingConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1949,17 +1744,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Cluster.ClusterConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2058,7 +1846,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster.ClusterConfig othe if (other.hasClusterAutoscalingConfig()) { mergeClusterAutoscalingConfig(other.getClusterAutoscalingConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2073,18 +1861,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Cluster.ClusterConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getClusterAutoscalingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.Cluster.ClusterConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2332,7 +2140,19 @@ public ClusterConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2434,52 +2254,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EncryptionConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKeyName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Cluster_EncryptionConfig_descriptor; @@ -2579,7 +2353,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2591,7 +2365,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2608,7 +2382,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.Cluster.EncryptionConfig) obj; if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2621,7 +2395,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; hash = (53 * hash) + getKmsKeyName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2754,17 +2528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Cluster.EncryptionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2856,7 +2623,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster.EncryptionConfig o kmsKeyName_ = other.kmsKeyName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2871,18 +2638,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Cluster.EncryptionConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + kmsKeyName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.Cluster.EncryptionConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3070,7 +2856,19 @@ public EncryptionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EncryptionConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3486,7 +3284,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (configCase_ == 7) { output.writeMessage(7, (com.google.bigtable.admin.v2.Cluster.ClusterConfig) config_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3519,7 +3317,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.bigtable.admin.v2.Cluster.ClusterConfig) config_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3551,7 +3349,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3584,7 +3382,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3714,17 +3512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Cluster.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3738,6 +3529,9 @@ public Builder clear() { serveNodes_ = 0; + if (clusterConfigBuilder_ != null) { + clusterConfigBuilder_.clear(); + } defaultStorageType_ = 0; if (encryptionConfigBuilder_ == null) { @@ -3872,7 +3666,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Cluster other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3887,17 +3681,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Cluster parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + + break; + } // case 24 + case 32: + { + serveNodes_ = input.readInt32(); + + break; + } // case 32 + case 40: + { + defaultStorageType_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + input.readMessage( + getEncryptionConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getClusterConfigFieldBuilder().getBuilder(), extensionRegistry); + configCase_ = 7; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.Cluster) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4869,7 +4720,18 @@ public Cluster parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Cluster(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java index 435652a733..5735bb824b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ColumnFamily.java @@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ColumnFamily( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.GcRule.Builder subBuilder = null; - if (gcRule_ != null) { - subBuilder = gcRule_.toBuilder(); - } - gcRule_ = - input.readMessage( - com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcRule_); - gcRule_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_ColumnFamily_descriptor; @@ -195,7 +140,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (gcRule_ != null) { output.writeMessage(1, getGcRule()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +152,7 @@ public int getSerializedSize() { if (gcRule_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcRule()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGcRule()) { if (!getGcRule().equals(other.getGcRule())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +187,7 @@ public int hashCode() { hash = (37 * hash) + GC_RULE_FIELD_NUMBER; hash = (53 * hash) + getGcRule().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -371,17 +316,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ColumnFamily.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -477,7 +415,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ColumnFamily other) { if (other.hasGcRule()) { mergeGcRule(other.getGcRule()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -492,17 +430,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ColumnFamily parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getGcRuleFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.ColumnFamily) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -755,7 +713,18 @@ public ColumnFamily parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ColumnFamily(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java index f1e5f2b8c1..631369711d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAppProfileRequest.java @@ -53,80 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateAppProfileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - case 26: - { - com.google.bigtable.admin.v2.AppProfile.Builder subBuilder = null; - if (appProfile_ != null) { - subBuilder = appProfile_.toBuilder(); - } - appProfile_ = - input.readMessage( - com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(appProfile_); - appProfile_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - ignoreWarnings_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateAppProfileRequest_descriptor; @@ -353,7 +279,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ignoreWarnings_ != false) { output.writeBool(4, ignoreWarnings_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -374,7 +300,7 @@ public int getSerializedSize() { if (ignoreWarnings_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, ignoreWarnings_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -397,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppProfile().equals(other.getAppProfile())) return false; } if (getIgnoreWarnings() != other.getIgnoreWarnings()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -418,7 +344,7 @@ public int hashCode() { } hash = (37 * hash) + IGNORE_WARNINGS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreWarnings()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -547,17 +473,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateAppProfileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -674,7 +593,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateAppProfileRequest ot if (other.getIgnoreWarnings() != false) { setIgnoreWarnings(other.getIgnoreWarnings()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -689,18 +608,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateAppProfileRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getAppProfileFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + ignoreWarnings_ = input.readBool(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateAppProfileRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1242,7 +1198,18 @@ public CreateAppProfileRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateAppProfileRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java index 36299f11e2..457f33ef61 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupMetadata.java @@ -54,89 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateBackupMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceTable_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupMetadata_descriptor; @@ -368,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(4, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -389,7 +306,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -415,7 +332,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -438,7 +355,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -568,17 +485,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateBackupMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -703,7 +613,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateBackupMetadata other if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -718,18 +628,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateBackupMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + sourceTable_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateBackupMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1335,7 +1282,18 @@ public CreateBackupMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateBackupMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java index 7bf7bd2419..a897824bcd 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateBackupRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateBackupRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - backupId_ = s; - break; - } - case 26: - { - com.google.bigtable.admin.v2.Backup.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = - input.readMessage( - com.google.bigtable.admin.v2.Backup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateBackupRequest_descriptor; @@ -325,7 +256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backup_ != null) { output.writeMessage(3, getBackup()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -343,7 +274,7 @@ public int getSerializedSize() { if (backup_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBackup()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -365,7 +296,7 @@ public boolean equals(final java.lang.Object obj) { if (hasBackup()) { if (!getBackup().equals(other.getBackup())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -384,7 +315,7 @@ public int hashCode() { hash = (37 * hash) + BACKUP_FIELD_NUMBER; hash = (53 * hash) + getBackup().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateBackupRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateBackupRequest other) if (other.hasBackup()) { mergeBackup(other.getBackup()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -649,17 +573,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateBackupRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + backupId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.CreateBackupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1142,7 +1098,18 @@ public CreateBackupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateBackupRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java index a0e0c63691..13c30f5d4a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterMetadata.java @@ -50,110 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateClusterMetadata( - 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; - case 10: - { - com.google.bigtable.admin.v2.CreateClusterRequest.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.CreateClusterRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - tables_ = - com.google.protobuf.MapField.newMapField(TablesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress> - tables__ = - input.readMessage( - TablesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - tables_.getMutableMap().put(tables__.getKey(), tables__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_descriptor; @@ -260,62 +156,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TableProgress( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 16: - { - estimatedSizeBytes_ = input.readInt64(); - break; - } - case 24: - { - estimatedCopiedBytes_ = input.readInt64(); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterMetadata_TableProgress_descriptor; @@ -604,7 +444,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, state_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -625,7 +465,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -644,7 +484,7 @@ public boolean equals(final java.lang.Object obj) { if (getEstimatedSizeBytes() != other.getEstimatedSizeBytes()) return false; if (getEstimatedCopiedBytes() != other.getEstimatedCopiedBytes()) return false; if (state_ != other.state_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -661,7 +501,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEstimatedCopiedBytes()); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -795,17 +635,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -913,7 +746,7 @@ public Builder mergeFrom( if (other.state_ != 0) { setStateValue(other.getStateValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -928,19 +761,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + estimatedSizeBytes_ = input.readInt64(); + + break; + } // case 16 + case 24: + { + estimatedCopiedBytes_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + state_ = input.readEnum(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1153,7 +1016,19 @@ public TableProgress parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TableProgress(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1489,7 +1364,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTables(), TablesDefaultEntryHolder.defaultEntry, 4); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1520,7 +1395,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, tables__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1549,7 +1424,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFinishTime().equals(other.getFinishTime())) return false; } if (!internalGetTables().equals(other.internalGetTables())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1576,7 +1451,7 @@ public int hashCode() { hash = (37 * hash) + TABLES_FIELD_NUMBER; hash = (53 * hash) + internalGetTables().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1725,17 +1600,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.bigtable.admin.v2.CreateClusterMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1865,7 +1733,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateClusterMetadata othe mergeFinishTime(other.getFinishTime()); } internalGetMutableTables().mergeFrom(other.internalGetTables()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1880,18 +1748,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateClusterMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.bigtable.admin.v2.CreateClusterMetadata.TableProgress> + tables__ = + input.readMessage( + TablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableTables() + .getMutableMap() + .put(tables__.getKey(), tables__.getValue()); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateClusterMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2720,7 +2633,18 @@ public CreateClusterMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateClusterMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java index 47e620f52d..f6666ab297 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateClusterRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateClusterRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterId_ = s; - break; - } - case 26: - { - com.google.bigtable.admin.v2.Cluster.Builder subBuilder = null; - if (cluster_ != null) { - subBuilder = cluster_.toBuilder(); - } - cluster_ = - input.readMessage( - com.google.bigtable.admin.v2.Cluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cluster_); - cluster_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateClusterRequest_descriptor; @@ -322,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cluster_ != null) { output.writeMessage(3, getCluster()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +271,7 @@ public int getSerializedSize() { if (cluster_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCluster()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +293,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCluster()) { if (!getCluster().equals(other.getCluster())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +312,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getCluster().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateClusterRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -631,7 +555,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateClusterRequest other if (other.hasCluster()) { mergeCluster(other.getCluster()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +570,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateClusterRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + clusterId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1147,7 +1102,18 @@ public CreateClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java index 139cc8e730..75394c9779 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceMetadata.java @@ -50,92 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateInstanceMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.CreateInstanceRequest.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.CreateInstanceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceMetadata_descriptor; @@ -314,7 +228,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (finishTime_ != null) { output.writeMessage(3, getFinishTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -332,7 +246,7 @@ public int getSerializedSize() { if (finishTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinishTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +274,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFinishTime()) { if (!getFinishTime().equals(other.getFinishTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +297,7 @@ public int hashCode() { hash = (37 * hash) + FINISH_TIME_FIELD_NUMBER; hash = (53 * hash) + getFinishTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +426,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateInstanceMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,7 +554,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateInstanceMetadata oth if (other.hasFinishTime()) { mergeFinishTime(other.getFinishTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,18 +569,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateInstanceMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateInstanceMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1264,7 +1202,18 @@ public CreateInstanceMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstanceMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java index 6cb701b30b..0b74c6577f 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateInstanceRequest.java @@ -53,92 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateInstanceRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceId_ = s; - break; - } - case 26: - { - com.google.bigtable.admin.v2.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = - input.readMessage( - com.google.bigtable.admin.v2.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clusters_ = - com.google.protobuf.MapField.newMapField( - ClustersDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - clusters__ = - input.readMessage( - ClustersDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - clusters_.getMutableMap().put(clusters__.getKey(), clusters__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_CreateInstanceRequest_descriptor; @@ -485,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetClusters(), ClustersDefaultEntryHolder.defaultEntry, 4); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -514,7 +428,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, clusters__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -537,7 +451,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstance().equals(other.getInstance())) return false; } if (!internalGetClusters().equals(other.internalGetClusters())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -560,7 +474,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTERS_FIELD_NUMBER; hash = (53 * hash) + internalGetClusters().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -709,17 +623,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.bigtable.admin.v2.CreateInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -835,7 +742,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateInstanceRequest othe mergeInstance(other.getInstance()); } internalGetMutableClusters().mergeFrom(other.internalGetClusters()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -850,18 +757,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateInstanceRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + instanceId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry + clusters__ = + input.readMessage( + ClustersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableClusters() + .getMutableMap() + .put(clusters__.getKey(), clusters__.getValue()); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1555,7 +1505,18 @@ public CreateInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstanceRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java index 60b0455b94..cb326cf4ce 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotMetadata.java @@ -55,92 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTableFromSnapshotMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotMetadata_descriptor; @@ -323,7 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (finishTime_ != null) { output.writeMessage(3, getFinishTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -341,7 +255,7 @@ public int getSerializedSize() { if (finishTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinishTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -369,7 +283,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFinishTime()) { if (!getFinishTime().equals(other.getFinishTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -392,7 +306,7 @@ public int hashCode() { hash = (37 * hash) + FINISH_TIME_FIELD_NUMBER; hash = (53 * hash) + getFinishTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -526,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -663,7 +570,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableFromSnapshotMet if (other.hasFinishTime()) { mergeFinishTime(other.getFinishTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -678,18 +585,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1294,7 +1232,18 @@ public CreateTableFromSnapshotMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTableFromSnapshotMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java index 90744b58f4..392837847b 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableFromSnapshotRequest.java @@ -60,66 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTableFromSnapshotRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceSnapshot_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableFromSnapshotRequest_descriptor; @@ -323,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceSnapshot_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceSnapshot_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -341,7 +281,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceSnapshot_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceSnapshot_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getTableId().equals(other.getTableId())) return false; if (!getSourceSnapshot().equals(other.getSourceSnapshot())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +317,7 @@ public int hashCode() { hash = (53 * hash) + getTableId().hashCode(); hash = (37 * hash) + SOURCE_SNAPSHOT_FIELD_NUMBER; hash = (53 * hash) + getSourceSnapshot().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +452,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -626,7 +559,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableFromSnapshotReq sourceSnapshot_ = other.sourceSnapshot_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -641,18 +574,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + sourceSnapshot_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1051,7 +1015,18 @@ public CreateTableFromSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTableFromSnapshotRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java index 75d14e80fb..f5d6c6f995 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateTableRequest.java @@ -55,92 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTableRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 26: - { - com.google.bigtable.admin.v2.Table.Builder subBuilder = null; - if (table_ != null) { - subBuilder = table_.toBuilder(); - } - table_ = - input.readMessage(com.google.bigtable.admin.v2.Table.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(table_); - table_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - initialSplits_ = - new java.util.ArrayList< - com.google.bigtable.admin.v2.CreateTableRequest.Split>(); - mutable_bitField0_ |= 0x00000001; - } - initialSplits_.add( - input.readMessage( - com.google.bigtable.admin.v2.CreateTableRequest.Split.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - initialSplits_ = java.util.Collections.unmodifiableList(initialSplits_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_descriptor; @@ -208,50 +122,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Split( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - key_ = input.readBytes(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_CreateTableRequest_Split_descriptor; @@ -302,7 +172,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!key_.isEmpty()) { output.writeBytes(1, key_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -314,7 +184,7 @@ public int getSerializedSize() { if (!key_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, key_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +201,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.CreateTableRequest.Split) obj; if (!getKey().equals(other.getKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -344,7 +214,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,17 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateTableRequest.Split.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -577,7 +440,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest.Split o if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { setKey(other.getKey()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,18 +455,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateTableRequest.Split parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readBytes(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.CreateTableRequest.Split) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -695,7 +577,19 @@ public Split parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Split(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1033,7 +927,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < initialSplits_.size(); i++) { output.writeMessage(4, initialSplits_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1054,7 +948,7 @@ public int getSerializedSize() { for (int i = 0; i < initialSplits_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, initialSplits_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1077,7 +971,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTable().equals(other.getTable())) return false; } if (!getInitialSplitsList().equals(other.getInitialSplitsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1100,7 +994,7 @@ public int hashCode() { hash = (37 * hash) + INITIAL_SPLITS_FIELD_NUMBER; hash = (53 * hash) + getInitialSplitsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1230,19 +1124,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.CreateTableRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInitialSplitsFieldBuilder(); - } } @java.lang.Override @@ -1260,10 +1145,11 @@ public Builder clear() { } if (initialSplitsBuilder_ == null) { initialSplits_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + initialSplits_ = null; initialSplitsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1396,7 +1282,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.CreateTableRequest other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1411,17 +1297,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.CreateTableRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTableFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + com.google.bigtable.admin.v2.CreateTableRequest.Split m = + input.readMessage( + com.google.bigtable.admin.v2.CreateTableRequest.Split.parser(), + extensionRegistry); + if (initialSplitsBuilder_ == null) { + ensureInitialSplitsIsMutable(); + initialSplits_.add(m); + } else { + initialSplitsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.CreateTableRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2481,7 +2413,18 @@ public CreateTableRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTableRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java index b1296c96bf..4a85712a9f 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAppProfileRequest.java @@ -52,57 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAppProfileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - ignoreWarnings_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteAppProfileRequest_descriptor; @@ -211,7 +160,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ignoreWarnings_ != false) { output.writeBool(2, ignoreWarnings_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -226,7 +175,7 @@ public int getSerializedSize() { if (ignoreWarnings_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, ignoreWarnings_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -244,7 +193,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (getIgnoreWarnings() != other.getIgnoreWarnings()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -259,7 +208,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + IGNORE_WARNINGS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreWarnings()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -388,17 +337,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DeleteAppProfileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -494,7 +436,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteAppProfileRequest ot if (other.getIgnoreWarnings() != false) { setIgnoreWarnings(other.getIgnoreWarnings()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -509,18 +451,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DeleteAppProfileRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + ignoreWarnings_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.DeleteAppProfileRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -729,7 +696,18 @@ public DeleteAppProfileRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAppProfileRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java index 07552be8bc..332e0ce5a6 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteBackupRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteBackupRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteBackupRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.DeleteBackupRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DeleteBackupRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -458,7 +405,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteBackupRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,17 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DeleteBackupRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.DeleteBackupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -645,7 +612,18 @@ public DeleteBackupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBackupRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java index 73720e7c2a..35c1a6a376 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteClusterRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteClusterRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteClusterRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.DeleteClusterRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DeleteClusterRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteClusterRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DeleteClusterRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.DeleteClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public DeleteClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java index 0f24a15344..b3b6da08f2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteInstanceRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_DeleteInstanceRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.DeleteInstanceRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DeleteInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteInstanceRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DeleteInstanceRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.DeleteInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public DeleteInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java index e2eb44e36a..3f05f058f5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteSnapshotRequest.java @@ -57,52 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSnapshotRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteSnapshotRequest_descriptor; @@ -192,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -204,7 +158,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +175,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.DeleteSnapshotRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -234,7 +188,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -368,17 +322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DeleteSnapshotRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -468,7 +415,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteSnapshotRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -483,18 +430,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DeleteSnapshotRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.DeleteSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -656,7 +622,18 @@ public DeleteSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSnapshotRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java index 950c087a19..84a58dbf6a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteTableRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTableRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DeleteTableRequest_descriptor; @@ -188,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -200,7 +154,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -217,7 +171,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.DeleteTableRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +184,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DeleteTableRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DeleteTableRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DeleteTableRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.DeleteTableRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -647,7 +614,18 @@ public DeleteTableRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTableRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java index 03e8fb9312..4239f2d91d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DropRowRangeRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DropRowRangeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - target_ = input.readBytes(); - targetCase_ = 2; - break; - } - case 24: - { - target_ = input.readBool(); - targetCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_DropRowRangeRequest_descriptor; @@ -325,7 +267,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetCase_ == 3) { output.writeBool(3, (boolean) ((java.lang.Boolean) target_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -347,7 +289,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 3, (boolean) ((java.lang.Boolean) target_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -375,7 +317,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +342,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +472,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.DropRowRangeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -655,7 +590,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.DropRowRangeRequest other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,17 +605,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.DropRowRangeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + target_ = input.readBytes(); + targetCase_ = 2; + break; + } // case 18 + case 24: + { + target_ = input.readBool(); + targetCase_ = 3; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.DropRowRangeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1001,7 +968,18 @@ public DropRowRangeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DropRowRangeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java index 8f60903049..d85b829aaa 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/EncryptionInfo.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EncryptionInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - kmsKeyVersion_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - encryptionType_ = rawValue; - break; - } - case 34: - { - com.google.rpc.Status.Builder subBuilder = null; - if (encryptionStatus_ != null) { - subBuilder = encryptionStatus_.toBuilder(); - } - encryptionStatus_ = - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(encryptionStatus_); - encryptionStatus_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_EncryptionInfo_descriptor; @@ -488,7 +420,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (encryptionStatus_ != null) { output.writeMessage(4, getEncryptionStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -508,7 +440,7 @@ public int getSerializedSize() { if (encryptionStatus_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEncryptionStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -530,7 +462,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEncryptionStatus().equals(other.getEncryptionStatus())) return false; } if (!getKmsKeyVersion().equals(other.getKmsKeyVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -549,7 +481,7 @@ public int hashCode() { } hash = (37 * hash) + KMS_KEY_VERSION_FIELD_NUMBER; hash = (53 * hash) + getKmsKeyVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -681,17 +613,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.EncryptionInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -800,7 +725,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.EncryptionInfo other) { kmsKeyVersion_ = other.kmsKeyVersion_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -815,17 +740,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.EncryptionInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + kmsKeyVersion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + encryptionType_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + input.readMessage( + getEncryptionStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.EncryptionInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1283,7 +1241,18 @@ public EncryptionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EncryptionInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java index b831ff99e4..5a3866c1bf 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GcRule.java @@ -50,97 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - rule_ = input.readInt32(); - ruleCase_ = 1; - break; - } - case 18: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (ruleCase_ == 2) { - subBuilder = ((com.google.protobuf.Duration) rule_).toBuilder(); - } - rule_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Duration) rule_); - rule_ = subBuilder.buildPartial(); - } - ruleCase_ = 2; - break; - } - case 26: - { - com.google.bigtable.admin.v2.GcRule.Intersection.Builder subBuilder = null; - if (ruleCase_ == 3) { - subBuilder = ((com.google.bigtable.admin.v2.GcRule.Intersection) rule_).toBuilder(); - } - rule_ = - input.readMessage( - com.google.bigtable.admin.v2.GcRule.Intersection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.GcRule.Intersection) rule_); - rule_ = subBuilder.buildPartial(); - } - ruleCase_ = 3; - break; - } - case 34: - { - com.google.bigtable.admin.v2.GcRule.Union.Builder subBuilder = null; - if (ruleCase_ == 4) { - subBuilder = ((com.google.bigtable.admin.v2.GcRule.Union) rule_).toBuilder(); - } - rule_ = - input.readMessage( - com.google.bigtable.admin.v2.GcRule.Union.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.GcRule.Union) rule_); - rule_ = subBuilder.buildPartial(); - } - ruleCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_descriptor; @@ -246,60 +155,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Intersection( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add( - input.readMessage( - com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Intersection_descriptor; @@ -401,7 +256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(1, rules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -413,7 +268,7 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -430,7 +285,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GcRule.Intersection) obj; if (!getRulesList().equals(other.getRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +300,7 @@ public int hashCode() { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -576,19 +431,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GcRule.Intersection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -596,10 +442,11 @@ public Builder clear() { super.clear(); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -716,7 +563,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule.Intersection other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -731,18 +578,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GcRule.Intersection parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.GcRule m = + input.readMessage( + com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.GcRule.Intersection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1129,7 +1002,19 @@ public Intersection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Intersection(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1238,60 +1123,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Union( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add( - input.readMessage( - com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_GcRule_Union_descriptor; @@ -1393,7 +1224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(1, rules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1405,7 +1236,7 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1422,7 +1253,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GcRule.Union) obj; if (!getRulesList().equals(other.getRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1437,7 +1268,7 @@ public int hashCode() { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1568,19 +1399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GcRule.Union.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -1588,10 +1410,11 @@ public Builder clear() { super.clear(); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1707,7 +1530,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule.Union other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1722,17 +1545,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GcRule.Union parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.GcRule m = + input.readMessage( + com.google.bigtable.admin.v2.GcRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GcRule.Union) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2119,7 +1969,19 @@ public Union parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Union(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2411,7 +2273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ruleCase_ == 4) { output.writeMessage(4, (com.google.bigtable.admin.v2.GcRule.Union) rule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2440,7 +2302,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.bigtable.admin.v2.GcRule.Union) rule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2472,7 +2334,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2503,7 +2365,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2631,22 +2493,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GcRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (maxAgeBuilder_ != null) { + maxAgeBuilder_.clear(); + } + if (intersectionBuilder_ != null) { + intersectionBuilder_.clear(); + } + if (unionBuilder_ != null) { + unionBuilder_.clear(); + } ruleCase_ = 0; rule_ = null; return this; @@ -2775,7 +2639,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GcRule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2790,17 +2654,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GcRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + rule_ = input.readInt32(); + ruleCase_ = 1; + break; + } // case 8 + case 18: + { + input.readMessage(getMaxAgeFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getIntersectionFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getUnionFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GcRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3561,7 +3463,18 @@ public GcRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java index 0fdca334db..15ae710e62 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateConsistencyTokenRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenRequest_descriptor; @@ -189,7 +143,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +155,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -231,7 +185,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -362,17 +316,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +411,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GenerateConsistencyTokenRe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,18 +426,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -653,7 +619,18 @@ public GenerateConsistencyTokenRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateConsistencyTokenRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java index 7445650df5..df2c9b5536 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GenerateConsistencyTokenResponse.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GenerateConsistencyTokenResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - consistencyToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GenerateConsistencyTokenResponse_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, consistencyToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, consistencyToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse) obj; if (!getConsistencyToken().equals(other.getConsistencyToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CONSISTENCY_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getConsistencyToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GenerateConsistencyTokenRe consistencyToken_ = other.consistencyToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,19 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + consistencyToken_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +591,18 @@ public GenerateConsistencyTokenResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GenerateConsistencyTokenResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java index cd2a40b571..82a6c7fcb5 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAppProfileRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAppProfileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetAppProfileRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GetAppProfileRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GetAppProfileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GetAppProfileRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GetAppProfileRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.GetAppProfileRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public GetAppProfileRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAppProfileRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java index c5c8ed2e0d..54165afb87 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetBackupRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetBackupRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetBackupRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GetBackupRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GetBackupRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GetBackupRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,17 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GetBackupRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GetBackupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +611,18 @@ public GetBackupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBackupRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java index 67b9f1112f..6b80a8e4f9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetClusterRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetClusterRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetClusterRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GetClusterRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GetClusterRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GetClusterRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GetClusterRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GetClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java index a56669f3b9..61a4318c22 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetInstanceRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_GetInstanceRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GetInstanceRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GetInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GetInstanceRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GetInstanceRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -638,7 +605,18 @@ public GetInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java index e3917838f7..831faeac60 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetSnapshotRequest.java @@ -57,52 +57,6 @@ 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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetSnapshotRequest_descriptor; @@ -192,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -204,7 +158,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +175,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.GetSnapshotRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -234,7 +188,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -368,17 +322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GetSnapshotRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -468,7 +415,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GetSnapshotRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -483,17 +430,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GetSnapshotRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GetSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -655,7 +622,18 @@ public GetSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSnapshotRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java index e4cb3954ad..3c2bdabb55 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetTableRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTableRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - view_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_GetTableRequest_descriptor; @@ -237,7 +184,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (view_ != com.google.bigtable.admin.v2.Table.View.VIEW_UNSPECIFIED.getNumber()) { output.writeEnum(2, view_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -252,7 +199,7 @@ public int getSerializedSize() { if (view_ != com.google.bigtable.admin.v2.Table.View.VIEW_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -270,7 +217,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (view_ != other.view_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -285,7 +232,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VIEW_FIELD_NUMBER; hash = (53 * hash) + view_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -415,17 +362,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.GetTableRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -520,7 +460,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.GetTableRequest other) { if (other.view_ != 0) { setViewValue(other.getViewValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -535,17 +475,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.GetTableRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.GetTableRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -803,7 +769,18 @@ public GetTableRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTableRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java index e4ee556792..c8c8349c61 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/HotTablet.java @@ -59,108 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HotTablet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - startKey_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - endKey_ = s; - break; - } - case 61: - { - nodeCpuUsagePercent_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_HotTablet_descriptor; @@ -530,7 +428,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Float.floatToRawIntBits(nodeCpuUsagePercent_) != 0) { output.writeFloat(7, nodeCpuUsagePercent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -560,7 +458,7 @@ public int getSerializedSize() { if (java.lang.Float.floatToRawIntBits(nodeCpuUsagePercent_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, nodeCpuUsagePercent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -589,7 +487,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEndKey().equals(other.getEndKey())) return false; if (java.lang.Float.floatToIntBits(getNodeCpuUsagePercent()) != java.lang.Float.floatToIntBits(other.getNodeCpuUsagePercent())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -618,7 +516,7 @@ public int hashCode() { hash = (53 * hash) + getEndKey().hashCode(); hash = (37 * hash) + NODE_CPU_USAGE_PERCENT_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getNodeCpuUsagePercent()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -751,17 +649,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.HotTablet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -905,7 +796,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.HotTablet other) { if (other.getNodeCpuUsagePercent() != 0F) { setNodeCpuUsagePercent(other.getNodeCpuUsagePercent()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -920,17 +811,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.HotTablet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + startKey_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + endKey_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 61: + { + nodeCpuUsagePercent_ = input.readFloat(); + + break; + } // case 61 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.HotTablet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1837,7 +1784,18 @@ public HotTablet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HotTablet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java index bc9b0a7416..67b76dd0c7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Instance.java @@ -58,102 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Instance( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.InstanceProto .internal_static_google_bigtable_admin_v2_Instance_descriptor; @@ -506,6 +410,7 @@ private Type(int value) { // @@protoc_insertion_point(enum_scope:google.bigtable.admin.v2.Instance.Type) } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -873,6 +778,39 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } + public static final int SATISFIES_PZS_FIELD_NUMBER = 8; + private boolean satisfiesPzs_; + /** + * + * + *
    +   * Output only. Reserved for future use.
    +   * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
    +   * Output only. Reserved for future use.
    +   * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -904,7 +842,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createTime_ != null) { output.writeMessage(7, getCreateTime()); } - unknownFields.writeTo(output); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(8, satisfiesPzs_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -938,7 +879,10 @@ public int getSerializedSize() { if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); } - size += unknownFields.getSerializedSize(); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, satisfiesPzs_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -962,7 +906,11 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (hasSatisfiesPzs() != other.hasSatisfiesPzs()) return false; + if (hasSatisfiesPzs()) { + if (getSatisfiesPzs() != other.getSatisfiesPzs()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -989,7 +937,11 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + if (hasSatisfiesPzs()) { + hash = (37 * hash) + SATISFIES_PZS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSatisfiesPzs()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1140,17 +1092,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.bigtable.admin.v2.Instance.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1171,6 +1116,8 @@ public Builder clear() { createTime_ = null; createTimeBuilder_ = null; } + satisfiesPzs_ = false; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1199,6 +1146,7 @@ public com.google.bigtable.admin.v2.Instance buildPartial() { com.google.bigtable.admin.v2.Instance result = new com.google.bigtable.admin.v2.Instance(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.name_ = name_; result.displayName_ = displayName_; result.state_ = state_; @@ -1210,6 +1158,11 @@ public com.google.bigtable.admin.v2.Instance buildPartial() { } else { result.createTime_ = createTimeBuilder_.build(); } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.satisfiesPzs_ = satisfiesPzs_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -1277,7 +1230,10 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Instance other) { if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } - this.mergeUnknownFields(other.unknownFields); + if (other.hasSatisfiesPzs()) { + setSatisfiesPzs(other.getSatisfiesPzs()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1292,17 +1248,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Instance parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + + break; + } // case 24 + case 32: + { + type_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 42 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 64: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.Instance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2162,6 +2179,73 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } + private boolean satisfiesPzs_; + /** + * + * + *
    +     * Output only. Reserved for future use.
    +     * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzs field is set. + */ + @java.lang.Override + public boolean hasSatisfiesPzs() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
    +     * Output only. Reserved for future use.
    +     * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + @java.lang.Override + public boolean getSatisfiesPzs() { + return satisfiesPzs_; + } + /** + * + * + *
    +     * Output only. Reserved for future use.
    +     * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The satisfiesPzs to set. + * @return This builder for chaining. + */ + public Builder setSatisfiesPzs(boolean value) { + bitField0_ |= 0x00000002; + satisfiesPzs_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Output only. Reserved for future use.
    +     * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSatisfiesPzs() { + bitField0_ = (bitField0_ & ~0x00000002); + satisfiesPzs_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -2194,7 +2278,18 @@ public Instance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Instance(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java index 8f094d8acf..103b7d8457 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceOrBuilder.java @@ -278,4 +278,29 @@ java.lang.String getLabelsOrDefault( *
    */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
    +   * Output only. Reserved for future use.
    +   * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the satisfiesPzs field is set. + */ + boolean hasSatisfiesPzs(); + /** + * + * + *
    +   * Output only. Reserved for future use.
    +   * 
    + * + * optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The satisfiesPzs. + */ + boolean getSatisfiesPzs(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java index d73caea850..2b73ddde21 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceProto.java @@ -89,80 +89,82 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "field_behavior.proto\032\031google/api/resourc" + "e.proto\032%google/bigtable/admin/v2/common" + ".proto\032\037google/protobuf/timestamp.proto\"" - + "\223\004\n\010Instance\022\014\n\004name\030\001 \001(\t\022\031\n\014display_na" + + "\306\004\n\010Instance\022\014\n\004name\030\001 \001(\t\022\031\n\014display_na" + "me\030\002 \001(\tB\003\340A\002\0227\n\005state\030\003 \001(\0162(.google.bi" + "gtable.admin.v2.Instance.State\0225\n\004type\030\004" + " \001(\0162\'.google.bigtable.admin.v2.Instance" + ".Type\022>\n\006labels\030\005 \003(\0132..google.bigtable." + "admin.v2.Instance.LabelsEntry\0224\n\013create_" + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"5\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000" - + "\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\"=\n\004Type\022\024\n\020TYP" - + "E_UNSPECIFIED\020\000\022\016\n\nPRODUCTION\020\001\022\017\n\013DEVEL" - + "OPMENT\020\002:S\352AP\n%bigtableadmin.googleapis." - + "com/Instance\022\'projects/{project}/instanc" - + "es/{instance}\"_\n\022AutoscalingTargets\022\037\n\027c" - + "pu_utilization_percent\030\002 \001(\005\022(\n storage_" - + "utilization_gib_per_node\030\003 \001(\005\"O\n\021Autosc" - + "alingLimits\022\034\n\017min_serve_nodes\030\001 \001(\005B\003\340A" - + "\002\022\034\n\017max_serve_nodes\030\002 \001(\005B\003\340A\002\"\321\007\n\007Clus" - + "ter\022\014\n\004name\030\001 \001(\t\022;\n\010location\030\002 \001(\tB)\340A\005" - + "\372A#\n!locations.googleapis.com/Location\022;" - + "\n\005state\030\003 \001(\0162\'.google.bigtable.admin.v2" - + ".Cluster.StateB\003\340A\003\022\023\n\013serve_nodes\030\004 \001(\005" - + "\022I\n\016cluster_config\030\007 \001(\0132/.google.bigtab" - + "le.admin.v2.Cluster.ClusterConfigH\000\022H\n\024d" - + "efault_storage_type\030\005 \001(\0162%.google.bigta" - + "ble.admin.v2.StorageTypeB\003\340A\005\022R\n\021encrypt" - + "ion_config\030\006 \001(\01322.google.bigtable.admin" - + ".v2.Cluster.EncryptionConfigB\003\340A\005\032\270\001\n\030Cl" - + "usterAutoscalingConfig\022L\n\022autoscaling_li" - + "mits\030\001 \001(\0132+.google.bigtable.admin.v2.Au" - + "toscalingLimitsB\003\340A\002\022N\n\023autoscaling_targ" - + "ets\030\002 \001(\0132,.google.bigtable.admin.v2.Aut" - + "oscalingTargetsB\003\340A\002\032o\n\rClusterConfig\022^\n" - + "\032cluster_autoscaling_config\030\001 \001(\0132:.goog" - + "le.bigtable.admin.v2.Cluster.ClusterAuto" - + "scalingConfig\032P\n\020EncryptionConfig\022<\n\014kms" - + "_key_name\030\001 \001(\tB&\372A#\n!cloudkms.googleapi" - + "s.com/CryptoKey\"Q\n\005State\022\023\n\017STATE_NOT_KN" - + "OWN\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002\022\014\n\010RESIZI" - + "NG\020\003\022\014\n\010DISABLED\020\004:e\352Ab\n$bigtableadmin.g" - + "oogleapis.com/Cluster\022:projects/{project" - + "}/instances/{instance}/clusters/{cluster" - + "}B\010\n\006config\"\210\004\n\nAppProfile\022\014\n\004name\030\001 \001(\t" - + "\022\014\n\004etag\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022g\n\035m" - + "ulti_cluster_routing_use_any\030\005 \001(\0132>.goo" - + "gle.bigtable.admin.v2.AppProfile.MultiCl" - + "usterRoutingUseAnyH\000\022[\n\026single_cluster_r" - + "outing\030\006 \001(\01329.google.bigtable.admin.v2." - + "AppProfile.SingleClusterRoutingH\000\0320\n\031Mul" - + "tiClusterRoutingUseAny\022\023\n\013cluster_ids\030\001 " - + "\003(\t\032N\n\024SingleClusterRouting\022\022\n\ncluster_i" - + "d\030\001 \001(\t\022\"\n\032allow_transactional_writes\030\002 " - + "\001(\010:o\352Al\n\'bigtableadmin.googleapis.com/A" - + "ppProfile\022Aprojects/{project}/instances/" - + "{instance}/appProfiles/{app_profile}B\020\n\016" - + "routing_policy\"\210\003\n\tHotTablet\022\014\n\004name\030\001 \001" - + "(\t\022;\n\ntable_name\030\002 \001(\tB\'\372A$\n\"bigtableadm" - + "in.googleapis.com/Table\0223\n\nstart_time\030\003 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010" - + "end_time\030\004 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\022\021\n\tstart_key\030\005 \001(\t\022\017\n\007end_key\030\006 " - + "\001(\t\022#\n\026node_cpu_usage_percent\030\007 \001(\002B\003\340A\003" - + ":\177\352A|\n&bigtableadmin.googleapis.com/HotT" - + "ablet\022Rprojects/{project}/instances/{ins" - + "tance}/clusters/{cluster}/hotTablets/{ho" - + "t_tablet}B\320\002\n\034com.google.bigtable.admin." - + "v2B\rInstanceProtoP\001Z=google.golang.org/g" - + "enproto/googleapis/bigtable/admin/v2;adm" - + "in\252\002\036Google.Cloud.Bigtable.Admin.V2\312\002\036Go" - + "ogle\\Cloud\\Bigtable\\Admin\\V2\352\002\"Google::C" - + "loud::Bigtable::Admin::V2\352Ax\n!cloudkms.g" - + "oogleapis.com/CryptoKey\022Sprojects/{proje" - + "ct}/locations/{location}/keyRings/{key_r" - + "ing}/cryptoKeys/{crypto_key}b\006proto3" + + "\340A\003\022\037\n\rsatisfies_pzs\030\010 \001(\010B\003\340A\003H\000\210\001\001\032-\n\013" + + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"5\n\005State\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005REA" + + "DY\020\001\022\014\n\010CREATING\020\002\"=\n\004Type\022\024\n\020TYPE_UNSPE" + + "CIFIED\020\000\022\016\n\nPRODUCTION\020\001\022\017\n\013DEVELOPMENT\020" + + "\002:S\352AP\n%bigtableadmin.googleapis.com/Ins" + + "tance\022\'projects/{project}/instances/{ins" + + "tance}B\020\n\016_satisfies_pzs\"_\n\022AutoscalingT" + + "argets\022\037\n\027cpu_utilization_percent\030\002 \001(\005\022" + + "(\n storage_utilization_gib_per_node\030\003 \001(" + + "\005\"O\n\021AutoscalingLimits\022\034\n\017min_serve_node" + + "s\030\001 \001(\005B\003\340A\002\022\034\n\017max_serve_nodes\030\002 \001(\005B\003\340" + + "A\002\"\321\007\n\007Cluster\022\014\n\004name\030\001 \001(\t\022;\n\010location" + + "\030\002 \001(\tB)\340A\005\372A#\n!locations.googleapis.com" + + "/Location\022;\n\005state\030\003 \001(\0162\'.google.bigtab" + + "le.admin.v2.Cluster.StateB\003\340A\003\022\023\n\013serve_" + + "nodes\030\004 \001(\005\022I\n\016cluster_config\030\007 \001(\0132/.go" + + "ogle.bigtable.admin.v2.Cluster.ClusterCo" + + "nfigH\000\022H\n\024default_storage_type\030\005 \001(\0162%.g" + + "oogle.bigtable.admin.v2.StorageTypeB\003\340A\005" + + "\022R\n\021encryption_config\030\006 \001(\01322.google.big" + + "table.admin.v2.Cluster.EncryptionConfigB" + + "\003\340A\005\032\270\001\n\030ClusterAutoscalingConfig\022L\n\022aut" + + "oscaling_limits\030\001 \001(\0132+.google.bigtable." + + "admin.v2.AutoscalingLimitsB\003\340A\002\022N\n\023autos" + + "caling_targets\030\002 \001(\0132,.google.bigtable.a" + + "dmin.v2.AutoscalingTargetsB\003\340A\002\032o\n\rClust" + + "erConfig\022^\n\032cluster_autoscaling_config\030\001" + + " \001(\0132:.google.bigtable.admin.v2.Cluster." + + "ClusterAutoscalingConfig\032P\n\020EncryptionCo" + + "nfig\022<\n\014kms_key_name\030\001 \001(\tB&\372A#\n!cloudkm" + + "s.googleapis.com/CryptoKey\"Q\n\005State\022\023\n\017S" + + "TATE_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020" + + "\002\022\014\n\010RESIZING\020\003\022\014\n\010DISABLED\020\004:e\352Ab\n$bigt" + + "ableadmin.googleapis.com/Cluster\022:projec" + + "ts/{project}/instances/{instance}/cluste" + + "rs/{cluster}B\010\n\006config\"\210\004\n\nAppProfile\022\014\n" + + "\004name\030\001 \001(\t\022\014\n\004etag\030\002 \001(\t\022\023\n\013description" + + "\030\003 \001(\t\022g\n\035multi_cluster_routing_use_any\030" + + "\005 \001(\0132>.google.bigtable.admin.v2.AppProf" + + "ile.MultiClusterRoutingUseAnyH\000\022[\n\026singl" + + "e_cluster_routing\030\006 \001(\01329.google.bigtabl" + + "e.admin.v2.AppProfile.SingleClusterRouti" + + "ngH\000\0320\n\031MultiClusterRoutingUseAny\022\023\n\013clu" + + "ster_ids\030\001 \003(\t\032N\n\024SingleClusterRouting\022\022" + + "\n\ncluster_id\030\001 \001(\t\022\"\n\032allow_transactiona" + + "l_writes\030\002 \001(\010:o\352Al\n\'bigtableadmin.googl" + + "eapis.com/AppProfile\022Aprojects/{project}" + + "/instances/{instance}/appProfiles/{app_p" + + "rofile}B\020\n\016routing_policy\"\210\003\n\tHotTablet\022" + + "\014\n\004name\030\001 \001(\t\022;\n\ntable_name\030\002 \001(\tB\'\372A$\n\"" + + "bigtableadmin.googleapis.com/Table\0223\n\nst" + + "art_time\030\003 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0221\n\010end_time\030\004 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022\021\n\tstart_key\030\005 \001(\t\022\017\n" + + "\007end_key\030\006 \001(\t\022#\n\026node_cpu_usage_percent" + + "\030\007 \001(\002B\003\340A\003:\177\352A|\n&bigtableadmin.googleap" + + "is.com/HotTablet\022Rprojects/{project}/ins" + + "tances/{instance}/clusters/{cluster}/hot" + + "Tablets/{hot_tablet}B\320\002\n\034com.google.bigt" + + "able.admin.v2B\rInstanceProtoP\001Z=google.g" + + "olang.org/genproto/googleapis/bigtable/a" + + "dmin/v2;admin\252\002\036Google.Cloud.Bigtable.Ad" + + "min.V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\V2\352" + + "\002\"Google::Cloud::Bigtable::Admin::V2\352Ax\n" + + "!cloudkms.googleapis.com/CryptoKey\022Sproj" + + "ects/{project}/locations/{location}/keyR" + + "ings/{key_ring}/cryptoKeys/{crypto_key}b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -179,7 +181,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Instance_descriptor, new java.lang.String[] { - "Name", "DisplayName", "State", "Type", "Labels", "CreateTime", + "Name", + "DisplayName", + "State", + "Type", + "Labels", + "CreateTime", + "SatisfiesPzs", + "SatisfiesPzs", }); internal_static_google_bigtable_admin_v2_Instance_LabelsEntry_descriptor = internal_static_google_bigtable_admin_v2_Instance_descriptor.getNestedTypes().get(0); diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java index d90e401eda..492fa44099 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAppProfilesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesRequest_descriptor; @@ -283,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -301,7 +243,7 @@ public int getSerializedSize() { if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +262,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -337,7 +279,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -466,17 +408,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListAppProfilesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -579,7 +514,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListAppProfilesRequest oth pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -594,18 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListAppProfilesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListAppProfilesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -953,7 +919,18 @@ public ListAppProfilesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAppProfilesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java index fe5435fbb0..42ce1fdf18 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAppProfilesResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAppProfilesResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - appProfiles_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - appProfiles_.add( - input.readMessage( - com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - failedLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - failedLocations_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - appProfiles_ = java.util.Collections.unmodifiableList(appProfiles_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - failedLocations_ = failedLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListAppProfilesResponse_descriptor; @@ -361,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < failedLocations_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, failedLocations_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -384,7 +310,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFailedLocationsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -403,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppProfilesList().equals(other.getAppProfilesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getFailedLocationsList().equals(other.getFailedLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,7 +350,7 @@ public int hashCode() { hash = (37 * hash) + FAILED_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getFailedLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -553,19 +479,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListAppProfilesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAppProfilesFieldBuilder(); - } } @java.lang.Override @@ -573,10 +490,11 @@ public Builder clear() { super.clear(); if (appProfilesBuilder_ == null) { appProfiles_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + appProfiles_ = null; appProfilesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; failedLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -715,7 +633,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListAppProfilesResponse ot } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -730,18 +648,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListAppProfilesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.AppProfile m = + input.readMessage( + com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry); + if (appProfilesBuilder_ == null) { + ensureAppProfilesIsMutable(); + appProfiles_.add(m); + } else { + appProfilesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedLocationsIsMutable(); + failedLocations_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListAppProfilesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1440,7 +1397,18 @@ public ListAppProfilesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAppProfilesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java index 720bcd126a..f36e324d1c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListBackupsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsRequest_descriptor; @@ -488,7 +416,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -512,7 +440,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -533,7 +461,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOrderBy().equals(other.getOrderBy())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -554,7 +482,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -683,17 +611,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListBackupsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -810,7 +731,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListBackupsRequest other) pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,17 +746,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListBackupsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.ListBackupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1605,7 +1570,18 @@ public ListBackupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackupsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java index 786ef99311..0e026a369c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListBackupsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListBackupsResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - backups_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - backups_.add( - input.readMessage( - com.google.bigtable.admin.v2.Backup.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - backups_ = java.util.Collections.unmodifiableList(backups_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListBackupsResponse_descriptor; @@ -271,7 +210,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +225,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -304,7 +243,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBackupsList().equals(other.getBackupsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -321,7 +260,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -450,19 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListBackupsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBackupsFieldBuilder(); - } } @java.lang.Override @@ -470,10 +400,11 @@ public Builder clear() { super.clear(); if (backupsBuilder_ == null) { backups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + backups_ = null; backupsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -595,7 +526,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListBackupsResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +541,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListBackupsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.Backup m = + input.readMessage( + com.google.bigtable.admin.v2.Backup.parser(), extensionRegistry); + if (backupsBuilder_ == null) { + ensureBackupsIsMutable(); + backups_.add(m); + } else { + backupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.ListBackupsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1122,7 +1086,18 @@ public ListBackupsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackupsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java index 138bb9040a..f131727426 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListClustersRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersRequest_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -426,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListClustersRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -533,7 +473,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListClustersRequest other) pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,17 +488,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListClustersRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.ListClustersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -831,7 +797,18 @@ public ListClustersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListClustersRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java index ed1e3fadbb..4bb6580ce2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListClustersResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListClustersResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clusters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - clusters_.add( - input.readMessage( - com.google.bigtable.admin.v2.Cluster.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - failedLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - failedLocations_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - clusters_ = java.util.Collections.unmodifiableList(clusters_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - failedLocations_ = failedLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListClustersResponse_descriptor; @@ -361,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -384,7 +310,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -403,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClustersList().equals(other.getClustersList())) return false; if (!getFailedLocationsList().equals(other.getFailedLocationsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,7 +350,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -553,19 +479,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListClustersResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getClustersFieldBuilder(); - } } @java.lang.Override @@ -573,10 +490,11 @@ public Builder clear() { super.clear(); if (clustersBuilder_ == null) { clusters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + clusters_ = null; clustersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); failedLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); nextPageToken_ = ""; @@ -715,7 +633,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListClustersResponse other nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -730,18 +648,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListClustersResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.Cluster m = + input.readMessage( + com.google.bigtable.admin.v2.Cluster.parser(), extensionRegistry); + if (clustersBuilder_ == null) { + ensureClustersIsMutable(); + clusters_.add(m); + } else { + clustersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedLocationsIsMutable(); + failedLocations_.add(s); + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListClustersResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1437,7 +1394,18 @@ public ListClustersResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListClustersResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java index 0a010c7292..103fa0b8c7 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsRequest.java @@ -53,94 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListHotTabletsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsRequest_descriptor; @@ -422,7 +334,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -446,7 +358,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -473,7 +385,7 @@ public boolean equals(final java.lang.Object obj) { } if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -498,7 +410,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -627,17 +539,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListHotTabletsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -768,7 +673,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListHotTabletsRequest othe pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -783,18 +688,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListHotTabletsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListHotTabletsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1535,7 +1483,18 @@ public ListHotTabletsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListHotTabletsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java index d45ef7325e..90ecf3ef7d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListHotTabletsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListHotTabletsResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - hotTablets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - hotTablets_.add( - input.readMessage( - com.google.bigtable.admin.v2.HotTablet.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - hotTablets_ = java.util.Collections.unmodifiableList(hotTablets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListHotTabletsResponse_descriptor; @@ -291,7 +230,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -306,7 +245,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -324,7 +263,7 @@ public boolean equals(final java.lang.Object obj) { if (!getHotTabletsList().equals(other.getHotTabletsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -341,7 +280,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -470,19 +409,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListHotTabletsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getHotTabletsFieldBuilder(); - } } @java.lang.Override @@ -490,10 +420,11 @@ public Builder clear() { super.clear(); if (hotTabletsBuilder_ == null) { hotTablets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + hotTablets_ = null; hotTabletsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -615,7 +546,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListHotTabletsResponse oth nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -630,18 +561,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListHotTabletsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.HotTablet m = + input.readMessage( + com.google.bigtable.admin.v2.HotTablet.parser(), extensionRegistry); + if (hotTabletsBuilder_ == null) { + ensureHotTabletsIsMutable(); + hotTablets_.add(m); + } else { + hotTabletsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListHotTabletsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1216,7 +1179,18 @@ public ListHotTabletsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListHotTabletsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java index c95ab64bb5..a64bd54432 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstancesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesRequest_descriptor; @@ -245,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -260,7 +207,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +240,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -422,17 +369,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListInstancesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -529,7 +469,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListInstancesRequest other pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -544,18 +484,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListInstancesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListInstancesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -818,7 +783,18 @@ public ListInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java index a9566cd591..d02e624e85 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListInstancesResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstancesResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.bigtable.admin.v2.Instance.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - failedLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - failedLocations_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - failedLocations_ = failedLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_ListInstancesResponse_descriptor; @@ -365,7 +291,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -388,7 +314,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -407,7 +333,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstancesList().equals(other.getInstancesList())) return false; if (!getFailedLocationsList().equals(other.getFailedLocationsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -428,7 +354,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -557,19 +483,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListInstancesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -577,10 +494,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); failedLocations_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); nextPageToken_ = ""; @@ -719,7 +637,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListInstancesResponse othe nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -734,18 +652,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListInstancesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.Instance m = + input.readMessage( + com.google.bigtable.admin.v2.Instance.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedLocationsIsMutable(); + failedLocations_.add(s); + break; + } // case 18 + case 26: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListInstancesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1450,7 +1407,18 @@ public ListInstancesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java index b46e7a6f91..3691b0075a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsRequest.java @@ -58,64 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSnapshotsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsRequest_descriptor; @@ -283,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -301,7 +243,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +262,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -337,7 +279,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -471,17 +413,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListSnapshotsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -584,7 +519,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListSnapshotsRequest other pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -599,18 +534,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListSnapshotsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListSnapshotsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -943,7 +909,18 @@ public ListSnapshotsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSnapshotsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java index 5646d98555..f28481e039 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListSnapshotsResponse.java @@ -58,67 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSnapshotsResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - snapshots_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - snapshots_.add( - input.readMessage( - com.google.bigtable.admin.v2.Snapshot.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - snapshots_ = java.util.Collections.unmodifiableList(snapshots_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListSnapshotsResponse_descriptor; @@ -276,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +230,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSnapshotsList().equals(other.getSnapshotsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -326,7 +265,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,19 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListSnapshotsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSnapshotsFieldBuilder(); - } } @java.lang.Override @@ -480,10 +410,11 @@ public Builder clear() { super.clear(); if (snapshotsBuilder_ == null) { snapshots_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + snapshots_ = null; snapshotsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -605,7 +536,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListSnapshotsResponse othe nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -620,18 +551,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListSnapshotsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.Snapshot m = + input.readMessage( + com.google.bigtable.admin.v2.Snapshot.parser(), extensionRegistry); + if (snapshotsBuilder_ == null) { + ensureSnapshotsIsMutable(); + snapshots_.add(m); + } else { + snapshotsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ListSnapshotsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1133,7 +1096,18 @@ public ListSnapshotsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSnapshotsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java index 58b05c36c9..b2ff56b8e2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesRequest.java @@ -55,71 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTablesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - view_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesRequest_descriptor; @@ -327,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pageSize_ != 0) { output.writeInt32(4, pageSize_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -348,7 +283,7 @@ public int getSerializedSize() { if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -368,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (view_ != other.view_) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -387,7 +322,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +452,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListTablesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -635,7 +563,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListTablesRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -650,17 +578,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListTablesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + view_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.ListTablesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1089,7 +1055,18 @@ public ListTablesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTablesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java index 61d54201cf..fecfb3c893 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListTablesResponse.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTablesResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - tables_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - tables_.add( - input.readMessage( - com.google.bigtable.admin.v2.Table.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - tables_ = java.util.Collections.unmodifiableList(tables_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ListTablesResponse_descriptor; @@ -272,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +226,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -305,7 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTablesList().equals(other.getTablesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -322,7 +261,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -452,19 +391,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ListTablesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTablesFieldBuilder(); - } } @java.lang.Override @@ -472,10 +402,11 @@ public Builder clear() { super.clear(); if (tablesBuilder_ == null) { tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + tables_ = null; tablesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -597,7 +528,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ListTablesResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,17 +543,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ListTablesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.admin.v2.Table m = + input.readMessage( + com.google.bigtable.admin.v2.Table.parser(), extensionRegistry); + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(m); + } else { + tablesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.ListTablesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1124,7 +1088,18 @@ public ListTablesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTablesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java index 542fc1e0be..17266065d3 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ModifyColumnFamiliesRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ModifyColumnFamiliesRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - modifications_ = - new java.util.ArrayList< - com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification>(); - mutable_bitField0_ |= 0x00000001; - } - modifications_.add( - input.readMessage( - com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - modifications_ = java.util.Collections.unmodifiableList(modifications_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_descriptor; @@ -304,90 +239,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Modification( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 18: - { - com.google.bigtable.admin.v2.ColumnFamily.Builder subBuilder = null; - if (modCase_ == 2) { - subBuilder = ((com.google.bigtable.admin.v2.ColumnFamily) mod_).toBuilder(); - } - mod_ = - input.readMessage( - com.google.bigtable.admin.v2.ColumnFamily.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.ColumnFamily) mod_); - mod_ = subBuilder.buildPartial(); - } - modCase_ = 2; - break; - } - case 26: - { - com.google.bigtable.admin.v2.ColumnFamily.Builder subBuilder = null; - if (modCase_ == 3) { - subBuilder = ((com.google.bigtable.admin.v2.ColumnFamily) mod_).toBuilder(); - } - mod_ = - input.readMessage( - com.google.bigtable.admin.v2.ColumnFamily.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.ColumnFamily) mod_); - mod_ = subBuilder.buildPartial(); - } - modCase_ = 3; - break; - } - case 32: - { - mod_ = input.readBool(); - modCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_ModifyColumnFamiliesRequest_Modification_descriptor; @@ -673,7 +524,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (modCase_ == 4) { output.writeBool(4, (boolean) ((java.lang.Boolean) mod_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -700,7 +551,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 4, (boolean) ((java.lang.Boolean) mod_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -731,7 +582,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -760,7 +611,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -895,17 +746,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -913,6 +757,12 @@ public Builder clear() { super.clear(); id_ = ""; + if (createBuilder_ != null) { + createBuilder_.clear(); + } + if (updateBuilder_ != null) { + updateBuilder_.clear(); + } modCase_ = 0; mod_ = null; return this; @@ -1045,7 +895,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1060,19 +910,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getCreateFieldBuilder().getBuilder(), extensionRegistry); + modCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateFieldBuilder().getBuilder(), extensionRegistry); + modCase_ = 3; + break; + } // case 26 + case 32: + { + mod_ = input.readBool(); + modCase_ = 4; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1741,7 +1627,19 @@ public Modification parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Modification(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1937,7 +1835,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < modifications_.size(); i++) { output.writeMessage(2, modifications_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1952,7 +1850,7 @@ public int getSerializedSize() { for (int i = 0; i < modifications_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, modifications_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1970,7 +1868,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getModificationsList().equals(other.getModificationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1987,7 +1885,7 @@ public int hashCode() { hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER; hash = (53 * hash) + getModificationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2118,19 +2016,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getModificationsFieldBuilder(); - } } @java.lang.Override @@ -2140,10 +2029,11 @@ public Builder clear() { if (modificationsBuilder_ == null) { modifications_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + modifications_ = null; modificationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2263,7 +2153,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ModifyColumnFamiliesReques } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2278,18 +2168,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification m = + input.readMessage( + com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification + .parser(), + extensionRegistry); + if (modificationsBuilder_ == null) { + ensureModificationsIsMutable(); + modifications_.add(m); + } else { + modificationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2923,7 +2847,18 @@ public ModifyColumnFamiliesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ModifyColumnFamiliesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java index 725f0fa8c7..c8dbdfc47e 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OperationProgress.java @@ -51,80 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationProgress( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - progressPercent_ = input.readInt32(); - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.CommonProto .internal_static_google_bigtable_admin_v2_OperationProgress_descriptor; @@ -277,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(3, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +221,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +246,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -341,7 +267,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -471,17 +397,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.OperationProgress.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -597,7 +516,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.OperationProgress other) { if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,17 +531,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.OperationProgress parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + progressPercent_ = input.readInt32(); + + break; + } // case 8 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.OperationProgress) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1080,7 +1031,18 @@ public OperationProgress parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationProgress(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java index 87045259de..7b2c946018 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/OptimizeRestoredTableMetadata.java @@ -55,68 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OptimizeRestoredTableMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - com.google.bigtable.admin.v2.OperationProgress.Builder subBuilder = null; - if (progress_ != null) { - subBuilder = progress_.toBuilder(); - } - progress_ = - input.readMessage( - com.google.bigtable.admin.v2.OperationProgress.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(progress_); - progress_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_OptimizeRestoredTableMetadata_descriptor; @@ -249,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (progress_ != null) { output.writeMessage(2, getProgress()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +202,7 @@ public int getSerializedSize() { if (progress_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProgress()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProgress()) { if (!getProgress().equals(other.getProgress())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + PROGRESS_FIELD_NUMBER; hash = (53 * hash) + getProgress().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -549,7 +480,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.OptimizeRestoredTableMetad if (other.hasProgress()) { mergeProgress(other.getProgress()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -564,18 +495,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.OptimizeRestoredTableMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -903,7 +859,18 @@ public OptimizeRestoredTableMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OptimizeRestoredTableMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java index fcf723774b..6ea994b7ca 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterMetadata.java @@ -50,92 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartialUpdateClusterMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.bigtable.admin.v2.PartialUpdateClusterRequest.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.PartialUpdateClusterRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterMetadata_descriptor; @@ -315,7 +229,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (originalRequest_ != null) { output.writeMessage(3, getOriginalRequest()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -333,7 +247,7 @@ public int getSerializedSize() { if (originalRequest_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOriginalRequest()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +275,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOriginalRequest()) { if (!getOriginalRequest().equals(other.getOriginalRequest())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -384,7 +298,7 @@ public int hashCode() { hash = (37 * hash) + ORIGINAL_REQUEST_FIELD_NUMBER; hash = (53 * hash) + getOriginalRequest().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -514,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.PartialUpdateClusterMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -649,7 +556,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.PartialUpdateClusterMetada if (other.hasOriginalRequest()) { mergeOriginalRequest(other.getOriginalRequest()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -664,18 +571,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.PartialUpdateClusterMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.PartialUpdateClusterMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1269,7 +1207,18 @@ public PartialUpdateClusterMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartialUpdateClusterMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java index 1e8447f7e3..51fab538cd 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateClusterRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartialUpdateClusterRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.Cluster.Builder subBuilder = null; - if (cluster_ != null) { - subBuilder = cluster_.toBuilder(); - } - cluster_ = - input.readMessage( - com.google.bigtable.admin.v2.Cluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cluster_); - cluster_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateClusterRequest_descriptor; @@ -256,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -271,7 +201,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -295,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -314,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -444,17 +374,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.PartialUpdateClusterRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -565,7 +488,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.PartialUpdateClusterReques if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -580,18 +503,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.PartialUpdateClusterRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getClusterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.PartialUpdateClusterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1031,7 +979,18 @@ public PartialUpdateClusterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartialUpdateClusterRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java index 5e0b6d0993..c3dc82149c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/PartialUpdateInstanceRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PartialUpdateInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.Instance.Builder subBuilder = null; - if (instance_ != null) { - subBuilder = instance_.toBuilder(); - } - instance_ = - input.readMessage( - com.google.bigtable.admin.v2.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instance_); - instance_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_PartialUpdateInstanceRequest_descriptor; @@ -261,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +206,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +249,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,17 +379,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +493,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.PartialUpdateInstanceReque if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,18 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getInstanceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.PartialUpdateInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +984,18 @@ public PartialUpdateInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PartialUpdateInstanceRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java index d0298c2329..7f12b4a44c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreInfo.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RestoreInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - sourceType_ = rawValue; - break; - } - case 18: - { - com.google.bigtable.admin.v2.BackupInfo.Builder subBuilder = null; - if (sourceInfoCase_ == 2) { - subBuilder = ((com.google.bigtable.admin.v2.BackupInfo) sourceInfo_).toBuilder(); - } - sourceInfo_ = - input.readMessage( - com.google.bigtable.admin.v2.BackupInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.BackupInfo) sourceInfo_); - sourceInfo_ = subBuilder.buildPartial(); - } - sourceInfoCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_RestoreInfo_descriptor; @@ -285,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceInfoCase_ == 2) { output.writeMessage(2, (com.google.bigtable.admin.v2.BackupInfo) sourceInfo_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +242,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.bigtable.admin.v2.BackupInfo) sourceInfo_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -328,7 +266,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -349,7 +287,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -478,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.RestoreInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -496,6 +427,9 @@ public Builder clear() { super.clear(); sourceType_ = 0; + if (backupInfoBuilder_ != null) { + backupInfoBuilder_.clear(); + } sourceInfoCase_ = 0; sourceInfo_ = null; return this; @@ -597,7 +531,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.RestoreInfo other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,17 +546,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.RestoreInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sourceType_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + input.readMessage(getBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + sourceInfoCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.RestoreInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -981,7 +941,18 @@ public RestoreInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RestoreInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java index 82ddb802ff..a5bda7dd29 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableMetadata.java @@ -55,98 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RestoreTableMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - sourceType_ = rawValue; - break; - } - case 26: - { - com.google.bigtable.admin.v2.BackupInfo.Builder subBuilder = null; - if (sourceInfoCase_ == 3) { - subBuilder = ((com.google.bigtable.admin.v2.BackupInfo) sourceInfo_).toBuilder(); - } - sourceInfo_ = - input.readMessage( - com.google.bigtable.admin.v2.BackupInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.admin.v2.BackupInfo) sourceInfo_); - sourceInfo_ = subBuilder.buildPartial(); - } - sourceInfoCase_ = 3; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - optimizeTableOperationName_ = s; - break; - } - case 42: - { - com.google.bigtable.admin.v2.OperationProgress.Builder subBuilder = null; - if (progress_ != null) { - subBuilder = progress_.toBuilder(); - } - progress_ = - input.readMessage( - com.google.bigtable.admin.v2.OperationProgress.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(progress_); - progress_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableMetadata_descriptor; @@ -469,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (progress_ != null) { output.writeMessage(5, getProgress()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +406,7 @@ public int getSerializedSize() { if (progress_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getProgress()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -530,7 +438,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -559,7 +467,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -689,17 +597,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.RestoreTableMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -709,6 +610,9 @@ public Builder clear() { sourceType_ = 0; + if (backupInfoBuilder_ != null) { + backupInfoBuilder_.clear(); + } optimizeTableOperationName_ = ""; if (progressBuilder_ == null) { @@ -837,7 +741,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.RestoreTableMetadata other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -852,18 +756,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.RestoreTableMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + sourceType_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + input.readMessage(getBackupInfoFieldBuilder().getBuilder(), extensionRegistry); + sourceInfoCase_ = 3; + break; + } // case 26 + case 34: + { + optimizeTableOperationName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getProgressFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.RestoreTableMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1592,7 +1539,18 @@ public RestoreTableMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RestoreTableMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java index 025f82cd2f..1ca6255dcb 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/RestoreTableRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RestoreTableRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - sourceCase_ = 3; - source_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_RestoreTableRequest_descriptor; @@ -381,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +339,7 @@ public int getSerializedSize() { if (sourceCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -425,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -448,7 +388,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.RestoreTableRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -704,7 +637,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.RestoreTableRequest other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -719,17 +652,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.RestoreTableRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 3; + source_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.RestoreTableRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1166,7 +1132,18 @@ public RestoreTableRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RestoreTableRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java index ca6b5b7db4..15afea9cec 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Snapshot.java @@ -59,116 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Snapshot( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - com.google.bigtable.admin.v2.Table.Builder subBuilder = null; - if (sourceTable_ != null) { - subBuilder = sourceTable_.toBuilder(); - } - sourceTable_ = - input.readMessage(com.google.bigtable.admin.v2.Table.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceTable_); - sourceTable_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - dataSizeBytes_ = input.readInt64(); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deleteTime_ != null) { - subBuilder = deleteTime_.toBuilder(); - } - deleteTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deleteTime_); - deleteTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Snapshot_descriptor; @@ -685,7 +575,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -715,7 +605,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -746,7 +636,7 @@ public boolean equals(final java.lang.Object obj) { } if (state_ != other.state_) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -777,7 +667,7 @@ public int hashCode() { hash = (53 * hash) + state_; hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -910,17 +800,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Snapshot.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1070,7 +953,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Snapshot other) { description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1085,17 +968,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Snapshot parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getSourceTableFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + dataSizeBytes_ = input.readInt64(); + + break; + } // case 24 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + + break; + } // case 48 + case 58: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.Snapshot) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2074,7 +2013,18 @@ public Snapshot parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Snapshot(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java index b54ab58fad..a789b41783 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableMetadata.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SnapshotTableMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.SnapshotTableRequest.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.SnapshotTableRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableMetadata_descriptor; @@ -318,7 +232,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (finishTime_ != null) { output.writeMessage(3, getFinishTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +250,7 @@ public int getSerializedSize() { if (finishTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinishTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +278,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFinishTime()) { if (!getFinishTime().equals(other.getFinishTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -387,7 +301,7 @@ public int hashCode() { hash = (37 * hash) + FINISH_TIME_FIELD_NUMBER; hash = (53 * hash) + getFinishTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -520,17 +434,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.SnapshotTableMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -655,7 +562,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.SnapshotTableMetadata othe if (other.hasFinishTime()) { mergeFinishTime(other.getFinishTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.SnapshotTableMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.SnapshotTableMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1272,7 +1210,18 @@ public SnapshotTableMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SnapshotTableMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java index 78d6886cc7..e759062c78 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotTableRequest.java @@ -60,87 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SnapshotTableRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - cluster_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - snapshotId_ = s; - break; - } - case 34: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (ttl_ != null) { - subBuilder = ttl_.toBuilder(); - } - ttl_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ttl_); - ttl_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_SnapshotTableRequest_descriptor; @@ -458,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -482,7 +401,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -506,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTtl().equals(other.getTtl())) return false; } if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -529,7 +448,7 @@ public int hashCode() { } hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -663,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.SnapshotTableRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -798,7 +710,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.SnapshotTableRequest other description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -813,18 +725,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.SnapshotTableRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + cluster_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + snapshotId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.SnapshotTableRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1543,7 +1498,18 @@ public SnapshotTableRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SnapshotTableRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java index 55f389ad07..654ce87398 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/Table.java @@ -54,114 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Table( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - clusterStates_ = - com.google.protobuf.MapField.newMapField( - ClusterStatesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.bigtable.admin.v2.Table.ClusterState> - clusterStates__ = - input.readMessage( - ClusterStatesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - clusterStates_ - .getMutableMap() - .put(clusterStates__.getKey(), clusterStates__.getValue()); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - columnFamilies_ = - com.google.protobuf.MapField.newMapField( - ColumnFamiliesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.bigtable.admin.v2.ColumnFamily> - columnFamilies__ = - input.readMessage( - ColumnFamiliesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - columnFamilies_ - .getMutableMap() - .put(columnFamilies__.getKey(), columnFamilies__.getValue()); - break; - } - case 32: - { - int rawValue = input.readEnum(); - - granularity_ = rawValue; - break; - } - case 50: - { - com.google.bigtable.admin.v2.RestoreInfo.Builder subBuilder = null; - if (restoreInfo_ != null) { - subBuilder = restoreInfo_.toBuilder(); - } - restoreInfo_ = - input.readMessage( - com.google.bigtable.admin.v2.RestoreInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(restoreInfo_); - restoreInfo_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_descriptor; @@ -707,68 +599,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ClusterState( - 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; - case 8: - { - int rawValue = input.readEnum(); - - replicationState_ = rawValue; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - encryptionInfo_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - encryptionInfo_.add( - input.readMessage( - com.google.bigtable.admin.v2.EncryptionInfo.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - encryptionInfo_ = java.util.Collections.unmodifiableList(encryptionInfo_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.admin.v2.TableProto .internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor; @@ -1193,7 +1023,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < encryptionInfo_.size(); i++) { output.writeMessage(2, encryptionInfo_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1210,7 +1040,7 @@ public int getSerializedSize() { for (int i = 0; i < encryptionInfo_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, encryptionInfo_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1228,7 +1058,7 @@ public boolean equals(final java.lang.Object obj) { if (replicationState_ != other.replicationState_) return false; if (!getEncryptionInfoList().equals(other.getEncryptionInfoList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1245,7 +1075,7 @@ public int hashCode() { hash = (37 * hash) + ENCRYPTION_INFO_FIELD_NUMBER; hash = (53 * hash) + getEncryptionInfoList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1376,19 +1206,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.Table.ClusterState.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEncryptionInfoFieldBuilder(); - } } @java.lang.Override @@ -1398,10 +1219,11 @@ public Builder clear() { if (encryptionInfoBuilder_ == null) { encryptionInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + encryptionInfo_ = null; encryptionInfoBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1522,7 +1344,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Table.ClusterState other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1537,18 +1359,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Table.ClusterState parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + replicationState_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + com.google.bigtable.admin.v2.EncryptionInfo m = + input.readMessage( + com.google.bigtable.admin.v2.EncryptionInfo.parser(), extensionRegistry); + if (encryptionInfoBuilder_ == null) { + ensureEncryptionInfoIsMutable(); + encryptionInfo_.add(m); + } else { + encryptionInfoBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.Table.ClusterState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2160,7 +2014,19 @@ public ClusterState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClusterState(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2587,6 +2453,29 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder return getRestoreInfo(); } + public static final int DELETION_PROTECTION_FIELD_NUMBER = 9; + private boolean deletionProtection_; + /** + * + * + *
    +   * Set to true to make the table protected against data loss. i.e. deleting
    +   * the following resources through Admin APIs are prohibited:
    +   *   - The table.
    +   *   - The column families in the table.
    +   *   - The instance containing the table.
    +   * Note one can still delete the data stored in the table through Data APIs.
    +   * 
    + * + * bool deletion_protection = 9; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2616,7 +2505,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (restoreInfo_ != null) { output.writeMessage(6, getRestoreInfo()); } - unknownFields.writeTo(output); + if (deletionProtection_ != false) { + output.writeBool(9, deletionProtection_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2659,7 +2551,10 @@ public int getSerializedSize() { if (restoreInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRestoreInfo()); } - size += unknownFields.getSerializedSize(); + if (deletionProtection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, deletionProtection_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2682,7 +2577,8 @@ public boolean equals(final java.lang.Object obj) { if (hasRestoreInfo()) { if (!getRestoreInfo().equals(other.getRestoreInfo())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (getDeletionProtection() != other.getDeletionProtection()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2709,7 +2605,9 @@ public int hashCode() { hash = (37 * hash) + RESTORE_INFO_FIELD_NUMBER; hash = (53 * hash) + getRestoreInfo().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeletionProtection()); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2862,17 +2760,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.bigtable.admin.v2.Table.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2890,6 +2781,8 @@ public Builder clear() { restoreInfo_ = null; restoreInfoBuilder_ = null; } + deletionProtection_ = false; + return this; } @@ -2928,6 +2821,7 @@ public com.google.bigtable.admin.v2.Table buildPartial() { } else { result.restoreInfo_ = restoreInfoBuilder_.build(); } + result.deletionProtection_ = deletionProtection_; onBuilt(); return result; } @@ -2989,7 +2883,10 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.Table other) { if (other.hasRestoreInfo()) { mergeRestoreInfo(other.getRestoreInfo()); } - this.mergeUnknownFields(other.unknownFields); + if (other.getDeletionProtection() != false) { + setDeletionProtection(other.getDeletionProtection()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3004,17 +2901,81 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.Table parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.bigtable.admin.v2.Table.ClusterState> + clusterStates__ = + input.readMessage( + ClusterStatesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableClusterStates() + .getMutableMap() + .put(clusterStates__.getKey(), clusterStates__.getValue()); + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.bigtable.admin.v2.ColumnFamily> + columnFamilies__ = + input.readMessage( + ColumnFamiliesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableColumnFamilies() + .getMutableMap() + .put(columnFamilies__.getKey(), columnFamilies__.getValue()); + break; + } // case 26 + case 32: + { + granularity_ = input.readEnum(); + + break; + } // case 32 + case 50: + { + input.readMessage(getRestoreInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 72: + { + deletionProtection_ = input.readBool(); + + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.Table) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3862,6 +3823,73 @@ public com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder return restoreInfoBuilder_; } + private boolean deletionProtection_; + /** + * + * + *
    +     * Set to true to make the table protected against data loss. i.e. deleting
    +     * the following resources through Admin APIs are prohibited:
    +     *   - The table.
    +     *   - The column families in the table.
    +     *   - The instance containing the table.
    +     * Note one can still delete the data stored in the table through Data APIs.
    +     * 
    + * + * bool deletion_protection = 9; + * + * @return The deletionProtection. + */ + @java.lang.Override + public boolean getDeletionProtection() { + return deletionProtection_; + } + /** + * + * + *
    +     * Set to true to make the table protected against data loss. i.e. deleting
    +     * the following resources through Admin APIs are prohibited:
    +     *   - The table.
    +     *   - The column families in the table.
    +     *   - The instance containing the table.
    +     * Note one can still delete the data stored in the table through Data APIs.
    +     * 
    + * + * bool deletion_protection = 9; + * + * @param value The deletionProtection to set. + * @return This builder for chaining. + */ + public Builder setDeletionProtection(boolean value) { + + deletionProtection_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * Set to true to make the table protected against data loss. i.e. deleting
    +     * the following resources through Admin APIs are prohibited:
    +     *   - The table.
    +     *   - The column families in the table.
    +     *   - The instance containing the table.
    +     * Note one can still delete the data stored in the table through Data APIs.
    +     * 
    + * + * bool deletion_protection = 9; + * + * @return This builder for chaining. + */ + public Builder clearDeletionProtection() { + + deletionProtection_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -3894,7 +3922,18 @@ public Table parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Table(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java index 831ca5358e..d27cc5d252 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableOrBuilder.java @@ -285,4 +285,22 @@ com.google.bigtable.admin.v2.ColumnFamily getColumnFamiliesOrDefault( * */ com.google.bigtable.admin.v2.RestoreInfoOrBuilder getRestoreInfoOrBuilder(); + + /** + * + * + *
    +   * Set to true to make the table protected against data loss. i.e. deleting
    +   * the following resources through Admin APIs are prohibited:
    +   *   - The table.
    +   *   - The column families in the table.
    +   *   - The instance containing the table.
    +   * Note one can still delete the data stored in the table through Data APIs.
    +   * 
    + * + * bool deletion_protection = 9; + * + * @return The deletionProtection. + */ + boolean getDeletionProtection(); } diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java index 52363aa70f..c6ca5e60c2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableProto.java @@ -97,7 +97,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_type\030\001 \001(\0162+.google.bigtable.admin.v2.R" + "estoreSourceType\022;\n\013backup_info\030\002 \001(\0132$." + "google.bigtable.admin.v2.BackupInfoH\000B\r\n" - + "\013source_info\"\361\010\n\005Table\022\014\n\004name\030\001 \001(\t\022O\n\016" + + "\013source_info\"\216\t\n\005Table\022\014\n\004name\030\001 \001(\t\022O\n\016" + "cluster_states\030\002 \003(\01322.google.bigtable.a" + "dmin.v2.Table.ClusterStatesEntryB\003\340A\003\022L\n" + "\017column_families\030\003 \003(\01323.google.bigtable" @@ -105,87 +105,88 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ranularity\030\004 \001(\01624.google.bigtable.admin" + ".v2.Table.TimestampGranularityB\003\340A\005\022@\n\014r" + "estore_info\030\006 \001(\0132%.google.bigtable.admi" - + "n.v2.RestoreInfoB\003\340A\003\032\306\002\n\014ClusterState\022]" - + "\n\021replication_state\030\001 \001(\0162=.google.bigta" - + "ble.admin.v2.Table.ClusterState.Replicat" - + "ionStateB\003\340A\003\022F\n\017encryption_info\030\002 \003(\0132(" - + ".google.bigtable.admin.v2.EncryptionInfo" - + "B\003\340A\003\"\216\001\n\020ReplicationState\022\023\n\017STATE_NOT_" - + "KNOWN\020\000\022\020\n\014INITIALIZING\020\001\022\027\n\023PLANNED_MAI" - + "NTENANCE\020\002\022\031\n\025UNPLANNED_MAINTENANCE\020\003\022\t\n" - + "\005READY\020\004\022\024\n\020READY_OPTIMIZING\020\005\032b\n\022Cluste" - + "rStatesEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\013" - + "2,.google.bigtable.admin.v2.Table.Cluste" - + "rState:\0028\001\032]\n\023ColumnFamiliesEntry\022\013\n\003key" - + "\030\001 \001(\t\0225\n\005value\030\002 \001(\0132&.google.bigtable." - + "admin.v2.ColumnFamily:\0028\001\"I\n\024TimestampGr" - + "anularity\022%\n!TIMESTAMP_GRANULARITY_UNSPE" - + "CIFIED\020\000\022\n\n\006MILLIS\020\001\"q\n\004View\022\024\n\020VIEW_UNS" - + "PECIFIED\020\000\022\r\n\tNAME_ONLY\020\001\022\017\n\013SCHEMA_VIEW" - + "\020\002\022\024\n\020REPLICATION_VIEW\020\003\022\023\n\017ENCRYPTION_V" - + "IEW\020\005\022\010\n\004FULL\020\004:_\352A\\\n\"bigtableadmin.goog" - + "leapis.com/Table\0226projects/{project}/ins" - + "tances/{instance}/tables/{table}\"A\n\014Colu" - + "mnFamily\0221\n\007gc_rule\030\001 \001(\0132 .google.bigta" - + "ble.admin.v2.GcRule\"\325\002\n\006GcRule\022\032\n\020max_nu" - + "m_versions\030\001 \001(\005H\000\022,\n\007max_age\030\002 \001(\0132\031.go" - + "ogle.protobuf.DurationH\000\022E\n\014intersection" - + "\030\003 \001(\0132-.google.bigtable.admin.v2.GcRule" - + ".IntersectionH\000\0227\n\005union\030\004 \001(\0132&.google." - + "bigtable.admin.v2.GcRule.UnionH\000\032?\n\014Inte" - + "rsection\022/\n\005rules\030\001 \003(\0132 .google.bigtabl" - + "e.admin.v2.GcRule\0328\n\005Union\022/\n\005rules\030\001 \003(" - + "\0132 .google.bigtable.admin.v2.GcRuleB\006\n\004r" - + "ule\"\331\002\n\016EncryptionInfo\022U\n\017encryption_typ" - + "e\030\003 \001(\01627.google.bigtable.admin.v2.Encry" - + "ptionInfo.EncryptionTypeB\003\340A\003\0222\n\021encrypt" - + "ion_status\030\004 \001(\0132\022.google.rpc.StatusB\003\340A" - + "\003\022I\n\017kms_key_version\030\002 \001(\tB0\340A\003\372A*\n(clou" - + "dkms.googleapis.com/CryptoKeyVersion\"q\n\016" - + "EncryptionType\022\037\n\033ENCRYPTION_TYPE_UNSPEC" - + "IFIED\020\000\022\035\n\031GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037" - + "\n\033CUSTOMER_MANAGED_ENCRYPTION\020\002\"\314\003\n\010Snap" - + "shot\022\014\n\004name\030\001 \001(\t\0225\n\014source_table\030\002 \001(\013" - + "2\037.google.bigtable.admin.v2.Table\022\027\n\017dat" - + "a_size_bytes\030\003 \001(\003\022/\n\013create_time\030\004 \001(\0132" - + "\032.google.protobuf.Timestamp\022/\n\013delete_ti" - + "me\030\005 \001(\0132\032.google.protobuf.Timestamp\0227\n\005" - + "state\030\006 \001(\0162(.google.bigtable.admin.v2.S" - + "napshot.State\022\023\n\013description\030\007 \001(\t\"5\n\005St" - + "ate\022\023\n\017STATE_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022\014\n\010C" - + "REATING\020\002:{\352Ax\n%bigtableadmin.googleapis" - + ".com/Snapshot\022Oprojects/{project}/instan" - + "ces/{instance}/clusters/{cluster}/snapsh" - + "ots/{snapshot}\"\237\004\n\006Backup\022\014\n\004name\030\001 \001(\t\022" - + "\034\n\014source_table\030\002 \001(\tB\006\340A\005\340A\002\0224\n\013expire_" - + "time\030\003 \001(\0132\032.google.protobuf.TimestampB\003" - + "\340A\002\0223\n\nstart_time\030\004 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\0221\n\010end_time\030\005 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\022\027\n\nsize_byte" - + "s\030\006 \001(\003B\003\340A\003\022:\n\005state\030\007 \001(\0162&.google.big" - + "table.admin.v2.Backup.StateB\003\340A\003\022F\n\017encr" - + "yption_info\030\t \001(\0132(.google.bigtable.admi" - + "n.v2.EncryptionInfoB\003\340A\003\"7\n\005State\022\025\n\021STA" - + "TE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020" - + "\002:u\352Ar\n#bigtableadmin.googleapis.com/Bac" - + "kup\022Kprojects/{project}/instances/{insta" - + "nce}/clusters/{cluster}/backups/{backup}" - + "\"\244\001\n\nBackupInfo\022\023\n\006backup\030\001 \001(\tB\003\340A\003\0223\n\n" - + "start_time\030\002 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\0221\n\010end_time\030\003 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003\022\031\n\014source_table\030\004 \001" - + "(\tB\003\340A\003*D\n\021RestoreSourceType\022#\n\037RESTORE_" - + "SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n\006BACKUP\020\001B\374\002" - + "\n\034com.google.bigtable.admin.v2B\nTablePro" - + "toP\001Z=google.golang.org/genproto/googlea" - + "pis/bigtable/admin/v2;admin\252\002\036Google.Clo" - + "ud.Bigtable.Admin.V2\312\002\036Google\\Cloud\\Bigt" - + "able\\Admin\\V2\352\002\"Google::Cloud::Bigtable:" - + ":Admin::V2\352A\246\001\n(cloudkms.googleapis.com/" - + "CryptoKeyVersion\022zprojects/{project}/loc" - + "ations/{location}/keyRings/{key_ring}/cr" - + "yptoKeys/{crypto_key}/cryptoKeyVersions/" - + "{crypto_key_version}b\006proto3" + + "n.v2.RestoreInfoB\003\340A\003\022\033\n\023deletion_protec" + + "tion\030\t \001(\010\032\306\002\n\014ClusterState\022]\n\021replicati" + + "on_state\030\001 \001(\0162=.google.bigtable.admin.v" + + "2.Table.ClusterState.ReplicationStateB\003\340" + + "A\003\022F\n\017encryption_info\030\002 \003(\0132(.google.big" + + "table.admin.v2.EncryptionInfoB\003\340A\003\"\216\001\n\020R" + + "eplicationState\022\023\n\017STATE_NOT_KNOWN\020\000\022\020\n\014" + + "INITIALIZING\020\001\022\027\n\023PLANNED_MAINTENANCE\020\002\022" + + "\031\n\025UNPLANNED_MAINTENANCE\020\003\022\t\n\005READY\020\004\022\024\n" + + "\020READY_OPTIMIZING\020\005\032b\n\022ClusterStatesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.b" + + "igtable.admin.v2.Table.ClusterState:\0028\001\032" + + "]\n\023ColumnFamiliesEntry\022\013\n\003key\030\001 \001(\t\0225\n\005v" + + "alue\030\002 \001(\0132&.google.bigtable.admin.v2.Co" + + "lumnFamily:\0028\001\"I\n\024TimestampGranularity\022%" + + "\n!TIMESTAMP_GRANULARITY_UNSPECIFIED\020\000\022\n\n" + + "\006MILLIS\020\001\"q\n\004View\022\024\n\020VIEW_UNSPECIFIED\020\000\022" + + "\r\n\tNAME_ONLY\020\001\022\017\n\013SCHEMA_VIEW\020\002\022\024\n\020REPLI" + + "CATION_VIEW\020\003\022\023\n\017ENCRYPTION_VIEW\020\005\022\010\n\004FU" + + "LL\020\004:_\352A\\\n\"bigtableadmin.googleapis.com/" + + "Table\0226projects/{project}/instances/{ins" + + "tance}/tables/{table}\"A\n\014ColumnFamily\0221\n" + + "\007gc_rule\030\001 \001(\0132 .google.bigtable.admin.v" + + "2.GcRule\"\325\002\n\006GcRule\022\032\n\020max_num_versions\030" + + "\001 \001(\005H\000\022,\n\007max_age\030\002 \001(\0132\031.google.protob" + + "uf.DurationH\000\022E\n\014intersection\030\003 \001(\0132-.go" + + "ogle.bigtable.admin.v2.GcRule.Intersecti" + + "onH\000\0227\n\005union\030\004 \001(\0132&.google.bigtable.ad" + + "min.v2.GcRule.UnionH\000\032?\n\014Intersection\022/\n" + + "\005rules\030\001 \003(\0132 .google.bigtable.admin.v2." + + "GcRule\0328\n\005Union\022/\n\005rules\030\001 \003(\0132 .google." + + "bigtable.admin.v2.GcRuleB\006\n\004rule\"\331\002\n\016Enc" + + "ryptionInfo\022U\n\017encryption_type\030\003 \001(\01627.g" + + "oogle.bigtable.admin.v2.EncryptionInfo.E" + + "ncryptionTypeB\003\340A\003\0222\n\021encryption_status\030" + + "\004 \001(\0132\022.google.rpc.StatusB\003\340A\003\022I\n\017kms_ke" + + "y_version\030\002 \001(\tB0\340A\003\372A*\n(cloudkms.google" + + "apis.com/CryptoKeyVersion\"q\n\016EncryptionT" + + "ype\022\037\n\033ENCRYPTION_TYPE_UNSPECIFIED\020\000\022\035\n\031" + + "GOOGLE_DEFAULT_ENCRYPTION\020\001\022\037\n\033CUSTOMER_" + + "MANAGED_ENCRYPTION\020\002\"\314\003\n\010Snapshot\022\014\n\004nam" + + "e\030\001 \001(\t\0225\n\014source_table\030\002 \001(\0132\037.google.b" + + "igtable.admin.v2.Table\022\027\n\017data_size_byte" + + "s\030\003 \001(\003\022/\n\013create_time\030\004 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022/\n\013delete_time\030\005 \001(\0132\032." + + "google.protobuf.Timestamp\0227\n\005state\030\006 \001(\016" + + "2(.google.bigtable.admin.v2.Snapshot.Sta" + + "te\022\023\n\013description\030\007 \001(\t\"5\n\005State\022\023\n\017STAT" + + "E_NOT_KNOWN\020\000\022\t\n\005READY\020\001\022\014\n\010CREATING\020\002:{" + + "\352Ax\n%bigtableadmin.googleapis.com/Snapsh" + + "ot\022Oprojects/{project}/instances/{instan" + + "ce}/clusters/{cluster}/snapshots/{snapsh" + + "ot}\"\237\004\n\006Backup\022\014\n\004name\030\001 \001(\t\022\034\n\014source_t" + + "able\030\002 \001(\tB\006\340A\005\340A\002\0224\n\013expire_time\030\003 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\002\0223\n\nstar" + + "t_time\030\004 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0221\n\010end_time\030\005 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022\027\n\nsize_bytes\030\006 \001(\003B\003\340A" + + "\003\022:\n\005state\030\007 \001(\0162&.google.bigtable.admin" + + ".v2.Backup.StateB\003\340A\003\022F\n\017encryption_info" + + "\030\t \001(\0132(.google.bigtable.admin.v2.Encryp" + + "tionInfoB\003\340A\003\"7\n\005State\022\025\n\021STATE_UNSPECIF" + + "IED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002:u\352Ar\n#big" + + "tableadmin.googleapis.com/Backup\022Kprojec" + + "ts/{project}/instances/{instance}/cluste" + + "rs/{cluster}/backups/{backup}\"\244\001\n\nBackup" + + "Info\022\023\n\006backup\030\001 \001(\tB\003\340A\003\0223\n\nstart_time\030" + + "\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221" + + "\n\010end_time\030\003 \001(\0132\032.google.protobuf.Times" + + "tampB\003\340A\003\022\031\n\014source_table\030\004 \001(\tB\003\340A\003*D\n\021" + + "RestoreSourceType\022#\n\037RESTORE_SOURCE_TYPE" + + "_UNSPECIFIED\020\000\022\n\n\006BACKUP\020\001B\374\002\n\034com.googl" + + "e.bigtable.admin.v2B\nTableProtoP\001Z=googl" + + "e.golang.org/genproto/googleapis/bigtabl" + + "e/admin/v2;admin\252\002\036Google.Cloud.Bigtable" + + ".Admin.V2\312\002\036Google\\Cloud\\Bigtable\\Admin\\" + + "V2\352\002\"Google::Cloud::Bigtable::Admin::V2\352" + + "A\246\001\n(cloudkms.googleapis.com/CryptoKeyVe" + + "rsion\022zprojects/{project}/locations/{loc" + + "ation}/keyRings/{key_ring}/cryptoKeys/{c" + + "rypto_key}/cryptoKeyVersions/{crypto_key" + + "_version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -211,7 +212,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_admin_v2_Table_descriptor, new java.lang.String[] { - "Name", "ClusterStates", "ColumnFamilies", "Granularity", "RestoreInfo", + "Name", + "ClusterStates", + "ColumnFamilies", + "Granularity", + "RestoreInfo", + "DeletionProtection", }); internal_static_google_bigtable_admin_v2_Table_ClusterState_descriptor = internal_static_google_bigtable_admin_v2_Table_descriptor.getNestedTypes().get(0); diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java index b4488d0427..383ba6159a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableMetadata.java @@ -53,82 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UndeleteTableMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableMetadata_descriptor; @@ -308,7 +232,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(3, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -326,7 +250,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -351,7 +275,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -372,7 +296,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -502,17 +426,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UndeleteTableMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -630,7 +547,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UndeleteTableMetadata othe if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +562,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UndeleteTableMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.UndeleteTableMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1156,7 +1104,18 @@ public UndeleteTableMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UndeleteTableMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java index 8cecfc37af..1416ee41cd 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UndeleteTableRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UndeleteTableRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UndeleteTableRequest_descriptor; @@ -188,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -200,7 +154,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -217,7 +171,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.admin.v2.UndeleteTableRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +184,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UndeleteTableRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UndeleteTableRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,18 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UndeleteTableRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.UndeleteTableRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -648,7 +614,18 @@ public UndeleteTableRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UndeleteTableRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java index 4455327c4d..c8f33f9e7a 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileMetadata.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAppProfileMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileMetadata_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.bigtable.admin.v2.UpdateAppProfileMetadata other = (com.google.bigtable.admin.v2.UpdateAppProfileMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UpdateAppProfileMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateAppProfileMetadata other) { if (other == com.google.bigtable.admin.v2.UpdateAppProfileMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,18 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UpdateAppProfileMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.UpdateAppProfileMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -439,7 +406,18 @@ public UpdateAppProfileMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAppProfileMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java index 748c754d5c..10c54caa1c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAppProfileRequest.java @@ -50,81 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAppProfileRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.AppProfile.Builder subBuilder = null; - if (appProfile_ != null) { - subBuilder = appProfile_.toBuilder(); - } - appProfile_ = - input.readMessage( - com.google.bigtable.admin.v2.AppProfile.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(appProfile_); - appProfile_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - ignoreWarnings_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateAppProfileRequest_descriptor; @@ -287,7 +212,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ignoreWarnings_ != false) { output.writeBool(3, ignoreWarnings_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +230,7 @@ public int getSerializedSize() { if (ignoreWarnings_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreWarnings_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -330,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } if (getIgnoreWarnings() != other.getIgnoreWarnings()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -351,7 +276,7 @@ public int hashCode() { } hash = (37 * hash) + IGNORE_WARNINGS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreWarnings()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -480,17 +405,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UpdateAppProfileRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -607,7 +525,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateAppProfileRequest ot if (other.getIgnoreWarnings() != false) { setIgnoreWarnings(other.getIgnoreWarnings()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,18 +540,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UpdateAppProfileRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAppProfileFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + ignoreWarnings_ = input.readBool(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.UpdateAppProfileRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1125,7 +1074,18 @@ public UpdateAppProfileRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAppProfileRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java index 6af688de21..a4311ef7bc 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateBackupRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateBackupRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.Backup.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = - input.readMessage( - com.google.bigtable.admin.v2.Backup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableTableAdminProto .internal_static_google_bigtable_admin_v2_UpdateBackupRequest_descriptor; @@ -274,7 +204,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -289,7 +219,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +243,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +262,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -461,17 +391,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UpdateBackupRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -582,7 +505,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateBackupRequest other) if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -597,17 +520,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UpdateBackupRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBackupFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.admin.v2.UpdateBackupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1088,7 +1037,18 @@ public UpdateBackupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateBackupRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java index a4eb043ea0..87faae7b1c 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateClusterMetadata.java @@ -50,91 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateClusterMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.Cluster.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.Cluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateClusterMetadata_descriptor; @@ -313,7 +228,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (finishTime_ != null) { output.writeMessage(3, getFinishTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +246,7 @@ public int getSerializedSize() { if (finishTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinishTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +274,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFinishTime()) { if (!getFinishTime().equals(other.getFinishTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +297,7 @@ public int hashCode() { hash = (37 * hash) + FINISH_TIME_FIELD_NUMBER; hash = (53 * hash) + getFinishTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +426,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UpdateClusterMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -646,7 +554,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateClusterMetadata othe if (other.hasFinishTime()) { mergeFinishTime(other.getFinishTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -661,18 +569,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UpdateClusterMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.UpdateClusterMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1262,7 +1201,18 @@ public UpdateClusterMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateClusterMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java index e0acd91878..462d1afca9 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateInstanceMetadata.java @@ -50,92 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateInstanceMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.Builder subBuilder = null; - if (originalRequest_ != null) { - subBuilder = originalRequest_.toBuilder(); - } - originalRequest_ = - input.readMessage( - com.google.bigtable.admin.v2.PartialUpdateInstanceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalRequest_); - originalRequest_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (requestTime_ != null) { - subBuilder = requestTime_.toBuilder(); - } - requestTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestTime_); - requestTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (finishTime_ != null) { - subBuilder = finishTime_.toBuilder(); - } - finishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(finishTime_); - finishTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.admin.v2.BigtableInstanceAdminProto .internal_static_google_bigtable_admin_v2_UpdateInstanceMetadata_descriptor; @@ -315,7 +229,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (finishTime_ != null) { output.writeMessage(3, getFinishTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -333,7 +247,7 @@ public int getSerializedSize() { if (finishTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinishTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +275,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFinishTime()) { if (!getFinishTime().equals(other.getFinishTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -384,7 +298,7 @@ public int hashCode() { hash = (37 * hash) + FINISH_TIME_FIELD_NUMBER; hash = (53 * hash) + getFinishTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +427,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.admin.v2.UpdateInstanceMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -648,7 +555,7 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateInstanceMetadata oth if (other.hasFinishTime()) { mergeFinishTime(other.getFinishTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -663,18 +570,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.admin.v2.UpdateInstanceMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOriginalRequestFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getRequestTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFinishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.admin.v2.UpdateInstanceMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1268,7 +1206,18 @@ public UpdateInstanceMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateInstanceMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java new file mode 100644 index 0000000000..8a951e94b0 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadata.java @@ -0,0 +1,1135 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * Metadata type for the operation returned by
    + * [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateTableMetadata} + */ +public final class UpdateTableMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateTableMetadata) + UpdateTableMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTableMetadata.newBuilder() to construct. + private UpdateTableMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTableMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTableMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateTableMetadata.class, + com.google.bigtable.admin.v2.UpdateTableMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
    +   * The name of the table being updated.
    +   * 
    + * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
    +   * The name of the table being updated.
    +   * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
    +   * If set, the time at which this operation finished or was canceled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
    +   * If set, the time at which this operation finished or was canceled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
    +   * If set, the time at which this operation finished or was canceled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (startTime_ != null) { + output.writeMessage(2, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(3, getEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); + } + size += getUnknownFields().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.bigtable.admin.v2.UpdateTableMetadata)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateTableMetadata other = + (com.google.bigtable.admin.v2.UpdateTableMetadata) obj; + + if (!getName().equals(other.getName())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata 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.bigtable.admin.v2.UpdateTableMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.admin.v2.UpdateTableMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * Metadata type for the operation returned by
    +   * [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateTableMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateTableMetadata) + com.google.bigtable.admin.v2.UpdateTableMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateTableMetadata.class, + com.google.bigtable.admin.v2.UpdateTableMetadata.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateTableMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableMetadata_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableMetadata getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateTableMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableMetadata build() { + com.google.bigtable.admin.v2.UpdateTableMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableMetadata buildPartial() { + com.google.bigtable.admin.v2.UpdateTableMetadata result = + new com.google.bigtable.admin.v2.UpdateTableMetadata(this); + result.name_ = name_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateTableMetadata) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateTableMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateTableMetadata other) { + if (other == com.google.bigtable.admin.v2.UpdateTableMetadata.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
    +     * The name of the table being updated.
    +     * 
    + * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
    +     * The name of the table being updated.
    +     * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
    +     * The name of the table being updated.
    +     * 
    + * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The name of the table being updated.
    +     * 
    + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The name of the table being updated.
    +     * 
    + * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
    +     * The time at which this operation started.
    +     * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
    +     * If set, the time at which this operation finished or was canceled.
    +     * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateTableMetadata) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateTableMetadata) + private static final com.google.bigtable.admin.v2.UpdateTableMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateTableMetadata(); + } + + public static com.google.bigtable.admin.v2.UpdateTableMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTableMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java new file mode 100644 index 0000000000..734da4bb0d --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableMetadataOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +public interface UpdateTableMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateTableMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The name of the table being updated.
    +   * 
    + * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
    +   * The name of the table being updated.
    +   * 
    + * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
    +   * The time at which this operation started.
    +   * 
    + * + * .google.protobuf.Timestamp start_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
    +   * If set, the time at which this operation finished or was canceled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
    +   * If set, the time at which this operation finished or was canceled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
    +   * If set, the time at which this operation finished or was canceled.
    +   * 
    + * + * .google.protobuf.Timestamp end_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java new file mode 100644 index 0000000000..b3a21906de --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequest.java @@ -0,0 +1,1080 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +/** + * + * + *
    + * The request for
    + * [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
    + * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateTableRequest} + */ +public final class UpdateTableRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.UpdateTableRequest) + UpdateTableRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTableRequest.newBuilder() to construct. + private UpdateTableRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTableRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTableRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateTableRequest.class, + com.google.bigtable.admin.v2.UpdateTableRequest.Builder.class); + } + + public static final int TABLE_FIELD_NUMBER = 1; + private com.google.bigtable.admin.v2.Table table_; + /** + * + * + *
    +   * Required. The table to update.
    +   * The table's `name` field is used to identify the table to update.
    +   * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the table field is set. + */ + @java.lang.Override + public boolean hasTable() { + return table_ != null; + } + /** + * + * + *
    +   * Required. The table to update.
    +   * The table's `name` field is used to identify the table to update.
    +   * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The table. + */ + @java.lang.Override + public com.google.bigtable.admin.v2.Table getTable() { + return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; + } + /** + * + * + *
    +   * Required. The table to update.
    +   * The table's `name` field is used to identify the table to update.
    +   * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { + return getTable(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
    +   * Required. The list of fields to update.
    +   * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +   * field should be updated. This mask is relative to the `table` field, not to
    +   * the request message. The wildcard (*) path is currently not supported.
    +   * Currently UpdateTable is only supported for the following field:
    +   *  * `deletion_protection`
    +   * If `column_families` is set in `update_mask`, it will return an
    +   * UNIMPLEMENTED error.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
    +   * Required. The list of fields to update.
    +   * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +   * field should be updated. This mask is relative to the `table` field, not to
    +   * the request message. The wildcard (*) path is currently not supported.
    +   * Currently UpdateTable is only supported for the following field:
    +   *  * `deletion_protection`
    +   * If `column_families` is set in `update_mask`, it will return an
    +   * UNIMPLEMENTED error.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
    +   * Required. The list of fields to update.
    +   * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +   * field should be updated. This mask is relative to the `table` field, not to
    +   * the request message. The wildcard (*) path is currently not supported.
    +   * Currently UpdateTable is only supported for the following field:
    +   *  * `deletion_protection`
    +   * If `column_families` is set in `update_mask`, it will return an
    +   * UNIMPLEMENTED error.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (table_ != null) { + output.writeMessage(1, getTable()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (table_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTable()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().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.bigtable.admin.v2.UpdateTableRequest)) { + return super.equals(obj); + } + com.google.bigtable.admin.v2.UpdateTableRequest other = + (com.google.bigtable.admin.v2.UpdateTableRequest) obj; + + if (hasTable() != other.hasTable()) return false; + if (hasTable()) { + if (!getTable().equals(other.getTable())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTable()) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest 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.bigtable.admin.v2.UpdateTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.admin.v2.UpdateTableRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * The request for
    +   * [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable].
    +   * 
    + * + * Protobuf type {@code google.bigtable.admin.v2.UpdateTableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.UpdateTableRequest) + com.google.bigtable.admin.v2.UpdateTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.admin.v2.UpdateTableRequest.class, + com.google.bigtable.admin.v2.UpdateTableRequest.Builder.class); + } + + // Construct using com.google.bigtable.admin.v2.UpdateTableRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (tableBuilder_ == null) { + table_ = null; + } else { + table_ = null; + tableBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.admin.v2.BigtableTableAdminProto + .internal_static_google_bigtable_admin_v2_UpdateTableRequest_descriptor; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableRequest getDefaultInstanceForType() { + return com.google.bigtable.admin.v2.UpdateTableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableRequest build() { + com.google.bigtable.admin.v2.UpdateTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableRequest buildPartial() { + com.google.bigtable.admin.v2.UpdateTableRequest result = + new com.google.bigtable.admin.v2.UpdateTableRequest(this); + if (tableBuilder_ == null) { + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.admin.v2.UpdateTableRequest) { + return mergeFrom((com.google.bigtable.admin.v2.UpdateTableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.admin.v2.UpdateTableRequest other) { + if (other == com.google.bigtable.admin.v2.UpdateTableRequest.getDefaultInstance()) + return this; + if (other.hasTable()) { + mergeTable(other.getTable()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTableFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.bigtable.admin.v2.Table table_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Table, + com.google.bigtable.admin.v2.Table.Builder, + com.google.bigtable.admin.v2.TableOrBuilder> + tableBuilder_; + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the table field is set. + */ + public boolean hasTable() { + return tableBuilder_ != null || table_ != null; + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The table. + */ + public com.google.bigtable.admin.v2.Table getTable() { + if (tableBuilder_ == null) { + return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; + } else { + return tableBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTable(com.google.bigtable.admin.v2.Table value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTable(com.google.bigtable.admin.v2.Table.Builder builderForValue) { + if (tableBuilder_ == null) { + table_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTable(com.google.bigtable.admin.v2.Table value) { + if (tableBuilder_ == null) { + if (table_ != null) { + table_ = + com.google.bigtable.admin.v2.Table.newBuilder(table_).mergeFrom(value).buildPartial(); + } else { + table_ = value; + } + onChanged(); + } else { + tableBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = null; + onChanged(); + } else { + table_ = null; + tableBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.Table.Builder getTableBuilder() { + + onChanged(); + return getTableFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilder(); + } else { + return table_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : table_; + } + } + /** + * + * + *
    +     * Required. The table to update.
    +     * The table's `name` field is used to identify the table to update.
    +     * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Table, + com.google.bigtable.admin.v2.Table.Builder, + com.google.bigtable.admin.v2.TableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.admin.v2.Table, + com.google.bigtable.admin.v2.Table.Builder, + com.google.bigtable.admin.v2.TableOrBuilder>( + getTable(), getParentForChildren(), isClean()); + table_ = null; + } + return tableBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
    +     * Required. The list of fields to update.
    +     * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +     * field should be updated. This mask is relative to the `table` field, not to
    +     * the request message. The wildcard (*) path is currently not supported.
    +     * Currently UpdateTable is only supported for the following field:
    +     *  * `deletion_protection`
    +     * If `column_families` is set in `update_mask`, it will return an
    +     * UNIMPLEMENTED error.
    +     * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.UpdateTableRequest) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.UpdateTableRequest) + private static final com.google.bigtable.admin.v2.UpdateTableRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.UpdateTableRequest(); + } + + public static com.google.bigtable.admin.v2.UpdateTableRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTableRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.admin.v2.UpdateTableRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java new file mode 100644 index 0000000000..3ded387418 --- /dev/null +++ b/proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateTableRequestOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/admin/v2/bigtable_table_admin.proto + +package com.google.bigtable.admin.v2; + +public interface UpdateTableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.UpdateTableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Required. The table to update.
    +   * The table's `name` field is used to identify the table to update.
    +   * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the table field is set. + */ + boolean hasTable(); + /** + * + * + *
    +   * Required. The table to update.
    +   * The table's `name` field is used to identify the table to update.
    +   * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The table. + */ + com.google.bigtable.admin.v2.Table getTable(); + /** + * + * + *
    +   * Required. The table to update.
    +   * The table's `name` field is used to identify the table to update.
    +   * 
    + * + * .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.bigtable.admin.v2.TableOrBuilder getTableOrBuilder(); + + /** + * + * + *
    +   * Required. The list of fields to update.
    +   * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +   * field should be updated. This mask is relative to the `table` field, not to
    +   * the request message. The wildcard (*) path is currently not supported.
    +   * Currently UpdateTable is only supported for the following field:
    +   *  * `deletion_protection`
    +   * If `column_families` is set in `update_mask`, it will return an
    +   * UNIMPLEMENTED error.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
    +   * Required. The list of fields to update.
    +   * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +   * field should be updated. This mask is relative to the `table` field, not to
    +   * the request message. The wildcard (*) path is currently not supported.
    +   * Currently UpdateTable is only supported for the following field:
    +   *  * `deletion_protection`
    +   * If `column_families` is set in `update_mask`, it will return an
    +   * UNIMPLEMENTED error.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
    +   * Required. The list of fields to update.
    +   * A mask specifying which fields (e.g. `deletion_protection`) in the `table`
    +   * field should be updated. This mask is relative to the `table` field, not to
    +   * the request message. The wildcard (*) path is currently not supported.
    +   * Currently UpdateTable is only supported for the following field:
    +   *  * `deletion_protection`
    +   * If `column_families` is set in `update_mask`, it will return an
    +   * UNIMPLEMENTED error.
    +   * 
    + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto index 92b9f690b2..6a2d9eac95 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/bigtable_table_admin.proto @@ -100,6 +100,19 @@ service BigtableTableAdmin { option (google.api.method_signature) = "name"; } + // Updates a specified table. + rpc UpdateTable(UpdateTableRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{table.name=projects/*/instances/*/tables/*}" + body: "table" + }; + option (google.api.method_signature) = "table,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Table" + metadata_type: "UpdateTableMetadata" + }; + } + // Permanently deletes a specified table and all of its data. rpc DeleteTable(DeleteTableRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -579,6 +592,38 @@ message GetTableRequest { Table.View view = 2; } +// The request for +// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. +message UpdateTableRequest { + // Required. The table to update. + // The table's `name` field is used to identify the table to update. + Table table = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + // A mask specifying which fields (e.g. `deletion_protection`) in the `table` + // field should be updated. This mask is relative to the `table` field, not to + // the request message. The wildcard (*) path is currently not supported. + // Currently UpdateTable is only supported for the following field: + // * `deletion_protection` + // If `column_families` is set in `update_mask`, it will return an + // UNIMPLEMENTED error. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Metadata type for the operation returned by +// [UpdateTable][google.bigtable.admin.v2.BigtableTableAdmin.UpdateTable]. +message UpdateTableMetadata { + // The name of the table being updated. + string name = 1; + + // The time at which this operation started. + google.protobuf.Timestamp start_time = 2; + + // If set, the time at which this operation finished or was canceled. + google.protobuf.Timestamp end_time = 3; +} + // Request message for // [google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable][google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable] message DeleteTableRequest { diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto index 4dbbbbbfc4..e7e73e00f2 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/instance.proto @@ -106,6 +106,9 @@ message Instance { // For instances created before this field was added (August 2021), this value // is `seconds: 0, nanos: 1`. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + optional bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The Autoscaling targets for a Cluster. These determine the recommended nodes. diff --git a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto index 4e5d2a4a72..5a59fd203d 100644 --- a/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto +++ b/proto-google-cloud-bigtable-admin-v2/src/main/proto/google/bigtable/admin/v2/table.proto @@ -156,6 +156,14 @@ message Table { // Output only. If this table was restored from another data source (e.g. a backup), this // field will be populated with information about the restore. RestoreInfo restore_info = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Set to true to make the table protected against data loss. i.e. deleting + // the following resources through Admin APIs are prohibited: + // - The table. + // - The column families in the table. + // - The instance containing the table. + // Note one can still delete the data stored in the table through Data APIs. + bool deletion_protection = 9; } // A set of columns within a table which share a common configuration. diff --git a/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml b/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml index 0259e4ee6e..3dc1fb98dc 100644 --- a/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml +++ b/proto-google-cloud-bigtable-v2/clirr-ignored-differences.xml @@ -4,6 +4,65 @@ 7012 com/google/bigtable/v2/*OrBuilder - * has*(*) + * get*(*) + + + 7012 + com/google/bigtable/v2/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/bigtable/v2/*OrBuilder + boolean has*(*) + + + + + + 7002 + com/google/bigtable/v2/RequestStats* + ** + + + 8001 + com/google/bigtable/v2/AllReadStats* + + + 8001 + com/google/bigtable/v2/ReadEfficiencyStats* + + + 8001 + com/google/bigtable/v2/ReadIteratorStats* + + + 8001 + com/google/bigtable/v2/RequestStats$StatsCase + + + 6001 + com/google/bigtable/v2/ReadRowsRequest$RequestStatsView + REQUEST_STATS_EFFICIENCY + + + 6011 + com/google/bigtable/v2/ReadRowsRequest$RequestStatsView + REQUEST_STATS_EFFICIENCY_VALUE + + + 6011 + com/google/bigtable/v2/RequestStats + ALL_READ_STATS_FIELD_NUMBER + + + 6011 + com/google/bigtable/v2/RequestStats + READ_EFFICIENCY_STATS_FIELD_NUMBER + + + 6003 + com/google/bigtable/v2/ReadRowsRequest$RequestStatsView + REQUEST_STATS_FULL_VALUE \ No newline at end of file diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml index 42f7b20c96..cf7f5a352c 100644 --- a/proto-google-cloud-bigtable-v2/pom.xml +++ b/proto-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java index 5de4d1ecd5..8cb7595eee 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java @@ -145,200 +145,207 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032\027google/api/client.proto\032\037google/a" + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032\030google/api/routing.proto\032\035go" - + "ogle/bigtable/v2/data.proto\032\036google/prot" + + "ogle/bigtable/v2/data.proto\032&google/bigt" + + "able/v2/request_stats.proto\032\036google/prot" + "obuf/duration.proto\032\037google/protobuf/tim" + "estamp.proto\032\036google/protobuf/wrappers.p" - + "roto\032\027google/rpc/status.proto\"\326\001\n\017ReadRo" + + "roto\032\027google/rpc/status.proto\"\220\003\n\017ReadRo" + "wsRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"b" + "igtableadmin.googleapis.com/Table\022\026\n\016app" + "_profile_id\030\005 \001(\t\022(\n\004rows\030\002 \001(\0132\032.google" + ".bigtable.v2.RowSet\022-\n\006filter\030\003 \001(\0132\035.go" + "ogle.bigtable.v2.RowFilter\022\022\n\nrows_limit" - + "\030\004 \001(\003\"\370\002\n\020ReadRowsResponse\022>\n\006chunks\030\001 " - + "\003(\0132..google.bigtable.v2.ReadRowsRespons" - + "e.CellChunk\022\034\n\024last_scanned_row_key\030\002 \001(" - + "\014\032\205\002\n\tCellChunk\022\017\n\007row_key\030\001 \001(\014\0221\n\013fami" - + "ly_name\030\002 \001(\0132\034.google.protobuf.StringVa" - + "lue\022.\n\tqualifier\030\003 \001(\0132\033.google.protobuf" - + ".BytesValue\022\030\n\020timestamp_micros\030\004 \001(\003\022\016\n" - + "\006labels\030\005 \003(\t\022\r\n\005value\030\006 \001(\014\022\022\n\nvalue_si" - + "ze\030\007 \001(\005\022\023\n\treset_row\030\010 \001(\010H\000\022\024\n\ncommit_" - + "row\030\t \001(\010H\000B\014\n\nrow_status\"n\n\024SampleRowKe" - + "ysRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"b" - + "igtableadmin.googleapis.com/Table\022\026\n\016app" - + "_profile_id\030\002 \001(\t\">\n\025SampleRowKeysRespon" - + "se\022\017\n\007row_key\030\001 \001(\014\022\024\n\014offset_bytes\030\002 \001(" - + "\003\"\266\001\n\020MutateRowRequest\022>\n\ntable_name\030\001 \001" + + "\030\004 \001(\003\022P\n\022request_stats_view\030\006 \001(\01624.goo" + + "gle.bigtable.v2.ReadRowsRequest.RequestS" + + "tatsView\"f\n\020RequestStatsView\022\"\n\036REQUEST_" + + "STATS_VIEW_UNSPECIFIED\020\000\022\026\n\022REQUEST_STAT" + + "S_NONE\020\001\022\026\n\022REQUEST_STATS_FULL\020\002\"\261\003\n\020Rea" + + "dRowsResponse\022>\n\006chunks\030\001 \003(\0132..google.b" + + "igtable.v2.ReadRowsResponse.CellChunk\022\034\n" + + "\024last_scanned_row_key\030\002 \001(\014\0227\n\rrequest_s" + + "tats\030\003 \001(\0132 .google.bigtable.v2.RequestS" + + "tats\032\205\002\n\tCellChunk\022\017\n\007row_key\030\001 \001(\014\0221\n\013f" + + "amily_name\030\002 \001(\0132\034.google.protobuf.Strin" + + "gValue\022.\n\tqualifier\030\003 \001(\0132\033.google.proto" + + "buf.BytesValue\022\030\n\020timestamp_micros\030\004 \001(\003" + + "\022\016\n\006labels\030\005 \003(\t\022\r\n\005value\030\006 \001(\014\022\022\n\nvalue" + + "_size\030\007 \001(\005\022\023\n\treset_row\030\010 \001(\010H\000\022\024\n\ncomm" + + "it_row\030\t \001(\010H\000B\014\n\nrow_status\"n\n\024SampleRo" + + "wKeysRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$" + + "\n\"bigtableadmin.googleapis.com/Table\022\026\n\016" + + "app_profile_id\030\002 \001(\t\">\n\025SampleRowKeysRes" + + "ponse\022\017\n\007row_key\030\001 \001(\014\022\024\n\014offset_bytes\030\002" + + " \001(\003\"\266\001\n\020MutateRowRequest\022>\n\ntable_name\030" + + "\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis." + + "com/Table\022\026\n\016app_profile_id\030\004 \001(\t\022\024\n\007row" + + "_key\030\002 \001(\014B\003\340A\002\0224\n\tmutations\030\003 \003(\0132\034.goo" + + "gle.bigtable.v2.MutationB\003\340A\002\"\023\n\021MutateR" + + "owResponse\"\376\001\n\021MutateRowsRequest\022>\n\ntabl" + + "e_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.goog" + + "leapis.com/Table\022\026\n\016app_profile_id\030\003 \001(\t" + + "\022A\n\007entries\030\002 \003(\0132+.google.bigtable.v2.M" + + "utateRowsRequest.EntryB\003\340A\002\032N\n\005Entry\022\017\n\007" + + "row_key\030\001 \001(\014\0224\n\tmutations\030\002 \003(\0132\034.googl" + + "e.bigtable.v2.MutationB\003\340A\002\"\217\001\n\022MutateRo" + + "wsResponse\022=\n\007entries\030\001 \003(\0132,.google.big" + + "table.v2.MutateRowsResponse.Entry\032:\n\005Ent" + + "ry\022\r\n\005index\030\001 \001(\003\022\"\n\006status\030\002 \001(\0132\022.goog" + + "le.rpc.Status\"\256\002\n\030CheckAndMutateRowReque" + + "st\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtable" + + "admin.googleapis.com/Table\022\026\n\016app_profil" + + "e_id\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0227\n\020pred" + + "icate_filter\030\006 \001(\0132\035.google.bigtable.v2." + + "RowFilter\0224\n\016true_mutations\030\004 \003(\0132\034.goog" + + "le.bigtable.v2.Mutation\0225\n\017false_mutatio" + + "ns\030\005 \003(\0132\034.google.bigtable.v2.Mutation\"6" + + "\n\031CheckAndMutateRowResponse\022\031\n\021predicate" + + "_matched\030\001 \001(\010\"i\n\022PingAndWarmRequest\022;\n\004" + + "name\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin.google" + + "apis.com/Instance\022\026\n\016app_profile_id\030\002 \001(" + + "\t\"\025\n\023PingAndWarmResponse\"\306\001\n\031ReadModifyW" + + "riteRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372" + + "A$\n\"bigtableadmin.googleapis.com/Table\022\026" + + "\n\016app_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B" + + "\003\340A\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v2" + + ".ReadModifyWriteRuleB\003\340A\002\"B\n\032ReadModifyW" + + "riteRowResponse\022$\n\003row\030\001 \001(\0132\027.google.bi" + + "gtable.v2.Row\"\206\001\n,GenerateInitialChangeS" + + "treamPartitionsRequest\022>\n\ntable_name\030\001 \001" + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com" - + "/Table\022\026\n\016app_profile_id\030\004 \001(\t\022\024\n\007row_ke" - + "y\030\002 \001(\014B\003\340A\002\0224\n\tmutations\030\003 \003(\0132\034.google" - + ".bigtable.v2.MutationB\003\340A\002\"\023\n\021MutateRowR" - + "esponse\"\376\001\n\021MutateRowsRequest\022>\n\ntable_n" - + "ame\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadmin.googlea" - + "pis.com/Table\022\026\n\016app_profile_id\030\003 \001(\t\022A\n" - + "\007entries\030\002 \003(\0132+.google.bigtable.v2.Muta" - + "teRowsRequest.EntryB\003\340A\002\032N\n\005Entry\022\017\n\007row" - + "_key\030\001 \001(\014\0224\n\tmutations\030\002 \003(\0132\034.google.b" - + "igtable.v2.MutationB\003\340A\002\"\217\001\n\022MutateRowsR" - + "esponse\022=\n\007entries\030\001 \003(\0132,.google.bigtab" - + "le.v2.MutateRowsResponse.Entry\032:\n\005Entry\022" - + "\r\n\005index\030\001 \001(\003\022\"\n\006status\030\002 \001(\0132\022.google." - + "rpc.Status\"\256\002\n\030CheckAndMutateRowRequest\022" - + ">\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtableadm" - + "in.googleapis.com/Table\022\026\n\016app_profile_i" - + "d\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0227\n\020predica" - + "te_filter\030\006 \001(\0132\035.google.bigtable.v2.Row" - + "Filter\0224\n\016true_mutations\030\004 \003(\0132\034.google." - + "bigtable.v2.Mutation\0225\n\017false_mutations\030" - + "\005 \003(\0132\034.google.bigtable.v2.Mutation\"6\n\031C" - + "heckAndMutateRowResponse\022\031\n\021predicate_ma" - + "tched\030\001 \001(\010\"i\n\022PingAndWarmRequest\022;\n\004nam" - + "e\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin.googleapi" - + "s.com/Instance\022\026\n\016app_profile_id\030\002 \001(\t\"\025" - + "\n\023PingAndWarmResponse\"\306\001\n\031ReadModifyWrit" - + "eRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n" - + "\"bigtableadmin.googleapis.com/Table\022\026\n\016a" - + "pp_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A" - + "\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v2.Re" - + "adModifyWriteRuleB\003\340A\002\"B\n\032ReadModifyWrit" - + "eRowResponse\022$\n\003row\030\001 \001(\0132\027.google.bigta" - + "ble.v2.Row\"\206\001\n,GenerateInitialChangeStre" - + "amPartitionsRequest\022>\n\ntable_name\030\001 \001(\tB" - + "*\340A\002\372A$\n\"bigtableadmin.googleapis.com/Ta" - + "ble\022\026\n\016app_profile_id\030\002 \001(\t\"g\n-GenerateI" - + "nitialChangeStreamPartitionsResponse\0226\n\t" - + "partition\030\001 \001(\0132#.google.bigtable.v2.Str" - + "eamPartition\"\233\003\n\027ReadChangeStreamRequest" - + "\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtablead" - + "min.googleapis.com/Table\022\026\n\016app_profile_" - + "id\030\002 \001(\t\0226\n\tpartition\030\003 \001(\0132#.google.big" - + "table.v2.StreamPartition\0220\n\nstart_time\030\004" - + " \001(\0132\032.google.protobuf.TimestampH\000\022K\n\023co" - + "ntinuation_tokens\030\006 \001(\0132,.google.bigtabl" - + "e.v2.StreamContinuationTokensH\000\022,\n\010end_t" - + "ime\030\005 \001(\0132\032.google.protobuf.Timestamp\0225\n" - + "\022heartbeat_duration\030\007 \001(\0132\031.google.proto" - + "buf.DurationB\014\n\nstart_from\"\327\t\n\030ReadChang" - + "eStreamResponse\022N\n\013data_change\030\001 \001(\01327.g" - + "oogle.bigtable.v2.ReadChangeStreamRespon" - + "se.DataChangeH\000\022K\n\theartbeat\030\002 \001(\01326.goo" - + "gle.bigtable.v2.ReadChangeStreamResponse" - + ".HeartbeatH\000\022P\n\014close_stream\030\003 \001(\01328.goo" - + "gle.bigtable.v2.ReadChangeStreamResponse" - + ".CloseStreamH\000\032\364\001\n\rMutationChunk\022X\n\nchun" - + "k_info\030\001 \001(\0132D.google.bigtable.v2.ReadCh" - + "angeStreamResponse.MutationChunk.ChunkIn" - + "fo\022.\n\010mutation\030\002 \001(\0132\034.google.bigtable.v" - + "2.Mutation\032Y\n\tChunkInfo\022\032\n\022chunked_value" - + "_size\030\001 \001(\005\022\034\n\024chunked_value_offset\030\002 \001(" - + "\005\022\022\n\nlast_chunk\030\003 \001(\010\032\274\003\n\nDataChange\022J\n\004" - + "type\030\001 \001(\0162<.google.bigtable.v2.ReadChan" - + "geStreamResponse.DataChange.Type\022\031\n\021sour" - + "ce_cluster_id\030\002 \001(\t\022\017\n\007row_key\030\003 \001(\014\0224\n\020" - + "commit_timestamp\030\004 \001(\0132\032.google.protobuf" - + ".Timestamp\022\022\n\ntiebreaker\030\005 \001(\005\022J\n\006chunks" - + "\030\006 \003(\0132:.google.bigtable.v2.ReadChangeSt" - + "reamResponse.MutationChunk\022\014\n\004done\030\010 \001(\010" - + "\022\r\n\005token\030\t \001(\t\0221\n\rlow_watermark\030\n \001(\0132\032" - + ".google.protobuf.Timestamp\"P\n\004Type\022\024\n\020TY" - + "PE_UNSPECIFIED\020\000\022\010\n\004USER\020\001\022\026\n\022GARBAGE_CO" - + "LLECTION\020\002\022\020\n\014CONTINUATION\020\003\032\207\001\n\tHeartbe" - + "at\022G\n\022continuation_token\030\001 \001(\0132+.google." - + "bigtable.v2.StreamContinuationToken\0221\n\rl" - + "ow_watermark\030\002 \001(\0132\032.google.protobuf.Tim" - + "estamp\032{\n\013CloseStream\022\"\n\006status\030\001 \001(\0132\022." - + "google.rpc.Status\022H\n\023continuation_tokens" - + "\030\002 \003(\0132+.google.bigtable.v2.StreamContin" - + "uationTokenB\017\n\rstream_record2\327\030\n\010Bigtabl" - + "e\022\233\002\n\010ReadRows\022#.google.bigtable.v2.Read" - + "RowsRequest\032$.google.bigtable.v2.ReadRow" - + "sResponse\"\301\001\202\323\344\223\002>\"9/v2/{table_name=proj" - + "ects/*/instances/*/tables/*}:readRows:\001*" - + "\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=projec" - + "ts/*/instances/*/tables/*}\022\020\n\016app_profil" - + "e_id\332A\ntable_name\332A\031table_name,app_profi" - + "le_id0\001\022\254\002\n\rSampleRowKeys\022(.google.bigta" - + "ble.v2.SampleRowKeysRequest\032).google.big" - + "table.v2.SampleRowKeysResponse\"\303\001\202\323\344\223\002@\022" - + ">/v2/{table_name=projects/*/instances/*/" - + "tables/*}:sampleRowKeys\212\323\344\223\002N\022:\n\ntable_n" - + "ame\022,{table_name=projects/*/instances/*/" - + "tables/*}\022\020\n\016app_profile_id\332A\ntable_name" - + "\332A\031table_name,app_profile_id0\001\022\301\002\n\tMutat" - + "eRow\022$.google.bigtable.v2.MutateRowReque" - + "st\032%.google.bigtable.v2.MutateRowRespons" - + "e\"\346\001\202\323\344\223\002?\":/v2/{table_name=projects/*/i" - + "nstances/*/tables/*}:mutateRow:\001*\212\323\344\223\002N\022" - + ":\n\ntable_name\022,{table_name=projects/*/in" - + "stances/*/tables/*}\022\020\n\016app_profile_id\332A\034" - + "table_name,row_key,mutations\332A+table_nam" - + "e,row_key,mutations,app_profile_id\022\263\002\n\nM" - + "utateRows\022%.google.bigtable.v2.MutateRow" - + "sRequest\032&.google.bigtable.v2.MutateRows" - + "Response\"\323\001\202\323\344\223\002@\";/v2/{table_name=proje" - + "cts/*/instances/*/tables/*}:mutateRows:\001" - + "*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=proje" - + "cts/*/instances/*/tables/*}\022\020\n\016app_profi" - + "le_id\332A\022table_name,entries\332A!table_name," - + "entries,app_profile_id0\001\022\255\003\n\021CheckAndMut" - + "ateRow\022,.google.bigtable.v2.CheckAndMuta" - + "teRowRequest\032-.google.bigtable.v2.CheckA" - + "ndMutateRowResponse\"\272\002\202\323\344\223\002G\"B/v2/{table" - + "_name=projects/*/instances/*/tables/*}:c" - + "heckAndMutateRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022" + + "/Table\022\026\n\016app_profile_id\030\002 \001(\t\"g\n-Genera" + + "teInitialChangeStreamPartitionsResponse\022" + + "6\n\tpartition\030\001 \001(\0132#.google.bigtable.v2." + + "StreamPartition\"\233\003\n\027ReadChangeStreamRequ" + + "est\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtabl" + + "eadmin.googleapis.com/Table\022\026\n\016app_profi" + + "le_id\030\002 \001(\t\0226\n\tpartition\030\003 \001(\0132#.google." + + "bigtable.v2.StreamPartition\0220\n\nstart_tim" + + "e\030\004 \001(\0132\032.google.protobuf.TimestampH\000\022K\n" + + "\023continuation_tokens\030\006 \001(\0132,.google.bigt" + + "able.v2.StreamContinuationTokensH\000\022,\n\010en" + + "d_time\030\005 \001(\0132\032.google.protobuf.Timestamp" + + "\0225\n\022heartbeat_duration\030\007 \001(\0132\031.google.pr" + + "otobuf.DurationB\014\n\nstart_from\"\327\t\n\030ReadCh" + + "angeStreamResponse\022N\n\013data_change\030\001 \001(\0132" + + "7.google.bigtable.v2.ReadChangeStreamRes" + + "ponse.DataChangeH\000\022K\n\theartbeat\030\002 \001(\01326." + + "google.bigtable.v2.ReadChangeStreamRespo" + + "nse.HeartbeatH\000\022P\n\014close_stream\030\003 \001(\01328." + + "google.bigtable.v2.ReadChangeStreamRespo" + + "nse.CloseStreamH\000\032\364\001\n\rMutationChunk\022X\n\nc" + + "hunk_info\030\001 \001(\0132D.google.bigtable.v2.Rea" + + "dChangeStreamResponse.MutationChunk.Chun" + + "kInfo\022.\n\010mutation\030\002 \001(\0132\034.google.bigtabl" + + "e.v2.Mutation\032Y\n\tChunkInfo\022\032\n\022chunked_va" + + "lue_size\030\001 \001(\005\022\034\n\024chunked_value_offset\030\002" + + " \001(\005\022\022\n\nlast_chunk\030\003 \001(\010\032\274\003\n\nDataChange\022" + + "J\n\004type\030\001 \001(\0162<.google.bigtable.v2.ReadC" + + "hangeStreamResponse.DataChange.Type\022\031\n\021s" + + "ource_cluster_id\030\002 \001(\t\022\017\n\007row_key\030\003 \001(\014\022" + + "4\n\020commit_timestamp\030\004 \001(\0132\032.google.proto" + + "buf.Timestamp\022\022\n\ntiebreaker\030\005 \001(\005\022J\n\006chu" + + "nks\030\006 \003(\0132:.google.bigtable.v2.ReadChang" + + "eStreamResponse.MutationChunk\022\014\n\004done\030\010 " + + "\001(\010\022\r\n\005token\030\t \001(\t\0221\n\rlow_watermark\030\n \001(" + + "\0132\032.google.protobuf.Timestamp\"P\n\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001\022\026\n\022GARBAGE" + + "_COLLECTION\020\002\022\020\n\014CONTINUATION\020\003\032\207\001\n\tHear" + + "tbeat\022G\n\022continuation_token\030\001 \001(\0132+.goog" + + "le.bigtable.v2.StreamContinuationToken\0221" + + "\n\rlow_watermark\030\002 \001(\0132\032.google.protobuf." + + "Timestamp\032{\n\013CloseStream\022\"\n\006status\030\001 \001(\013" + + "2\022.google.rpc.Status\022H\n\023continuation_tok" + + "ens\030\002 \003(\0132+.google.bigtable.v2.StreamCon" + + "tinuationTokenB\017\n\rstream_record2\327\030\n\010Bigt" + + "able\022\233\002\n\010ReadRows\022#.google.bigtable.v2.R" + + "eadRowsRequest\032$.google.bigtable.v2.Read" + + "RowsResponse\"\301\001\202\323\344\223\002>\"9/v2/{table_name=p" + + "rojects/*/instances/*/tables/*}:readRows" + + ":\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=pro" + + "jects/*/instances/*/tables/*}\022\020\n\016app_pro" + + "file_id\332A\ntable_name\332A\031table_name,app_pr" + + "ofile_id0\001\022\254\002\n\rSampleRowKeys\022(.google.bi" + + "gtable.v2.SampleRowKeysRequest\032).google." + + "bigtable.v2.SampleRowKeysResponse\"\303\001\202\323\344\223" + + "\002@\022>/v2/{table_name=projects/*/instances" + + "/*/tables/*}:sampleRowKeys\212\323\344\223\002N\022:\n\ntabl" + + "e_name\022,{table_name=projects/*/instances" + + "/*/tables/*}\022\020\n\016app_profile_id\332A\ntable_n" + + "ame\332A\031table_name,app_profile_id0\001\022\301\002\n\tMu" + + "tateRow\022$.google.bigtable.v2.MutateRowRe" + + "quest\032%.google.bigtable.v2.MutateRowResp" + + "onse\"\346\001\202\323\344\223\002?\":/v2/{table_name=projects/" + + "*/instances/*/tables/*}:mutateRow:\001*\212\323\344\223" + + "\002N\022:\n\ntable_name\022,{table_name=projects/*" + + "/instances/*/tables/*}\022\020\n\016app_profile_id" + + "\332A\034table_name,row_key,mutations\332A+table_" + + "name,row_key,mutations,app_profile_id\022\263\002" + + "\n\nMutateRows\022%.google.bigtable.v2.Mutate" + + "RowsRequest\032&.google.bigtable.v2.MutateR" + + "owsResponse\"\323\001\202\323\344\223\002@\";/v2/{table_name=pr" + + "ojects/*/instances/*/tables/*}:mutateRow" + + "s:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=pr" + + "ojects/*/instances/*/tables/*}\022\020\n\016app_pr" + + "ofile_id\332A\022table_name,entries\332A!table_na" + + "me,entries,app_profile_id0\001\022\255\003\n\021CheckAnd" + + "MutateRow\022,.google.bigtable.v2.CheckAndM" + + "utateRowRequest\032-.google.bigtable.v2.Che" + + "ckAndMutateRowResponse\"\272\002\202\323\344\223\002G\"B/v2/{ta" + + "ble_name=projects/*/instances/*/tables/*" + + "}:checkAndMutateRow:\001*\212\323\344\223\002N\022:\n\ntable_na" + + "me\022,{table_name=projects/*/instances/*/t" + + "ables/*}\022\020\n\016app_profile_id\332ABtable_name," + + "row_key,predicate_filter,true_mutations," + + "false_mutations\332AQtable_name,row_key,pre" + + "dicate_filter,true_mutations,false_mutat" + + "ions,app_profile_id\022\356\001\n\013PingAndWarm\022&.go" + + "ogle.bigtable.v2.PingAndWarmRequest\032\'.go" + + "ogle.bigtable.v2.PingAndWarmResponse\"\215\001\202" + + "\323\344\223\002+\"&/v2/{name=projects/*/instances/*}" + + ":ping:\001*\212\323\344\223\0029\022%\n\004name\022\035{name=projects/*" + + "/instances/*}\022\020\n\016app_profile_id\332A\004name\332A" + + "\023name,app_profile_id\022\335\002\n\022ReadModifyWrite" + + "Row\022-.google.bigtable.v2.ReadModifyWrite" + + "RowRequest\032..google.bigtable.v2.ReadModi" + + "fyWriteRowResponse\"\347\001\202\323\344\223\002H\"C/v2/{table_" + + "name=projects/*/instances/*/tables/*}:re" + + "adModifyWriteRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022" + ",{table_name=projects/*/instances/*/tabl" - + "es/*}\022\020\n\016app_profile_id\332ABtable_name,row" - + "_key,predicate_filter,true_mutations,fal" - + "se_mutations\332AQtable_name,row_key,predic" - + "ate_filter,true_mutations,false_mutation" - + "s,app_profile_id\022\356\001\n\013PingAndWarm\022&.googl" - + "e.bigtable.v2.PingAndWarmRequest\032\'.googl" - + "e.bigtable.v2.PingAndWarmResponse\"\215\001\202\323\344\223" - + "\002+\"&/v2/{name=projects/*/instances/*}:pi" - + "ng:\001*\212\323\344\223\0029\022%\n\004name\022\035{name=projects/*/in" - + "stances/*}\022\020\n\016app_profile_id\332A\004name\332A\023na" - + "me,app_profile_id\022\335\002\n\022ReadModifyWriteRow" - + "\022-.google.bigtable.v2.ReadModifyWriteRow" - + "Request\032..google.bigtable.v2.ReadModifyW" - + "riteRowResponse\"\347\001\202\323\344\223\002H\"C/v2/{table_nam" - + "e=projects/*/instances/*/tables/*}:readM" - + "odifyWriteRow:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{t" - + "able_name=projects/*/instances/*/tables/" - + "*}\022\020\n\016app_profile_id\332A\030table_name,row_ke" - + "y,rules\332A\'table_name,row_key,rules,app_p" - + "rofile_id\022\273\002\n%GenerateInitialChangeStrea" - + "mPartitions\022@.google.bigtable.v2.Generat" - + "eInitialChangeStreamPartitionsRequest\032A." - + "google.bigtable.v2.GenerateInitialChange" - + "StreamPartitionsResponse\"\212\001\202\323\344\223\002[\"V/v2/{" - + "table_name=projects/*/instances/*/tables" - + "/*}:generateInitialChangeStreamPartition" - + "s:\001*\332A\ntable_name\332A\031table_name,app_profi" - + "le_id0\001\022\346\001\n\020ReadChangeStream\022+.google.bi" - + "gtable.v2.ReadChangeStreamRequest\032,.goog" - + "le.bigtable.v2.ReadChangeStreamResponse\"" - + "u\202\323\344\223\002F\"A/v2/{table_name=projects/*/inst" - + "ances/*/tables/*}:readChangeStream:\001*\332A\n" - + "table_name\332A\031table_name,app_profile_id0\001" - + "\032\333\002\312A\027bigtable.googleapis.com\322A\275\002https:/" - + "/www.googleapis.com/auth/bigtable.data,h" - + "ttps://www.googleapis.com/auth/bigtable." - + "data.readonly,https://www.googleapis.com" - + "/auth/cloud-bigtable.data,https://www.go" - + "ogleapis.com/auth/cloud-bigtable.data.re" - + "adonly,https://www.googleapis.com/auth/c" - + "loud-platform,https://www.googleapis.com" - + "/auth/cloud-platform.read-onlyB\353\002\n\026com.g" - + "oogle.bigtable.v2B\rBigtableProtoP\001Z:goog" - + "le.golang.org/genproto/googleapis/bigtab" - + "le/v2;bigtable\252\002\030Google.Cloud.Bigtable.V" - + "2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google::C" - + "loud::Bigtable::V2\352A\\\n\"bigtableadmin.goo" - + "gleapis.com/Table\0226projects/{project}/in" - + "stances/{instance}/tables/{table}\352AP\n%bi" - + "gtableadmin.googleapis.com/Instance\022\'pro" - + "jects/{project}/instances/{instance}b\006pr" - + "oto3" + + "es/*}\022\020\n\016app_profile_id\332A\030table_name,row" + + "_key,rules\332A\'table_name,row_key,rules,ap" + + "p_profile_id\022\273\002\n%GenerateInitialChangeSt" + + "reamPartitions\022@.google.bigtable.v2.Gene" + + "rateInitialChangeStreamPartitionsRequest" + + "\032A.google.bigtable.v2.GenerateInitialCha" + + "ngeStreamPartitionsResponse\"\212\001\202\323\344\223\002[\"V/v" + + "2/{table_name=projects/*/instances/*/tab" + + "les/*}:generateInitialChangeStreamPartit" + + "ions:\001*\332A\ntable_name\332A\031table_name,app_pr" + + "ofile_id0\001\022\346\001\n\020ReadChangeStream\022+.google" + + ".bigtable.v2.ReadChangeStreamRequest\032,.g" + + "oogle.bigtable.v2.ReadChangeStreamRespon" + + "se\"u\202\323\344\223\002F\"A/v2/{table_name=projects/*/i" + + "nstances/*/tables/*}:readChangeStream:\001*" + + "\332A\ntable_name\332A\031table_name,app_profile_i" + + "d0\001\032\333\002\312A\027bigtable.googleapis.com\322A\275\002http" + + "s://www.googleapis.com/auth/bigtable.dat" + + "a,https://www.googleapis.com/auth/bigtab" + + "le.data.readonly,https://www.googleapis." + + "com/auth/cloud-bigtable.data,https://www" + + ".googleapis.com/auth/cloud-bigtable.data" + + ".readonly,https://www.googleapis.com/aut" + + "h/cloud-platform,https://www.googleapis." + + "com/auth/cloud-platform.read-onlyB\353\002\n\026co" + + "m.google.bigtable.v2B\rBigtableProtoP\001Z:g" + + "oogle.golang.org/genproto/googleapis/big" + + "table/v2;bigtable\252\002\030Google.Cloud.Bigtabl" + + "e.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google" + + "::Cloud::Bigtable::V2\352AP\n%bigtableadmin." + + "googleapis.com/Instance\022\'projects/{proje" + + "ct}/instances/{instance}\352A\\\n\"bigtableadm" + + "in.googleapis.com/Table\0226projects/{proje" + + "ct}/instances/{instance}/tables/{table}b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -350,6 +357,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.api.RoutingProto.getDescriptor(), com.google.bigtable.v2.DataProto.getDescriptor(), + com.google.bigtable.v2.RequestStatsProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.protobuf.WrappersProto.getDescriptor(), @@ -361,7 +369,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_ReadRowsRequest_descriptor, new java.lang.String[] { - "TableName", "AppProfileId", "Rows", "Filter", "RowsLimit", + "TableName", "AppProfileId", "Rows", "Filter", "RowsLimit", "RequestStatsView", }); internal_static_google_bigtable_v2_ReadRowsResponse_descriptor = getDescriptor().getMessageTypes().get(1); @@ -369,7 +377,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_bigtable_v2_ReadRowsResponse_descriptor, new java.lang.String[] { - "Chunks", "LastScannedRowKey", + "Chunks", "LastScannedRowKey", "RequestStats", }); internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_descriptor = internal_static_google_bigtable_v2_ReadRowsResponse_descriptor.getNestedTypes().get(0); @@ -616,6 +624,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.api.RoutingProto.getDescriptor(); com.google.bigtable.v2.DataProto.getDescriptor(); + com.google.bigtable.v2.RequestStatsProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.WrappersProto.getDescriptor(); diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java index ebf47a5681..d6b97cdc4b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Cell.java @@ -53,69 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Cell( - 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; - case 8: - { - timestampMicros_ = input.readInt64(); - break; - } - case 18: - { - value_ = input.readBytes(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - labels_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = labels_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Cell_descriptor; } @@ -256,7 +193,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < labels_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, labels_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -279,7 +216,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getLabelsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -297,7 +234,7 @@ public boolean equals(final java.lang.Object obj) { if (getTimestampMicros() != other.getTimestampMicros()) return false; if (!getValue().equals(other.getValue())) return false; if (!getLabelsList().equals(other.getLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -316,7 +253,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + getLabelsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -442,17 +379,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Cell.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -562,7 +492,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Cell other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,17 +507,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Cell parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + timestampMicros_ = input.readInt64(); + + break; + } // case 8 + case 18: + { + value_ = input.readBytes(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLabelsIsMutable(); + labels_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Cell) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -921,7 +884,18 @@ public Cell parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Cell(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java index 0d1ca2cae2..a45a41ba9b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowRequest.java @@ -56,106 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CheckAndMutateRowRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 18: - { - rowKey_ = input.readBytes(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - trueMutations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - trueMutations_.add( - input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - falseMutations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - falseMutations_.add( - input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry)); - break; - } - case 50: - { - com.google.bigtable.v2.RowFilter.Builder subBuilder = null; - if (predicateFilter_ != null) { - subBuilder = predicateFilter_.toBuilder(); - } - predicateFilter_ = - input.readMessage(com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(predicateFilter_); - predicateFilter_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - trueMutations_ = java.util.Collections.unmodifiableList(trueMutations_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - falseMutations_ = java.util.Collections.unmodifiableList(falseMutations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor; @@ -566,7 +466,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, appProfileId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -593,7 +493,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, appProfileId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -618,7 +518,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getTrueMutationsList().equals(other.getTrueMutationsList())) return false; if (!getFalseMutationsList().equals(other.getFalseMutationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -647,7 +547,7 @@ public int hashCode() { hash = (37 * hash) + FALSE_MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getFalseMutationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -776,20 +676,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.CheckAndMutateRowRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTrueMutationsFieldBuilder(); - getFalseMutationsFieldBuilder(); - } } @java.lang.Override @@ -809,16 +699,18 @@ public Builder clear() { } if (trueMutationsBuilder_ == null) { trueMutations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + trueMutations_ = null; trueMutationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (falseMutationsBuilder_ == null) { falseMutations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + falseMutations_ = null; falseMutationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -991,7 +883,7 @@ public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowRequest other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1006,17 +898,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.CheckAndMutateRowRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + rowKey_ = input.readBytes(); + + break; + } // case 18 + case 34: + { + com.google.bigtable.v2.Mutation m = + input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry); + if (trueMutationsBuilder_ == null) { + ensureTrueMutationsIsMutable(); + trueMutations_.add(m); + } else { + trueMutationsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.bigtable.v2.Mutation m = + input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry); + if (falseMutationsBuilder_ == null) { + ensureFalseMutationsIsMutable(); + falseMutations_.add(m); + } else { + falseMutationsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + input.readMessage(getPredicateFilterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.CheckAndMutateRowRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2409,7 +2363,18 @@ public CheckAndMutateRowRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CheckAndMutateRowRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java index afcf90a5c8..038804e44b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/CheckAndMutateRowResponse.java @@ -50,50 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CheckAndMutateRowResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - predicateMatched_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor; @@ -145,7 +101,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (predicateMatched_ != false) { output.writeBool(1, predicateMatched_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -157,7 +113,7 @@ public int getSerializedSize() { if (predicateMatched_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, predicateMatched_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -174,7 +130,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.v2.CheckAndMutateRowResponse) obj; if (getPredicateMatched() != other.getPredicateMatched()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -187,7 +143,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PREDICATE_MATCHED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPredicateMatched()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -316,17 +272,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.CheckAndMutateRowResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -415,7 +364,7 @@ public Builder mergeFrom(com.google.bigtable.v2.CheckAndMutateRowResponse other) if (other.getPredicateMatched() != false) { setPredicateMatched(other.getPredicateMatched()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -430,17 +379,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.CheckAndMutateRowResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + predicateMatched_ = input.readBool(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.CheckAndMutateRowResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -531,7 +500,18 @@ public CheckAndMutateRowResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CheckAndMutateRowResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java index 4a26a89fd6..780f63da2d 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Column.java @@ -54,64 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Column( - 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; - case 10: - { - qualifier_ = input.readBytes(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cells_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - cells_.add( - input.readMessage(com.google.bigtable.v2.Cell.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - cells_ = java.util.Collections.unmodifiableList(cells_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Column_descriptor; } @@ -235,7 +177,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < cells_.size(); i++) { output.writeMessage(2, cells_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -250,7 +192,7 @@ public int getSerializedSize() { for (int i = 0; i < cells_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, cells_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -267,7 +209,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQualifier().equals(other.getQualifier())) return false; if (!getCellsList().equals(other.getCellsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -284,7 +226,7 @@ public int hashCode() { hash = (37 * hash) + CELLS_FIELD_NUMBER; hash = (53 * hash) + getCellsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -411,19 +353,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Column.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCellsFieldBuilder(); - } } @java.lang.Override @@ -433,10 +366,11 @@ public Builder clear() { if (cellsBuilder_ == null) { cells_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + cells_ = null; cellsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -552,7 +486,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Column other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -567,17 +501,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Column parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + qualifier_ = input.readBytes(); + + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.Cell m = + input.readMessage(com.google.bigtable.v2.Cell.parser(), extensionRegistry); + if (cellsBuilder_ == null) { + ensureCellsIsMutable(); + cells_.add(m); + } else { + cellsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Column) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1024,7 +990,18 @@ public Column parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Column(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java index ad0f09e338..a5da9d1288 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ColumnRange.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ColumnRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - familyName_ = s; - break; - } - case 18: - { - startQualifier_ = input.readBytes(); - startQualifierCase_ = 2; - break; - } - case 26: - { - startQualifier_ = input.readBytes(); - startQualifierCase_ = 3; - break; - } - case 34: - { - endQualifier_ = input.readBytes(); - endQualifierCase_ = 4; - break; - } - case 42: - { - endQualifier_ = input.readBytes(); - endQualifierCase_ = 5; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ColumnRange_descriptor; @@ -452,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endQualifierCase_ == 5) { output.writeBytes(5, (com.google.protobuf.ByteString) endQualifier_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +414,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBytesSize( 5, (com.google.protobuf.ByteString) endQualifier_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -522,7 +452,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -559,7 +489,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -690,17 +620,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ColumnRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -838,7 +761,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ColumnRange other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -853,17 +776,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ColumnRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + familyName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + startQualifier_ = input.readBytes(); + startQualifierCase_ = 2; + break; + } // case 18 + case 26: + { + startQualifier_ = input.readBytes(); + startQualifierCase_ = 3; + break; + } // case 26 + case 34: + { + endQualifier_ = input.readBytes(); + endQualifierCase_ = 4; + break; + } // case 34 + case 42: + { + endQualifier_ = input.readBytes(); + endQualifierCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ColumnRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1321,7 +1288,18 @@ public ColumnRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ColumnRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java index ac1b91e9bb..25e73be090 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Family.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Family( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - columns_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - columns_.add( - input.readMessage(com.google.bigtable.v2.Column.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - columns_ = java.util.Collections.unmodifiableList(columns_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Family_descriptor; } @@ -275,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < columns_.size(); i++) { output.writeMessage(2, columns_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +230,7 @@ public int getSerializedSize() { for (int i = 0; i < columns_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, columns_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -307,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getColumnsList().equals(other.getColumnsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -324,7 +264,7 @@ public int hashCode() { hash = (37 * hash) + COLUMNS_FIELD_NUMBER; hash = (53 * hash) + getColumnsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -451,19 +391,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Family.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getColumnsFieldBuilder(); - } } @java.lang.Override @@ -473,10 +404,11 @@ public Builder clear() { if (columnsBuilder_ == null) { columns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + columns_ = null; columnsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -593,7 +525,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Family other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,17 +540,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Family parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.Column m = + input.readMessage(com.google.bigtable.v2.Column.parser(), extensionRegistry); + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(m); + } else { + columnsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Family) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1133,7 +1097,18 @@ public Family parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Family(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java new file mode 100644 index 0000000000..f0e0c2b726 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsView.java @@ -0,0 +1,1020 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +/** + * + * + *
    + * FullReadStatsView captures all known information about a read.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.FullReadStatsView} + */ +public final class FullReadStatsView extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.FullReadStatsView) + FullReadStatsViewOrBuilder { + private static final long serialVersionUID = 0L; + // Use FullReadStatsView.newBuilder() to construct. + private FullReadStatsView(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FullReadStatsView() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FullReadStatsView(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_FullReadStatsView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.FullReadStatsView.class, + com.google.bigtable.v2.FullReadStatsView.Builder.class); + } + + public static final int READ_ITERATION_STATS_FIELD_NUMBER = 1; + private com.google.bigtable.v2.ReadIterationStats readIterationStats_; + /** + * + * + *
    +   * Iteration stats describe how efficient the read is, e.g. comparing
    +   * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +   * indication of read efficiency (the higher the ratio of seen to retuned the
    +   * better).
    +   * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * + * @return Whether the readIterationStats field is set. + */ + @java.lang.Override + public boolean hasReadIterationStats() { + return readIterationStats_ != null; + } + /** + * + * + *
    +   * Iteration stats describe how efficient the read is, e.g. comparing
    +   * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +   * indication of read efficiency (the higher the ratio of seen to retuned the
    +   * better).
    +   * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * + * @return The readIterationStats. + */ + @java.lang.Override + public com.google.bigtable.v2.ReadIterationStats getReadIterationStats() { + return readIterationStats_ == null + ? com.google.bigtable.v2.ReadIterationStats.getDefaultInstance() + : readIterationStats_; + } + /** + * + * + *
    +   * Iteration stats describe how efficient the read is, e.g. comparing
    +   * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +   * indication of read efficiency (the higher the ratio of seen to retuned the
    +   * better).
    +   * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsOrBuilder() { + return getReadIterationStats(); + } + + public static final int REQUEST_LATENCY_STATS_FIELD_NUMBER = 2; + private com.google.bigtable.v2.RequestLatencyStats requestLatencyStats_; + /** + * + * + *
    +   * Request latency stats describe the time taken to complete a request, from
    +   * the server side.
    +   * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * + * @return Whether the requestLatencyStats field is set. + */ + @java.lang.Override + public boolean hasRequestLatencyStats() { + return requestLatencyStats_ != null; + } + /** + * + * + *
    +   * Request latency stats describe the time taken to complete a request, from
    +   * the server side.
    +   * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * + * @return The requestLatencyStats. + */ + @java.lang.Override + public com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats() { + return requestLatencyStats_ == null + ? com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance() + : requestLatencyStats_; + } + /** + * + * + *
    +   * Request latency stats describe the time taken to complete a request, from
    +   * the server side.
    +   * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + @java.lang.Override + public com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStatsOrBuilder() { + return getRequestLatencyStats(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (readIterationStats_ != null) { + output.writeMessage(1, getReadIterationStats()); + } + if (requestLatencyStats_ != null) { + output.writeMessage(2, getRequestLatencyStats()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readIterationStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReadIterationStats()); + } + if (requestLatencyStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRequestLatencyStats()); + } + size += getUnknownFields().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.bigtable.v2.FullReadStatsView)) { + return super.equals(obj); + } + com.google.bigtable.v2.FullReadStatsView other = (com.google.bigtable.v2.FullReadStatsView) obj; + + if (hasReadIterationStats() != other.hasReadIterationStats()) return false; + if (hasReadIterationStats()) { + if (!getReadIterationStats().equals(other.getReadIterationStats())) return false; + } + if (hasRequestLatencyStats() != other.hasRequestLatencyStats()) return false; + if (hasRequestLatencyStats()) { + if (!getRequestLatencyStats().equals(other.getRequestLatencyStats())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReadIterationStats()) { + hash = (37 * hash) + READ_ITERATION_STATS_FIELD_NUMBER; + hash = (53 * hash) + getReadIterationStats().hashCode(); + } + if (hasRequestLatencyStats()) { + hash = (37 * hash) + REQUEST_LATENCY_STATS_FIELD_NUMBER; + hash = (53 * hash) + getRequestLatencyStats().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.FullReadStatsView parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.FullReadStatsView parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.FullReadStatsView parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.FullReadStatsView parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.FullReadStatsView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.FullReadStatsView 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.bigtable.v2.FullReadStatsView parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.FullReadStatsView parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.v2.FullReadStatsView prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * FullReadStatsView captures all known information about a read.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.FullReadStatsView} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.FullReadStatsView) + com.google.bigtable.v2.FullReadStatsViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_FullReadStatsView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.FullReadStatsView.class, + com.google.bigtable.v2.FullReadStatsView.Builder.class); + } + + // Construct using com.google.bigtable.v2.FullReadStatsView.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (readIterationStatsBuilder_ == null) { + readIterationStats_ = null; + } else { + readIterationStats_ = null; + readIterationStatsBuilder_ = null; + } + if (requestLatencyStatsBuilder_ == null) { + requestLatencyStats_ = null; + } else { + requestLatencyStats_ = null; + requestLatencyStatsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_FullReadStatsView_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsView getDefaultInstanceForType() { + return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsView build() { + com.google.bigtable.v2.FullReadStatsView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsView buildPartial() { + com.google.bigtable.v2.FullReadStatsView result = + new com.google.bigtable.v2.FullReadStatsView(this); + if (readIterationStatsBuilder_ == null) { + result.readIterationStats_ = readIterationStats_; + } else { + result.readIterationStats_ = readIterationStatsBuilder_.build(); + } + if (requestLatencyStatsBuilder_ == null) { + result.requestLatencyStats_ = requestLatencyStats_; + } else { + result.requestLatencyStats_ = requestLatencyStatsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.FullReadStatsView) { + return mergeFrom((com.google.bigtable.v2.FullReadStatsView) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.FullReadStatsView other) { + if (other == com.google.bigtable.v2.FullReadStatsView.getDefaultInstance()) return this; + if (other.hasReadIterationStats()) { + mergeReadIterationStats(other.getReadIterationStats()); + } + if (other.hasRequestLatencyStats()) { + mergeRequestLatencyStats(other.getRequestLatencyStats()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getReadIterationStatsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getRequestLatencyStatsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.bigtable.v2.ReadIterationStats readIterationStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ReadIterationStats, + com.google.bigtable.v2.ReadIterationStats.Builder, + com.google.bigtable.v2.ReadIterationStatsOrBuilder> + readIterationStatsBuilder_; + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * + * @return Whether the readIterationStats field is set. + */ + public boolean hasReadIterationStats() { + return readIterationStatsBuilder_ != null || readIterationStats_ != null; + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * + * @return The readIterationStats. + */ + public com.google.bigtable.v2.ReadIterationStats getReadIterationStats() { + if (readIterationStatsBuilder_ == null) { + return readIterationStats_ == null + ? com.google.bigtable.v2.ReadIterationStats.getDefaultInstance() + : readIterationStats_; + } else { + return readIterationStatsBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + public Builder setReadIterationStats(com.google.bigtable.v2.ReadIterationStats value) { + if (readIterationStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readIterationStats_ = value; + onChanged(); + } else { + readIterationStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + public Builder setReadIterationStats( + com.google.bigtable.v2.ReadIterationStats.Builder builderForValue) { + if (readIterationStatsBuilder_ == null) { + readIterationStats_ = builderForValue.build(); + onChanged(); + } else { + readIterationStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + public Builder mergeReadIterationStats(com.google.bigtable.v2.ReadIterationStats value) { + if (readIterationStatsBuilder_ == null) { + if (readIterationStats_ != null) { + readIterationStats_ = + com.google.bigtable.v2.ReadIterationStats.newBuilder(readIterationStats_) + .mergeFrom(value) + .buildPartial(); + } else { + readIterationStats_ = value; + } + onChanged(); + } else { + readIterationStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + public Builder clearReadIterationStats() { + if (readIterationStatsBuilder_ == null) { + readIterationStats_ = null; + onChanged(); + } else { + readIterationStats_ = null; + readIterationStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + public com.google.bigtable.v2.ReadIterationStats.Builder getReadIterationStatsBuilder() { + + onChanged(); + return getReadIterationStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + public com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsOrBuilder() { + if (readIterationStatsBuilder_ != null) { + return readIterationStatsBuilder_.getMessageOrBuilder(); + } else { + return readIterationStats_ == null + ? com.google.bigtable.v2.ReadIterationStats.getDefaultInstance() + : readIterationStats_; + } + } + /** + * + * + *
    +     * Iteration stats describe how efficient the read is, e.g. comparing
    +     * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +     * indication of read efficiency (the higher the ratio of seen to retuned the
    +     * better).
    +     * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ReadIterationStats, + com.google.bigtable.v2.ReadIterationStats.Builder, + com.google.bigtable.v2.ReadIterationStatsOrBuilder> + getReadIterationStatsFieldBuilder() { + if (readIterationStatsBuilder_ == null) { + readIterationStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.ReadIterationStats, + com.google.bigtable.v2.ReadIterationStats.Builder, + com.google.bigtable.v2.ReadIterationStatsOrBuilder>( + getReadIterationStats(), getParentForChildren(), isClean()); + readIterationStats_ = null; + } + return readIterationStatsBuilder_; + } + + private com.google.bigtable.v2.RequestLatencyStats requestLatencyStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.RequestLatencyStats, + com.google.bigtable.v2.RequestLatencyStats.Builder, + com.google.bigtable.v2.RequestLatencyStatsOrBuilder> + requestLatencyStatsBuilder_; + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * + * @return Whether the requestLatencyStats field is set. + */ + public boolean hasRequestLatencyStats() { + return requestLatencyStatsBuilder_ != null || requestLatencyStats_ != null; + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * + * @return The requestLatencyStats. + */ + public com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats() { + if (requestLatencyStatsBuilder_ == null) { + return requestLatencyStats_ == null + ? com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance() + : requestLatencyStats_; + } else { + return requestLatencyStatsBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + public Builder setRequestLatencyStats(com.google.bigtable.v2.RequestLatencyStats value) { + if (requestLatencyStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestLatencyStats_ = value; + onChanged(); + } else { + requestLatencyStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + public Builder setRequestLatencyStats( + com.google.bigtable.v2.RequestLatencyStats.Builder builderForValue) { + if (requestLatencyStatsBuilder_ == null) { + requestLatencyStats_ = builderForValue.build(); + onChanged(); + } else { + requestLatencyStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + public Builder mergeRequestLatencyStats(com.google.bigtable.v2.RequestLatencyStats value) { + if (requestLatencyStatsBuilder_ == null) { + if (requestLatencyStats_ != null) { + requestLatencyStats_ = + com.google.bigtable.v2.RequestLatencyStats.newBuilder(requestLatencyStats_) + .mergeFrom(value) + .buildPartial(); + } else { + requestLatencyStats_ = value; + } + onChanged(); + } else { + requestLatencyStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + public Builder clearRequestLatencyStats() { + if (requestLatencyStatsBuilder_ == null) { + requestLatencyStats_ = null; + onChanged(); + } else { + requestLatencyStats_ = null; + requestLatencyStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + public com.google.bigtable.v2.RequestLatencyStats.Builder getRequestLatencyStatsBuilder() { + + onChanged(); + return getRequestLatencyStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + public com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStatsOrBuilder() { + if (requestLatencyStatsBuilder_ != null) { + return requestLatencyStatsBuilder_.getMessageOrBuilder(); + } else { + return requestLatencyStats_ == null + ? com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance() + : requestLatencyStats_; + } + } + /** + * + * + *
    +     * Request latency stats describe the time taken to complete a request, from
    +     * the server side.
    +     * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.RequestLatencyStats, + com.google.bigtable.v2.RequestLatencyStats.Builder, + com.google.bigtable.v2.RequestLatencyStatsOrBuilder> + getRequestLatencyStatsFieldBuilder() { + if (requestLatencyStatsBuilder_ == null) { + requestLatencyStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.RequestLatencyStats, + com.google.bigtable.v2.RequestLatencyStats.Builder, + com.google.bigtable.v2.RequestLatencyStatsOrBuilder>( + getRequestLatencyStats(), getParentForChildren(), isClean()); + requestLatencyStats_ = null; + } + return requestLatencyStatsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.FullReadStatsView) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.FullReadStatsView) + private static final com.google.bigtable.v2.FullReadStatsView DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.FullReadStatsView(); + } + + public static com.google.bigtable.v2.FullReadStatsView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FullReadStatsView parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java new file mode 100644 index 0000000000..e98b57f732 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FullReadStatsViewOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +public interface FullReadStatsViewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.FullReadStatsView) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Iteration stats describe how efficient the read is, e.g. comparing
    +   * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +   * indication of read efficiency (the higher the ratio of seen to retuned the
    +   * better).
    +   * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * + * @return Whether the readIterationStats field is set. + */ + boolean hasReadIterationStats(); + /** + * + * + *
    +   * Iteration stats describe how efficient the read is, e.g. comparing
    +   * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +   * indication of read efficiency (the higher the ratio of seen to retuned the
    +   * better).
    +   * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + * + * @return The readIterationStats. + */ + com.google.bigtable.v2.ReadIterationStats getReadIterationStats(); + /** + * + * + *
    +   * Iteration stats describe how efficient the read is, e.g. comparing
    +   * rows seen vs. rows returned or cells seen vs cells returned can provide an
    +   * indication of read efficiency (the higher the ratio of seen to retuned the
    +   * better).
    +   * 
    + * + * .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; + */ + com.google.bigtable.v2.ReadIterationStatsOrBuilder getReadIterationStatsOrBuilder(); + + /** + * + * + *
    +   * Request latency stats describe the time taken to complete a request, from
    +   * the server side.
    +   * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * + * @return Whether the requestLatencyStats field is set. + */ + boolean hasRequestLatencyStats(); + /** + * + * + *
    +   * Request latency stats describe the time taken to complete a request, from
    +   * the server side.
    +   * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + * + * @return The requestLatencyStats. + */ + com.google.bigtable.v2.RequestLatencyStats getRequestLatencyStats(); + /** + * + * + *
    +   * Request latency stats describe the time taken to complete a request, from
    +   * the server side.
    +   * 
    + * + * .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; + */ + com.google.bigtable.v2.RequestLatencyStatsOrBuilder getRequestLatencyStatsOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java index 6e46da8f24..00c657bb3a 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MutateRowRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 18: - { - rowKey_ = input.readBytes(); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - mutations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - mutations_.add( - input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry)); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - mutations_ = java.util.Collections.unmodifiableList(mutations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowRequest_descriptor; @@ -383,7 +311,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appProfileId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -404,7 +332,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appProfileId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -423,7 +351,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (!getRowKey().equals(other.getRowKey())) return false; if (!getMutationsList().equals(other.getMutationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -444,7 +372,7 @@ public int hashCode() { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -573,19 +501,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMutationsFieldBuilder(); - } } @java.lang.Override @@ -599,10 +518,11 @@ public Builder clear() { if (mutationsBuilder_ == null) { mutations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + mutations_ = null; mutationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -730,7 +650,7 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowRequest other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -745,17 +665,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.MutateRowRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + rowKey_ = input.readBytes(); + + break; + } // case 18 + case 26: + { + com.google.bigtable.v2.Mutation m = + input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry); + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(m); + } else { + mutationsBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.MutateRowRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1505,7 +1469,18 @@ public MutateRowRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MutateRowRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java index 90ee12a5a4..154c3818b9 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MutateRowResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -142,7 +103,7 @@ public boolean equals(final java.lang.Object obj) { } com.google.bigtable.v2.MutateRowResponse other = (com.google.bigtable.v2.MutateRowResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -153,7 +114,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -282,17 +243,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -374,7 +328,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.MutateRowResponse other) { if (other == com.google.bigtable.v2.MutateRowResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -389,17 +343,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.MutateRowResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.MutateRowResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -435,7 +403,18 @@ public MutateRowResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MutateRowResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java index e0aed28a41..72a373f79d 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsRequest.java @@ -54,75 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MutateRowsRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - entries_.add( - input.readMessage( - com.google.bigtable.v2.MutateRowsRequest.Entry.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = java.util.Collections.unmodifiableList(entries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_descriptor; @@ -267,64 +198,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Entry( - 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; - case 10: - { - rowKey_ = input.readBytes(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - mutations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - mutations_.add( - input.readMessage(com.google.bigtable.v2.Mutation.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - mutations_ = java.util.Collections.unmodifiableList(mutations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsRequest_Entry_descriptor; @@ -472,7 +345,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < mutations_.size(); i++) { output.writeMessage(2, mutations_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +360,7 @@ public int getSerializedSize() { for (int i = 0; i < mutations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, mutations_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -505,7 +378,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRowKey().equals(other.getRowKey())) return false; if (!getMutationsList().equals(other.getMutationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -522,7 +395,7 @@ public int hashCode() { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -653,19 +526,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowsRequest.Entry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMutationsFieldBuilder(); - } } @java.lang.Override @@ -675,10 +539,11 @@ public Builder clear() { if (mutationsBuilder_ == null) { mutations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + mutations_ = null; mutationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -799,7 +664,7 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsRequest.Entry other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -814,17 +679,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.MutateRowsRequest.Entry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + rowKey_ = input.readBytes(); + + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.Mutation m = + input.readMessage( + com.google.bigtable.v2.Mutation.parser(), extensionRegistry); + if (mutationsBuilder_ == null) { + ensureMutationsIsMutable(); + mutations_.add(m); + } else { + mutationsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.MutateRowsRequest.Entry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1356,7 +1254,19 @@ public Entry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Entry(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1601,7 +1511,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, appProfileId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1619,7 +1529,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, appProfileId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1637,7 +1547,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTableName().equals(other.getTableName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (!getEntriesList().equals(other.getEntriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1656,7 +1566,7 @@ public int hashCode() { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1785,19 +1695,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEntriesFieldBuilder(); - } } @java.lang.Override @@ -1809,10 +1710,11 @@ public Builder clear() { if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + entries_ = null; entriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1936,7 +1838,7 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsRequest other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1951,17 +1853,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.MutateRowsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.MutateRowsRequest.Entry m = + input.readMessage( + com.google.bigtable.v2.MutateRowsRequest.Entry.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.MutateRowsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2685,7 +2626,18 @@ public MutateRowsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MutateRowsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java index 6f3b818671..783b6f4faa 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java @@ -52,61 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MutateRowsResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - entries_.add( - input.readMessage( - com.google.bigtable.v2.MutateRowsResponse.Entry.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = java.util.Collections.unmodifiableList(entries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_descriptor; @@ -217,64 +162,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Entry( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - index_ = input.readInt64(); - break; - } - case 18: - { - com.google.rpc.Status.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor; @@ -384,7 +271,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (status_ != null) { output.writeMessage(2, getStatus()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +286,7 @@ public int getSerializedSize() { if (status_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -437,7 +324,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -568,17 +455,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowsResponse.Entry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -683,7 +563,7 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsResponse.Entry other) if (other.hasStatus()) { mergeStatus(other.getStatus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -698,18 +578,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.MutateRowsResponse.Entry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + index_ = input.readInt64(); + + break; + } // case 8 + case 18: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.v2.MutateRowsResponse.Entry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1001,7 +906,19 @@ public Entry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Entry(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1106,7 +1023,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < entries_.size(); i++) { output.writeMessage(1, entries_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1118,7 +1035,7 @@ public int getSerializedSize() { for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1135,7 +1052,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.v2.MutateRowsResponse) obj; if (!getEntriesList().equals(other.getEntriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1150,7 +1067,7 @@ public int hashCode() { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1279,19 +1196,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.MutateRowsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEntriesFieldBuilder(); - } } @java.lang.Override @@ -1299,10 +1207,11 @@ public Builder clear() { super.clear(); if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + entries_ = null; entriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -1416,7 +1325,7 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsResponse other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1431,17 +1340,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.MutateRowsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.v2.MutateRowsResponse.Entry m = + input.readMessage( + com.google.bigtable.v2.MutateRowsResponse.Entry.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.MutateRowsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1830,7 +1767,18 @@ public MutateRowsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MutateRowsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java index 62b4124598..177339dfa8 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Mutation.java @@ -50,112 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Mutation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.v2.Mutation.SetCell.Builder subBuilder = null; - if (mutationCase_ == 1) { - subBuilder = ((com.google.bigtable.v2.Mutation.SetCell) mutation_).toBuilder(); - } - mutation_ = - input.readMessage( - com.google.bigtable.v2.Mutation.SetCell.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.Mutation.SetCell) mutation_); - mutation_ = subBuilder.buildPartial(); - } - mutationCase_ = 1; - break; - } - case 18: - { - com.google.bigtable.v2.Mutation.DeleteFromColumn.Builder subBuilder = null; - if (mutationCase_ == 2) { - subBuilder = - ((com.google.bigtable.v2.Mutation.DeleteFromColumn) mutation_).toBuilder(); - } - mutation_ = - input.readMessage( - com.google.bigtable.v2.Mutation.DeleteFromColumn.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.Mutation.DeleteFromColumn) mutation_); - mutation_ = subBuilder.buildPartial(); - } - mutationCase_ = 2; - break; - } - case 26: - { - com.google.bigtable.v2.Mutation.DeleteFromFamily.Builder subBuilder = null; - if (mutationCase_ == 3) { - subBuilder = - ((com.google.bigtable.v2.Mutation.DeleteFromFamily) mutation_).toBuilder(); - } - mutation_ = - input.readMessage( - com.google.bigtable.v2.Mutation.DeleteFromFamily.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.Mutation.DeleteFromFamily) mutation_); - mutation_ = subBuilder.buildPartial(); - } - mutationCase_ = 3; - break; - } - case 34: - { - com.google.bigtable.v2.Mutation.DeleteFromRow.Builder subBuilder = null; - if (mutationCase_ == 4) { - subBuilder = - ((com.google.bigtable.v2.Mutation.DeleteFromRow) mutation_).toBuilder(); - } - mutation_ = - input.readMessage( - com.google.bigtable.v2.Mutation.DeleteFromRow.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.Mutation.DeleteFromRow) mutation_); - mutation_ = subBuilder.buildPartial(); - } - mutationCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Mutation_descriptor; } @@ -281,67 +175,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetCell( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - familyName_ = s; - break; - } - case 18: - { - columnQualifier_ = input.readBytes(); - break; - } - case 24: - { - timestampMicros_ = input.readInt64(); - break; - } - case 34: - { - value_ = input.readBytes(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_SetCell_descriptor; @@ -493,7 +326,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!value_.isEmpty()) { output.writeBytes(4, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -514,7 +347,7 @@ public int getSerializedSize() { if (!value_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -533,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (!getColumnQualifier().equals(other.getColumnQualifier())) return false; if (getTimestampMicros() != other.getTimestampMicros()) return false; if (!getValue().equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -552,7 +385,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestampMicros()); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -683,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Mutation.SetCell.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -802,7 +628,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation.SetCell other) { if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -817,17 +643,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Mutation.SetCell parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + familyName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + columnQualifier_ = input.readBytes(); + + break; + } // case 18 + case 24: + { + timestampMicros_ = input.readInt64(); + + break; + } // case 24 + case 34: + { + value_ = input.readBytes(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Mutation.SetCell) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1153,7 +1017,19 @@ public SetCell parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetCell(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1289,73 +1165,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFromColumn( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - familyName_ = s; - break; - } - case 18: - { - columnQualifier_ = input.readBytes(); - break; - } - case 26: - { - com.google.bigtable.v2.TimestampRange.Builder subBuilder = null; - if (timeRange_ != null) { - subBuilder = timeRange_.toBuilder(); - } - timeRange_ = - input.readMessage( - com.google.bigtable.v2.TimestampRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeRange_); - timeRange_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromColumn_descriptor; @@ -1512,7 +1321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (timeRange_ != null) { output.writeMessage(3, getTimeRange()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1530,7 +1339,7 @@ public int getSerializedSize() { if (timeRange_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTimeRange()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1552,7 +1361,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTimeRange()) { if (!getTimeRange().equals(other.getTimeRange())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1571,7 +1380,7 @@ public int hashCode() { hash = (37 * hash) + TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getTimeRange().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1703,17 +1512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Mutation.DeleteFromColumn.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1825,7 +1627,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation.DeleteFromColumn other) if (other.hasTimeRange()) { mergeTimeRange(other.getTimeRange()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1840,18 +1642,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Mutation.DeleteFromColumn parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + familyName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + columnQualifier_ = input.readBytes(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTimeRangeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.v2.Mutation.DeleteFromColumn) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2243,7 +2076,19 @@ public DeleteFromColumn parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFromColumn(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2328,52 +2173,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFromFamily( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - familyName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromFamily_descriptor; @@ -2457,7 +2256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, familyName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2469,7 +2268,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(familyName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, familyName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2486,7 +2285,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.v2.Mutation.DeleteFromFamily) obj; if (!getFamilyName().equals(other.getFamilyName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2499,7 +2298,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; hash = (53 * hash) + getFamilyName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2630,17 +2429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Mutation.DeleteFromFamily.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2732,7 +2524,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation.DeleteFromFamily other) familyName_ = other.familyName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2747,18 +2539,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Mutation.DeleteFromFamily parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + familyName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.v2.Mutation.DeleteFromFamily) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2906,7 +2717,19 @@ public DeleteFromFamily parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFromFamily(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2961,45 +2784,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFromRow( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_Mutation_DeleteFromRow_descriptor; @@ -3029,7 +2813,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3038,7 +2822,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3054,7 +2838,7 @@ public boolean equals(final java.lang.Object obj) { com.google.bigtable.v2.Mutation.DeleteFromRow other = (com.google.bigtable.v2.Mutation.DeleteFromRow) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3065,7 +2849,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3196,17 +2980,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Mutation.DeleteFromRow.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3291,7 +3068,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.Mutation.DeleteFromRow other) { if (other == com.google.bigtable.v2.Mutation.DeleteFromRow.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3306,17 +3083,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Mutation.DeleteFromRow parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Mutation.DeleteFromRow) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3353,7 +3144,19 @@ public DeleteFromRow parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFromRow(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3655,7 +3458,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (mutationCase_ == 4) { output.writeMessage(4, (com.google.bigtable.v2.Mutation.DeleteFromRow) mutation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3684,7 +3487,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.bigtable.v2.Mutation.DeleteFromRow) mutation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3716,7 +3519,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3747,7 +3550,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3874,22 +3677,27 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Mutation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (setCellBuilder_ != null) { + setCellBuilder_.clear(); + } + if (deleteFromColumnBuilder_ != null) { + deleteFromColumnBuilder_.clear(); + } + if (deleteFromFamilyBuilder_ != null) { + deleteFromFamilyBuilder_.clear(); + } + if (deleteFromRowBuilder_ != null) { + deleteFromRowBuilder_.clear(); + } mutationCase_ = 0; mutation_ = null; return this; @@ -4022,7 +3830,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Mutation other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4037,17 +3845,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Mutation parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSetCellFieldBuilder().getBuilder(), extensionRegistry); + mutationCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getDeleteFromColumnFieldBuilder().getBuilder(), extensionRegistry); + mutationCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getDeleteFromFamilyFieldBuilder().getBuilder(), extensionRegistry); + mutationCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getDeleteFromRowFieldBuilder().getBuilder(), extensionRegistry); + mutationCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Mutation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4938,7 +4786,18 @@ public Mutation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Mutation(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java index c602d4fc6c..03d0839d7c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PingAndWarmRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.PingAndWarmRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -530,7 +470,7 @@ public Builder mergeFrom(com.google.bigtable.v2.PingAndWarmRequest other) { appProfileId_ = other.appProfileId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -545,17 +485,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.PingAndWarmRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.PingAndWarmRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -823,7 +789,18 @@ public PingAndWarmRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PingAndWarmRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java index 0c31dbc0ed..80eb3431fb 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/PingAndWarmResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PingAndWarmResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.bigtable.v2.PingAndWarmResponse other = (com.google.bigtable.v2.PingAndWarmResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -283,17 +244,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.PingAndWarmResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -375,7 +329,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.bigtable.v2.PingAndWarmResponse other) { if (other == com.google.bigtable.v2.PingAndWarmResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -390,17 +344,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.PingAndWarmResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.PingAndWarmResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -436,7 +404,18 @@ public PingAndWarmResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PingAndWarmResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java new file mode 100644 index 0000000000..26955faba7 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStats.java @@ -0,0 +1,811 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +/** + * + * + *
    + * ReadIterationStats captures information about the iteration of rows or cells
    + * over the course of a read, e.g. how many results were scanned in a read
    + * operation versus the results returned.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.ReadIterationStats} + */ +public final class ReadIterationStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.ReadIterationStats) + ReadIterationStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReadIterationStats.newBuilder() to construct. + private ReadIterationStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReadIterationStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ReadIterationStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_ReadIterationStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadIterationStats.class, + com.google.bigtable.v2.ReadIterationStats.Builder.class); + } + + public static final int ROWS_SEEN_COUNT_FIELD_NUMBER = 1; + private long rowsSeenCount_; + /** + * + * + *
    +   * The rows seen (scanned) as part of the request. This includes the count of
    +   * rows returned, as captured below.
    +   * 
    + * + * int64 rows_seen_count = 1; + * + * @return The rowsSeenCount. + */ + @java.lang.Override + public long getRowsSeenCount() { + return rowsSeenCount_; + } + + public static final int ROWS_RETURNED_COUNT_FIELD_NUMBER = 2; + private long rowsReturnedCount_; + /** + * + * + *
    +   * The rows returned as part of the request.
    +   * 
    + * + * int64 rows_returned_count = 2; + * + * @return The rowsReturnedCount. + */ + @java.lang.Override + public long getRowsReturnedCount() { + return rowsReturnedCount_; + } + + public static final int CELLS_SEEN_COUNT_FIELD_NUMBER = 3; + private long cellsSeenCount_; + /** + * + * + *
    +   * The cells seen (scanned) as part of the request. This includes the count of
    +   * cells returned, as captured below.
    +   * 
    + * + * int64 cells_seen_count = 3; + * + * @return The cellsSeenCount. + */ + @java.lang.Override + public long getCellsSeenCount() { + return cellsSeenCount_; + } + + public static final int CELLS_RETURNED_COUNT_FIELD_NUMBER = 4; + private long cellsReturnedCount_; + /** + * + * + *
    +   * The cells returned as part of the request.
    +   * 
    + * + * int64 cells_returned_count = 4; + * + * @return The cellsReturnedCount. + */ + @java.lang.Override + public long getCellsReturnedCount() { + return cellsReturnedCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (rowsSeenCount_ != 0L) { + output.writeInt64(1, rowsSeenCount_); + } + if (rowsReturnedCount_ != 0L) { + output.writeInt64(2, rowsReturnedCount_); + } + if (cellsSeenCount_ != 0L) { + output.writeInt64(3, cellsSeenCount_); + } + if (cellsReturnedCount_ != 0L) { + output.writeInt64(4, cellsReturnedCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rowsSeenCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rowsSeenCount_); + } + if (rowsReturnedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, rowsReturnedCount_); + } + if (cellsSeenCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, cellsSeenCount_); + } + if (cellsReturnedCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, cellsReturnedCount_); + } + size += getUnknownFields().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.bigtable.v2.ReadIterationStats)) { + return super.equals(obj); + } + com.google.bigtable.v2.ReadIterationStats other = + (com.google.bigtable.v2.ReadIterationStats) obj; + + if (getRowsSeenCount() != other.getRowsSeenCount()) return false; + if (getRowsReturnedCount() != other.getRowsReturnedCount()) return false; + if (getCellsSeenCount() != other.getCellsSeenCount()) return false; + if (getCellsReturnedCount() != other.getCellsReturnedCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROWS_SEEN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsSeenCount()); + hash = (37 * hash) + ROWS_RETURNED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsReturnedCount()); + hash = (37 * hash) + CELLS_SEEN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCellsSeenCount()); + hash = (37 * hash) + CELLS_RETURNED_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCellsReturnedCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.ReadIterationStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ReadIterationStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ReadIterationStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.ReadIterationStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.ReadIterationStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ReadIterationStats 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.bigtable.v2.ReadIterationStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.ReadIterationStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.v2.ReadIterationStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * ReadIterationStats captures information about the iteration of rows or cells
    +   * over the course of a read, e.g. how many results were scanned in a read
    +   * operation versus the results returned.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.ReadIterationStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.ReadIterationStats) + com.google.bigtable.v2.ReadIterationStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_ReadIterationStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.ReadIterationStats.class, + com.google.bigtable.v2.ReadIterationStats.Builder.class); + } + + // Construct using com.google.bigtable.v2.ReadIterationStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + rowsSeenCount_ = 0L; + + rowsReturnedCount_ = 0L; + + cellsSeenCount_ = 0L; + + cellsReturnedCount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_ReadIterationStats_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.ReadIterationStats getDefaultInstanceForType() { + return com.google.bigtable.v2.ReadIterationStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.ReadIterationStats build() { + com.google.bigtable.v2.ReadIterationStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.ReadIterationStats buildPartial() { + com.google.bigtable.v2.ReadIterationStats result = + new com.google.bigtable.v2.ReadIterationStats(this); + result.rowsSeenCount_ = rowsSeenCount_; + result.rowsReturnedCount_ = rowsReturnedCount_; + result.cellsSeenCount_ = cellsSeenCount_; + result.cellsReturnedCount_ = cellsReturnedCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.ReadIterationStats) { + return mergeFrom((com.google.bigtable.v2.ReadIterationStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.ReadIterationStats other) { + if (other == com.google.bigtable.v2.ReadIterationStats.getDefaultInstance()) return this; + if (other.getRowsSeenCount() != 0L) { + setRowsSeenCount(other.getRowsSeenCount()); + } + if (other.getRowsReturnedCount() != 0L) { + setRowsReturnedCount(other.getRowsReturnedCount()); + } + if (other.getCellsSeenCount() != 0L) { + setCellsSeenCount(other.getCellsSeenCount()); + } + if (other.getCellsReturnedCount() != 0L) { + setCellsReturnedCount(other.getCellsReturnedCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + rowsSeenCount_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + rowsReturnedCount_ = input.readInt64(); + + break; + } // case 16 + case 24: + { + cellsSeenCount_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + cellsReturnedCount_ = input.readInt64(); + + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private long rowsSeenCount_; + /** + * + * + *
    +     * The rows seen (scanned) as part of the request. This includes the count of
    +     * rows returned, as captured below.
    +     * 
    + * + * int64 rows_seen_count = 1; + * + * @return The rowsSeenCount. + */ + @java.lang.Override + public long getRowsSeenCount() { + return rowsSeenCount_; + } + /** + * + * + *
    +     * The rows seen (scanned) as part of the request. This includes the count of
    +     * rows returned, as captured below.
    +     * 
    + * + * int64 rows_seen_count = 1; + * + * @param value The rowsSeenCount to set. + * @return This builder for chaining. + */ + public Builder setRowsSeenCount(long value) { + + rowsSeenCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The rows seen (scanned) as part of the request. This includes the count of
    +     * rows returned, as captured below.
    +     * 
    + * + * int64 rows_seen_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearRowsSeenCount() { + + rowsSeenCount_ = 0L; + onChanged(); + return this; + } + + private long rowsReturnedCount_; + /** + * + * + *
    +     * The rows returned as part of the request.
    +     * 
    + * + * int64 rows_returned_count = 2; + * + * @return The rowsReturnedCount. + */ + @java.lang.Override + public long getRowsReturnedCount() { + return rowsReturnedCount_; + } + /** + * + * + *
    +     * The rows returned as part of the request.
    +     * 
    + * + * int64 rows_returned_count = 2; + * + * @param value The rowsReturnedCount to set. + * @return This builder for chaining. + */ + public Builder setRowsReturnedCount(long value) { + + rowsReturnedCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The rows returned as part of the request.
    +     * 
    + * + * int64 rows_returned_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearRowsReturnedCount() { + + rowsReturnedCount_ = 0L; + onChanged(); + return this; + } + + private long cellsSeenCount_; + /** + * + * + *
    +     * The cells seen (scanned) as part of the request. This includes the count of
    +     * cells returned, as captured below.
    +     * 
    + * + * int64 cells_seen_count = 3; + * + * @return The cellsSeenCount. + */ + @java.lang.Override + public long getCellsSeenCount() { + return cellsSeenCount_; + } + /** + * + * + *
    +     * The cells seen (scanned) as part of the request. This includes the count of
    +     * cells returned, as captured below.
    +     * 
    + * + * int64 cells_seen_count = 3; + * + * @param value The cellsSeenCount to set. + * @return This builder for chaining. + */ + public Builder setCellsSeenCount(long value) { + + cellsSeenCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The cells seen (scanned) as part of the request. This includes the count of
    +     * cells returned, as captured below.
    +     * 
    + * + * int64 cells_seen_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearCellsSeenCount() { + + cellsSeenCount_ = 0L; + onChanged(); + return this; + } + + private long cellsReturnedCount_; + /** + * + * + *
    +     * The cells returned as part of the request.
    +     * 
    + * + * int64 cells_returned_count = 4; + * + * @return The cellsReturnedCount. + */ + @java.lang.Override + public long getCellsReturnedCount() { + return cellsReturnedCount_; + } + /** + * + * + *
    +     * The cells returned as part of the request.
    +     * 
    + * + * int64 cells_returned_count = 4; + * + * @param value The cellsReturnedCount to set. + * @return This builder for chaining. + */ + public Builder setCellsReturnedCount(long value) { + + cellsReturnedCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The cells returned as part of the request.
    +     * 
    + * + * int64 cells_returned_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearCellsReturnedCount() { + + cellsReturnedCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.ReadIterationStats) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.ReadIterationStats) + private static final com.google.bigtable.v2.ReadIterationStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.ReadIterationStats(); + } + + public static com.google.bigtable.v2.ReadIterationStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReadIterationStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.v2.ReadIterationStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java new file mode 100644 index 0000000000..c9f7c6e842 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadIterationStatsOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +public interface ReadIterationStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.ReadIterationStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The rows seen (scanned) as part of the request. This includes the count of
    +   * rows returned, as captured below.
    +   * 
    + * + * int64 rows_seen_count = 1; + * + * @return The rowsSeenCount. + */ + long getRowsSeenCount(); + + /** + * + * + *
    +   * The rows returned as part of the request.
    +   * 
    + * + * int64 rows_returned_count = 2; + * + * @return The rowsReturnedCount. + */ + long getRowsReturnedCount(); + + /** + * + * + *
    +   * The cells seen (scanned) as part of the request. This includes the count of
    +   * cells returned, as captured below.
    +   * 
    + * + * int64 cells_seen_count = 3; + * + * @return The cellsSeenCount. + */ + long getCellsSeenCount(); + + /** + * + * + *
    +   * The cells returned as part of the request.
    +   * 
    + * + * int64 cells_returned_count = 4; + * + * @return The cellsReturnedCount. + */ + long getCellsReturnedCount(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java index a048b66796..9bd7eef837 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowRequest.java @@ -55,79 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadModifyWriteRowRequest( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 18: - { - rowKey_ = input.readBytes(); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add( - input.readMessage( - com.google.bigtable.v2.ReadModifyWriteRule.parser(), extensionRegistry)); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor; @@ -386,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appProfileId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -407,7 +334,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appProfileId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -427,7 +354,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppProfileId().equals(other.getAppProfileId())) return false; if (!getRowKey().equals(other.getRowKey())) return false; if (!getRulesList().equals(other.getRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -448,7 +375,7 @@ public int hashCode() { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,19 +504,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ReadModifyWriteRowRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -603,10 +521,11 @@ public Builder clear() { if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -735,7 +654,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRowRequest other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,17 +669,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ReadModifyWriteRowRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + rowKey_ = input.readBytes(); + + break; + } // case 18 + case 26: + { + com.google.bigtable.v2.ReadModifyWriteRule m = + input.readMessage( + com.google.bigtable.v2.ReadModifyWriteRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ReadModifyWriteRowRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1516,7 +1480,18 @@ public ReadModifyWriteRowRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadModifyWriteRowRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java index d1155353ba..e79c933d51 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRowResponse.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadModifyWriteRowResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.v2.Row.Builder subBuilder = null; - if (row_ != null) { - subBuilder = row_.toBuilder(); - } - row_ = input.readMessage(com.google.bigtable.v2.Row.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(row_); - row_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor; @@ -181,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (row_ != null) { output.writeMessage(1, getRow()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +140,7 @@ public int getSerializedSize() { if (row_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRow()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -213,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRow()) { if (!getRow().equals(other.getRow())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -228,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + ROW_FIELD_NUMBER; hash = (53 * hash) + getRow().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ReadModifyWriteRowResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +404,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRowResponse other if (other.hasRow()) { mergeRow(other.getRow()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ReadModifyWriteRowResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRowFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.v2.ReadModifyWriteRowResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -703,7 +662,18 @@ public ReadModifyWriteRowResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadModifyWriteRowResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java index 1826e984c4..a02ecbb670 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadModifyWriteRule.java @@ -54,69 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadModifyWriteRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - familyName_ = s; - break; - } - case 18: - { - columnQualifier_ = input.readBytes(); - break; - } - case 26: - { - rule_ = input.readBytes(); - ruleCase_ = 3; - break; - } - case 32: - { - rule_ = input.readInt64(); - ruleCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ReadModifyWriteRule_descriptor; @@ -356,7 +293,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ruleCase_ == 4) { output.writeInt64(4, (long) ((java.lang.Long) rule_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -381,7 +318,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt64Size( 4, (long) ((java.lang.Long) rule_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -410,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -437,7 +374,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -567,17 +504,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ReadModifyWriteRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -697,7 +627,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadModifyWriteRule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -712,17 +642,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ReadModifyWriteRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + familyName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + columnQualifier_ = input.readBytes(); + + break; + } // case 18 + case 26: + { + rule_ = input.readBytes(); + ruleCase_ = 3; + break; + } // case 26 + case 32: + { + rule_ = input.readInt64(); + ruleCase_ = 4; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ReadModifyWriteRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1105,7 +1073,18 @@ public ReadModifyWriteRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadModifyWriteRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java index 0c8a055a78..bb9349047c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java @@ -40,6 +40,7 @@ private ReadRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builde private ReadRowsRequest() { tableName_ = ""; appProfileId_ = ""; + requestStatsView_ = 0; } @java.lang.Override @@ -53,93 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadRowsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 18: - { - com.google.bigtable.v2.RowSet.Builder subBuilder = null; - if (rows_ != null) { - subBuilder = rows_.toBuilder(); - } - rows_ = input.readMessage(com.google.bigtable.v2.RowSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rows_); - rows_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.bigtable.v2.RowFilter.Builder subBuilder = null; - if (filter_ != null) { - subBuilder = filter_.toBuilder(); - } - filter_ = - input.readMessage(com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(filter_); - filter_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - rowsLimit_ = input.readInt64(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsRequest_descriptor; @@ -155,6 +69,170 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.bigtable.v2.ReadRowsRequest.Builder.class); } + /** + * + * + *
    +   * The desired view into RequestStats that should be returned in the response.
    +   * See also: RequestStats message.
    +   * 
    + * + * Protobuf enum {@code google.bigtable.v2.ReadRowsRequest.RequestStatsView} + */ + public enum RequestStatsView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
    +     * The default / unset value. The API will default to the NONE option below.
    +     * 
    + * + * REQUEST_STATS_VIEW_UNSPECIFIED = 0; + */ + REQUEST_STATS_VIEW_UNSPECIFIED(0), + /** + * + * + *
    +     * Do not include any RequestStats in the response. This will leave the
    +     * RequestStats embedded message unset in the response.
    +     * 
    + * + * REQUEST_STATS_NONE = 1; + */ + REQUEST_STATS_NONE(1), + /** + * + * + *
    +     * Include the full set of available RequestStats in the response,
    +     * applicable to this read.
    +     * 
    + * + * REQUEST_STATS_FULL = 2; + */ + REQUEST_STATS_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
    +     * The default / unset value. The API will default to the NONE option below.
    +     * 
    + * + * REQUEST_STATS_VIEW_UNSPECIFIED = 0; + */ + public static final int REQUEST_STATS_VIEW_UNSPECIFIED_VALUE = 0; + /** + * + * + *
    +     * Do not include any RequestStats in the response. This will leave the
    +     * RequestStats embedded message unset in the response.
    +     * 
    + * + * REQUEST_STATS_NONE = 1; + */ + public static final int REQUEST_STATS_NONE_VALUE = 1; + /** + * + * + *
    +     * Include the full set of available RequestStats in the response,
    +     * applicable to this read.
    +     * 
    + * + * REQUEST_STATS_FULL = 2; + */ + public static final int REQUEST_STATS_FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RequestStatsView valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RequestStatsView forNumber(int value) { + switch (value) { + case 0: + return REQUEST_STATS_VIEW_UNSPECIFIED; + case 1: + return REQUEST_STATS_NONE; + case 2: + return REQUEST_STATS_FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RequestStatsView findValueByNumber(int number) { + return RequestStatsView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.bigtable.v2.ReadRowsRequest.getDescriptor().getEnumTypes().get(0); + } + + private static final RequestStatsView[] VALUES = values(); + + public static RequestStatsView valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RequestStatsView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.bigtable.v2.ReadRowsRequest.RequestStatsView) + } + public static final int TABLE_NAME_FIELD_NUMBER = 1; private volatile java.lang.Object tableName_; /** @@ -218,8 +296,8 @@ public com.google.protobuf.ByteString getTableNameBytes() { * * *
    -   * This value specifies routing for replication. If not specified, the
    -   * "default" application profile will be used.
    +   * This value specifies routing for replication. This API only accepts the
    +   * empty value of app_profile_id.
        * 
    * * string app_profile_id = 5; @@ -242,8 +320,8 @@ public java.lang.String getAppProfileId() { * * *
    -   * This value specifies routing for replication. If not specified, the
    -   * "default" application profile will be used.
    +   * This value specifies routing for replication. This API only accepts the
    +   * empty value of app_profile_id.
        * 
    * * string app_profile_id = 5; @@ -380,6 +458,44 @@ public long getRowsLimit() { return rowsLimit_; } + public static final int REQUEST_STATS_VIEW_FIELD_NUMBER = 6; + private int requestStatsView_; + /** + * + * + *
    +   * The view into RequestStats, as described above.
    +   * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return The enum numeric value on the wire for requestStatsView. + */ + @java.lang.Override + public int getRequestStatsViewValue() { + return requestStatsView_; + } + /** + * + * + *
    +   * The view into RequestStats, as described above.
    +   * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return The requestStatsView. + */ + @java.lang.Override + public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsView() { + @SuppressWarnings("deprecation") + com.google.bigtable.v2.ReadRowsRequest.RequestStatsView result = + com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.valueOf(requestStatsView_); + return result == null + ? com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -409,7 +525,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, appProfileId_); } - unknownFields.writeTo(output); + if (requestStatsView_ + != com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.REQUEST_STATS_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, requestStatsView_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -433,7 +554,12 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, appProfileId_); } - size += unknownFields.getSerializedSize(); + if (requestStatsView_ + != com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.REQUEST_STATS_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, requestStatsView_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -459,7 +585,8 @@ public boolean equals(final java.lang.Object obj) { if (!getFilter().equals(other.getFilter())) return false; } if (getRowsLimit() != other.getRowsLimit()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (requestStatsView_ != other.requestStatsView_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -484,7 +611,9 @@ public int hashCode() { } hash = (37 * hash) + ROWS_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowsLimit()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + REQUEST_STATS_VIEW_FIELD_NUMBER; + hash = (53 * hash) + requestStatsView_; + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -613,17 +742,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ReadRowsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,6 +769,8 @@ public Builder clear() { } rowsLimit_ = 0L; + requestStatsView_ = 0; + return this; } @@ -687,6 +811,7 @@ public com.google.bigtable.v2.ReadRowsRequest buildPartial() { result.filter_ = filterBuilder_.build(); } result.rowsLimit_ = rowsLimit_; + result.requestStatsView_ = requestStatsView_; onBuilt(); return result; } @@ -753,7 +878,10 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadRowsRequest other) { if (other.getRowsLimit() != 0L) { setRowsLimit(other.getRowsLimit()); } - this.mergeUnknownFields(other.unknownFields); + if (other.requestStatsView_ != 0) { + setRequestStatsViewValue(other.getRequestStatsViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -768,17 +896,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ReadRowsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getRowsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFilterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + rowsLimit_ = input.readInt64(); + + break; + } // case 32 + case 42: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + requestStatsView_ = input.readEnum(); + + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ReadRowsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -913,8 +1091,8 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) { * * *
    -     * This value specifies routing for replication. If not specified, the
    -     * "default" application profile will be used.
    +     * This value specifies routing for replication. This API only accepts the
    +     * empty value of app_profile_id.
          * 
    * * string app_profile_id = 5; @@ -936,8 +1114,8 @@ public java.lang.String getAppProfileId() { * * *
    -     * This value specifies routing for replication. If not specified, the
    -     * "default" application profile will be used.
    +     * This value specifies routing for replication. This API only accepts the
    +     * empty value of app_profile_id.
          * 
    * * string app_profile_id = 5; @@ -959,8 +1137,8 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() { * * *
    -     * This value specifies routing for replication. If not specified, the
    -     * "default" application profile will be used.
    +     * This value specifies routing for replication. This API only accepts the
    +     * empty value of app_profile_id.
          * 
    * * string app_profile_id = 5; @@ -981,8 +1159,8 @@ public Builder setAppProfileId(java.lang.String value) { * * *
    -     * This value specifies routing for replication. If not specified, the
    -     * "default" application profile will be used.
    +     * This value specifies routing for replication. This API only accepts the
    +     * empty value of app_profile_id.
          * 
    * * string app_profile_id = 5; @@ -999,8 +1177,8 @@ public Builder clearAppProfileId() { * * *
    -     * This value specifies routing for replication. If not specified, the
    -     * "default" application profile will be used.
    +     * This value specifies routing for replication. This API only accepts the
    +     * empty value of app_profile_id.
          * 
    * * string app_profile_id = 5; @@ -1449,6 +1627,100 @@ public Builder clearRowsLimit() { return this; } + private int requestStatsView_ = 0; + /** + * + * + *
    +     * The view into RequestStats, as described above.
    +     * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return The enum numeric value on the wire for requestStatsView. + */ + @java.lang.Override + public int getRequestStatsViewValue() { + return requestStatsView_; + } + /** + * + * + *
    +     * The view into RequestStats, as described above.
    +     * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @param value The enum numeric value on the wire for requestStatsView to set. + * @return This builder for chaining. + */ + public Builder setRequestStatsViewValue(int value) { + + requestStatsView_ = value; + onChanged(); + return this; + } + /** + * + * + *
    +     * The view into RequestStats, as described above.
    +     * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return The requestStatsView. + */ + @java.lang.Override + public com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsView() { + @SuppressWarnings("deprecation") + com.google.bigtable.v2.ReadRowsRequest.RequestStatsView result = + com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.valueOf(requestStatsView_); + return result == null + ? com.google.bigtable.v2.ReadRowsRequest.RequestStatsView.UNRECOGNIZED + : result; + } + /** + * + * + *
    +     * The view into RequestStats, as described above.
    +     * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @param value The requestStatsView to set. + * @return This builder for chaining. + */ + public Builder setRequestStatsView( + com.google.bigtable.v2.ReadRowsRequest.RequestStatsView value) { + if (value == null) { + throw new NullPointerException(); + } + + requestStatsView_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
    +     * The view into RequestStats, as described above.
    +     * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return This builder for chaining. + */ + public Builder clearRequestStatsView() { + + requestStatsView_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -1481,7 +1753,18 @@ public ReadRowsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadRowsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java index 9455f46c5c..2b2e969f06 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java @@ -60,8 +60,8 @@ public interface ReadRowsRequestOrBuilder * * *
    -   * This value specifies routing for replication. If not specified, the
    -   * "default" application profile will be used.
    +   * This value specifies routing for replication. This API only accepts the
    +   * empty value of app_profile_id.
        * 
    * * string app_profile_id = 5; @@ -73,8 +73,8 @@ public interface ReadRowsRequestOrBuilder * * *
    -   * This value specifies routing for replication. If not specified, the
    -   * "default" application profile will be used.
    +   * This value specifies routing for replication. This API only accepts the
    +   * empty value of app_profile_id.
        * 
    * * string app_profile_id = 5; @@ -172,4 +172,29 @@ public interface ReadRowsRequestOrBuilder * @return The rowsLimit. */ long getRowsLimit(); + + /** + * + * + *
    +   * The view into RequestStats, as described above.
    +   * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return The enum numeric value on the wire for requestStatsView. + */ + int getRequestStatsViewValue(); + /** + * + * + *
    +   * The view into RequestStats, as described above.
    +   * 
    + * + * .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; + * + * @return The requestStatsView. + */ + com.google.bigtable.v2.ReadRowsRequest.RequestStatsView getRequestStatsView(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java index 98ac786491..2de28f715e 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReadRowsResponse( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - chunks_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - chunks_.add( - input.readMessage( - com.google.bigtable.v2.ReadRowsResponse.CellChunk.parser(), - extensionRegistry)); - break; - } - case 18: - { - lastScannedRowKey_ = input.readBytes(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - chunks_ = java.util.Collections.unmodifiableList(chunks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_descriptor; @@ -452,121 +391,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CellChunk( - 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; - case 10: - { - rowKey_ = input.readBytes(); - break; - } - case 18: - { - com.google.protobuf.StringValue.Builder subBuilder = null; - if (familyName_ != null) { - subBuilder = familyName_.toBuilder(); - } - familyName_ = - input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(familyName_); - familyName_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.BytesValue.Builder subBuilder = null; - if (qualifier_ != null) { - subBuilder = qualifier_.toBuilder(); - } - qualifier_ = - input.readMessage(com.google.protobuf.BytesValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(qualifier_); - qualifier_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - timestampMicros_ = input.readInt64(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - labels_.add(s); - break; - } - case 50: - { - value_ = input.readBytes(); - break; - } - case 56: - { - valueSize_ = input.readInt32(); - break; - } - case 64: - { - rowStatus_ = input.readBool(); - rowStatusCase_ = 8; - break; - } - case 72: - { - rowStatus_ = input.readBool(); - rowStatusCase_ = 9; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - labels_ = labels_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_ReadRowsResponse_CellChunk_descriptor; @@ -1023,7 +847,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (rowStatusCase_ == 9) { output.writeBool(9, (boolean) ((java.lang.Boolean) rowStatus_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1068,7 +892,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 9, (boolean) ((java.lang.Boolean) rowStatus_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1108,7 +932,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1151,7 +975,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1283,17 +1107,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ReadRowsResponse.CellChunk.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1473,7 +1290,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadRowsResponse.CellChunk other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1488,18 +1305,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ReadRowsResponse.CellChunk parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + rowKey_ = input.readBytes(); + + break; + } // case 10 + case 18: + { + input.readMessage(getFamilyNameFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getQualifierFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + timestampMicros_ = input.readInt64(); + + break; + } // case 32 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLabelsIsMutable(); + labels_.add(s); + break; + } // case 42 + case 50: + { + value_ = input.readBytes(); + + break; + } // case 50 + case 56: + { + valueSize_ = input.readInt32(); + + break; + } // case 56 + case 64: + { + rowStatus_ = input.readBool(); + rowStatusCase_ = 8; + break; + } // case 64 + case 72: + { + rowStatus_ = input.readBool(); + rowStatusCase_ = 9; + break; + } // case 72 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.bigtable.v2.ReadRowsResponse.CellChunk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2600,7 +2485,19 @@ public CellChunk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CellChunk(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2712,6 +2609,102 @@ public com.google.protobuf.ByteString getLastScannedRowKey() { return lastScannedRowKey_; } + public static final int REQUEST_STATS_FIELD_NUMBER = 3; + private com.google.bigtable.v2.RequestStats requestStats_; + /** + * + * + *
    +   * If requested, provide enhanced query performance statistics. The semantics
    +   * dictate:
    +   *   * request_stats is empty on every (streamed) response, except
    +   *   * request_stats has non-empty information after all chunks have been
    +   *     streamed, where the ReadRowsResponse message only contains
    +   *     request_stats.
    +   *       * For example, if a read request would have returned an empty
    +   *         response instead a single ReadRowsResponse is streamed with empty
    +   *         chunks and request_stats filled.
    +   * Visually, response messages will stream as follows:
    +   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +   *   \______________________/  \________________________________/
    +   *       Primary response         Trailer of RequestStats info
    +   * Or if the read did not return any values:
    +   *   {chunks: [], request_stats: {...}}
    +   *   \________________________________/
    +   *      Trailer of RequestStats info
    +   * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + * + * @return Whether the requestStats field is set. + */ + @java.lang.Override + public boolean hasRequestStats() { + return requestStats_ != null; + } + /** + * + * + *
    +   * If requested, provide enhanced query performance statistics. The semantics
    +   * dictate:
    +   *   * request_stats is empty on every (streamed) response, except
    +   *   * request_stats has non-empty information after all chunks have been
    +   *     streamed, where the ReadRowsResponse message only contains
    +   *     request_stats.
    +   *       * For example, if a read request would have returned an empty
    +   *         response instead a single ReadRowsResponse is streamed with empty
    +   *         chunks and request_stats filled.
    +   * Visually, response messages will stream as follows:
    +   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +   *   \______________________/  \________________________________/
    +   *       Primary response         Trailer of RequestStats info
    +   * Or if the read did not return any values:
    +   *   {chunks: [], request_stats: {...}}
    +   *   \________________________________/
    +   *      Trailer of RequestStats info
    +   * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + * + * @return The requestStats. + */ + @java.lang.Override + public com.google.bigtable.v2.RequestStats getRequestStats() { + return requestStats_ == null + ? com.google.bigtable.v2.RequestStats.getDefaultInstance() + : requestStats_; + } + /** + * + * + *
    +   * If requested, provide enhanced query performance statistics. The semantics
    +   * dictate:
    +   *   * request_stats is empty on every (streamed) response, except
    +   *   * request_stats has non-empty information after all chunks have been
    +   *     streamed, where the ReadRowsResponse message only contains
    +   *     request_stats.
    +   *       * For example, if a read request would have returned an empty
    +   *         response instead a single ReadRowsResponse is streamed with empty
    +   *         chunks and request_stats filled.
    +   * Visually, response messages will stream as follows:
    +   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +   *   \______________________/  \________________________________/
    +   *       Primary response         Trailer of RequestStats info
    +   * Or if the read did not return any values:
    +   *   {chunks: [], request_stats: {...}}
    +   *   \________________________________/
    +   *      Trailer of RequestStats info
    +   * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + @java.lang.Override + public com.google.bigtable.v2.RequestStatsOrBuilder getRequestStatsOrBuilder() { + return getRequestStats(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2732,7 +2725,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!lastScannedRowKey_.isEmpty()) { output.writeBytes(2, lastScannedRowKey_); } - unknownFields.writeTo(output); + if (requestStats_ != null) { + output.writeMessage(3, getRequestStats()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2747,7 +2743,10 @@ public int getSerializedSize() { if (!lastScannedRowKey_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, lastScannedRowKey_); } - size += unknownFields.getSerializedSize(); + if (requestStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequestStats()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2764,7 +2763,11 @@ public boolean equals(final java.lang.Object obj) { if (!getChunksList().equals(other.getChunksList())) return false; if (!getLastScannedRowKey().equals(other.getLastScannedRowKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (hasRequestStats() != other.hasRequestStats()) return false; + if (hasRequestStats()) { + if (!getRequestStats().equals(other.getRequestStats())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2781,7 +2784,11 @@ public int hashCode() { } hash = (37 * hash) + LAST_SCANNED_ROW_KEY_FIELD_NUMBER; hash = (53 * hash) + getLastScannedRowKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + if (hasRequestStats()) { + hash = (37 * hash) + REQUEST_STATS_FIELD_NUMBER; + hash = (53 * hash) + getRequestStats().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2910,19 +2917,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ReadRowsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getChunksFieldBuilder(); - } } @java.lang.Override @@ -2930,12 +2928,19 @@ public Builder clear() { super.clear(); if (chunksBuilder_ == null) { chunks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + chunks_ = null; chunksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); lastScannedRowKey_ = com.google.protobuf.ByteString.EMPTY; + if (requestStatsBuilder_ == null) { + requestStats_ = null; + } else { + requestStats_ = null; + requestStatsBuilder_ = null; + } return this; } @@ -2974,6 +2979,11 @@ public com.google.bigtable.v2.ReadRowsResponse buildPartial() { result.chunks_ = chunksBuilder_.build(); } result.lastScannedRowKey_ = lastScannedRowKey_; + if (requestStatsBuilder_ == null) { + result.requestStats_ = requestStats_; + } else { + result.requestStats_ = requestStatsBuilder_.build(); + } onBuilt(); return result; } @@ -3053,7 +3063,10 @@ public Builder mergeFrom(com.google.bigtable.v2.ReadRowsResponse other) { if (other.getLastScannedRowKey() != com.google.protobuf.ByteString.EMPTY) { setLastScannedRowKey(other.getLastScannedRowKey()); } - this.mergeUnknownFields(other.unknownFields); + if (other.hasRequestStats()) { + mergeRequestStats(other.getRequestStats()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3068,17 +3081,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ReadRowsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.v2.ReadRowsResponse.CellChunk m = + input.readMessage( + com.google.bigtable.v2.ReadRowsResponse.CellChunk.parser(), + extensionRegistry); + if (chunksBuilder_ == null) { + ensureChunksIsMutable(); + chunks_.add(m); + } else { + chunksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + lastScannedRowKey_ = input.readBytes(); + + break; + } // case 18 + case 26: + { + input.readMessage(getRequestStatsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ReadRowsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3511,6 +3564,335 @@ public Builder clearLastScannedRowKey() { return this; } + private com.google.bigtable.v2.RequestStats requestStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.RequestStats, + com.google.bigtable.v2.RequestStats.Builder, + com.google.bigtable.v2.RequestStatsOrBuilder> + requestStatsBuilder_; + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + * + * @return Whether the requestStats field is set. + */ + public boolean hasRequestStats() { + return requestStatsBuilder_ != null || requestStats_ != null; + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + * + * @return The requestStats. + */ + public com.google.bigtable.v2.RequestStats getRequestStats() { + if (requestStatsBuilder_ == null) { + return requestStats_ == null + ? com.google.bigtable.v2.RequestStats.getDefaultInstance() + : requestStats_; + } else { + return requestStatsBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + public Builder setRequestStats(com.google.bigtable.v2.RequestStats value) { + if (requestStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestStats_ = value; + onChanged(); + } else { + requestStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + public Builder setRequestStats(com.google.bigtable.v2.RequestStats.Builder builderForValue) { + if (requestStatsBuilder_ == null) { + requestStats_ = builderForValue.build(); + onChanged(); + } else { + requestStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + public Builder mergeRequestStats(com.google.bigtable.v2.RequestStats value) { + if (requestStatsBuilder_ == null) { + if (requestStats_ != null) { + requestStats_ = + com.google.bigtable.v2.RequestStats.newBuilder(requestStats_) + .mergeFrom(value) + .buildPartial(); + } else { + requestStats_ = value; + } + onChanged(); + } else { + requestStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + public Builder clearRequestStats() { + if (requestStatsBuilder_ == null) { + requestStats_ = null; + onChanged(); + } else { + requestStats_ = null; + requestStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + public com.google.bigtable.v2.RequestStats.Builder getRequestStatsBuilder() { + + onChanged(); + return getRequestStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + public com.google.bigtable.v2.RequestStatsOrBuilder getRequestStatsOrBuilder() { + if (requestStatsBuilder_ != null) { + return requestStatsBuilder_.getMessageOrBuilder(); + } else { + return requestStats_ == null + ? com.google.bigtable.v2.RequestStats.getDefaultInstance() + : requestStats_; + } + } + /** + * + * + *
    +     * If requested, provide enhanced query performance statistics. The semantics
    +     * dictate:
    +     *   * request_stats is empty on every (streamed) response, except
    +     *   * request_stats has non-empty information after all chunks have been
    +     *     streamed, where the ReadRowsResponse message only contains
    +     *     request_stats.
    +     *       * For example, if a read request would have returned an empty
    +     *         response instead a single ReadRowsResponse is streamed with empty
    +     *         chunks and request_stats filled.
    +     * Visually, response messages will stream as follows:
    +     *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +     *   \______________________/  \________________________________/
    +     *       Primary response         Trailer of RequestStats info
    +     * Or if the read did not return any values:
    +     *   {chunks: [], request_stats: {...}}
    +     *   \________________________________/
    +     *      Trailer of RequestStats info
    +     * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.RequestStats, + com.google.bigtable.v2.RequestStats.Builder, + com.google.bigtable.v2.RequestStatsOrBuilder> + getRequestStatsFieldBuilder() { + if (requestStatsBuilder_ == null) { + requestStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.RequestStats, + com.google.bigtable.v2.RequestStats.Builder, + com.google.bigtable.v2.RequestStatsOrBuilder>( + getRequestStats(), getParentForChildren(), isClean()); + requestStats_ = null; + } + return requestStatsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -3543,7 +3925,18 @@ public ReadRowsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadRowsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java index 84410a4c1e..26522bed3b 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsResponseOrBuilder.java @@ -93,4 +93,87 @@ public interface ReadRowsResponseOrBuilder * @return The lastScannedRowKey. */ com.google.protobuf.ByteString getLastScannedRowKey(); + + /** + * + * + *
    +   * If requested, provide enhanced query performance statistics. The semantics
    +   * dictate:
    +   *   * request_stats is empty on every (streamed) response, except
    +   *   * request_stats has non-empty information after all chunks have been
    +   *     streamed, where the ReadRowsResponse message only contains
    +   *     request_stats.
    +   *       * For example, if a read request would have returned an empty
    +   *         response instead a single ReadRowsResponse is streamed with empty
    +   *         chunks and request_stats filled.
    +   * Visually, response messages will stream as follows:
    +   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +   *   \______________________/  \________________________________/
    +   *       Primary response         Trailer of RequestStats info
    +   * Or if the read did not return any values:
    +   *   {chunks: [], request_stats: {...}}
    +   *   \________________________________/
    +   *      Trailer of RequestStats info
    +   * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + * + * @return Whether the requestStats field is set. + */ + boolean hasRequestStats(); + /** + * + * + *
    +   * If requested, provide enhanced query performance statistics. The semantics
    +   * dictate:
    +   *   * request_stats is empty on every (streamed) response, except
    +   *   * request_stats has non-empty information after all chunks have been
    +   *     streamed, where the ReadRowsResponse message only contains
    +   *     request_stats.
    +   *       * For example, if a read request would have returned an empty
    +   *         response instead a single ReadRowsResponse is streamed with empty
    +   *         chunks and request_stats filled.
    +   * Visually, response messages will stream as follows:
    +   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +   *   \______________________/  \________________________________/
    +   *       Primary response         Trailer of RequestStats info
    +   * Or if the read did not return any values:
    +   *   {chunks: [], request_stats: {...}}
    +   *   \________________________________/
    +   *      Trailer of RequestStats info
    +   * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + * + * @return The requestStats. + */ + com.google.bigtable.v2.RequestStats getRequestStats(); + /** + * + * + *
    +   * If requested, provide enhanced query performance statistics. The semantics
    +   * dictate:
    +   *   * request_stats is empty on every (streamed) response, except
    +   *   * request_stats has non-empty information after all chunks have been
    +   *     streamed, where the ReadRowsResponse message only contains
    +   *     request_stats.
    +   *       * For example, if a read request would have returned an empty
    +   *         response instead a single ReadRowsResponse is streamed with empty
    +   *         chunks and request_stats filled.
    +   * Visually, response messages will stream as follows:
    +   *    ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
    +   *   \______________________/  \________________________________/
    +   *       Primary response         Trailer of RequestStats info
    +   * Or if the read did not return any values:
    +   *   {chunks: [], request_stats: {...}}
    +   *   \________________________________/
    +   *      Trailer of RequestStats info
    +   * 
    + * + * .google.bigtable.v2.RequestStats request_stats = 3; + */ + com.google.bigtable.v2.RequestStatsOrBuilder getRequestStatsOrBuilder(); } diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java new file mode 100644 index 0000000000..b8f0d518de --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStats.java @@ -0,0 +1,876 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +/** + * + * + *
    + * RequestLatencyStats provides a measurement of the latency of the request as
    + * it interacts with different systems over its lifetime, e.g. how long the
    + * request took to execute within a frontend server.
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.RequestLatencyStats} + */ +public final class RequestLatencyStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.RequestLatencyStats) + RequestLatencyStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestLatencyStats.newBuilder() to construct. + private RequestLatencyStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RequestLatencyStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RequestLatencyStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestLatencyStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.RequestLatencyStats.class, + com.google.bigtable.v2.RequestLatencyStats.Builder.class); + } + + public static final int FRONTEND_SERVER_LATENCY_FIELD_NUMBER = 1; + private com.google.protobuf.Duration frontendServerLatency_; + /** + * + * + *
    +   * The latency measured by the frontend server handling this request, from
    +   * when the request was received, to when this value is sent back in the
    +   * response. For more context on the component that is measuring this latency,
    +   * see: https://cloud.google.com/bigtable/docs/overview
    +   * Note: This value may be slightly shorter than the value reported into
    +   * aggregate latency metrics in Monitoring for this request
    +   * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +   * needs to be sent in the response before the latency measurement including
    +   * that transmission is finalized.
    +   * Note: This value includes the end-to-end latency of contacting nodes in
    +   * the targeted cluster, e.g. measuring from when the first byte arrives at
    +   * the frontend server, to when this value is sent back as the last value in
    +   * the response, including any latency incurred by contacting nodes, waiting
    +   * for results from nodes, and finally sending results from nodes back to the
    +   * caller.
    +   * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + * + * @return Whether the frontendServerLatency field is set. + */ + @java.lang.Override + public boolean hasFrontendServerLatency() { + return frontendServerLatency_ != null; + } + /** + * + * + *
    +   * The latency measured by the frontend server handling this request, from
    +   * when the request was received, to when this value is sent back in the
    +   * response. For more context on the component that is measuring this latency,
    +   * see: https://cloud.google.com/bigtable/docs/overview
    +   * Note: This value may be slightly shorter than the value reported into
    +   * aggregate latency metrics in Monitoring for this request
    +   * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +   * needs to be sent in the response before the latency measurement including
    +   * that transmission is finalized.
    +   * Note: This value includes the end-to-end latency of contacting nodes in
    +   * the targeted cluster, e.g. measuring from when the first byte arrives at
    +   * the frontend server, to when this value is sent back as the last value in
    +   * the response, including any latency incurred by contacting nodes, waiting
    +   * for results from nodes, and finally sending results from nodes back to the
    +   * caller.
    +   * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + * + * @return The frontendServerLatency. + */ + @java.lang.Override + public com.google.protobuf.Duration getFrontendServerLatency() { + return frontendServerLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : frontendServerLatency_; + } + /** + * + * + *
    +   * The latency measured by the frontend server handling this request, from
    +   * when the request was received, to when this value is sent back in the
    +   * response. For more context on the component that is measuring this latency,
    +   * see: https://cloud.google.com/bigtable/docs/overview
    +   * Note: This value may be slightly shorter than the value reported into
    +   * aggregate latency metrics in Monitoring for this request
    +   * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +   * needs to be sent in the response before the latency measurement including
    +   * that transmission is finalized.
    +   * Note: This value includes the end-to-end latency of contacting nodes in
    +   * the targeted cluster, e.g. measuring from when the first byte arrives at
    +   * the frontend server, to when this value is sent back as the last value in
    +   * the response, including any latency incurred by contacting nodes, waiting
    +   * for results from nodes, and finally sending results from nodes back to the
    +   * caller.
    +   * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder() { + return getFrontendServerLatency(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (frontendServerLatency_ != null) { + output.writeMessage(1, getFrontendServerLatency()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (frontendServerLatency_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFrontendServerLatency()); + } + size += getUnknownFields().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.bigtable.v2.RequestLatencyStats)) { + return super.equals(obj); + } + com.google.bigtable.v2.RequestLatencyStats other = + (com.google.bigtable.v2.RequestLatencyStats) obj; + + if (hasFrontendServerLatency() != other.hasFrontendServerLatency()) return false; + if (hasFrontendServerLatency()) { + if (!getFrontendServerLatency().equals(other.getFrontendServerLatency())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFrontendServerLatency()) { + hash = (37 * hash) + FRONTEND_SERVER_LATENCY_FIELD_NUMBER; + hash = (53 * hash) + getFrontendServerLatency().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.RequestLatencyStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.RequestLatencyStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.RequestLatencyStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.RequestLatencyStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.RequestLatencyStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.RequestLatencyStats 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.bigtable.v2.RequestLatencyStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.RequestLatencyStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.v2.RequestLatencyStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * RequestLatencyStats provides a measurement of the latency of the request as
    +   * it interacts with different systems over its lifetime, e.g. how long the
    +   * request took to execute within a frontend server.
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.RequestLatencyStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.RequestLatencyStats) + com.google.bigtable.v2.RequestLatencyStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestLatencyStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.RequestLatencyStats.class, + com.google.bigtable.v2.RequestLatencyStats.Builder.class); + } + + // Construct using com.google.bigtable.v2.RequestLatencyStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (frontendServerLatencyBuilder_ == null) { + frontendServerLatency_ = null; + } else { + frontendServerLatency_ = null; + frontendServerLatencyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestLatencyStats_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.RequestLatencyStats getDefaultInstanceForType() { + return com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.RequestLatencyStats build() { + com.google.bigtable.v2.RequestLatencyStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.RequestLatencyStats buildPartial() { + com.google.bigtable.v2.RequestLatencyStats result = + new com.google.bigtable.v2.RequestLatencyStats(this); + if (frontendServerLatencyBuilder_ == null) { + result.frontendServerLatency_ = frontendServerLatency_; + } else { + result.frontendServerLatency_ = frontendServerLatencyBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.RequestLatencyStats) { + return mergeFrom((com.google.bigtable.v2.RequestLatencyStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.RequestLatencyStats other) { + if (other == com.google.bigtable.v2.RequestLatencyStats.getDefaultInstance()) return this; + if (other.hasFrontendServerLatency()) { + mergeFrontendServerLatency(other.getFrontendServerLatency()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getFrontendServerLatencyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.protobuf.Duration frontendServerLatency_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + frontendServerLatencyBuilder_; + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + * + * @return Whether the frontendServerLatency field is set. + */ + public boolean hasFrontendServerLatency() { + return frontendServerLatencyBuilder_ != null || frontendServerLatency_ != null; + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + * + * @return The frontendServerLatency. + */ + public com.google.protobuf.Duration getFrontendServerLatency() { + if (frontendServerLatencyBuilder_ == null) { + return frontendServerLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : frontendServerLatency_; + } else { + return frontendServerLatencyBuilder_.getMessage(); + } + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + public Builder setFrontendServerLatency(com.google.protobuf.Duration value) { + if (frontendServerLatencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + frontendServerLatency_ = value; + onChanged(); + } else { + frontendServerLatencyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + public Builder setFrontendServerLatency(com.google.protobuf.Duration.Builder builderForValue) { + if (frontendServerLatencyBuilder_ == null) { + frontendServerLatency_ = builderForValue.build(); + onChanged(); + } else { + frontendServerLatencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + public Builder mergeFrontendServerLatency(com.google.protobuf.Duration value) { + if (frontendServerLatencyBuilder_ == null) { + if (frontendServerLatency_ != null) { + frontendServerLatency_ = + com.google.protobuf.Duration.newBuilder(frontendServerLatency_) + .mergeFrom(value) + .buildPartial(); + } else { + frontendServerLatency_ = value; + } + onChanged(); + } else { + frontendServerLatencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + public Builder clearFrontendServerLatency() { + if (frontendServerLatencyBuilder_ == null) { + frontendServerLatency_ = null; + onChanged(); + } else { + frontendServerLatency_ = null; + frontendServerLatencyBuilder_ = null; + } + + return this; + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + public com.google.protobuf.Duration.Builder getFrontendServerLatencyBuilder() { + + onChanged(); + return getFrontendServerLatencyFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + public com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder() { + if (frontendServerLatencyBuilder_ != null) { + return frontendServerLatencyBuilder_.getMessageOrBuilder(); + } else { + return frontendServerLatency_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : frontendServerLatency_; + } + } + /** + * + * + *
    +     * The latency measured by the frontend server handling this request, from
    +     * when the request was received, to when this value is sent back in the
    +     * response. For more context on the component that is measuring this latency,
    +     * see: https://cloud.google.com/bigtable/docs/overview
    +     * Note: This value may be slightly shorter than the value reported into
    +     * aggregate latency metrics in Monitoring for this request
    +     * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +     * needs to be sent in the response before the latency measurement including
    +     * that transmission is finalized.
    +     * Note: This value includes the end-to-end latency of contacting nodes in
    +     * the targeted cluster, e.g. measuring from when the first byte arrives at
    +     * the frontend server, to when this value is sent back as the last value in
    +     * the response, including any latency incurred by contacting nodes, waiting
    +     * for results from nodes, and finally sending results from nodes back to the
    +     * caller.
    +     * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getFrontendServerLatencyFieldBuilder() { + if (frontendServerLatencyBuilder_ == null) { + frontendServerLatencyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getFrontendServerLatency(), getParentForChildren(), isClean()); + frontendServerLatency_ = null; + } + return frontendServerLatencyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RequestLatencyStats) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.RequestLatencyStats) + private static final com.google.bigtable.v2.RequestLatencyStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.RequestLatencyStats(); + } + + public static com.google.bigtable.v2.RequestLatencyStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestLatencyStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.v2.RequestLatencyStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java new file mode 100644 index 0000000000..956f3a7af7 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestLatencyStatsOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +public interface RequestLatencyStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RequestLatencyStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * The latency measured by the frontend server handling this request, from
    +   * when the request was received, to when this value is sent back in the
    +   * response. For more context on the component that is measuring this latency,
    +   * see: https://cloud.google.com/bigtable/docs/overview
    +   * Note: This value may be slightly shorter than the value reported into
    +   * aggregate latency metrics in Monitoring for this request
    +   * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +   * needs to be sent in the response before the latency measurement including
    +   * that transmission is finalized.
    +   * Note: This value includes the end-to-end latency of contacting nodes in
    +   * the targeted cluster, e.g. measuring from when the first byte arrives at
    +   * the frontend server, to when this value is sent back as the last value in
    +   * the response, including any latency incurred by contacting nodes, waiting
    +   * for results from nodes, and finally sending results from nodes back to the
    +   * caller.
    +   * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + * + * @return Whether the frontendServerLatency field is set. + */ + boolean hasFrontendServerLatency(); + /** + * + * + *
    +   * The latency measured by the frontend server handling this request, from
    +   * when the request was received, to when this value is sent back in the
    +   * response. For more context on the component that is measuring this latency,
    +   * see: https://cloud.google.com/bigtable/docs/overview
    +   * Note: This value may be slightly shorter than the value reported into
    +   * aggregate latency metrics in Monitoring for this request
    +   * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +   * needs to be sent in the response before the latency measurement including
    +   * that transmission is finalized.
    +   * Note: This value includes the end-to-end latency of contacting nodes in
    +   * the targeted cluster, e.g. measuring from when the first byte arrives at
    +   * the frontend server, to when this value is sent back as the last value in
    +   * the response, including any latency incurred by contacting nodes, waiting
    +   * for results from nodes, and finally sending results from nodes back to the
    +   * caller.
    +   * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + * + * @return The frontendServerLatency. + */ + com.google.protobuf.Duration getFrontendServerLatency(); + /** + * + * + *
    +   * The latency measured by the frontend server handling this request, from
    +   * when the request was received, to when this value is sent back in the
    +   * response. For more context on the component that is measuring this latency,
    +   * see: https://cloud.google.com/bigtable/docs/overview
    +   * Note: This value may be slightly shorter than the value reported into
    +   * aggregate latency metrics in Monitoring for this request
    +   * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
    +   * needs to be sent in the response before the latency measurement including
    +   * that transmission is finalized.
    +   * Note: This value includes the end-to-end latency of contacting nodes in
    +   * the targeted cluster, e.g. measuring from when the first byte arrives at
    +   * the frontend server, to when this value is sent back as the last value in
    +   * the response, including any latency incurred by contacting nodes, waiting
    +   * for results from nodes, and finally sending results from nodes back to the
    +   * caller.
    +   * 
    + * + * .google.protobuf.Duration frontend_server_latency = 1; + */ + com.google.protobuf.DurationOrBuilder getFrontendServerLatencyOrBuilder(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java new file mode 100644 index 0000000000..9f648b3022 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStats.java @@ -0,0 +1,824 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +/** + * + * + *
    + * RequestStats is the container for additional information pertaining to a
    + * single request, helpful for evaluating the performance of the sent request.
    + * Currently, there are the following supported methods:
    + *   * google.bigtable.v2.ReadRows
    + * 
    + * + * Protobuf type {@code google.bigtable.v2.RequestStats} + */ +public final class RequestStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.RequestStats) + RequestStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RequestStats.newBuilder() to construct. + private RequestStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RequestStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RequestStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.RequestStats.class, + com.google.bigtable.v2.RequestStats.Builder.class); + } + + private int statsViewCase_ = 0; + private java.lang.Object statsView_; + + public enum StatsViewCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FULL_READ_STATS_VIEW(1), + STATSVIEW_NOT_SET(0); + private final int value; + + private StatsViewCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StatsViewCase valueOf(int value) { + return forNumber(value); + } + + public static StatsViewCase forNumber(int value) { + switch (value) { + case 1: + return FULL_READ_STATS_VIEW; + case 0: + return STATSVIEW_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StatsViewCase getStatsViewCase() { + return StatsViewCase.forNumber(statsViewCase_); + } + + public static final int FULL_READ_STATS_VIEW_FIELD_NUMBER = 1; + /** + * + * + *
    +   * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +   * view, see package google.bigtable.v2.
    +   * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * + * @return Whether the fullReadStatsView field is set. + */ + @java.lang.Override + public boolean hasFullReadStatsView() { + return statsViewCase_ == 1; + } + /** + * + * + *
    +   * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +   * view, see package google.bigtable.v2.
    +   * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * + * @return The fullReadStatsView. + */ + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsView getFullReadStatsView() { + if (statsViewCase_ == 1) { + return (com.google.bigtable.v2.FullReadStatsView) statsView_; + } + return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } + /** + * + * + *
    +   * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +   * view, see package google.bigtable.v2.
    +   * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrBuilder() { + if (statsViewCase_ == 1) { + return (com.google.bigtable.v2.FullReadStatsView) statsView_; + } + return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (statsViewCase_ == 1) { + output.writeMessage(1, (com.google.bigtable.v2.FullReadStatsView) statsView_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (statsViewCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.bigtable.v2.FullReadStatsView) statsView_); + } + size += getUnknownFields().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.bigtable.v2.RequestStats)) { + return super.equals(obj); + } + com.google.bigtable.v2.RequestStats other = (com.google.bigtable.v2.RequestStats) obj; + + if (!getStatsViewCase().equals(other.getStatsViewCase())) return false; + switch (statsViewCase_) { + case 1: + if (!getFullReadStatsView().equals(other.getFullReadStatsView())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (statsViewCase_) { + case 1: + hash = (37 * hash) + FULL_READ_STATS_VIEW_FIELD_NUMBER; + hash = (53 * hash) + getFullReadStatsView().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.bigtable.v2.RequestStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.RequestStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.RequestStats parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.bigtable.v2.RequestStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.bigtable.v2.RequestStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.RequestStats 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.bigtable.v2.RequestStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.bigtable.v2.RequestStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.bigtable.v2.RequestStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
    +   * RequestStats is the container for additional information pertaining to a
    +   * single request, helpful for evaluating the performance of the sent request.
    +   * Currently, there are the following supported methods:
    +   *   * google.bigtable.v2.ReadRows
    +   * 
    + * + * Protobuf type {@code google.bigtable.v2.RequestStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.bigtable.v2.RequestStats) + com.google.bigtable.v2.RequestStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.RequestStats.class, + com.google.bigtable.v2.RequestStats.Builder.class); + } + + // Construct using com.google.bigtable.v2.RequestStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (fullReadStatsViewBuilder_ != null) { + fullReadStatsViewBuilder_.clear(); + } + statsViewCase_ = 0; + statsView_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.bigtable.v2.RequestStatsProto + .internal_static_google_bigtable_v2_RequestStats_descriptor; + } + + @java.lang.Override + public com.google.bigtable.v2.RequestStats getDefaultInstanceForType() { + return com.google.bigtable.v2.RequestStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.bigtable.v2.RequestStats build() { + com.google.bigtable.v2.RequestStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.bigtable.v2.RequestStats buildPartial() { + com.google.bigtable.v2.RequestStats result = new com.google.bigtable.v2.RequestStats(this); + if (statsViewCase_ == 1) { + if (fullReadStatsViewBuilder_ == null) { + result.statsView_ = statsView_; + } else { + result.statsView_ = fullReadStatsViewBuilder_.build(); + } + } + result.statsViewCase_ = statsViewCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.bigtable.v2.RequestStats) { + return mergeFrom((com.google.bigtable.v2.RequestStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.bigtable.v2.RequestStats other) { + if (other == com.google.bigtable.v2.RequestStats.getDefaultInstance()) return this; + switch (other.getStatsViewCase()) { + case FULL_READ_STATS_VIEW: + { + mergeFullReadStatsView(other.getFullReadStatsView()); + break; + } + case STATSVIEW_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getFullReadStatsViewFieldBuilder().getBuilder(), extensionRegistry); + statsViewCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int statsViewCase_ = 0; + private java.lang.Object statsView_; + + public StatsViewCase getStatsViewCase() { + return StatsViewCase.forNumber(statsViewCase_); + } + + public Builder clearStatsView() { + statsViewCase_ = 0; + statsView_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.FullReadStatsView, + com.google.bigtable.v2.FullReadStatsView.Builder, + com.google.bigtable.v2.FullReadStatsViewOrBuilder> + fullReadStatsViewBuilder_; + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * + * @return Whether the fullReadStatsView field is set. + */ + @java.lang.Override + public boolean hasFullReadStatsView() { + return statsViewCase_ == 1; + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * + * @return The fullReadStatsView. + */ + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsView getFullReadStatsView() { + if (fullReadStatsViewBuilder_ == null) { + if (statsViewCase_ == 1) { + return (com.google.bigtable.v2.FullReadStatsView) statsView_; + } + return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } else { + if (statsViewCase_ == 1) { + return fullReadStatsViewBuilder_.getMessage(); + } + return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + public Builder setFullReadStatsView(com.google.bigtable.v2.FullReadStatsView value) { + if (fullReadStatsViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + statsView_ = value; + onChanged(); + } else { + fullReadStatsViewBuilder_.setMessage(value); + } + statsViewCase_ = 1; + return this; + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + public Builder setFullReadStatsView( + com.google.bigtable.v2.FullReadStatsView.Builder builderForValue) { + if (fullReadStatsViewBuilder_ == null) { + statsView_ = builderForValue.build(); + onChanged(); + } else { + fullReadStatsViewBuilder_.setMessage(builderForValue.build()); + } + statsViewCase_ = 1; + return this; + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + public Builder mergeFullReadStatsView(com.google.bigtable.v2.FullReadStatsView value) { + if (fullReadStatsViewBuilder_ == null) { + if (statsViewCase_ == 1 + && statsView_ != com.google.bigtable.v2.FullReadStatsView.getDefaultInstance()) { + statsView_ = + com.google.bigtable.v2.FullReadStatsView.newBuilder( + (com.google.bigtable.v2.FullReadStatsView) statsView_) + .mergeFrom(value) + .buildPartial(); + } else { + statsView_ = value; + } + onChanged(); + } else { + if (statsViewCase_ == 1) { + fullReadStatsViewBuilder_.mergeFrom(value); + } else { + fullReadStatsViewBuilder_.setMessage(value); + } + } + statsViewCase_ = 1; + return this; + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + public Builder clearFullReadStatsView() { + if (fullReadStatsViewBuilder_ == null) { + if (statsViewCase_ == 1) { + statsViewCase_ = 0; + statsView_ = null; + onChanged(); + } + } else { + if (statsViewCase_ == 1) { + statsViewCase_ = 0; + statsView_ = null; + } + fullReadStatsViewBuilder_.clear(); + } + return this; + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + public com.google.bigtable.v2.FullReadStatsView.Builder getFullReadStatsViewBuilder() { + return getFullReadStatsViewFieldBuilder().getBuilder(); + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + @java.lang.Override + public com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrBuilder() { + if ((statsViewCase_ == 1) && (fullReadStatsViewBuilder_ != null)) { + return fullReadStatsViewBuilder_.getMessageOrBuilder(); + } else { + if (statsViewCase_ == 1) { + return (com.google.bigtable.v2.FullReadStatsView) statsView_; + } + return com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } + } + /** + * + * + *
    +     * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +     * view, see package google.bigtable.v2.
    +     * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.FullReadStatsView, + com.google.bigtable.v2.FullReadStatsView.Builder, + com.google.bigtable.v2.FullReadStatsViewOrBuilder> + getFullReadStatsViewFieldBuilder() { + if (fullReadStatsViewBuilder_ == null) { + if (!(statsViewCase_ == 1)) { + statsView_ = com.google.bigtable.v2.FullReadStatsView.getDefaultInstance(); + } + fullReadStatsViewBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.bigtable.v2.FullReadStatsView, + com.google.bigtable.v2.FullReadStatsView.Builder, + com.google.bigtable.v2.FullReadStatsViewOrBuilder>( + (com.google.bigtable.v2.FullReadStatsView) statsView_, + getParentForChildren(), + isClean()); + statsView_ = null; + } + statsViewCase_ = 1; + onChanged(); + ; + return fullReadStatsViewBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RequestStats) + } + + // @@protoc_insertion_point(class_scope:google.bigtable.v2.RequestStats) + private static final com.google.bigtable.v2.RequestStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.bigtable.v2.RequestStats(); + } + + public static com.google.bigtable.v2.RequestStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RequestStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.bigtable.v2.RequestStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java new file mode 100644 index 0000000000..00b8f2cad4 --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +public interface RequestStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RequestStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
    +   * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +   * view, see package google.bigtable.v2.
    +   * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * + * @return Whether the fullReadStatsView field is set. + */ + boolean hasFullReadStatsView(); + /** + * + * + *
    +   * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +   * view, see package google.bigtable.v2.
    +   * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + * + * @return The fullReadStatsView. + */ + com.google.bigtable.v2.FullReadStatsView getFullReadStatsView(); + /** + * + * + *
    +   * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
    +   * view, see package google.bigtable.v2.
    +   * 
    + * + * .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; + */ + com.google.bigtable.v2.FullReadStatsViewOrBuilder getFullReadStatsViewOrBuilder(); + + public com.google.bigtable.v2.RequestStats.StatsViewCase getStatsViewCase(); +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java new file mode 100644 index 0000000000..512d606b8b --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RequestStatsProto.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/bigtable/v2/request_stats.proto + +package com.google.bigtable.v2; + +public final class RequestStatsProto { + private RequestStatsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_ReadIterationStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_RequestLatencyStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_FullReadStatsView_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_bigtable_v2_RequestStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n&google/bigtable/v2/request_stats.proto" + + "\022\022google.bigtable.v2\032\036google/protobuf/du" + + "ration.proto\"\202\001\n\022ReadIterationStats\022\027\n\017r" + + "ows_seen_count\030\001 \001(\003\022\033\n\023rows_returned_co" + + "unt\030\002 \001(\003\022\030\n\020cells_seen_count\030\003 \001(\003\022\034\n\024c" + + "ells_returned_count\030\004 \001(\003\"Q\n\023RequestLate" + + "ncyStats\022:\n\027frontend_server_latency\030\001 \001(" + + "\0132\031.google.protobuf.Duration\"\241\001\n\021FullRea" + + "dStatsView\022D\n\024read_iteration_stats\030\001 \001(\013" + + "2&.google.bigtable.v2.ReadIterationStats" + + "\022F\n\025request_latency_stats\030\002 \001(\0132\'.google" + + ".bigtable.v2.RequestLatencyStats\"c\n\014Requ" + + "estStats\022E\n\024full_read_stats_view\030\001 \001(\0132%" + + ".google.bigtable.v2.FullReadStatsViewH\000B" + + "\014\n\nstats_viewB\275\001\n\026com.google.bigtable.v2" + + "B\021RequestStatsProtoP\001Z:google.golang.org" + + "/genproto/googleapis/bigtable/v2;bigtabl" + + "e\252\002\030Google.Cloud.Bigtable.V2\312\002\030Google\\Cl" + + "oud\\Bigtable\\V2\352\002\033Google::Cloud::Bigtabl" + + "e::V2b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_bigtable_v2_ReadIterationStats_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_bigtable_v2_ReadIterationStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_ReadIterationStats_descriptor, + new java.lang.String[] { + "RowsSeenCount", "RowsReturnedCount", "CellsSeenCount", "CellsReturnedCount", + }); + internal_static_google_bigtable_v2_RequestLatencyStats_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_bigtable_v2_RequestLatencyStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_RequestLatencyStats_descriptor, + new java.lang.String[] { + "FrontendServerLatency", + }); + internal_static_google_bigtable_v2_FullReadStatsView_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_bigtable_v2_FullReadStatsView_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_FullReadStatsView_descriptor, + new java.lang.String[] { + "ReadIterationStats", "RequestLatencyStats", + }); + internal_static_google_bigtable_v2_RequestStats_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_bigtable_v2_RequestStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_bigtable_v2_RequestStats_descriptor, + new java.lang.String[] { + "FullReadStatsView", "StatsView", + }); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java index c64592a2b4..6c0fc5c63f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ResponseParams.java @@ -56,60 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResponseParams( - 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; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - zoneId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - clusterId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.ResponseParamsProto .internal_static_google_bigtable_v2_ResponseParams_descriptor; @@ -277,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +238,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -315,7 +261,7 @@ public boolean equals(final java.lang.Object obj) { if (hasClusterId()) { if (!getClusterId().equals(other.getClusterId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -334,7 +280,7 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER; hash = (53 * hash) + getClusterId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -465,17 +411,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ResponseParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -582,7 +521,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ResponseParams other) { clusterId_ = other.clusterId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -597,17 +536,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ResponseParams parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + zoneId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + clusterId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ResponseParams) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -891,7 +856,18 @@ public ResponseParams parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResponseParams(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java index 117cd8638f..8fe37c4d46 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/Row.java @@ -54,64 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Row( - 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; - case 10: - { - key_ = input.readBytes(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - families_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - families_.add( - input.readMessage(com.google.bigtable.v2.Family.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - families_ = java.util.Collections.unmodifiableList(families_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_Row_descriptor; } @@ -239,7 +181,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < families_.size(); i++) { output.writeMessage(2, families_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +196,7 @@ public int getSerializedSize() { for (int i = 0; i < families_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, families_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -271,7 +213,7 @@ public boolean equals(final java.lang.Object obj) { if (!getKey().equals(other.getKey())) return false; if (!getFamiliesList().equals(other.getFamiliesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +230,7 @@ public int hashCode() { hash = (37 * hash) + FAMILIES_FIELD_NUMBER; hash = (53 * hash) + getFamiliesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -415,19 +357,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.Row.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFamiliesFieldBuilder(); - } } @java.lang.Override @@ -437,10 +370,11 @@ public Builder clear() { if (familiesBuilder_ == null) { families_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + families_ = null; familiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -556,7 +490,7 @@ public Builder mergeFrom(com.google.bigtable.v2.Row other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -571,17 +505,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.Row parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readBytes(); + + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.Family m = + input.readMessage(com.google.bigtable.v2.Family.parser(), extensionRegistry); + if (familiesBuilder_ == null) { + ensureFamiliesIsMutable(); + families_.add(m); + } else { + familiesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.Row) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1044,7 +1010,18 @@ public Row parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Row(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java index 802514aace..89d7c853b7 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowFilter.java @@ -77,219 +77,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RowFilter( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.v2.RowFilter.Chain.Builder subBuilder = null; - if (filterCase_ == 1) { - subBuilder = ((com.google.bigtable.v2.RowFilter.Chain) filter_).toBuilder(); - } - filter_ = - input.readMessage( - com.google.bigtable.v2.RowFilter.Chain.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.RowFilter.Chain) filter_); - filter_ = subBuilder.buildPartial(); - } - filterCase_ = 1; - break; - } - case 18: - { - com.google.bigtable.v2.RowFilter.Interleave.Builder subBuilder = null; - if (filterCase_ == 2) { - subBuilder = ((com.google.bigtable.v2.RowFilter.Interleave) filter_).toBuilder(); - } - filter_ = - input.readMessage( - com.google.bigtable.v2.RowFilter.Interleave.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.RowFilter.Interleave) filter_); - filter_ = subBuilder.buildPartial(); - } - filterCase_ = 2; - break; - } - case 26: - { - com.google.bigtable.v2.RowFilter.Condition.Builder subBuilder = null; - if (filterCase_ == 3) { - subBuilder = ((com.google.bigtable.v2.RowFilter.Condition) filter_).toBuilder(); - } - filter_ = - input.readMessage( - com.google.bigtable.v2.RowFilter.Condition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.RowFilter.Condition) filter_); - filter_ = subBuilder.buildPartial(); - } - filterCase_ = 3; - break; - } - case 34: - { - filter_ = input.readBytes(); - filterCase_ = 4; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - filterCase_ = 5; - filter_ = s; - break; - } - case 50: - { - filter_ = input.readBytes(); - filterCase_ = 6; - break; - } - case 58: - { - com.google.bigtable.v2.ColumnRange.Builder subBuilder = null; - if (filterCase_ == 7) { - subBuilder = ((com.google.bigtable.v2.ColumnRange) filter_).toBuilder(); - } - filter_ = - input.readMessage(com.google.bigtable.v2.ColumnRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.ColumnRange) filter_); - filter_ = subBuilder.buildPartial(); - } - filterCase_ = 7; - break; - } - case 66: - { - com.google.bigtable.v2.TimestampRange.Builder subBuilder = null; - if (filterCase_ == 8) { - subBuilder = ((com.google.bigtable.v2.TimestampRange) filter_).toBuilder(); - } - filter_ = - input.readMessage( - com.google.bigtable.v2.TimestampRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.TimestampRange) filter_); - filter_ = subBuilder.buildPartial(); - } - filterCase_ = 8; - break; - } - case 74: - { - filter_ = input.readBytes(); - filterCase_ = 9; - break; - } - case 80: - { - filter_ = input.readInt32(); - filterCase_ = 10; - break; - } - case 88: - { - filter_ = input.readInt32(); - filterCase_ = 11; - break; - } - case 96: - { - filter_ = input.readInt32(); - filterCase_ = 12; - break; - } - case 104: - { - filter_ = input.readBool(); - filterCase_ = 13; - break; - } - case 113: - { - filter_ = input.readDouble(); - filterCase_ = 14; - break; - } - case 122: - { - com.google.bigtable.v2.ValueRange.Builder subBuilder = null; - if (filterCase_ == 15) { - subBuilder = ((com.google.bigtable.v2.ValueRange) filter_).toBuilder(); - } - filter_ = - input.readMessage(com.google.bigtable.v2.ValueRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.bigtable.v2.ValueRange) filter_); - filter_ = subBuilder.buildPartial(); - } - filterCase_ = 15; - break; - } - case 128: - { - filter_ = input.readBool(); - filterCase_ = 16; - break; - } - case 136: - { - filter_ = input.readBool(); - filterCase_ = 17; - break; - } - case 144: - { - filter_ = input.readBool(); - filterCase_ = 18; - break; - } - case 154: - { - java.lang.String s = input.readStringRequireUtf8(); - filterCase_ = 19; - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto.internal_static_google_bigtable_v2_RowFilter_descriptor; } @@ -403,60 +190,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Chain( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - filters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - filters_.add( - input.readMessage( - com.google.bigtable.v2.RowFilter.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - filters_ = java.util.Collections.unmodifiableList(filters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Chain_descriptor; @@ -568,7 +301,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < filters_.size(); i++) { output.writeMessage(1, filters_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -580,7 +313,7 @@ public int getSerializedSize() { for (int i = 0; i < filters_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, filters_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -596,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { com.google.bigtable.v2.RowFilter.Chain other = (com.google.bigtable.v2.RowFilter.Chain) obj; if (!getFiltersList().equals(other.getFiltersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -611,7 +344,7 @@ public int hashCode() { hash = (37 * hash) + FILTERS_FIELD_NUMBER; hash = (53 * hash) + getFiltersList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -742,19 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.RowFilter.Chain.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFiltersFieldBuilder(); - } } @java.lang.Override @@ -762,10 +486,11 @@ public Builder clear() { super.clear(); if (filtersBuilder_ == null) { filters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + filters_ = null; filtersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -881,7 +606,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RowFilter.Chain other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -896,17 +621,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.RowFilter.Chain parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.v2.RowFilter m = + input.readMessage( + com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(m); + } else { + filtersBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.RowFilter.Chain) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1329,7 +1081,19 @@ public Chain parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Chain(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1549,60 +1313,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Interleave( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - filters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - filters_.add( - input.readMessage( - com.google.bigtable.v2.RowFilter.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - filters_ = java.util.Collections.unmodifiableList(filters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Interleave_descriptor; @@ -1814,7 +1524,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < filters_.size(); i++) { output.writeMessage(1, filters_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1826,7 +1536,7 @@ public int getSerializedSize() { for (int i = 0; i < filters_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, filters_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1843,7 +1553,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.bigtable.v2.RowFilter.Interleave) obj; if (!getFiltersList().equals(other.getFiltersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1858,7 +1568,7 @@ public int hashCode() { hash = (37 * hash) + FILTERS_FIELD_NUMBER; hash = (53 * hash) + getFiltersList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1990,19 +1700,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.RowFilter.Interleave.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFiltersFieldBuilder(); - } } @java.lang.Override @@ -2010,10 +1711,11 @@ public Builder clear() { super.clear(); if (filtersBuilder_ == null) { filters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + filters_ = null; filtersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2129,7 +1831,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RowFilter.Interleave other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2144,17 +1846,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.RowFilter.Interleave parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.bigtable.v2.RowFilter m = + input.readMessage( + com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(m); + } else { + filtersBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.RowFilter.Interleave) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2937,7 +2666,19 @@ public Interleave parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Interleave(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3115,90 +2856,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Condition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.bigtable.v2.RowFilter.Builder subBuilder = null; - if (predicateFilter_ != null) { - subBuilder = predicateFilter_.toBuilder(); - } - predicateFilter_ = - input.readMessage(com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(predicateFilter_); - predicateFilter_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.bigtable.v2.RowFilter.Builder subBuilder = null; - if (trueFilter_ != null) { - subBuilder = trueFilter_.toBuilder(); - } - trueFilter_ = - input.readMessage(com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(trueFilter_); - trueFilter_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.bigtable.v2.RowFilter.Builder subBuilder = null; - if (falseFilter_ != null) { - subBuilder = falseFilter_.toBuilder(); - } - falseFilter_ = - input.readMessage(com.google.bigtable.v2.RowFilter.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(falseFilter_); - falseFilter_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_RowFilter_Condition_descriptor; @@ -3393,7 +3050,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (falseFilter_ != null) { output.writeMessage(3, getFalseFilter()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3411,7 +3068,7 @@ public int getSerializedSize() { if (falseFilter_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFalseFilter()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3439,7 +3096,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFalseFilter()) { if (!getFalseFilter().equals(other.getFalseFilter())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3462,7 +3119,7 @@ public int hashCode() { hash = (37 * hash) + FALSE_FILTER_FIELD_NUMBER; hash = (53 * hash) + getFalseFilter().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3598,17 +3255,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.RowFilter.Condition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3734,7 +3384,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RowFilter.Condition other) { if (other.hasFalseFilter()) { mergeFalseFilter(other.getFalseFilter()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3749,17 +3399,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.RowFilter.Condition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getPredicateFilterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getTrueFilterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getFalseFilterFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.RowFilter.Condition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4387,7 +4070,19 @@ public Condition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Condition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5620,7 +5315,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (filterCase_ == 19) { com.google.protobuf.GeneratedMessageV3.writeString(output, 19, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5720,7 +5415,7 @@ public int getSerializedSize() { if (filterCase_ == 19) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5799,7 +5494,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5893,7 +5588,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6048,22 +5743,33 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.RowFilter.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (chainBuilder_ != null) { + chainBuilder_.clear(); + } + if (interleaveBuilder_ != null) { + interleaveBuilder_.clear(); + } + if (conditionBuilder_ != null) { + conditionBuilder_.clear(); + } + if (columnRangeFilterBuilder_ != null) { + columnRangeFilterBuilder_.clear(); + } + if (timestampRangeFilterBuilder_ != null) { + timestampRangeFilterBuilder_.clear(); + } + if (valueRangeFilterBuilder_ != null) { + valueRangeFilterBuilder_.clear(); + } filterCase_ = 0; filter_ = null; return this; @@ -6328,7 +6034,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RowFilter other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6343,17 +6049,150 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.RowFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getChainFieldBuilder().getBuilder(), extensionRegistry); + filterCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getInterleaveFieldBuilder().getBuilder(), extensionRegistry); + filterCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + filterCase_ = 3; + break; + } // case 26 + case 34: + { + filter_ = input.readBytes(); + filterCase_ = 4; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + filterCase_ = 5; + filter_ = s; + break; + } // case 42 + case 50: + { + filter_ = input.readBytes(); + filterCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getColumnRangeFilterFieldBuilder().getBuilder(), extensionRegistry); + filterCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getTimestampRangeFilterFieldBuilder().getBuilder(), extensionRegistry); + filterCase_ = 8; + break; + } // case 66 + case 74: + { + filter_ = input.readBytes(); + filterCase_ = 9; + break; + } // case 74 + case 80: + { + filter_ = input.readInt32(); + filterCase_ = 10; + break; + } // case 80 + case 88: + { + filter_ = input.readInt32(); + filterCase_ = 11; + break; + } // case 88 + case 96: + { + filter_ = input.readInt32(); + filterCase_ = 12; + break; + } // case 96 + case 104: + { + filter_ = input.readBool(); + filterCase_ = 13; + break; + } // case 104 + case 113: + { + filter_ = input.readDouble(); + filterCase_ = 14; + break; + } // case 113 + case 122: + { + input.readMessage( + getValueRangeFilterFieldBuilder().getBuilder(), extensionRegistry); + filterCase_ = 15; + break; + } // case 122 + case 128: + { + filter_ = input.readBool(); + filterCase_ = 16; + break; + } // case 128 + case 136: + { + filter_ = input.readBool(); + filterCase_ = 17; + break; + } // case 136 + case 144: + { + filter_ = input.readBool(); + filterCase_ = 18; + break; + } // case 144 + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + filterCase_ = 19; + filter_ = s; + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.RowFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9128,7 +8967,18 @@ public RowFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RowFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java index a297a4448f..a9cdcc73c4 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowRange.java @@ -50,69 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RowRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - startKey_ = input.readBytes(); - startKeyCase_ = 1; - break; - } - case 18: - { - startKey_ = input.readBytes(); - startKeyCase_ = 2; - break; - } - case 26: - { - endKey_ = input.readBytes(); - endKeyCase_ = 3; - break; - } - case 34: - { - endKey_ = input.readBytes(); - endKeyCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto.internal_static_google_bigtable_v2_RowRange_descriptor; } @@ -386,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endKeyCase_ == 4) { output.writeBytes(4, (com.google.protobuf.ByteString) endKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +352,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBytesSize( 4, (com.google.protobuf.ByteString) endKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -487,7 +424,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -614,17 +551,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.RowRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -755,7 +685,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RowRange other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -770,17 +700,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.RowRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + startKey_ = input.readBytes(); + startKeyCase_ = 1; + break; + } // case 10 + case 18: + { + startKey_ = input.readBytes(); + startKeyCase_ = 2; + break; + } // case 18 + case 26: + { + endKey_ = input.readBytes(); + endKeyCase_ = 3; + break; + } // case 26 + case 34: + { + endKey_ = input.readBytes(); + endKeyCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.RowRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1132,7 +1100,18 @@ public RowRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RowRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java index 1b67c0fe43..86d5b281a9 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RowSet.java @@ -53,71 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RowSet( - 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; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rowKeys_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rowKeys_.add(input.readBytes()); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rowRanges_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - rowRanges_.add( - input.readMessage(com.google.bigtable.v2.RowRange.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rowKeys_ = java.util.Collections.unmodifiableList(rowKeys_); // C - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - rowRanges_ = java.util.Collections.unmodifiableList(rowRanges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.bigtable.v2.DataProto.internal_static_google_bigtable_v2_RowSet_descriptor; } @@ -267,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rowRanges_.size(); i++) { output.writeMessage(2, rowRanges_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +222,7 @@ public int getSerializedSize() { for (int i = 0; i < rowRanges_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rowRanges_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -304,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRowKeysList().equals(other.getRowKeysList())) return false; if (!getRowRangesList().equals(other.getRowRangesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -323,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + ROW_RANGES_FIELD_NUMBER; hash = (53 * hash) + getRowRangesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,19 +384,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.RowSet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRowRangesFieldBuilder(); - } } @java.lang.Override @@ -471,10 +397,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (rowRangesBuilder_ == null) { rowRanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + rowRanges_ = null; rowRangesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -601,7 +528,7 @@ public Builder mergeFrom(com.google.bigtable.v2.RowSet other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +543,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.RowSet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.ByteString v = input.readBytes(); + ensureRowKeysIsMutable(); + rowKeys_.add(v); + break; + } // case 10 + case 18: + { + com.google.bigtable.v2.RowRange m = + input.readMessage(com.google.bigtable.v2.RowRange.parser(), extensionRegistry); + if (rowRangesBuilder_ == null) { + ensureRowRangesIsMutable(); + rowRanges_.add(m); + } else { + rowRangesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.RowSet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1146,7 +1106,18 @@ public RowSet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RowSet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java index 8405901e00..6bebd6765d 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SampleRowKeysRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - appProfileId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysRequest_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTableName().equals(other.getTableName())) return false; if (!getAppProfileId().equals(other.getAppProfileId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (53 * hash) + getTableName().hashCode(); hash = (37 * hash) + APP_PROFILE_ID_FIELD_NUMBER; hash = (53 * hash) + getAppProfileId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -426,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.SampleRowKeysRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -532,7 +472,7 @@ public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysRequest other) { appProfileId_ = other.appProfileId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,17 +487,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.SampleRowKeysRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tableName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + appProfileId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.SampleRowKeysRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -830,7 +796,18 @@ public SampleRowKeysRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SampleRowKeysRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java index 36d74de3af..64730abc0c 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/SampleRowKeysResponse.java @@ -52,55 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SampleRowKeysResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - rowKey_ = input.readBytes(); - break; - } - case 16: - { - offsetBytes_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.BigtableProto .internal_static_google_bigtable_v2_SampleRowKeysResponse_descriptor; @@ -181,7 +132,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (offsetBytes_ != 0L) { output.writeInt64(2, offsetBytes_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -196,7 +147,7 @@ public int getSerializedSize() { if (offsetBytes_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, offsetBytes_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +165,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRowKey().equals(other.getRowKey())) return false; if (getOffsetBytes() != other.getOffsetBytes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +180,7 @@ public int hashCode() { hash = (53 * hash) + getRowKey().hashCode(); hash = (37 * hash) + OFFSET_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffsetBytes()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.SampleRowKeysResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -462,7 +406,7 @@ public Builder mergeFrom(com.google.bigtable.v2.SampleRowKeysResponse other) { if (other.getOffsetBytes() != 0L) { setOffsetBytes(other.getOffsetBytes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -477,17 +421,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.SampleRowKeysResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + rowKey_ = input.readBytes(); + + break; + } // case 10 + case 16: + { + offsetBytes_ = input.readInt64(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.SampleRowKeysResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -657,7 +627,18 @@ public SampleRowKeysResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SampleRowKeysResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java index 996b2caa20..b570b88de0 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TimestampRange.java @@ -50,55 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimestampRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - startTimestampMicros_ = input.readInt64(); - break; - } - case 16: - { - endTimestampMicros_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_TimestampRange_descriptor; @@ -170,7 +121,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTimestampMicros_ != 0L) { output.writeInt64(2, endTimestampMicros_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -185,7 +136,7 @@ public int getSerializedSize() { if (endTimestampMicros_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endTimestampMicros_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -202,7 +153,7 @@ public boolean equals(final java.lang.Object obj) { if (getStartTimestampMicros() != other.getStartTimestampMicros()) return false; if (getEndTimestampMicros() != other.getEndTimestampMicros()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -217,7 +168,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartTimestampMicros()); hash = (37 * hash) + END_TIMESTAMP_MICROS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndTimestampMicros()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -345,17 +296,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.TimestampRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -449,7 +393,7 @@ public Builder mergeFrom(com.google.bigtable.v2.TimestampRange other) { if (other.getEndTimestampMicros() != 0L) { setEndTimestampMicros(other.getEndTimestampMicros()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -464,17 +408,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.TimestampRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + startTimestampMicros_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + endTimestampMicros_ = input.readInt64(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.TimestampRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -614,7 +584,18 @@ public TimestampRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimestampRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java index 1ae97c5675..b9ad1af05f 100644 --- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java +++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ValueRange.java @@ -50,69 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ValueRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - startValue_ = input.readBytes(); - startValueCase_ = 1; - break; - } - case 18: - { - startValue_ = input.readBytes(); - startValueCase_ = 2; - break; - } - case 26: - { - endValue_ = input.readBytes(); - endValueCase_ = 3; - break; - } - case 34: - { - endValue_ = input.readBytes(); - endValueCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.bigtable.v2.DataProto .internal_static_google_bigtable_v2_ValueRange_descriptor; @@ -388,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endValueCase_ == 4) { output.writeBytes(4, (com.google.protobuf.ByteString) endValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +354,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBytesSize( 4, (com.google.protobuf.ByteString) endValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -454,7 +391,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -489,7 +426,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -617,17 +554,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.bigtable.v2.ValueRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -758,7 +688,7 @@ public Builder mergeFrom(com.google.bigtable.v2.ValueRange other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -773,17 +703,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.bigtable.v2.ValueRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + startValue_ = input.readBytes(); + startValueCase_ = 1; + break; + } // case 10 + case 18: + { + startValue_ = input.readBytes(); + startValueCase_ = 2; + break; + } // case 18 + case 26: + { + endValue_ = input.readBytes(); + endValueCase_ = 3; + break; + } // case 26 + case 34: + { + endValue_ = input.readBytes(); + endValueCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.bigtable.v2.ValueRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1135,7 +1103,18 @@ public ValueRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ValueRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto index 8452338077..ba2ce46796 100644 --- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/api/routing.proto"; import "google/bigtable/v2/data.proto"; +import "google/bigtable/v2/request_stats.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -34,14 +35,14 @@ option java_outer_classname = "BigtableProto"; option java_package = "com.google.bigtable.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\V2"; option ruby_package = "Google::Cloud::Bigtable::V2"; -option (google.api.resource_definition) = { - type: "bigtableadmin.googleapis.com/Table" - pattern: "projects/{project}/instances/{instance}/tables/{table}" -}; option (google.api.resource_definition) = { type: "bigtableadmin.googleapis.com/Instance" pattern: "projects/{project}/instances/{instance}" }; +option (google.api.resource_definition) = { + type: "bigtableadmin.googleapis.com/Table" + pattern: "projects/{project}/instances/{instance}/tables/{table}" +}; // Service for reading from and writing to existing Bigtable tables. service Bigtable { @@ -230,6 +231,23 @@ service Bigtable { // Request message for Bigtable.ReadRows. message ReadRowsRequest { + // + // The desired view into RequestStats that should be returned in the response. + // + // See also: RequestStats message. + enum RequestStatsView { + // The default / unset value. The API will default to the NONE option below. + REQUEST_STATS_VIEW_UNSPECIFIED = 0; + + // Do not include any RequestStats in the response. This will leave the + // RequestStats embedded message unset in the response. + REQUEST_STATS_NONE = 1; + + // Include the full set of available RequestStats in the response, + // applicable to this read. + REQUEST_STATS_FULL = 2; + } + // Required. The unique name of the table from which to read. // Values are of the form // `projects//instances//tables/
    `. @@ -240,8 +258,8 @@ message ReadRowsRequest { } ]; - // This value specifies routing for replication. If not specified, the - // "default" application profile will be used. + // This value specifies routing for replication. This API only accepts the + // empty value of app_profile_id. string app_profile_id = 5; // The row keys and/or ranges to read sequentially. If not specified, reads @@ -255,6 +273,9 @@ message ReadRowsRequest { // The read will stop after committing to N rows' worth of results. The // default (zero) is to return all results. int64 rows_limit = 4; + + // The view into RequestStats, as described above. + RequestStatsView request_stats_view = 6; } // Response message for Bigtable.ReadRows. @@ -334,6 +355,28 @@ message ReadRowsResponse { // lot of data that was filtered out since the last committed row // key, allowing the client to skip that work on a retry. bytes last_scanned_row_key = 2; + + // + // If requested, provide enhanced query performance statistics. The semantics + // dictate: + // * request_stats is empty on every (streamed) response, except + // * request_stats has non-empty information after all chunks have been + // streamed, where the ReadRowsResponse message only contains + // request_stats. + // * For example, if a read request would have returned an empty + // response instead a single ReadRowsResponse is streamed with empty + // chunks and request_stats filled. + // + // Visually, response messages will stream as follows: + // ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} + // \______________________/ \________________________________/ + // Primary response Trailer of RequestStats info + // + // Or if the read did not return any values: + // {chunks: [], request_stats: {...}} + // \________________________________/ + // Trailer of RequestStats info + RequestStats request_stats = 3; } // Request message for Bigtable.SampleRowKeys. diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto new file mode 100644 index 0000000000..f650abe09c --- /dev/null +++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/request_stats.proto @@ -0,0 +1,113 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.bigtable.v2; + +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Cloud.Bigtable.V2"; +option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable"; +option java_multiple_files = true; +option java_outer_classname = "RequestStatsProto"; +option java_package = "com.google.bigtable.v2"; +option php_namespace = "Google\\Cloud\\Bigtable\\V2"; +option ruby_package = "Google::Cloud::Bigtable::V2"; + +// +// Messages related to RequestStats, part of the Query Stats feature, that can +// help understand the performance of requests. +// +// The layout of requests below is as follows: +// * RequestStats serves as the top-level container for statistics and +// measures related to Bigtable requests. This common object is returned as +// part of methods in the Data API. +// * RequestStats contains multiple *views* of related data, chosen by an +// option in the source Data API method. The view that is returned is +// designed to have all submessages (and their submessages, and so on) +// filled-in, to provide a comprehensive selection of statistics and +// measures related to the requested view. + +// ReadIterationStats captures information about the iteration of rows or cells +// over the course of a read, e.g. how many results were scanned in a read +// operation versus the results returned. +message ReadIterationStats { + // The rows seen (scanned) as part of the request. This includes the count of + // rows returned, as captured below. + int64 rows_seen_count = 1; + + // The rows returned as part of the request. + int64 rows_returned_count = 2; + + // The cells seen (scanned) as part of the request. This includes the count of + // cells returned, as captured below. + int64 cells_seen_count = 3; + + // The cells returned as part of the request. + int64 cells_returned_count = 4; +} + +// RequestLatencyStats provides a measurement of the latency of the request as +// it interacts with different systems over its lifetime, e.g. how long the +// request took to execute within a frontend server. +message RequestLatencyStats { + // The latency measured by the frontend server handling this request, from + // when the request was received, to when this value is sent back in the + // response. For more context on the component that is measuring this latency, + // see: https://cloud.google.com/bigtable/docs/overview + // + // Note: This value may be slightly shorter than the value reported into + // aggregate latency metrics in Monitoring for this request + // (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + // needs to be sent in the response before the latency measurement including + // that transmission is finalized. + // + // Note: This value includes the end-to-end latency of contacting nodes in + // the targeted cluster, e.g. measuring from when the first byte arrives at + // the frontend server, to when this value is sent back as the last value in + // the response, including any latency incurred by contacting nodes, waiting + // for results from nodes, and finally sending results from nodes back to the + // caller. + google.protobuf.Duration frontend_server_latency = 1; +} + +// FullReadStatsView captures all known information about a read. +message FullReadStatsView { + // Iteration stats describe how efficient the read is, e.g. comparing + // rows seen vs. rows returned or cells seen vs cells returned can provide an + // indication of read efficiency (the higher the ratio of seen to retuned the + // better). + ReadIterationStats read_iteration_stats = 1; + + // Request latency stats describe the time taken to complete a request, from + // the server side. + RequestLatencyStats request_latency_stats = 2; +} + +// RequestStats is the container for additional information pertaining to a +// single request, helpful for evaluating the performance of the sent request. +// Currently, there are the following supported methods: +// * google.bigtable.v2.ReadRows +message RequestStats { + // Information pertaining to each request type received. The type is chosen + // based on the requested view. + // + // See the messages above for additional context. + oneof stats_view { + // Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL + // view, see package google.bigtable.v2. + FullReadStatsView full_read_stats_view = 1; + } +} diff --git a/renovate.json b/renovate.json index c28944e2e2..2543edb1a8 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 0684cdc321..656b7cf8ed 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigtable - 2.11.1 + 2.17.0 diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 6fc55d073d..d0552e807d 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.1.1 + 26.1.5 pom import @@ -83,13 +83,21 @@ org.junit.vintage junit-vintage-engine +<<<<<<< HEAD 5.9.0 +======= + 5.9.1 +>>>>>>> main test org.graalvm.buildtools junit-platform-native +<<<<<<< HEAD 0.9.13 +======= + 0.9.19 +>>>>>>> main test @@ -99,7 +107,11 @@ org.graalvm.buildtools native-maven-plugin +<<<<<<< HEAD 0.9.13 +======= + 0.9.19 +>>>>>>> main true com.example.bigtable.NativeImageBigtableSample diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index d5a74eb608..d57cced056 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.11.2-SNAPSHOT + 2.17.1-SNAPSHOT diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b75c4c14c8..7083717877 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.1 + 26.1.5 pom import diff --git a/samples/snippets/src/main/java/com/example/bigtable/KeySalting.java b/samples/snippets/src/main/java/com/example/bigtable/KeySalting.java new file mode 100644 index 0000000000..da5e401347 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigtable/KeySalting.java @@ -0,0 +1,95 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigtable; + +import com.google.api.core.ApiFuture; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.Row; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; + +public class KeySalting { + private static final String COLUMN_FAMILY_NAME = "stats_summary"; + public static final int SALT_RANGE = 4; + + public static void writeSaltedRow( + String projectId, String instanceId, String tableId, String rowKey) throws IOException { + BigtableDataClient dataClient = BigtableDataClient.create(projectId, instanceId); + String saltedRowKey = getSaltedRowKey(rowKey, SALT_RANGE); + RowMutation rowMutation = + RowMutation.create(tableId, saltedRowKey) + .setCell(COLUMN_FAMILY_NAME, "os_build", "PQ2A.190405.003"); + + dataClient.mutateRow(rowMutation); + System.out.printf("Successfully wrote row %s as %s\n", rowKey, saltedRowKey); + + dataClient.close(); + } + + public static void readSaltedRow( + String projectId, String instanceId, String tableId, String rowKey) throws IOException { + BigtableDataClient dataClient = BigtableDataClient.create(projectId, instanceId); + Row row = dataClient.readRow(tableId, getSaltedRowKey(rowKey, SALT_RANGE)); + System.out.printf("Successfully read row %s\n", row.getKey().toStringUtf8()); + } + + public static void scanSaltedRows( + String projectId, String instanceId, String tableId, String prefix) + throws IOException, ExecutionException, InterruptedException { + BigtableDataClient dataClient = BigtableDataClient.create(projectId, instanceId); + + List queries = new ArrayList<>(); + for (int i = 0; i < SALT_RANGE; i++) { + queries.add(Query.create(tableId).prefix(i + "-" + prefix)); + } + + List>> futures = new ArrayList<>(); + for (Query q : queries) { + futures.add(dataClient.readRowsCallable().all().futureCall(q)); + } + + List rows = new ArrayList<>(); + for (ApiFuture> future : futures) { + rows.addAll(future.get()); + } + + System.out.printf("Successfully fetched %s rows\n", rows.size()); + for (Row row : rows) { + System.out.printf("Successfully read row %s\n", row.getKey().toStringUtf8()); + } + } + + /** + * Generates a salted version of the row key. + * + *

    Some Bigtable schema designs will always have hot spots, and a salted row key breaks up + * individual rows and groups of rows that are hot. Row keys are stored in sorted order, so + * prepending a numeric prefix allows those hot rows to be stored in different locations. + * + *

    The salted row key is created by hashing the existing row key and taking a modulo of how + * large a prefix range you want to create; then prepending the existing row key with that result. + * This produces a deterministic output, so each row key will always produce the same salted key. + */ + public static String getSaltedRowKey(String rowKey, int saltRange) { + int prefix = rowKey.hashCode() % saltRange; + return prefix + "-" + rowKey; + } +} diff --git a/samples/snippets/src/test/java/com/example/bigtable/KeySaltingTest.java b/samples/snippets/src/test/java/com/example/bigtable/KeySaltingTest.java new file mode 100644 index 0000000000..085d992cea --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigtable/KeySaltingTest.java @@ -0,0 +1,92 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigtable; + +import static org.junit.Assert.assertEquals; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class KeySaltingTest extends MobileTimeSeriesBaseTest { + public static final String ROW_KEY = "phone#4c410523#20190501"; + + @BeforeClass + public static void beforeClass() throws IOException { + initializeVariables(); + createTable(); + } + + @AfterClass + public static void afterClass() throws IOException { + cleanupTable(); + } + + @Test + public void testWriteAndRead() throws IOException { + KeySalting.writeSaltedRow(projectId, instanceId, TABLE_ID, ROW_KEY); + KeySalting.readSaltedRow(projectId, instanceId, TABLE_ID, ROW_KEY); + + String output = bout.toString(); + assertEquals( + "Successfully wrote row phone#4c410523#20190501 as 0-phone#4c410523#20190501\n" + + "Successfully read row 0-phone#4c410523#20190501\n", + output); + } + + @Test + public void testScans() throws IOException, ExecutionException, InterruptedException { + String prefix = "abc-"; + for (int i = 0; i < 8; i++) { + KeySalting.writeSaltedRow(projectId, instanceId, TABLE_ID, prefix + i); + } + bout.reset(); + + KeySalting.scanSaltedRows(projectId, instanceId, TABLE_ID, prefix); + + String output = bout.toString(); + assertEquals( + "Successfully fetched 8 rows\n" + + "Successfully read row 0-abc-3\n" + + "Successfully read row 0-abc-7\n" + + "Successfully read row 1-abc-0\n" + + "Successfully read row 1-abc-4\n" + + "Successfully read row 2-abc-1\n" + + "Successfully read row 2-abc-5\n" + + "Successfully read row 3-abc-2\n" + + "Successfully read row 3-abc-6\n", + output); + } + + @Test + public void testKeySalting() { + Map exampleKeys = new HashMap(); + exampleKeys.put("abc-1", "2-abc-1"); + exampleKeys.put("abc-2", "3-abc-2"); + exampleKeys.put("abc-3", "0-abc-3"); + exampleKeys.put("abc-4", "1-abc-4"); + + exampleKeys.forEach((k, v) -> assertEquals(v, KeySalting.getSaltedRowKey(k, 4))); + } +} diff --git a/test-proxy/EnableAutoValue.txt b/test-proxy/EnableAutoValue.txt new file mode 100644 index 0000000000..e8237e1cbc --- /dev/null +++ b/test-proxy/EnableAutoValue.txt @@ -0,0 +1,2 @@ +This is a marker file to trigger auto-value injection into the annotation processor path +https://github.com/googleapis/java-shared-config/blob/51c9f68ff1736761b21c921f078ab2c8675ff268/pom.xml#L758 \ No newline at end of file diff --git a/test-proxy/README.md b/test-proxy/README.md new file mode 100644 index 0000000000..a97f40094e --- /dev/null +++ b/test-proxy/README.md @@ -0,0 +1,48 @@ +# CBT Java Test Proxy + +The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client. + +## Set up + +If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library: + +``` +git clone https://github.com/googleapis/cloud-bigtable-clients-test.git +``` + +## Start test proxy + +Build the proxy with the latest version of the client + +``` +cd java-bigtable +mvn clean install -DskipTests +cd test-proxy +mvn clean install +``` + +Start the proxy on default port 9999 + +``` +mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +``` + +Start the proxy on a different port + +``` +mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1 +``` + +Build and start the proxy with an older version of the client + +``` +mvn clean install -Dbigtable.client.version= -Denforcer.skip +mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +``` + +## Run the test cases + +``` +cd cloud-bigtable-clients-test/tests +go test -v -proxy_addr=:9999 +``` diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml new file mode 100644 index 0000000000..5792703442 --- /dev/null +++ b/test-proxy/pom.xml @@ -0,0 +1,140 @@ + + 4.0.0 + com.google.cloud + google-cloud-bigtable-test-proxy + 0.0.1-SNAPSHOT + jar + Google Cloud Bigtable Test Proxy + https://github.com/googleapis/java-bigtable + Cloud Bigtable Java Client test proxy for running conformance tests. + + + google-cloud-bigtable-parent + com.google.cloud + 2.17.1-SNAPSHOT + + + + 2.17.1-SNAPSHOT + + + + + + com.google.cloud + google-cloud-bigtable-bom + ${bigtable.client.version} + pom + import + + + com.google.cloud + google-cloud-bigtable-deps-bom + ${bigtable.client.version} + pom + import + + + + + + + com.google.cloud + google-cloud-bigtable + + + io.grpc + grpc-netty + + + io.grpc + grpc-stub + + + com.google.protobuf + protobuf-java + + + + + + + kr.motd.maven + os-maven-plugin + 1.7.1 + + + + + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 + + com.google.protobuf:protoc:3.9.0:exe:${os.detected.classifier} + grpc-java + io.grpc:protoc-gen-grpc-java:1.24.0:exe:${os.detected.classifier} + + + + + compile + compile-custom + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + true + + + + org.apache.maven.plugins + maven-site-plugin + + true + + + + org.apache.maven.plugins + maven-source-plugin + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + org.apache.maven.plugins + maven-gpg-plugin + + true + + + + org.codehaus.mojo + clirr-maven-plugin + + true + + + + + + diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java new file mode 100644 index 0000000000..18e9be1e92 --- /dev/null +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java @@ -0,0 +1,758 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.testproxy; + +import static com.google.cloud.bigtable.data.v2.models.Filters.FILTERS; +import static java.nio.charset.StandardCharsets.UTF_8; + +import com.google.api.core.ApiFunction; +import com.google.api.gax.core.CredentialsProvider; +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ServerStream; +import com.google.auth.oauth2.GoogleCredentials; +import com.google.auto.value.AutoValue; +import com.google.bigtable.v2.Column; +import com.google.bigtable.v2.Family; +import com.google.bigtable.v2.Row; +import com.google.cloud.bigtable.data.v2.BigtableDataClient; +import com.google.cloud.bigtable.data.v2.BigtableDataSettings; +import com.google.cloud.bigtable.data.v2.models.BulkMutation; +import com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation; +import com.google.cloud.bigtable.data.v2.models.KeyOffset; +import com.google.cloud.bigtable.data.v2.models.MutateRowsException; +import com.google.cloud.bigtable.data.v2.models.Query; +import com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow; +import com.google.cloud.bigtable.data.v2.models.RowCell; +import com.google.cloud.bigtable.data.v2.models.RowMutation; +import com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStubSettings; +import com.google.cloud.bigtable.testproxy.CloudBigtableV2TestProxyGrpc.CloudBigtableV2TestProxyImplBase; +import com.google.common.base.Preconditions; +import com.google.protobuf.ByteString; +import com.google.protobuf.util.Durations; +import com.google.rpc.Code; +import io.grpc.ManagedChannelBuilder; +import io.grpc.Status; +import io.grpc.StatusException; +import io.grpc.netty.GrpcSslContexts; +import io.grpc.netty.NettyChannelBuilder; +import io.grpc.stub.StreamObserver; +import io.netty.handler.ssl.SslContext; +import java.io.ByteArrayInputStream; +import java.io.Closeable; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import javax.annotation.Nullable; +import org.threeten.bp.Duration; + +/** Java implementation of the CBT test proxy. Used to test the Java CBT client. */ +public class CbtTestProxy extends CloudBigtableV2TestProxyImplBase implements Closeable { + + /** + * Class that holds BigtableDataSettings and a BigtableDataClient created with those settings. + * Used so users can retrieve settings for a particular client. + */ + @AutoValue + abstract static class CbtClient { + static CbtClient create(BigtableDataSettings settings, BigtableDataClient dataClient) { + return new AutoValue_CbtTestProxy_CbtClient(settings, dataClient); + } + + abstract BigtableDataSettings settings(); + + abstract BigtableDataClient dataClient(); + } + + private static final Logger logger = Logger.getLogger(CbtTestProxy.class.getName()); + + private CbtTestProxy( + boolean encrypted, + @Nullable String rootCerts, + @Nullable String sslTarget, + @Nullable String credential) { + this.encrypted = encrypted; + this.rootCerts = rootCerts; + this.sslTarget = sslTarget; + this.credential = credential; + this.idClientMap = new ConcurrentHashMap<>(); + } + + /** + * Factory method to return a proxy instance that interacts with server unencrypted and + * unauthenticated. + */ + public static CbtTestProxy createUnencrypted() { + return new CbtTestProxy(false, null, null, null); + } + + /** + * Factory method to return a proxy instance that interacts with server encrypted. Default + * authority and public certificates are used if null values are passed in. + * + * @param rootCertsPemPath The path to a root certificate PEM file + * @param sslTarget The override of SSL target name + * @param credentialJsonPath The path to a credential JSON file + */ + public static CbtTestProxy createEncrypted( + @Nullable String rootCertsPemPath, + @Nullable String sslTarget, + @Nullable String credentialJsonPath) + throws IOException { + String tmpRootCerts = null, tmpCredential = null; + if (rootCertsPemPath != null) { + Path file = Paths.get(rootCertsPemPath); + tmpRootCerts = new String(Files.readAllBytes(file), UTF_8); + } + if (credentialJsonPath != null) { + Path file = Paths.get(credentialJsonPath); + tmpCredential = new String(Files.readAllBytes(file), UTF_8); + } + + return new CbtTestProxy(true, tmpRootCerts, sslTarget, tmpCredential); + } + + /** + * Helper method to override the timeout settings of data APIs. TODO(developer): per-attempt + * timeout may also be overridden, which will involve test harness update. + * + * @param settingsBuilder The Builder object of BigtableDataSettings. + * @param newTimeout The value that is used to set the timeout. + */ + private static BigtableDataSettings.Builder overrideTimeoutSetting( + Duration newTimeout, BigtableDataSettings.Builder settingsBuilder) { + // TODO(developer): remove the initialRpcTimeout update below by updating the client library. + Duration initialRpcTimeout = + settingsBuilder + .stubSettings() + .bulkMutateRowsSettings() + .getRetrySettings() + .getInitialRpcTimeout(); + if (initialRpcTimeout.compareTo(newTimeout) > 0) { + // Total timeout is smaller than initialRpcTimeout, which will cause deadline-related problem. + initialRpcTimeout = newTimeout; + } + settingsBuilder + .stubSettings() + .bulkMutateRowsSettings() + .retrySettings() + .setTotalTimeout(newTimeout) + .setInitialRpcTimeout(initialRpcTimeout); + + settingsBuilder.stubSettings().mutateRowSettings().retrySettings().setTotalTimeout(newTimeout); + + settingsBuilder.stubSettings().readRowSettings().retrySettings().setTotalTimeout(newTimeout); + + settingsBuilder.stubSettings().readRowsSettings().retrySettings().setTotalTimeout(newTimeout); + + settingsBuilder + .stubSettings() + .sampleRowKeysSettings() + .retrySettings() + .setTotalTimeout(newTimeout); + + settingsBuilder + .stubSettings() + .checkAndMutateRowSettings() + .retrySettings() + .setTotalTimeout(newTimeout); + + settingsBuilder + .stubSettings() + .readModifyWriteRowSettings() + .retrySettings() + .setTotalTimeout(newTimeout); + + return settingsBuilder; + } + + /** Helper method to get a client object by its id. */ + private CbtClient getClient(String id) throws StatusException { + CbtClient client = idClientMap.get(id); + if (client == null) { + throw Status.NOT_FOUND.withDescription("Client " + id + " not found.").asException(); + } + return client; + } + + @Override + public synchronized void createClient( + CreateClientRequest request, StreamObserver responseObserver) { + Preconditions.checkArgument(!request.getClientId().isEmpty(), "client id must be provided"); + Preconditions.checkArgument(!request.getProjectId().isEmpty(), "project id must be provided"); + Preconditions.checkArgument(!request.getInstanceId().isEmpty(), "instance id must be provided"); + Preconditions.checkArgument(!request.getDataTarget().isEmpty(), "data target must be provided"); + + if (idClientMap.contains(request.getClientId())) { + responseObserver.onError( + Status.ALREADY_EXISTS + .withDescription("Client " + request.getClientId() + " already exists.") + .asException()); + return; + } + + BigtableDataSettings.Builder settingsBuilder = + BigtableDataSettings.newBuilder() + .setProjectId(request.getProjectId()) + .setInstanceId(request.getInstanceId()) + .setAppProfileId(request.getAppProfileId()); + + if (request.hasPerOperationTimeout()) { + Duration newTimeout = Duration.ofMillis(Durations.toMillis(request.getPerOperationTimeout())); + settingsBuilder = overrideTimeoutSetting(newTimeout, settingsBuilder); + logger.info( + String.format( + "Total timeout is set to %s for all the methods", + Durations.toString(request.getPerOperationTimeout()))); + } + + // Create and store CbtClient for later use + try { + if (!request.getDataTarget().equals("emulator")) { + settingsBuilder + .stubSettings() + .setEndpoint(request.getDataTarget()) + .setTransportChannelProvider(getTransportChannel()) + .setCredentialsProvider(getCredentialsProvider()); + } + BigtableDataSettings settings = settingsBuilder.build(); + BigtableDataClient client = BigtableDataClient.create(settings); + CbtClient cbtClient = CbtClient.create(settings, client); + idClientMap.put(request.getClientId(), cbtClient); + } catch (IOException e) { + responseObserver.onError(Status.INTERNAL.withDescription(e.getMessage()).asException()); + return; + } + + responseObserver.onNext(CreateClientResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + + @Override + public void closeClient( + CloseClientRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + client.dataClient().close(); + + responseObserver.onNext(CloseClientResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + + @Override + public void removeClient( + RemoveClientRequest request, StreamObserver responseObserver) { + CbtClient client = idClientMap.remove(request.getClientId()); + if (client == null) { + responseObserver.onError( + Status.NOT_FOUND + .withDescription("Client " + request.getClientId() + " not found.") + .asException()); + return; + } + + responseObserver.onNext(RemoveClientResponse.getDefaultInstance()); + responseObserver.onCompleted(); + } + + @Override + public void mutateRow( + MutateRowRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + // TODO(developer): evaluate if we want to manually unpack the proto into a model, instead of + // using fromProto. Same for the other methods. + RowMutation mutation = RowMutation.fromProto(request.getRequest()); + try { + // This response is empty. + client.dataClient().mutateRow(mutation); + } catch (ApiException e) { + responseObserver.onNext( + MutateRowResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + responseObserver.onNext( + MutateRowResult.newBuilder().setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + responseObserver.onCompleted(); + } + + @Override + public void bulkMutateRows( + MutateRowsRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + BulkMutation batch = BulkMutation.fromProto(request.getRequest()); + try { + client.dataClient().bulkMutateRows(batch); + } catch (MutateRowsException e) { + MutateRowsResult.Builder resultBuilder = MutateRowsResult.newBuilder(); + for (MutateRowsException.FailedMutation failed : e.getFailedMutations()) { + resultBuilder + .addEntryBuilder() + .setIndex(failed.getIndex()) + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(failed.getError().getStatusCode().getCode().ordinal()) + .setMessage(failed.getError().getMessage()) + .build()); + } + responseObserver.onNext( + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + responseObserver.onCompleted(); + return; + } catch (ApiException e) { + responseObserver.onNext( + MutateRowsResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + responseObserver.onNext( + MutateRowsResult.newBuilder() + .setStatus(com.google.rpc.Status.getDefaultInstance()) + .build()); + responseObserver.onCompleted(); + } + + @Override + public void readRow(ReadRowRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + String tableId; + try { + tableId = extractTableIdFromTableName(request.getTableName()); + } catch (IllegalArgumentException e) { + responseObserver.onError( + Status.INVALID_ARGUMENT.withDescription(e.getMessage()).asException()); + return; + } + + com.google.cloud.bigtable.data.v2.models.Row row; + try { + row = + client + .dataClient() + .readRow(tableId, request.getRowKey(), FILTERS.fromProto(request.getFilter())); + } catch (ApiException e) { + responseObserver.onNext( + RowResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + if (row != null) { + try { + RowResult.Builder resultBuilder = convertRowResult(row); + responseObserver.onNext( + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } catch (RuntimeException e) { + // If client encounters problem, don't return any row result. + responseObserver.onNext( + RowResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(Code.INTERNAL.getNumber()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + } else { + logger.info(String.format("readRow() did not find row: %s", request.getRowKey())); + responseObserver.onNext( + RowResult.newBuilder().setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } + responseObserver.onCompleted(); + } + + @Override + public void readRows(ReadRowsRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + ServerStream rows; + Query query = Query.fromProto(request.getRequest()); + try { + rows = client.dataClient().readRows(query); + } catch (ApiException e) { + responseObserver.onNext( + RowsResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + int cancelAfterRows = request.getCancelAfterRows(); + try { + RowsResult.Builder resultBuilder = convertRowsResult(rows, cancelAfterRows); + responseObserver.onNext( + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } catch (RuntimeException e) { + // If client encounters problem, don't return any row result. + responseObserver.onNext( + RowsResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(Code.INTERNAL.getNumber()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + responseObserver.onCompleted(); + } + + /** + * Helper method to convert row from type com.google.cloud.bigtable.data.v2.models.Row to type + * com.google.bigtable.v2.Row. After conversion, row cells within the same column and family are + * grouped and ordered; but the ordering of family and qualifier is not preserved. + * + * @param row Logical row of type com.google.cloud.bigtable.data.v2.models.Row + * @return the converted row in RowResult Builder + */ + private static RowResult.Builder convertRowResult( + com.google.cloud.bigtable.data.v2.models.Row row) { + Row.Builder rowBuilder = Row.newBuilder(); + rowBuilder.setKey(row.getKey()); + + Map>> grouped = + row.getCells().stream() + .collect( + Collectors.groupingBy( + RowCell::getFamily, Collectors.groupingBy(RowCell::getQualifier))); + for (Map.Entry>> e : grouped.entrySet()) { + Family.Builder family = rowBuilder.addFamiliesBuilder().setName(e.getKey()); + + for (Map.Entry> e2 : e.getValue().entrySet()) { + Column.Builder column = family.addColumnsBuilder().setQualifier(e2.getKey()); + + for (RowCell rowCell : e2.getValue()) { + column + .addCellsBuilder() + .setTimestampMicros(rowCell.getTimestamp()) + .setValue(rowCell.getValue()) + .addAllLabels(rowCell.getLabels()); + } + } + } + + RowResult.Builder resultBuilder = RowResult.newBuilder(); + resultBuilder.setRow(rowBuilder.build()); + return resultBuilder; + } + + /** + * Helper method to convert rows from type com.google.cloud.bigtable.data.v2.models.Row to type + * com.google.bigtable.v2.Row. Row order is preserved. + * + * @param rows Logical rows in ServerStream + * @param cancelAfterRows Ignore the results after this row if set positive + * @return the converted rows in RowsResult Builder + */ + private static RowsResult.Builder convertRowsResult( + ServerStream rows, int cancelAfterRows) { + RowsResult.Builder resultBuilder = RowsResult.newBuilder(); + int rowCounter = 0; + for (com.google.cloud.bigtable.data.v2.models.Row row : rows) { + rowCounter++; + RowResult.Builder rowResultBuilder = convertRowResult(row); + resultBuilder.addRow(rowResultBuilder.getRow()); + + if (cancelAfterRows > 0 && rowCounter >= cancelAfterRows) { + logger.info( + String.format("Canceling ReadRows() to respect cancel_after_rows=%d", cancelAfterRows)); + break; + } + } + return resultBuilder; + } + + @Override + public void sampleRowKeys( + SampleRowKeysRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + String tableId; + try { + tableId = extractTableIdFromTableName(request.getRequest().getTableName()); + } catch (IllegalArgumentException e) { + responseObserver.onError( + Status.INVALID_ARGUMENT.withDescription(e.getMessage()).asException()); + return; + } + + List keyOffsets; + try { + keyOffsets = client.dataClient().sampleRowKeys(tableId); + } catch (ApiException e) { + responseObserver.onNext( + SampleRowKeysResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + SampleRowKeysResult.Builder resultBuilder = SampleRowKeysResult.newBuilder(); + for (KeyOffset keyOffset : keyOffsets) { + resultBuilder + .addSampleBuilder() + .setRowKey(keyOffset.getKey()) + .setOffsetBytes(keyOffset.getOffsetBytes()); + } + responseObserver.onNext( + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + responseObserver.onCompleted(); + } + + @Override + public void checkAndMutateRow( + CheckAndMutateRowRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + ConditionalRowMutation mutation = ConditionalRowMutation.fromProto(request.getRequest()); + Boolean matched; + try { + matched = client.dataClient().checkAndMutateRow(mutation); + } catch (ApiException e) { + responseObserver.onNext( + CheckAndMutateRowResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + CheckAndMutateRowResult.Builder resultBuilder = CheckAndMutateRowResult.newBuilder(); + resultBuilder.getResultBuilder().setPredicateMatched(matched); + responseObserver.onNext( + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + responseObserver.onCompleted(); + } + + @Override + public void readModifyWriteRow( + ReadModifyWriteRowRequest request, StreamObserver responseObserver) { + CbtClient client; + try { + client = getClient(request.getClientId()); + } catch (StatusException e) { + responseObserver.onError(e); + return; + } + + com.google.cloud.bigtable.data.v2.models.Row row; + ReadModifyWriteRow mutation = ReadModifyWriteRow.fromProto(request.getRequest()); + try { + row = client.dataClient().readModifyWriteRow(mutation); + } catch (ApiException e) { + responseObserver.onNext( + RowResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(e.getStatusCode().getCode().ordinal()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + + if (row != null) { + try { + RowResult.Builder resultBuilder = convertRowResult(row); + responseObserver.onNext( + resultBuilder.setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } catch (RuntimeException e) { + // If client encounters problem, fail the whole operation. + responseObserver.onNext( + RowResult.newBuilder() + .setStatus( + com.google.rpc.Status.newBuilder() + .setCode(Code.INTERNAL.getNumber()) + .setMessage(e.getMessage()) + .build()) + .build()); + responseObserver.onCompleted(); + return; + } + } else { + logger.info( + String.format( + "readModifyWriteRow() did not find row: %s", request.getRequest().getRowKey())); + responseObserver.onNext( + RowResult.newBuilder().setStatus(com.google.rpc.Status.getDefaultInstance()).build()); + } + responseObserver.onCompleted(); + } + + @Override + public synchronized void close() { + Iterator> it = idClientMap.entrySet().iterator(); + while (it.hasNext()) { + Map.Entry entry = it.next(); + entry.getValue().dataClient().close(); + it.remove(); + } + } + + private static String extractTableIdFromTableName(String fullTableName) + throws IllegalArgumentException { + Matcher matcher = tablePattern.matcher(fullTableName); + if (!matcher.matches()) { + throw new IllegalArgumentException("Invalid table name: " + fullTableName); + } + return matcher.group(3); + } + + private InstantiatingGrpcChannelProvider getTransportChannel() throws IOException { + if (!encrypted) { + return EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder() + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .build(); + } + + if (rootCerts == null) { + return EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder().build(); + } + + final SslContext secureContext = + GrpcSslContexts.forClient() + .trustManager(new ByteArrayInputStream(rootCerts.getBytes(UTF_8))) + .build(); + return EnhancedBigtableStubSettings.defaultGrpcTransportProviderBuilder() + .setChannelConfigurator( + new ApiFunction() { + @Override + public ManagedChannelBuilder apply(ManagedChannelBuilder input) { + NettyChannelBuilder channelBuilder = (NettyChannelBuilder) input; + channelBuilder.sslContext(secureContext).overrideAuthority(sslTarget); + return channelBuilder; + } + }) + .build(); + } + + private CredentialsProvider getCredentialsProvider() throws IOException { + if (credential == null) { + return NoCredentialsProvider.create(); + } + + final GoogleCredentials creds = + GoogleCredentials.fromStream(new ByteArrayInputStream(credential.getBytes(UTF_8))); + + return FixedCredentialsProvider.create(creds); + } + + private final ConcurrentHashMap idClientMap; + private final boolean encrypted; + + // Parameters that may be needed when "encrypted" is true. + private final String rootCerts; + private final String sslTarget; + private final String credential; + + private static final Pattern tablePattern = + Pattern.compile("projects/([^/]+)/instances/([^/]+)/tables/([^/]+)"); +} diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java new file mode 100644 index 0000000000..8750909f1a --- /dev/null +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxyMain.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigtable.testproxy; + +import io.grpc.ServerBuilder; +import java.io.IOException; +import java.util.logging.Logger; + +/** Starts a CbtTestProxy server. */ +public final class CbtTestProxyMain { + + private CbtTestProxyMain() {} + + private static final Logger logger = Logger.getLogger(CbtTestProxyMain.class.getName()); + + public static void main(String[] args) throws InterruptedException, IOException { + int port = Integer.getInteger("port", 9999); + if (port <= 0) { + throw new IllegalArgumentException(String.format("Port %d is not > 0.", port)); + } + + CbtTestProxy cbtTestProxy; + + // If encryption is specified + boolean encrypted = Boolean.getBoolean("encrypted"); + if (encrypted) { + String rootCertsPemPath = System.getProperty("root.certs.pem.path"); + String sslTarget = System.getProperty("ssl.target"); + String credentialJsonPath = System.getProperty("credential.json.path"); + cbtTestProxy = CbtTestProxy.createEncrypted(rootCertsPemPath, sslTarget, credentialJsonPath); + } else { + cbtTestProxy = CbtTestProxy.createUnencrypted(); + } + + logger.info(String.format("Test proxy starting on %d", port)); + ServerBuilder.forPort(port).addService(cbtTestProxy).build().start().awaitTermination(); + } +} diff --git a/test-proxy/src/main/proto/v2_test_proxy.proto b/test-proxy/src/main/proto/v2_test_proxy.proto new file mode 100644 index 0000000000..43b540c463 --- /dev/null +++ b/test-proxy/src/main/proto/v2_test_proxy.proto @@ -0,0 +1,223 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package bigtable.client.test; + +import "google/bigtable/v2/bigtable.proto"; +import "google/bigtable/v2/data.proto"; +import "google/protobuf/duration.proto"; +import "google/rpc/status.proto"; + +option java_multiple_files = true; +option java_package = "com.google.cloud.bigtable.testproxy"; +option go_package = "./testproxypb"; + +// The `status` field of response messages always represents an error returned +// by the client binding, e.g. never a problem in either the proxy logic or +// test driver to proxy communication. After receiving a response from the +// proxy, the test driver should always check its `status` field. +// +// [test driver] <--> [test proxy <--> client binding] <--> [Cloud Bigtable] +// ^^^^ +// `status` represents success or errors +// returned from the client binding. +// +// Status propagation design examples, assuming the C++ client: +// +// // For CloudBigtableV2TestProxy.ReadRow +// StatusOr> result = table.ReadRow(row_key, filter); +// +// Set RowResult.status to OK iff result.status() is OK. +// OK is required even if the bool is false, indicating the row wasn't found. +// +// // For CloudBigtableV2TestProxy.BulkMutateRows +// std::vector failed = table.BulkApply(bulk_mutation); +// +// The semantics are less obvious for BulkApply(), because some mutations +// failing doesn't indicate the overall RPC fails. In such case, test proxy +// should disambiguate between RPC failure and individual entry failure, and +// set MutateRowsResult.status according to the overall RPC status. +// +// The final decision regarding semantics must be documented for the +// CloudBigtableV2TestProxy service in this file. + +message CreateClientRequest { + string client_id = 1; + // The "host:port" address of the data API endpoint (i.e. the backend being + // proxied to). Example: 127.0.0.1:38543. If you want to connect to a local + // emulator via BIGTABLE_EMULATOR_HOST environment variable, you can use + // "emulator" instead of "host:port" for this field. + string data_target = 2; + // The project for all calls on this client. + string project_id = 3; + // The instance for all calls on this client. + string instance_id = 4; + // Optional app profile for all calls on this client. + // Some client bindings allow specifying the app profile on a per-operation + // basis. We don't yet support this in the proxy API, but may in the future. + string app_profile_id = 5; + // If provided, a custom timeout will be set for each API call conducted by + // the created client. Otherwise, the default timeout from the client library + // will be used. Note that the override applies to all the methods. + google.protobuf.Duration per_operation_timeout = 6; +} + +message CreateClientResponse {} + +message CloseClientRequest { + string client_id = 1; +} + +message CloseClientResponse {} + +message RemoveClientRequest { + string client_id = 1; +} + +message RemoveClientResponse {} + +message ReadRowRequest { + string client_id = 1; + // The unique name of the table from which to read the row. + // Values are of the form + // `projects//instances//tables/

    `. + string table_name = 4; + string row_key = 2; + google.bigtable.v2.RowFilter filter = 3; +} + +message RowResult { + google.rpc.Status status = 1; + google.bigtable.v2.Row row = 2; +} + +message ReadRowsRequest { + string client_id = 1; + google.bigtable.v2.ReadRowsRequest request = 2; + // The streaming read can be canceled before all items are seen. + // Has no effect if non-positive. + int32 cancel_after_rows = 3; +} + +message RowsResult { + google.rpc.Status status = 1; + repeated google.bigtable.v2.Row row = 2; +} + +message MutateRowRequest { + string client_id = 1; + google.bigtable.v2.MutateRowRequest request = 2; +} + +message MutateRowResult { + google.rpc.Status status = 1; +} + +message MutateRowsRequest { + string client_id = 1; + google.bigtable.v2.MutateRowsRequest request = 2; +} + +message MutateRowsResult { + // Overall RPC status + google.rpc.Status status = 1; + // To record individual entry failures + repeated google.bigtable.v2.MutateRowsResponse.Entry entry = 2; +} + +message CheckAndMutateRowRequest { + string client_id = 1; + google.bigtable.v2.CheckAndMutateRowRequest request = 2; +} + +message CheckAndMutateRowResult { + google.rpc.Status status = 1; + google.bigtable.v2.CheckAndMutateRowResponse result = 2; +} + +message SampleRowKeysRequest { + string client_id = 1; + google.bigtable.v2.SampleRowKeysRequest request = 2; +} + +message SampleRowKeysResult { + google.rpc.Status status = 1; + repeated google.bigtable.v2.SampleRowKeysResponse sample = 2; +} + +message ReadModifyWriteRowRequest { + string client_id = 1; + google.bigtable.v2.ReadModifyWriteRowRequest request = 2; +} + +// Note that all RPCs are unary, even when the equivalent client binding call +// may be streaming. This is an intentional simplification. +// +// Most methods have sync (default) and async variants. For async variants, +// the proxy is expected to perform the async operation, then wait for results +// before delivering them back to the driver client. +// +// Operations that may have interesting concurrency characteristics are +// represented explicitly in the API (see ReadRowsRequest.cancel_after_rows). +// We include such operations only when they can be meaningfully performed +// through client bindings. +// +// Users should generally avoid setting deadlines for requests to the Proxy +// because operations are not cancelable. If the deadline is set anyway, please +// understand that the underlying operation will continue to be executed even +// after the deadline expires. +service CloudBigtableV2TestProxy { + // Client management: + // + // Creates a client in the proxy. + // Each client has its own dedicated channel(s), and can be used concurrently + // and independently with other clients. + rpc CreateClient(CreateClientRequest) returns (CreateClientResponse); + // Closes a client in the proxy, making it not accept new requests. + rpc CloseClient(CloseClientRequest) returns (CloseClientResponse); + // Removes a client in the proxy, making it inaccessible. Client closing + // should be done by CloseClient() separately. + rpc RemoveClient(RemoveClientRequest) returns (RemoveClientResponse); + + // Bigtable operations: for each operation, you should use the synchronous or + // asynchronous variant of the client method based on the `use_async_method` + // setting of the client instance. For starters, you can choose to implement + // one variant, and return UNIMPLEMENTED status for the other. + // + // Reads a row with the client instance. + // The result row may not be present in the response. + // Callers should check for it (e.g. calling has_row() in C++). + rpc ReadRow(ReadRowRequest) returns (RowResult); + + // Reads rows with the client instance. + rpc ReadRows(ReadRowsRequest) returns (RowsResult); + + // Writes a row with the client instance. + rpc MutateRow(MutateRowRequest) returns (MutateRowResult); + + // Writes multiple rows with the client instance. + rpc BulkMutateRows(MutateRowsRequest) returns (MutateRowsResult); + + // Performs a check-and-mutate-row operation with the client instance. + rpc CheckAndMutateRow(CheckAndMutateRowRequest) + returns (CheckAndMutateRowResult); + + // Obtains a row key sampling with the client instance. + rpc SampleRowKeys(SampleRowKeysRequest) returns (SampleRowKeysResult); + + // Performs a read-modify-write operation with the client. + rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) returns (RowResult); +} diff --git a/versions.txt b/versions.txt index ff186e3606..7666861b93 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.11.1:2.11.2-SNAPSHOT -grpc-google-cloud-bigtable-admin-v2:2.11.1:2.11.2-SNAPSHOT -grpc-google-cloud-bigtable-v2:2.11.1:2.11.2-SNAPSHOT -proto-google-cloud-bigtable-admin-v2:2.11.1:2.11.2-SNAPSHOT -proto-google-cloud-bigtable-v2:2.11.1:2.11.2-SNAPSHOT -google-cloud-bigtable-emulator:0.148.1:0.148.2-SNAPSHOT -google-cloud-bigtable-emulator-core:2.11.1:2.11.2-SNAPSHOT +google-cloud-bigtable:2.17.0:2.17.1-SNAPSHOT +grpc-google-cloud-bigtable-admin-v2:2.17.0:2.17.1-SNAPSHOT +grpc-google-cloud-bigtable-v2:2.17.0:2.17.1-SNAPSHOT +proto-google-cloud-bigtable-admin-v2:2.17.0:2.17.1-SNAPSHOT +proto-google-cloud-bigtable-v2:2.17.0:2.17.1-SNAPSHOT +google-cloud-bigtable-emulator:0.154.0:0.154.1-SNAPSHOT +google-cloud-bigtable-emulator-core:2.17.0:2.17.1-SNAPSHOT From 053cba63241767f6260801965937db10c6983a00 Mon Sep 17 00:00:00 2001 From: Jack Dingilian Date: Tue, 13 Dec 2022 17:49:01 -0500 Subject: [PATCH 16/27] fix: resolve merge conflict in samples/native-image-sample/pom.xml (#1553) --- samples/native-image-sample/pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index d0552e807d..1bf3a9e595 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -83,21 +83,13 @@ org.junit.vintage junit-vintage-engine -<<<<<<< HEAD - 5.9.0 -======= 5.9.1 ->>>>>>> main test org.graalvm.buildtools junit-platform-native -<<<<<<< HEAD - 0.9.13 -======= 0.9.19 ->>>>>>> main test @@ -107,11 +99,7 @@ org.graalvm.buildtools native-maven-plugin -<<<<<<< HEAD - 0.9.13 -======= 0.9.19 ->>>>>>> main true com.example.bigtable.NativeImageBigtableSample From 7f0e9df12c01acf47335846777d77004cc8ce409 Mon Sep 17 00:00:00 2001 From: tengzhonger <109308630+tengzhonger@users.noreply.github.com> Date: Mon, 9 Jan 2023 14:55:18 -0500 Subject: [PATCH 17/27] feat: Cdc rebase (#1566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#1304) * chore(deps): update dependency com.google.cloud:libraries-bom to v26 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build: enable longpaths support for windows test (#1485) (#1310) Source-Link: https://github.com/googleapis/synthtool/commit/73365620c41d96e97ff474b2c4d39b890ad51967 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 Co-authored-by: Owl Bot * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.0 (#1305) * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 (#1306) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 (#1307) * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.2 (#1297) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.0` -> `0.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/compatibility-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.2/confidence-slim/0.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-config ### [`v0.3.1`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​031-httpswwwgithubcomgoogleapisjava-shared-configcomparev030v031-2020-01-03) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v0.3.0...v0.3.1)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: enable integration test for google-cloud-bigtable-stats (#1311) * fix: enable integration test for graal * update * add more comments * chore: mark native image checks as required (#1313) * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.3 (#1314) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.2` -> `0.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/compatibility-slim/0.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.3/confidence-slim/0.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * ci: update template so GAPIC_AUTO repos do not require special approvers for Java code (#1494) (#1315) Source-Link: https://github.com/googleapis/synthtool/commit/da89e53878d92467eb648c610e64f94a614915cc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 * feat: use PingAndWarm request for channel priming (#1179) Switching channel priming from sending fake ReadRowsRequest to PingAndWarm request, which on the server side will list all the tables for an instance. In the settings we won't need to specify the table Ids to prime. * build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#1316) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add storage utilization gib per node for autoscaling (#1317) * feat: add storage utilization gib per node option for autoscaling * add additional assertion * add additional tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * review comments Co-authored-by: Owl Bot * fix: fix race condition in BuiltinMetricsTracer (#1320) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(main): release 2.10.0 (#1302) :robot: I have created a release *beep* *boop* --- ## [2.10.0](https://github.com/googleapis/java-bigtable/compare/v2.9.0...v2.10.0) (2022-07-26) ### Features * add response protos ([#1246](https://github.com/googleapis/java-bigtable/issues/1246)) ([52d59ce](https://github.com/googleapis/java-bigtable/commit/52d59ce18fb5536a17a5cb59da39e563e4afede4)) * add response_params proto to clients ([#1303](https://github.com/googleapis/java-bigtable/issues/1303)) ([93edfe1](https://github.com/googleapis/java-bigtable/commit/93edfe1e43dcfefda6bba3e9ee53ed80eaf2e5c2)) * add storage utilization gib per node for autoscaling ([#1317](https://github.com/googleapis/java-bigtable/issues/1317)) ([5282589](https://github.com/googleapis/java-bigtable/commit/52825891af0e4ec2dd76c0c6fa1379a98a77a08f)) * use PingAndWarm request for channel priming ([#1179](https://github.com/googleapis/java-bigtable/issues/1179)) ([6629821](https://github.com/googleapis/java-bigtable/commit/6629821ea3200d3a5b93c9d45aab6d57485fcebf)) ### Bug Fixes * enable integration test for google-cloud-bigtable-stats ([#1311](https://github.com/googleapis/java-bigtable/issues/1311)) ([7c77879](https://github.com/googleapis/java-bigtable/commit/7c7787998b164ceb55472c0d06c083a835e5d000)) * fix race condition in BuiltinMetricsTracer ([#1320](https://github.com/googleapis/java-bigtable/issues/1320)) ([644454a](https://github.com/googleapis/java-bigtable/commit/644454a9723da359677052b7a4b9201e91e9a78a)) * ignore repackaged files to fix clirr ([#1300](https://github.com/googleapis/java-bigtable/issues/1300)) ([99b67ba](https://github.com/googleapis/java-bigtable/commit/99b67ba5b1625686ac7802a6e40dafc2edceade0)) ### Dependencies * update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#1306](https://github.com/googleapis/java-bigtable/issues/1306)) ([ddae354](https://github.com/googleapis/java-bigtable/commit/ddae3540fd68e8f79d94d49c96c5685e1bad2f66)) * update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#1307](https://github.com/googleapis/java-bigtable/issues/1307)) ([c0740fe](https://github.com/googleapis/java-bigtable/commit/c0740fe30c5cd2bdf6dedf901e2fdb9a84ce64a1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 (#1323) * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.1-SNAPSHOT (#1321) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: retry rst stream in mutations (#1327) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.0 (#1330) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.1 (#1325) :robot: I have created a release *beep* *boop* --- ## [2.10.1](https://github.com/googleapis/java-bigtable/compare/v2.10.0...v2.10.1) (2022-08-01) ### Bug Fixes * retry rst stream in mutations ([#1327](https://github.com/googleapis/java-bigtable/issues/1327)) ([1a5b3a2](https://github.com/googleapis/java-bigtable/commit/1a5b3a215b5388678241cadec26a962a512157ac)) ### Dependencies * update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 ([#1323](https://github.com/googleapis/java-bigtable/issues/1323)) ([7655747](https://github.com/googleapis/java-bigtable/commit/76557476744a6404b9df30c97c59f0a7e38a1ed8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * build(deps): update dependency org.codehaus.mojo:extra-enforcer-rules to v1.6.1 (#1329) * chore(main): release 2.10.2-SNAPSHOT (#1331) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.1 (#1332) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * fix: add a ReadFirstRow callable to set future in onComplete (#1326) * fix: add a ReadFirstRow callable to set future in onComplete * use ReadRowsFirst callable instead * don't use atomic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats (#1336) * deps: upgrade shared config to 1.5.3, remove google-http-client and google-http-client-gson. * exclude google-http-client and google-http-client-gson from google-cloud-bigtable-stats. * exclude google-http-client and google-http-client-gson from google-cloud-bigtable-stats. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add comments to explain excluded dependencies. Co-authored-by: Owl Bot * fix: The metadata could be returned in trailer or header depends on i… (#1337) * fix: The metadata could be returned in trailer or header depends on if sidecar is enabled. Check both for now. * fix * fix npe * fix NPE when metadata is null * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3 (#1328) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.13.0` -> `3.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​301-httpsgithubcomgoogleapisjava-shared-dependenciescomparev300v301-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.0...v3.0.1) ##### Dependencies - update dependency com.google.code.gson:gson to v2.9.1 ([#​766](https://togithub.com/googleapis/java-shared-dependencies/issues/766)) ([f7b2b06](https://togithub.com/googleapis/java-shared-dependencies/commit/f7b2b06b80e3e95ff8ab9b1d6a2638ef3069298a)) - update gax.version to v2.18.7 ([#​767](https://togithub.com/googleapis/java-shared-dependencies/issues/767)) ([9650368](https://togithub.com/googleapis/java-shared-dependencies/commit/96503682e98cdf348ea2c1365a03a60f4322c712)) - update google.core.version to v2.8.6 ([#​770](https://togithub.com/googleapis/java-shared-dependencies/issues/770)) ([cfd4377](https://togithub.com/googleapis/java-shared-dependencies/commit/cfd4377dc178cebb4724065d55d185ce03988d55)) ### [`v3.0.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​300-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2130v300-2022-07-29) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.13.0...v3.0.0) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-shared-dependencies/issues/1485)) ([#​738](https://togithub.com/googleapis/java-shared-dependencies/issues/738)) ([11bc8f8](https://togithub.com/googleapis/java-shared-dependencies/commit/11bc8f81f28be88a97fdeafca21724e33638770c)) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.2 ([#​729](https://togithub.com/googleapis/java-shared-dependencies/issues/729)) ([1fa59af](https://togithub.com/googleapis/java-shared-dependencies/commit/1fa59af80abb9f278f57658c10158567e825fec6)) - update dependency com.google.api-client:google-api-client-bom to v2 ([#​746](https://togithub.com/googleapis/java-shared-dependencies/issues/746)) ([2dcb2e0](https://togithub.com/googleapis/java-shared-dependencies/commit/2dcb2e071e0ba0eea21bb575bd13cd559d4a1ca6)) - update dependency com.google.api.grpc:grpc-google-common-protos to v2.9.2 ([#​741](https://togithub.com/googleapis/java-shared-dependencies/issues/741)) ([3352d6c](https://togithub.com/googleapis/java-shared-dependencies/commit/3352d6c36111c04e3f6f3e6360470fa3efb10d8f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.0 ([#​726](https://togithub.com/googleapis/java-shared-dependencies/issues/726)) ([2c5d64c](https://togithub.com/googleapis/java-shared-dependencies/commit/2c5d64c127db8384e49113acfeac6928716a2d7f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.1 ([#​742](https://togithub.com/googleapis/java-shared-dependencies/issues/742)) ([4f53527](https://togithub.com/googleapis/java-shared-dependencies/commit/4f53527bda7f40896711b7c1d1c02453321ffbc8)) - update dependency com.google.cloud:first-party-dependencies to v2 ([#​747](https://togithub.com/googleapis/java-shared-dependencies/issues/747)) ([e970ac0](https://togithub.com/googleapis/java-shared-dependencies/commit/e970ac0599941c825dc2516146a7c6673e68a9b9)) - update dependency com.google.cloud:grpc-gcp to v1.2.1 ([#​751](https://togithub.com/googleapis/java-shared-dependencies/issues/751)) ([b3284b6](https://togithub.com/googleapis/java-shared-dependencies/commit/b3284b6ee52a96a6ea8696a05a94443df9ee5b9f)) - update dependency com.google.cloud:third-party-dependencies to v2 ([#​748](https://togithub.com/googleapis/java-shared-dependencies/issues/748)) ([573b41a](https://togithub.com/googleapis/java-shared-dependencies/commit/573b41a69504372741cbeb01dd200e7c71967186)) - update dependency com.google.http-client:google-http-client-bom to v1.42.1 ([#​730](https://togithub.com/googleapis/java-shared-dependencies/issues/730)) ([6b47126](https://togithub.com/googleapis/java-shared-dependencies/commit/6b47126686b603a5d112e097ce6aa3a1880daf6f)) - update dependency com.google.http-client:google-http-client-bom to v1.42.2 ([#​749](https://togithub.com/googleapis/java-shared-dependencies/issues/749)) ([299d7b0](https://togithub.com/googleapis/java-shared-dependencies/commit/299d7b0d4920644e2c3070d12dd1d97da17a5e88)) - update dependency com.google.protobuf:protobuf-bom to v3.21.2 ([#​722](https://togithub.com/googleapis/java-shared-dependencies/issues/722)) ([7a96b12](https://togithub.com/googleapis/java-shared-dependencies/commit/7a96b1259a526b63e9376fd6cc18b27cddeb5f0f)) - update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#​756](https://togithub.com/googleapis/java-shared-dependencies/issues/756)) ([3d0bac2](https://togithub.com/googleapis/java-shared-dependencies/commit/3d0bac23487aebb94267c0708f41ff6c02a028a4)) - update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#​759](https://togithub.com/googleapis/java-shared-dependencies/issues/759)) ([5a54ef1](https://togithub.com/googleapis/java-shared-dependencies/commit/5a54ef1a2d56244166d4fcc46041d62c0dc4b411)) - update dependency io.grpc:grpc-bom to v1.48.0 ([#​752](https://togithub.com/googleapis/java-shared-dependencies/issues/752)) ([20ac908](https://togithub.com/googleapis/java-shared-dependencies/commit/20ac908932a5e7c8e581bdfcd68579d7e1cedd5f)) - update dependency org.checkerframework:checker-qual to v3.23.0 ([#​736](https://togithub.com/googleapis/java-shared-dependencies/issues/736)) ([fc01d8f](https://togithub.com/googleapis/java-shared-dependencies/commit/fc01d8f93f391f12fdb800d5006f0b4505832eeb)) - update gax.version to v2.18.3 ([#​731](https://togithub.com/googleapis/java-shared-dependencies/issues/731)) ([e8ee554](https://togithub.com/googleapis/java-shared-dependencies/commit/e8ee554707acb2f71c739d08e2ff02fbe43ffa52)) - update gax.version to v2.18.4 ([#​735](https://togithub.com/googleapis/java-shared-dependencies/issues/735)) ([11c7415](https://togithub.com/googleapis/java-shared-dependencies/commit/11c74152a84697924de3a0e838b05f606c3098f7)) - update gax.version to v2.18.5 ([#​758](https://togithub.com/googleapis/java-shared-dependencies/issues/758)) ([7469fc1](https://togithub.com/googleapis/java-shared-dependencies/commit/7469fc1cc5095b39a5738e60156711a268f6e052)) - update gax.version to v2.18.6 ([#​763](https://togithub.com/googleapis/java-shared-dependencies/issues/763)) ([b5ca2f7](https://togithub.com/googleapis/java-shared-dependencies/commit/b5ca2f7b4d81c705823253f4f03363a32d2be48b)) - update google.common-protos.version to v2.9.1 ([#​724](https://togithub.com/googleapis/java-shared-dependencies/issues/724)) ([5213dbb](https://togithub.com/googleapis/java-shared-dependencies/commit/5213dbbfa9c9b73d2420ec2be7782f16c9c4955f)) - update google.core.version to v2.8.1 ([#​725](https://togithub.com/googleapis/java-shared-dependencies/issues/725)) ([575858a](https://togithub.com/googleapis/java-shared-dependencies/commit/575858a60f76e46bbc2a2435c2b6c01c8f4ab681)) - update google.core.version to v2.8.3 ([#​760](https://togithub.com/googleapis/java-shared-dependencies/issues/760)) ([cb10ae4](https://togithub.com/googleapis/java-shared-dependencies/commit/cb10ae4b76939215ea465af74163b3d4ad65a548)) - update google.core.version to v2.8.4 ([#​762](https://togithub.com/googleapis/java-shared-dependencies/issues/762)) ([821daaf](https://togithub.com/googleapis/java-shared-dependencies/commit/821daafefdbcfdfe6e363e580747538096a562ef)) - update google.core.version to v2.8.5 ([#​764](https://togithub.com/googleapis/java-shared-dependencies/issues/764)) ([a1f8f50](https://togithub.com/googleapis/java-shared-dependencies/commit/a1f8f501b54143a2cec8e72efd4ceb3ce47f13ae)) - update iam.version to v1.5.0 ([#​732](https://togithub.com/googleapis/java-shared-dependencies/issues/732)) ([9dce0e5](https://togithub.com/googleapis/java-shared-dependencies/commit/9dce0e5199c1e425119adc804304958f58003a27)) - update iam.version to v1.5.1 ([#​737](https://togithub.com/googleapis/java-shared-dependencies/issues/737)) ([df39168](https://togithub.com/googleapis/java-shared-dependencies/commit/df391685d42fcb1b04f03ab1380a594893bdce37)) - update iam.version to v1.5.2 ([#​743](https://togithub.com/googleapis/java-shared-dependencies/issues/743)) ([cdde697](https://togithub.com/googleapis/java-shared-dependencies/commit/cdde697f25a89fc8c2ec7eae6b7c54f69977bb1c))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.10.2 (#1335) :robot: I have created a release *beep* *boop* --- ## [2.10.2](https://github.com/googleapis/java-bigtable/compare/v2.10.1...v2.10.2) (2022-08-03) ### Bug Fixes * add a ReadFirstRow callable to set future in onComplete ([#1326](https://github.com/googleapis/java-bigtable/issues/1326)) ([cb539b5](https://github.com/googleapis/java-bigtable/commit/cb539b50d98ec2a8538ce4691b2639426ca95464)) * The metadata could be returned in trailer or header depends on i… ([#1337](https://github.com/googleapis/java-bigtable/issues/1337)) ([c4b8c03](https://github.com/googleapis/java-bigtable/commit/c4b8c03ece7b3f6ec2cea42ff0ca5ac617528060)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1328](https://github.com/googleapis/java-bigtable/issues/1328)) ([bee0ca0](https://github.com/googleapis/java-bigtable/commit/bee0ca036ab6e711f6069159364f6d3b691e6bfd)) * upgrade shared config to 1.5.3, exclude google-http-client and google-http-client-gson from gax in google-cloud-bigtable-stats ([#1336](https://github.com/googleapis/java-bigtable/issues/1336)) ([98b3349](https://github.com/googleapis/java-bigtable/commit/98b33498d85325d22737fb4bd66826519e96755a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.10.3-SNAPSHOT (#1340) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * fix: declaring 2 http libraries as runtime (#1341) * fix: declaring 2 http libraries as runtime Fixing similar issues as googleapis/java-pubsub#1239 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.2 (#1342) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.10.3 (#1343) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.10.4-SNAPSHOT (#1348) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.10.3 (#1349) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.10.2` -> `2.10.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/compatibility-slim/2.10.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.10.3/confidence-slim/2.10.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-bigtable ### [`v2.10.3`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2103-httpsgithubcomgoogleapisjava-bigtablecomparev2102v2103-2022-08-08) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.10.2...v2.10.3) ##### Bug Fixes - declaring 2 http libraries as runtime ([#​1341](https://togithub.com/googleapis/java-bigtable/issues/1341)) ([8071de6](https://togithub.com/googleapis/java-bigtable/commit/8071de6235a6c1aa5873902ca55beaa2a8d64276))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add stackdriver exporter (#1247) * remove status from application latency * feat: update tracers to use built in metrics * feat: add response protos * feat: add response protos * feat: add stackdriver exporter * fix tests * fix dependency * remove unused dependency * clean up code * udpates on comments * remove unused setting * make metrics consistent with cloud monitoring * convert undefined to global * update * add bigtable tracer back in the base callable * fix format * fix the tag name * add the link to the form * fix format * fix dependency conflicts * fix image tests * update undefined cluster to global * address comments * tweak export interval * remove unused metric kind * get project id from the metrics * clean up imports * remove unused method and rewrite create timeseries exporter * fix integration test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#1354) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: add opencensus lincese and update readme (#1353) * chore: add opencensus lincese and update readme * remove unused implementation * rename method * add back transformer * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: add instructions to enable builtin metrics (#1358) * chore: add instructions to enable builtin metrics * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 (#1352) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.3.6` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/compatibility-slim/3.3.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.1/confidence-slim/3.3.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.1`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​341-httpsgithubcomgoogleapisjava-monitoringcomparev340v341-2022-08-11) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.0...v3.4.1) ##### Bug Fixes - fix samples and samples tests for UptimeCheck. ([#​909](https://togithub.com/googleapis/java-monitoring/issues/909)) ([7143f96](https://togithub.com/googleapis/java-monitoring/commit/7143f96d3e5b4f7f96f184b6367c45980dbb4140)) - google-auth-library-oauth2-http is runtime scope ([#​911](https://togithub.com/googleapis/java-monitoring/issues/911)) ([fb080db](https://togithub.com/googleapis/java-monitoring/commit/fb080dbac9a11563d3b21b1defe34720bbcd2f91)) ### [`v3.4.0`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​340-httpsgithubcomgoogleapisjava-monitoringcomparev336v340-2022-08-06) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.3.6...v3.4.0) ##### Features - Added support for evaluating missing data in AlertPolicy ([#​906](https://togithub.com/googleapis/java-monitoring/issues/906)) ([e9effc8](https://togithub.com/googleapis/java-monitoring/commit/e9effc85f48d7f64ae5b297bace67e7cbafd27b1)) ##### Documentation - **owlbot-java:** explaining why not using formatter in pom.xml ([#​1511](https://togithub.com/googleapis/java-monitoring/issues/1511)) ([#​901](https://togithub.com/googleapis/java-monitoring/issues/901)) ([02e3f6b](https://togithub.com/googleapis/java-monitoring/commit/02e3f6b8af04ad995a488da9794bf391b4c602e5)), closes [#​1502](https://togithub.com/googleapis/java-monitoring/issues/1502)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency org.mockito:mockito-core to v4.7.0 (#1356) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.6.1` -> `4.7.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/compatibility-slim/4.6.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.7.0/confidence-slim/4.6.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    mockito/mockito ### [`v4.7.0`](https://togithub.com/mockito/mockito/releases/tag/v4.7.0) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.6.1...v4.7.0) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.7.0 - 2022-08-13 - [33 commit(s)](https://togithub.com/mockito/mockito/compare/v4.6.1...v4.7.0) by [`1988123`](https://togithub.com/mockito/mockito/commit/198812345678), Andy Coates, Chen Ni, Marius Lichtblau, Nikita Koselev. Developer Advocate, Open Source Ally, Rafael Winterhalter, dependabot\[bot], dstango, fishautumn, heqiang - Bump com.diffplug.spotless from 6.9.0 to 6.9.1 [(#​2725)](https://togithub.com/mockito/mockito/pull/2725) - Bump versions.bytebuddy from 1.12.12 to 1.12.13 [(#​2719)](https://togithub.com/mockito/mockito/pull/2719) - Fix Javadoc for Mockito. [(#​2718)](https://togithub.com/mockito/mockito/pull/2718) - Bump com.diffplug.spotless from 6.8.0 to 6.9.0 [(#​2717)](https://togithub.com/mockito/mockito/pull/2717) - Fix a typo in comment of InternalRunner.java [(#​2715)](https://togithub.com/mockito/mockito/pull/2715) - Bump junit-platform-launcher from 1.8.2 to 1.9.0 [(#​2713)](https://togithub.com/mockito/mockito/pull/2713) - Bump versions.junitJupiter from 5.8.2 to 5.9.0 [(#​2712)](https://togithub.com/mockito/mockito/pull/2712) - Bump groovy from 3.0.11 to 3.0.12 [(#​2711)](https://togithub.com/mockito/mockito/pull/2711) - Bump shipkit-auto-version from 1.2.0 to 1.2.1 [(#​2709)](https://togithub.com/mockito/mockito/pull/2709) - Bump kotlinVersion from 1.7.0 to 1.7.10 [(#​2705)](https://togithub.com/mockito/mockito/pull/2705) - Bump com.diffplug.spotless from 6.7.2 to 6.8.0 [(#​2699)](https://togithub.com/mockito/mockito/pull/2699) - Bump versions.bytebuddy from 1.12.11 to 1.12.12 [(#​2695)](https://togithub.com/mockito/mockito/pull/2695) - Makes error message less misleading and points to github for help. Issue [#​2692](https://togithub.com/mockito/mockito/issues/2692) [(#​2693)](https://togithub.com/mockito/mockito/pull/2693) - Misleading error message when mocking and a class (of a parameter) is not found [(#​2692)](https://togithub.com/mockito/mockito/issues/2692) - Bump kotlinx-coroutines-core from 1.6.1-native-mt to 1.6.3-native-mt [(#​2691)](https://togithub.com/mockito/mockito/pull/2691) - Bump versions.bytebuddy from 1.12.10 to 1.12.11 [(#​2690)](https://togithub.com/mockito/mockito/pull/2690) - Fixes [#​2679](https://togithub.com/mockito/mockito/issues/2679) : Update Javadoc [(#​2689)](https://togithub.com/mockito/mockito/pull/2689) - Bump org.eclipse.osgi from 3.17.200 to 3.18.0 [(#​2688)](https://togithub.com/mockito/mockito/pull/2688) - RETURNS_SELF: Avoids returning mock when mock type is assignable to method return type, but method return type is Object. [(#​2687)](https://togithub.com/mockito/mockito/pull/2687) - RETURNS_SELF breaks methods with generic return type [(#​2686)](https://togithub.com/mockito/mockito/issues/2686) - Fix [#​2616](https://togithub.com/mockito/mockito/issues/2616) wrong stub for nested static [(#​2685)](https://togithub.com/mockito/mockito/pull/2685) - Bump com.diffplug.spotless from 6.7.0 to 6.7.2 [(#​2684)](https://togithub.com/mockito/mockito/pull/2684) - Avoids starting mocks "half-way" if a superclass constructor is mocked but an unmocked subclass is initiated. [(#​2682)](https://togithub.com/mockito/mockito/pull/2682) - Fix typo [(#​2681)](https://togithub.com/mockito/mockito/pull/2681) - Update javadoc of `Strictness.STRICT_STUBS` [(#​2679)](https://togithub.com/mockito/mockito/issues/2679) - Bump kotlinVersion from 1.6.21 to 1.7.0 [(#​2677)](https://togithub.com/mockito/mockito/pull/2677) - Bump biz.aQute.bnd.builder from 6.3.0 to 6.3.1 [(#​2675)](https://togithub.com/mockito/mockito/pull/2675) - Bump biz.aQute.bnd.gradle from 6.3.0 to 6.3.1 [(#​2674)](https://togithub.com/mockito/mockito/pull/2674) - Bump com.diffplug.spotless from 6.6.1 to 6.7.0 [(#​2672)](https://togithub.com/mockito/mockito/pull/2672) - update CONTRIBUTING.md - stackoverflow [(#​2671)](https://togithub.com/mockito/mockito/pull/2671) - stackoverflow.com is a non-actionable text, to be replaced with a hyperlink [(#​2670)](https://togithub.com/mockito/mockito/issues/2670) - Fix typos [(#​2669)](https://togithub.com/mockito/mockito/pull/2669) - Bump biz.aQute.bnd.gradle from 6.2.0 to 6.3.0 [(#​2666)](https://togithub.com/mockito/mockito/pull/2666) - Bump biz.aQute.bnd.builder from 6.2.0 to 6.3.0 [(#​2665)](https://togithub.com/mockito/mockito/pull/2665) - Improve Varargs handling in AdditionalAnswers [(#​2664)](https://togithub.com/mockito/mockito/pull/2664) - Bump appcompat from 1.4.1 to 1.4.2 [(#​2663)](https://togithub.com/mockito/mockito/pull/2663) - Varargs methods cause `ClassCastException` in `AnswerFunctionalInterfaces` [(#​2644)](https://togithub.com/mockito/mockito/issues/2644) - Mock static class seems records wrong invocations if called nested method throws exception [(#​2616)](https://togithub.com/mockito/mockito/issues/2616)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency com.google.cloud:google-cloud-conformance-tests to v0.3.4 (#1351) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-conformance-tests](https://togithub.com/googleapis/java-shared-config) | `0.3.3` -> `0.3.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/compatibility-slim/0.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-conformance-tests/0.3.4/confidence-slim/0.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.1 (#1357) * chore(main): release 2.11.0 (#1350) :robot: I have created a release *beep* *boop* --- ## [2.11.0](https://github.com/googleapis/java-bigtable/compare/v2.10.3...v2.11.0) (2022-08-17) ### Features * add stackdriver exporter ([#1247](https://github.com/googleapis/java-bigtable/issues/1247)) ([7ce915e](https://github.com/googleapis/java-bigtable/commit/7ce915e34c1ccce30bee78bda9e024a620cde737)) ### Dependencies * update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.1 ([#1352](https://github.com/googleapis/java-bigtable/issues/1352)) ([f8d97e5](https://github.com/googleapis/java-bigtable/commit/f8d97e557318eab214f3d916c029bfa153cf7455)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.11.1-SNAPSHOT (#1361) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.0 (#1362) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * test: add integration test for builtin metrics (#1360) * test: add integration test for builtin metrics * add license * test on staging * udpate * address comments * remove debugging * fix dependency test * update comment * update integration test to only close client if it's not null * explain why we're including grpc-xds * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build(deps): update dependency org.apache.maven.shared:maven-dependency-tree to v3.2.0 (#1363) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.shared:maven-dependency-tree](https://maven.apache.org/shared/) | `3.1.1` -> `3.2.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/compatibility-slim/3.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.shared:maven-dependency-tree/3.2.0/confidence-slim/3.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: reset a measure map everytime the stats are recorded (#1364) * chore(main): release 2.11.1 (#1365) :robot: I have created a release *beep* *boop* --- ## [2.11.1](https://github.com/googleapis/java-bigtable/compare/v2.11.0...v2.11.1) (2022-08-26) ### Bug Fixes * reset a measure map everytime the stats are recorded ([#1364](https://github.com/googleapis/java-bigtable/issues/1364)) ([1683365](https://github.com/googleapis/java-bigtable/commit/1683365938178bb61b1e9c871f1971449ee942c2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.11.2-SNAPSHOT (#1366) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.1 (#1367) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#1370) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * fix: make cloud-monitoring a runtime dependency (#1371) * fix: make cloud-monitoring a runtime dependency * fix * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * test: disable integration test (#1375) * test: disable integration test * change to ignore * ignore the class * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 (#1374) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.1` -> `3.4.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/compatibility-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/confidence-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.2`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​342-httpsgithubcomgoogleapisjava-monitoringcomparev341v342-2022-08-31) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.1...v3.4.2) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​910](https://togithub.com/googleapis/java-monitoring/issues/910)) ([c9f0f96](https://togithub.com/googleapis/java-monitoring/commit/c9f0f9602209c077d614245f87e06527b897d461))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test: fix metrics integration test, remove the server latency since this field… (#1377) * fix: fix integration test, remove the server latency since this field may not exist * format code * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.2 (#1373) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.1` -> `3.4.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/compatibility-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.2/confidence-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.2`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​342-httpsgithubcomgoogleapisjava-monitoringcomparev341v342-2022-08-31) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.1...v3.4.2) ##### Dependencies - update dependency com.google.protobuf:protobuf-java-util to v3.21.5 ([#​910](https://togithub.com/googleapis/java-monitoring/issues/910)) ([c9f0f96](https://togithub.com/googleapis/java-monitoring/commit/c9f0f9602209c077d614245f87e06527b897d461))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.11.2 (#1372) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.11.3-SNAPSHOT (#1380) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * test(deps): update dependency org.mockito:mockito-core to v4.8.0 (#1382) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.7.0` -> `4.8.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/compatibility-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.0/confidence-slim/4.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.11.2 (#1381) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.11.1` -> `2.11.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/compatibility-slim/2.11.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.11.2/confidence-slim/2.11.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 (#1384) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.1` -> `3.0.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/compatibility-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/confidence-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.2`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​302-httpsgithubcomgoogleapisjava-shared-dependenciescomparev301v302-2022-09-08) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.1...v3.0.2) ##### Dependencies - Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4 ([#​789](https://togithub.com/googleapis/java-shared-dependencies/issues/789)) ([6cf91a9](https://togithub.com/googleapis/java-shared-dependencies/commit/6cf91a96b9ea6af0fb845b50582dac7aa2892cab)) - Update dependency com.google.auth:google-auth-library-bom to v1.10.0 ([#​781](https://togithub.com/googleapis/java-shared-dependencies/issues/781)) ([8859e61](https://togithub.com/googleapis/java-shared-dependencies/commit/8859e61808bfc5cd9546e27e945fc855b36d2554)) - Update dependency com.google.auth:google-auth-library-bom to v1.11.0 ([#​790](https://togithub.com/googleapis/java-shared-dependencies/issues/790)) ([3431a47](https://togithub.com/googleapis/java-shared-dependencies/commit/3431a471cbf874a67a4f1a42e31f0ed891dedc92)) - Update dependency com.google.auth:google-auth-library-bom to v1.9.0 ([#​773](https://togithub.com/googleapis/java-shared-dependencies/issues/773)) ([27fc79f](https://togithub.com/googleapis/java-shared-dependencies/commit/27fc79f00ee70011df6a368bb8fcfad7f0ce41f0)) - Update dependency com.google.errorprone:error_prone_annotations to v2.15.0 ([#​776](https://togithub.com/googleapis/java-shared-dependencies/issues/776)) ([bf333b8](https://togithub.com/googleapis/java-shared-dependencies/commit/bf333b8c88072d21cb959db4d3328bbb55d9ef5c)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.5 ([#​780](https://togithub.com/googleapis/java-shared-dependencies/issues/780)) ([da7f44d](https://togithub.com/googleapis/java-shared-dependencies/commit/da7f44d71d6d7f372b5313dab68ce220308614d4)) - Update dependency io.grpc:grpc-bom to v1.48.1 ([#​768](https://togithub.com/googleapis/java-shared-dependencies/issues/768)) ([5c7768d](https://togithub.com/googleapis/java-shared-dependencies/commit/5c7768d3c9665dd356de6c39c0a6a5fa6e992f2e)) - Update dependency io.grpc:grpc-bom to v1.49.0 ([#​786](https://togithub.com/googleapis/java-shared-dependencies/issues/786)) ([8734812](https://togithub.com/googleapis/java-shared-dependencies/commit/8734812f1b4e2faaa48caf41eff59a85892ae344)) - Update dependency org.checkerframework:checker-qual to v3.24.0 ([#​775](https://togithub.com/googleapis/java-shared-dependencies/issues/775)) ([df74b7b](https://togithub.com/googleapis/java-shared-dependencies/commit/df74b7b0dd5dd592523f302d9fb36adb5991cb0b)) - Update dependency org.checkerframework:checker-qual to v3.25.0 ([#​788](https://togithub.com/googleapis/java-shared-dependencies/issues/788)) ([207035b](https://togithub.com/googleapis/java-shared-dependencies/commit/207035bd04c9305899eea540acbefaf06a7b1ec9)) - Update dependency org.threeten:threetenbp to v1.6.1 ([#​782](https://togithub.com/googleapis/java-shared-dependencies/issues/782)) ([0f218ae](https://togithub.com/googleapis/java-shared-dependencies/commit/0f218aeb6aa33cf1da4a8b1d6c82bbf87946dab9)) - Update gax.version to v2.19.0 ([#​785](https://togithub.com/googleapis/java-shared-dependencies/issues/785)) ([4448331](https://togithub.com/googleapis/java-shared-dependencies/commit/4448331c4c6d88ea8076260776d1d47d24aa19fa)) - Update google.core.version to v2.8.10 ([#​787](https://togithub.com/googleapis/java-shared-dependencies/issues/787)) ([3c344d5](https://togithub.com/googleapis/java-shared-dependencies/commit/3c344d515e3b9215db5a1f8ef550d800d974e558)) - Update google.core.version to v2.8.7 ([#​774](https://togithub.com/googleapis/java-shared-dependencies/issues/774)) ([d0cd5e8](https://togithub.com/googleapis/java-shared-dependencies/commit/d0cd5e8f6ca88787fe0dbf7f30c849cb4c4fae5e)) - Update google.core.version to v2.8.8 ([#​777](https://togithub.com/googleapis/java-shared-dependencies/issues/777)) ([f00571c](https://togithub.com/googleapis/java-shared-dependencies/commit/f00571cd1e9f1c4e011fba4a1e1674c1d8d60200)) - Update google.core.version to v2.8.9 ([#​784](https://togithub.com/googleapis/java-shared-dependencies/issues/784)) ([aa8e505](https://togithub.com/googleapis/java-shared-dependencies/commit/aa8e505dbb1214b2239e55d5ac83b00c167d77e4))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: Generated snippets should not be owned by samples reviewers (#1575) (#1389) Source-Link: https://github.com/googleapis/synthtool/commit/2e9ac19d5b8181af77cdc5337cf922517813cc49 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 (#1393) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.2` -> `3.0.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/compatibility-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/confidence-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.3`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​303-httpsgithubcomgoogleapisjava-shared-dependenciescomparev302v303-2022-09-14) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.2...v3.0.3) ##### Dependencies - Google-cloud-core 2.8.12 ([#​799](https://togithub.com/googleapis/java-shared-dependencies/issues/799)) ([1b3db8d](https://togithub.com/googleapis/java-shared-dependencies/commit/1b3db8d1e17c49ebae79fc96164fa9058e1df6e3)) - Moving gson to first-party-dependencies ([#​800](https://togithub.com/googleapis/java-shared-dependencies/issues/800)) ([a41fcc1](https://togithub.com/googleapis/java-shared-dependencies/commit/a41fcc11d32e02e5af2837561792e3919f6d4b3f)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.6 ([#​797](https://togithub.com/googleapis/java-shared-dependencies/issues/797)) ([bc5fdc9](https://togithub.com/googleapis/java-shared-dependencies/commit/bc5fdc9b3af7973c28f063a9ac156fe2af562814)) - Update gax.version to v2.19.1 ([#​798](https://togithub.com/googleapis/java-shared-dependencies/issues/798)) ([84e5487](https://togithub.com/googleapis/java-shared-dependencies/commit/84e5487b2e3dce4bb60badecebde788c3cb702b8)) - Update google.core.version to v2.8.11 ([#​793](https://togithub.com/googleapis/java-shared-dependencies/issues/793)) ([63c1297](https://togithub.com/googleapis/java-shared-dependencies/commit/63c129722aa0b821031ff5b4c11004adf7b12044))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 (#1387) * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 (#1386) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.2` -> `3.4.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/compatibility-slim/3.4.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.3/confidence-slim/3.4.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.3`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​343-httpsgithubcomgoogleapisjava-monitoringcomparev342v343-2022-09-09) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.2...v3.4.3) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#​922](https://togithub.com/googleapis/java-monitoring/issues/922)) ([447e9c1](https://togithub.com/googleapis/java-monitoring/commit/447e9c10d11934a732112af0ac20b3146396c5e1))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.4 (#1395) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.3` -> `3.4.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/compatibility-slim/3.4.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.4/confidence-slim/3.4.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.4`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​344-httpsgithubcomgoogleapisjava-monitoringcomparev343v344-2022-09-15) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.3...v3.4.4) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#​927](https://togithub.com/googleapis/java-monitoring/issues/927)) ([804aed6](https://togithub.com/googleapis/java-monitoring/commit/804aed6206156580c1de7174d73c606ed8dfd899))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API in **stable** proto to external customers (#1383) * chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions PiperOrigin-RevId: 472750037 Source-Link: https://github.com/googleapis/googleapis/commit/88f2ea3f53b9712f2e04f28f06210f6f77fa7e24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API in **stable** proto to external customers PiperOrigin-RevId: 474010093 Source-Link: https://github.com/googleapis/googleapis/commit/e210283d7f45232b923d200e90ef57d41d0b3580 Source-Link: https://github.com/googleapis/googleapis-gen/commit/46d5c58b647ea9c050a00c3b6825a3cf316f8948 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDZkNWM1OGI2NDdlYTljMDUwYTAwYzNiNjgyNWEzY2YzMTZmODk0OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add properties to table admin toString * fix * fix Co-authored-by: Owl Bot Co-authored-by: Kristen O'Leary * chore: move cloud monitoring bom to deps bom (#1388) * chore(main): release 2.12.0 (#1396) :robot: I have created a release *beep* *boop* --- ## [2.12.0](https://github.com/googleapis/java-bigtable/compare/v2.11.2...v2.12.0) (2022-09-15) ### Features * **generated:** Publish CBT deletion_protection field in Table, UpdateTableRequest, and UpdateTable API ([f1f3f05](https://github.com/googleapis/java-bigtable/commit/f1f3f05ae2dc84a8dc853eb5467fbd157b7293c3)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 ([#1386](https://github.com/googleapis/java-bigtable/issues/1386)) ([f460373](https://github.com/googleapis/java-bigtable/commit/f460373eb74776fae1787b74392b508643e6139f)) * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.3 ([#1387](https://github.com/googleapis/java-bigtable/issues/1387)) ([e339cb1](https://github.com/googleapis/java-bigtable/commit/e339cb186289fa53a0d65c3d77fb7edbae737882)) * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.4 ([#1395](https://github.com/googleapis/java-bigtable/issues/1395)) ([a2db183](https://github.com/googleapis/java-bigtable/commit/a2db183dea46cd83ea70bb89848e0579b9c61fac)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1384](https://github.com/googleapis/java-bigtable/issues/1384)) ([ee3b256](https://github.com/googleapis/java-bigtable/commit/ee3b256a62c2665e2c4230d9acfc14c3d5c2aebf)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1393](https://github.com/googleapis/java-bigtable/issues/1393)) ([df6c6c7](https://github.com/googleapis/java-bigtable/commit/df6c6c79715ecc7b99e026ce8dfa8645765fc9d5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.12.1-SNAPSHOT (#1397) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.12.0 (#1399) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.12.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.2 (#1403) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.5 (#1406) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.4` -> `3.4.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/compatibility-slim/3.4.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.5/confidence-slim/3.4.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-monitoring ### [`v3.4.5`](https://togithub.com/googleapis/java-monitoring/blob/HEAD/CHANGELOG.md#​345-httpsgithubcomgoogleapisjava-monitoringcomparev344v345-2022-09-20) [Compare Source](https://togithub.com/googleapis/java-monitoring/compare/v3.4.4...v3.4.5) ##### Dependencies - Update dependency com.google.protobuf:protobuf-java-util to v3.21.6 ([#​926](https://togithub.com/googleapis/java-monitoring/issues/926)) ([e61e14c](https://togithub.com/googleapis/java-monitoring/commit/e61e14c8657f2aa6545ec0c8a08c9b4eebe1ee58))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 (#1409) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.junit.vintage:junit-vintage-engine](https://junit.org/junit5/) ([source](https://togithub.com/junit-team/junit5)) | `5.9.0` -> `5.9.1` | [![age](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/compatibility-slim/5.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.junit.vintage:junit-vintage-engine/5.9.1/confidence-slim/5.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * feat: add gRPC RLS dependency (#1248) * feat: add gRPC RLS dependency * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 (#1412) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.13` -> `0.9.14` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/compatibility-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.14/confidence-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    graalvm/native-build-tools ### [`v0.9.14`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.14) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.13...0.9.14) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Fix how the GRAALVM_QUICK_BUILD env var is read by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/278](https://togithub.com/graalvm/native-build-tools/pull/278) - Make it possible to pass env vars to the builder process by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/280](https://togithub.com/graalvm/native-build-tools/pull/280) - Maven plugin fixes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/274](https://togithub.com/graalvm/native-build-tools/pull/274) - Add support for `test-jar` artifacts by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/281](https://togithub.com/graalvm/native-build-tools/pull/281) - Add Gradle CLI options for quick build and debugging by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/286](https://togithub.com/graalvm/native-build-tools/pull/286) - Add a changelog and docs about build -> compile-no-fork changes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/290](https://togithub.com/graalvm/native-build-tools/pull/290) - Do not filter out entry values starting with `java.` in the metadata post-processing action by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/289](https://togithub.com/graalvm/native-build-tools/pull/289) - Try to fix snapshot publishing by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/244](https://togithub.com/graalvm/native-build-tools/pull/244) - Fix javadoc and warnings by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/291](https://togithub.com/graalvm/native-build-tools/pull/291) - Bump the default metadata repository version to 0.1.2 by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/294](https://togithub.com/graalvm/native-build-tools/pull/294) - Fix metadata repository crash by [@​dnestoro](https://togithub.com/dnestoro) in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) - Add support for override flag by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://github.com/graalvm/native-build-tools/pull/296](https://togithub.com/graalvm/native-build-tools/pull/296) - Fix build time initialization error with JUnit 5.9.0 by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/308](https://togithub.com/graalvm/native-build-tools/pull/308) - Fix compatibility with configuration cache by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/304](https://togithub.com/graalvm/native-build-tools/pull/304) - Bump metadata repository version by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/310](https://togithub.com/graalvm/native-build-tools/pull/310) #### New Contributors - [@​dnestoro](https://togithub.com/dnestoro) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.13...0.9.14
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.14 (#1411) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:junit-platform-native](https://togithub.com/graalvm/native-build-tools) | `0.9.13` -> `0.9.14` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/compatibility-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:junit-platform-native/0.9.14/confidence-slim/0.9.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    graalvm/native-build-tools ### [`v0.9.14`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.14) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.13...0.9.14) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Fix how the GRAALVM_QUICK_BUILD env var is read by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/278](https://togithub.com/graalvm/native-build-tools/pull/278) - Make it possible to pass env vars to the builder process by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/280](https://togithub.com/graalvm/native-build-tools/pull/280) - Maven plugin fixes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/274](https://togithub.com/graalvm/native-build-tools/pull/274) - Add support for `test-jar` artifacts by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/281](https://togithub.com/graalvm/native-build-tools/pull/281) - Add Gradle CLI options for quick build and debugging by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/286](https://togithub.com/graalvm/native-build-tools/pull/286) - Add a changelog and docs about build -> compile-no-fork changes by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/290](https://togithub.com/graalvm/native-build-tools/pull/290) - Do not filter out entry values starting with `java.` in the metadata post-processing action by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/289](https://togithub.com/graalvm/native-build-tools/pull/289) - Try to fix snapshot publishing by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/244](https://togithub.com/graalvm/native-build-tools/pull/244) - Fix javadoc and warnings by [@​lazar-mitrovic](https://togithub.com/lazar-mitrovic) in [https://github.com/graalvm/native-build-tools/pull/291](https://togithub.com/graalvm/native-build-tools/pull/291) - Bump the default metadata repository version to 0.1.2 by [@​gradinac](https://togithub.com/gradinac) in [https://github.com/graalvm/native-build-tools/pull/294](https://togithub.com/graalvm/native-build-tools/pull/294) - Fix metadata repository crash by [@​dnestoro](https://togithub.com/dnestoro) in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) - Add support for override flag by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://github.com/graalvm/native-build-tools/pull/296](https://togithub.com/graalvm/native-build-tools/pull/296) - Fix build time initialization error with JUnit 5.9.0 by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/308](https://togithub.com/graalvm/native-build-tools/pull/308) - Fix compatibility with configuration cache by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/304](https://togithub.com/graalvm/native-build-tools/pull/304) - Bump metadata repository version by [@​melix](https://togithub.com/melix) in [https://github.com/graalvm/native-build-tools/pull/310](https://togithub.com/graalvm/native-build-tools/pull/310) #### New Contributors - [@​dnestoro](https://togithub.com/dnestoro) made their first contribution in [https://github.com/graalvm/native-build-tools/pull/295](https://togithub.com/graalvm/native-build-tools/pull/295) **Full Changelog**: https://github.com/graalvm/native-build-tools/compare/0.9.13...0.9.14
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: pin versions of dependencies for compatibility with Python 3.6 (#1588) (#1415) * chore: pin versions of dependencies for compatibility with Python 3.6 * fix path of requirements file in synthtool Source-Link: https://github.com/googleapis/synthtool/commit/69cdb47824170d0b02bf694649ce66613c889040 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 * fix: add a UUID in the task value (#1430) The jvmName when calling from cloud function will always be 1@localhost. Add a UUID in the default task value string so we won't have multiple tasks writing to the same stream. Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(main): release 2.13.0 (#1407) :robot: I have created a release *beep* *boop* --- ## [2.13.0](https://github.com/googleapis/java-bigtable/compare/v2.12.0...v2.13.0) (2022-09-27) ### Features * Add gRPC RLS dependency ([#1248](https://github.com/googleapis/java-bigtable/issues/1248)) ([e829b92](https://github.com/googleapis/java-bigtable/commit/e829b923d97a00dcb55a14b0877bec2c8cf5ece2)) ### Bug Fixes * Add a UUID in the task value ([#1430](https://github.com/googleapis/java-bigtable/issues/1430)) ([3bfc7bc](https://github.com/googleapis/java-bigtable/commit/3bfc7bc246488a37b4470e3a75ffdd34f6761804)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.5 ([#1406](https://github.com/googleapis/java-bigtable/issues/1406)) ([d906729](https://github.com/googleapis/java-bigtable/commit/d906729a4bb9a51907bf4879e8d063d5103565ac)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.14 ([#1411](https://github.com/googleapis/java-bigtable/issues/1411)) ([ef7d741](https://github.com/googleapis/java-bigtable/commit/ef7d7419293f9f046dcf941148a86da713feae17)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.14 ([#1412](https://github.com/googleapis/java-bigtable/issues/1412)) ([dcae319](https://github.com/googleapis/java-bigtable/commit/dcae3195871b78aa6e102c4bc570b18c303c7760)) * Update dependency org.junit.vintage:junit-vintage-engine to v5.9.1 ([#1409](https://github.com/googleapis/java-bigtable/issues/1409)) ([c1e195d](https://github.com/googleapis/java-bigtable/commit/c1e195d4e0470b30d97231c44b09fcb5c4881514)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * chore(main): release 2.13.1-SNAPSHOT (#1431) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). * feat: publish the RequestStats proto (#1400) * docs: Remove unnecessary comment PiperOrigin-RevId: 474807836 Source-Link: https://github.com/googleapis/googleapis/commit/dfd68f74ddecc6d83ec50db6a69f695de9e304c3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fe305e0252bc9a88466e1b96c2f2464dd729b978 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmUzMDVlMDI1MmJjOWE4ODQ2NmUxYjk2YzJmMjQ2NGRkNzI5Yjk3OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: publish the RequestStats proto PiperOrigin-RevId: 476399682 Source-Link: https://github.com/googleapis/googleapis/commit/0c4e682e302268332468f304d0411048e24c85db Source-Link: https://github.com/googleapis/googleapis-gen/commit/ff87f69aad1f2ff06772f917eecbea649797d9d5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmY4N2Y2OWFhZDFmMmZmMDY3NzJmOTE3ZWVjYmVhNjQ5Nzk3ZDlkNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add to clirr ignored differences Co-authored-by: Owl Bot Co-authored-by: Kristen O'Leary * chore: exclude requirements.txt file from renovate-bot (#1594) (#1416) Source-Link: https://github.com/googleapis/synthtool/commit/f58d3135a2fab20e225d98741dbc06d57459b816 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.13.0 (#1442) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.13.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 (#1446) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.3` -> `3.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/compatibility-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/confidence-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.4`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​304-httpsgithubcomgoogleapisjava-shared-dependenciescomparev303v304-2022-10-03) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.3...v3.0.4) ##### Dependencies - Update dependency cachetools to v5 ([#​816](https://togithub.com/googleapis/java-shared-dependencies/issues/816)) ([3f6c408](https://togithub.com/googleapis/java-shared-dependencies/commit/3f6c408210c931c286235f61c7aadea5bf5cfe4d)) - Update dependency certifi to v2022.9.24 ([#​818](https://togithub.com/googleapis/java-shared-dependencies/issues/818)) ([5f04b97](https://togithub.com/googleapis/java-shared-dependencies/commit/5f04b97c2343146600e8c9ee65afdeb58f5743a6)) - Update dependency charset-normalizer to v2.1.1 ([#​822](https://togithub.com/googleapis/java-shared-dependencies/issues/822)) ([6997c5a](https://togithub.com/googleapis/java-shared-dependencies/commit/6997c5acad937ebe3594330de73261a424d42cf3)) - Update dependency click to v8.1.3 ([#​823](https://togithub.com/googleapis/java-shared-dependencies/issues/823)) ([42bf9f8](https://togithub.com/googleapis/java-shared-dependencies/commit/42bf9f834fdafea60f2be7ccbf7d363e058cd7c2)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.7 ([#​837](https://togithub.com/googleapis/java-shared-dependencies/issues/837)) ([d31e507](https://togithub.com/googleapis/java-shared-dependencies/commit/d31e5077c7e036de5e238e9a611df7ced527574a)) - Update dependency gcp-releasetool to v1.8.8 ([#​819](https://togithub.com/googleapis/java-shared-dependencies/issues/819)) ([8245d97](https://togithub.com/googleapis/java-shared-dependencies/commit/8245d975fb12e81454ec7664f9a7c9809bbac697)) - Update dependency gcp-releasetool to v1.8.9 ([#​846](https://togithub.com/googleapis/java-shared-dependencies/issues/846)) ([04e3283](https://togithub.com/googleapis/java-shared-dependencies/commit/04e32831c6e87c372444901013a747d2d02ce38d)) - Update dependency google-api-core to v2.10.1 ([#​824](https://togithub.com/googleapis/java-shared-dependencies/issues/824)) ([818b9aa](https://togithub.com/googleapis/java-shared-dependencies/commit/818b9aa2ac99d8b1f9b39a74b626122aed5f1d94)) - Update dependency google-auth to v2.12.0 ([#​825](https://togithub.com/googleapis/java-shared-dependencies/issues/825)) ([07c544b](https://togithub.com/googleapis/java-shared-dependencies/commit/07c544b5e0fa9f7110bbc957570f7a405962072e)) - Update dependency google-cloud-core to v2.3.2 ([#​820](https://togithub.com/googleapis/java-shared-dependencies/issues/820)) ([2a219e8](https://togithub.com/googleapis/java-shared-dependencies/commit/2a219e86f187ba5ad72f2570bd58ca6100128c43)) - Update dependency google-cloud-storage to v2.5.0 ([#​826](https://togithub.com/googleapis/java-shared-dependencies/issues/826)) ([bb10d18](https://togithub.com/googleapis/java-shared-dependencies/commit/bb10d1858a515f09d365362ffa0110a5b362c96b)) - Update dependency google-crc32c to v1.5.0 ([#​827](https://togithub.com/googleapis/java-shared-dependencies/issues/827)) ([7e5dae6](https://togithub.com/googleapis/java-shared-dependencies/commit/7e5dae60d667cb84b9ee4f6c977bdc35e79e4cf6)) - Update dependency google-resumable-media to v2.4.0 ([#​838](https://togithub.com/googleapis/java-shared-dependencies/issues/838)) ([ad82d63](https://togithub.com/googleapis/java-shared-dependencies/commit/ad82d6378f64039da383509638fb4782908eb4bc)) - Update dependency googleapis-common-protos to v1.56.4 ([#​821](https://togithub.com/googleapis/java-shared-dependencies/issues/821)) ([93d7745](https://togithub.com/googleapis/java-shared-dependencies/commit/93d77458c9bbf84ec367cdb4caaa41e6f71675c6)) - Update dependency importlib-metadata to v4.12.0 ([#​832](https://togithub.com/googleapis/java-shared-dependencies/issues/832)) ([ee19fb1](https://togithub.com/googleapis/java-shared-dependencies/commit/ee19fb1ca5a2a2e1985297e3b72d44de68bc72e3)) - Update dependency importlib-metadata to v4.13.0 ([#​843](https://togithub.com/googleapis/java-shared-dependencies/issues/843)) ([d2ede60](https://togithub.com/googleapis/java-shared-dependencies/commit/d2ede601eee8c875780c7eb5924623537480c509)) - Update dependency importlib-metadata to v5 ([#​845](https://togithub.com/googleapis/java-shared-dependencies/issues/845)) ([03ac7e8](https://togithub.com/googleapis/java-shared-dependencies/commit/03ac7e800274c5f58d2bc4ddd0561bfcdea1bb27)) - Update dependency io.grpc:grpc-bom to v1.49.1 ([#​802](https://togithub.com/googleapis/java-shared-dependencies/issues/802)) ([b8c54bf](https://togithub.com/googleapis/java-shared-dependencies/commit/b8c54bf8f1ddecc788cee151f8afe42de45bdc9d)) - Update dependency io.grpc:grpc-bom to v1.49.2 ([#​842](https://togithub.com/googleapis/java-shared-dependencies/issues/842)) ([1b1cfa2](https://togithub.com/googleapis/java-shared-dependencies/commit/1b1cfa27d05f7732da12721305cf41dcbebda232)) - Update dependency jeepney to v0.8.0 ([#​833](https://togithub.com/googleapis/java-shared-dependencies/issues/833)) ([15d2f9f](https://togithub.com/googleapis/java-shared-dependencies/commit/15d2f9f52b5a3259db0813df3d2424e256ccb372)) - Update dependency jinja2 to v3.1.2 ([#​834](https://togithub.com/googleapis/java-shared-dependencies/issues/834)) ([c188f95](https://togithub.com/googleapis/java-shared-dependencies/commit/c188f95acdb3349f1c4b3ed56e5fffb75e8fbc8d)) - Update dependency keyring to v23.9.3 ([#​828](https://togithub.com/googleapis/java-shared-dependencies/issues/828)) ([b185aaa](https://togithub.com/googleapis/java-shared-dependencies/commit/b185aaae716d4d97cb64f0426cac0e778f11223d)) - Update dependency markupsafe to v2.1.1 ([#​829](https://togithub.com/googleapis/java-shared-dependencies/issues/829)) ([add2825](https://togithub.com/googleapis/java-shared-dependencies/commit/add2825bd34cd80f529dbe0dadb3c84219177916)) - Update dependency org.threeten:threetenbp to v1.6.2 ([#​808](https://togithub.com/googleapis/java-shared-dependencies/issues/808)) ([2d2eabd](https://togithub.com/googleapis/java-shared-dependencies/commit/2d2eabd14d8150207885ea47280c0f7ff3d2962f)) - Update dependency protobuf to v3.20.2 ([#​830](https://togithub.com/googleapis/java-shared-dependencies/issues/830)) ([5afa76f](https://togithub.com/googleapis/java-shared-dependencies/commit/5afa76f9ef4705aecba49abc7bb93982fb1ecf3e)) - Update dependency protobuf to v3.20.3 ([#​839](https://togithub.com/googleapis/java-shared-dependencies/issues/839)) ([d9fc7dd](https://togithub.com/googleapis/java-shared-dependencies/commit/d9fc7ddd3e663458e6ea3f78a3c6241377df0319)) - Update dependency protobuf to v4 ([#​817](https://togithub.com/googleapis/java-shared-dependencies/issues/817)) ([ee8d154](https://togithub.com/googleapis/java-shared-dependencies/commit/ee8d154287ccd256b4dcfa48f28f5ec61a91fe3e)) - Update dependency pyjwt to v2.5.0 ([#​812](https://togithub.com/googleapis/java-shared-dependencies/issues/812)) ([4d4528e](https://togithub.com/googleapis/java-shared-dependencies/commit/4d4528e8ce269d49b99d2dbc4fcda2dc37a058cb)) - Update dependency requests to v2.28.1 ([#​813](https://togithub.com/googleapis/java-shared-dependencies/issues/813)) ([a3a8d89](https://togithub.com/googleapis/java-shared-dependencies/commit/a3a8d89b0117007a7108553c70aa82dd289e1691)) - Update dependency typing-extensions to v4.3.0 ([#​814](https://togithub.com/googleapis/java-shared-dependencies/issues/814)) ([da875e5](https://togithub.com/googleapis/java-shared-dependencies/commit/da875e5e91fa9d8c177e6c3afc9e34242eb914b7)) - Update dependency zipp to v3.8.1 ([#​815](https://togithub.com/googleapis/java-shared-dependencies/issues/815)) ([15585fd](https://togithub.com/googleapis/java-shared-dependencies/commit/15585fd0216013fe93be011f93f391f6269aa777)) - Update gax.version to v2.19.2 ([#​847](https://togithub.com/googleapis/java-shared-dependencies/issues/847)) ([c4afe1f](https://togithub.com/googleapis/java-shared-dependencies/commit/c4afe1fdc88af29ab039cea618d52c15c90e43e9)) - Update google.common-protos.version to v2.9.3 ([#​803](https://togithub.com/googleapis/java-shared-dependencies/issues/803)) ([a3e8e5e](https://togithub.com/googleapis/java-shared-dependencies/commit/a3e8e5eb53a8da14abf3b8d81a4f34fbb2f3b8f9)) - Update google.common-protos.version to v2.9.5 ([#​831](https://togithub.com/googleapis/java-shared-dependencies/issues/831)) ([1c901db](https://togithub.com/googleapis/java-shared-dependencies/commit/1c901db8a7740afaec3e809e51d4d369fbf469c4)) - Update google.common-protos.version to v2.9.6 ([#​844](https://togithub.com/googleapis/java-shared-dependencies/issues/844)) ([9e156be](https://togithub.com/googleapis/java-shared-dependencies/commit/9e156be59bd89959f04252c3045b8cd7a8be8070)) - Update google.core.version to v2.8.13 ([#​804](https://togithub.com/googleapis/java-shared-dependencies/issues/804)) ([45ae571](https://togithub.com/googleapis/java-shared-dependencies/commit/45ae57142bd6d5334eedd46243736b200a459795)) - Update google.core.version to v2.8.14 ([#​805](https://togithub.com/googleapis/java-shared-dependencies/issues/805)) ([02c9397](https://togithub.com/googleapis/java-shared-dependencies/commit/02c9397a84bf3fcca8d04e4c9867cc47689abde2)) - Update google.core.version to v2.8.15 ([#​807](https://togithub.com/googleapis/java-shared-dependencies/issues/807)) ([980856c](https://togithub.com/googleapis/java-shared-dependencies/commit/980856c43981992a3d08f69eac83aeada752d244)) - Update google.core.version to v2.8.16 ([#​810](https://togithub.com/googleapis/java-shared-dependencies/issues/810)) ([c2b2c9a](https://togithub.com/googleapis/java-shared-dependencies/commit/c2b2c9a327fd588f69524bb93a17e5d4ae8f5a42)) - Update google.core.version to v2.8.17 ([#​835](https://togithub.com/googleapis/java-shared-dependencies/issues/835)) ([3def21d](https://togithub.com/googleapis/java-shared-dependencies/commit/3def21df2e4253e3df0da064b6c4e472df079d2b)) - Update google.core.version to v2.8.18 ([#​840](https://togithub.com/googleapis/java-shared-dependencies/issues/840)) ([46566dc](https://togithub.com/googleapis/java-shared-dependencies/commit/46566dc18c4b1ed41c482b4ce21b92651e2f9dc5)) - Update google.core.version to v2.8.19 ([#​841](https://togithub.com/googleapis/java-shared-dependencies/issues/841)) ([99afde9](https://togithub.com/googleapis/java-shared-dependencies/commit/99afde97ea498f549eb75cc58c4ed88edf81b20d)) - Update google.core.version to v2.8.20 ([#​848](https://togithub.com/googleapis/java-shared-dependencies/issues/848)) ([c980c4f](https://togithub.com/googleapis/java-shared-dependencies/commit/c980c4fdfc8890d812b4881ba5b87bfd21269a5f)) - Update iam.version to v1.6.1 ([#​806](https://togithub.com/googleapis/java-shared-dependencies/issues/806)) ([a50158d](https://togithub.com/googleapis/java-shared-dependencies/commit/a50158d3b83cf8e02d8ee08c94e512b5669a927b)) - Update iam.version to v1.6.2 ([#​849](https://togithub.com/googleapis/java-shared-dependencies/issues/849)) ([e43ac96](https://togithub.com/googleapis/java-shared-dependencies/commit/e43ac96bc189a096a9311c9b03e85c86bea07e99))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(bazel): update protobuf to v3.21.7 (#1445) * chore(bazel): update protobuf to v3.21.7 PiperOrigin-RevId: 477955264 Source-Link: https://github.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.14.0 (#1447) :robot: I have created a release *beep* *boop* --- ## [2.14.0](https://togithub.com/googleapis/java-bigtable/compare/v2.13.0...v2.14.0) (2022-10-03) ### Features * Publish the RequestStats proto ([#1400](https://togithub.com/googleapis/java-bigtable/issues/1400)) ([e989200](https://togithub.com/googleapis/java-bigtable/commit/e989200980510b14d602925df7430e01bc2f8db7)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#1446](https://togithub.com/googleapis/java-bigtable/issues/1446)) ([81034c5](https://togithub.com/googleapis/java-bigtable/commit/81034c51722d973cf5545feb33665b4e08265303)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.14.1-SNAPSHOT (#1448) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 (#1450) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/java-monitoring) | `3.4.5` -> `3.4.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/compatibility-slim/3.4.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.4.6/confidence-slim/3.4.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.14.1 (#1452) :robot: I have created a release *beep* *boop* --- ## [2.14.1](https://togithub.com/googleapis/java-bigtable/compare/v2.14.0...v2.14.1) (2022-10-05) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 ([#1450](https://togithub.com/googleapis/java-bigtable/issues/1450)) ([96b1e80](https://togithub.com/googleapis/java-bigtable/commit/96b1e80af5e17689a84318e9a797195cde3dab45)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.14.2-SNAPSHOT (#1453) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.14.1 (#1449) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.13.0` -> `2.14.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.14.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-bigtable ### [`v2.14.1`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2141-httpsgithubcomgoogleapisjava-bigtablecomparev2140v2141-2022-10-05) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.14.0...v2.14.1) ##### Dependencies - Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.4.6 ([#​1450](https://togithub.com/googleapis/java-bigtable/issues/1450)) ([96b1e80](https://togithub.com/googleapis/java-bigtable/commit/96b1e80af5e17689a84318e9a797195cde3dab45)) ### [`v2.14.0`](https://togithub.com/googleapis/java-bigtable/blob/HEAD/CHANGELOG.md#​2140-httpsgithubcomgoogleapisjava-bigtablecomparev2130v2140-2022-10-03) [Compare Source](https://togithub.com/googleapis/java-bigtable/compare/v2.13.0...v2.14.0) ##### Features - Publish the RequestStats proto ([#​1400](https://togithub.com/googleapis/java-bigtable/issues/1400)) ([e989200](https://togithub.com/googleapis/java-bigtable/commit/e989200980510b14d602925df7430e01bc2f8db7)) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#​1446](https://togithub.com/googleapis/java-bigtable/issues/1446)) ([81034c5](https://togithub.com/googleapis/java-bigtable/commit/81034c51722d973cf5545feb33665b4e08265303))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * samples: Add examples for making requests in a salted row key scenario (#1405) * docs: Add examples for making requests in a salted row key scenario * fix indentation * fix indentation * fix lint * add example for scans * lint: fix import order * Add java doc comment explaining salted keys * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * trigger builds * trigger builds * trigger builds Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.3 (#1456) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: catch all throwables so version mismatch won't hang the client (#1402) * fix: catch all throwables so version mismatch won't hang the client * create a SafeResponseObserver * format * extend SafeResponseObserver * catch stream cancellation * update error log * update * throw on onStart * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix version Co-authored-by: Owl Bot * feat: add apis for Mutation and RowMutationEntry (#1454) * feat: add apis for Mutation and RowMutationEntry * use iterable instead of iterator * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: [java] generation with shared deps 3.0.4 (#1641) (#1451) * chore: [java] generation with shared deps 3.0.4 (#1641) * chore: [java] generation with shared deps 3.0.4 * fix for tests Source-Link: https://github.com/googleapis/synthtool/commit/c3ad3cc9d876a3dd897cc511cf5ef921784851ae Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:5643a4e1b729803e67ddceee450e87052527b37cac394bf900b4f8e3d1bb3e9b * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 (#1463) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 (#1462) * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.5.0 (#1464) * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.4 (#1469) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 (#1467) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 (#1470) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.4` -> `3.0.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/compatibility-slim/3.0.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.5/confidence-slim/3.0.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    googleapis/java-shared-dependencies ### [`v3.0.5`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​305-httpsgithubcomgoogleapisjava-shared-dependenciescomparev304v305-2022-10-20) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.4...v3.0.5) ##### Dependencies - Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4.20221013 ([#​868](https://togithub.com/googleapis/java-shared-dependencies/issues/868)) ([ffa7272](https://togithub.com/googleapis/java-shared-dependencies/commit/ffa7272e6d4775905e64173b3617555ee355019d)) - Update dependency com.google.auth:google-auth-library-bom to v1.12.0 ([#​870](https://togithub.com/googleapis/java-shared-dependencies/issues/870)) ([6e76f19](https://togithub.com/googleapis/java-shared-dependencies/commit/6e76f19133515b755b78185ce0135943e878a368)) - Update dependency com.google.auth:google-auth-library-bom to v1.12.1 ([#​871](https://togithub.com/googleapis/java-shared-dependencies/issues/871)) ([f7f5dc2](https://togithub.com/googleapis/java-shared-dependencies/commit/f7f5dc26dd54f33954bdf5d43314020de58e055b)) - Update dependency com.google.cloud:grpc-gcp to v1.3.0 ([#​867](https://togithub.com/googleapis/java-shared-dependencies/issues/867)) ([1927a92](https://togithub.com/googleapis/java-shared-dependencies/commit/1927a926c615eabbf0e7377c65232e0e5268220e)) - Update dependency com.google.errorprone:error_prone_annotations to v2.16 ([#​865](https://togithub.com/googleapis/java-shared-dependencies/issues/865)) ([b1734ec](https://togithub.com/googleapis/java-shared-dependencies/commit/b1734ec1c20e7bdf2582b31fde4648aa9f8de2fe)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.8 ([#​872](https://togithub.com/googleapis/java-shared-dependencies/issues/872)) ([1c303f2](https://togithub.com/googleapis/java-shared-dependencies/commit/1c303f2aa5145da4c93605a2d1088e8a3884de81)) - Update dependency gcp-releasetool to v1.8.10 ([#​853](https://togithub.com/googleapis/java-shared-dependencies/issues/853)) ([c815a59](https://togithub.com/googleapis/java-shared-dependencies/commit/c815a5996d28676de015d5dd41e2b0405f4bb9dc)) - Update dependency google-api-core to v2.10.2 ([#​858](https://togithub.com/googleapis/java-shared-dependencies/issues/858)) ([387a156](https://togithub.com/googleapis/java-shared-dependencies/commit/387a15662db0b20e72fe5bf961c02eb2bc4e75d9)) - Update dependency io.grpc:grpc-bom to v1.50.0 ([#​866](https://togithub.com/googleapis/java-shared-dependencies/issues/866)) ([3d3d443](https://togithub.com/googleapis/java-shared-dependencies/commit/3d3d4434636e605f47082641e8e495bbce8f9515)) - Update dependency io.grpc:grpc-bom to v1.50.1 ([#​873](https://togithub.com/googleapis/java-shared-dependencies/issues/873)) ([956309d](https://togithub.com/googleapis/java-shared-dependencies/commit/956309d76c9de46885711a77afbfce0d28971096)) - Update dependency org.checkerframework:checker-qual to v3.26.0 ([#​852](https://togithub.com/googleapis/java-shared-dependencies/issues/852)) ([6926b33](https://togithub.com/googleapis/java-shared-dependencies/commit/6926b33b83d1aa63e0c78b7b8c72cd1d80e28ef3)) - Update dependency org.threeten:threetenbp to v1.6.3 ([#​869](https://togithub.com/googleapis/java-shared-dependencies/issues/869)) ([fa4999b](https://togithub.com/googleapis/java-shared-dependencies/commit/fa4999b6310940e62456e83dad3ec76a7406a218)) - Update dependency typing-extensions to v4.4.0 ([#​854](https://togithub.com/googleapis/java-shared-dependencies/issues/854)) ([43bd31b](https://togithub.com/googleapis/java-shared-dependencies/commit/43bd31b66eef50d82ecf8a692053f10eb385d5c1)) - Update dependency zipp to v3.9.0 ([#​859](https://togithub.com/googleapis/java-shared-dependencies/issues/859)) ([a070ad0](https://togithub.com/googleapis/java-shared-dependencies/commit/a070ad04ef1bab5690487ba13dd4060827851edf)) - Update gax.version to v2.19.4 ([#​875](https://togithub.com/googleapis/java-shared-dependencies/issues/875)) ([227bdd8](https://togithub.com/googleapis/java-shared-dependencies/commit/227bdd86f368b89309814c615828544c29871a5d)) - Update google.core.version to v2.8.21 ([#​861](https://togithub.com/googleapis/java-shared-dependencies/issues/861)) ([8b502bd](https://togithub.com/googleapis/java-shared-dependencies/commit/8b502bd43760a2e52cf107567011d9c5132e74bd)) - Update google.core.version to v2.8.22 ([#​879](https://togithub.com/googleapis/java-shared-dependencies/issues/879)) ([0360e93](https://togithub.com/googleapis/java-shared-dependencies/commit/0360e931dc45034d3c3c554f2c29ad7ea4a0a9bb)) - Update iam.version to v1.6.3 ([#​857](https://togithub.com/googleapis/java-shared-dependencies/issues/857)) ([b39e683](https://togithub.com/googleapis/java-shared-dependencies/commit/b39e6838c3f3f6ef2b350efe8aec1b622893421a)) - Update iam.version to v1.6.4 ([#​862](https://togithub.com/googleapis/java-shared-dependencies/issues/862)) ([85c9794](https://togithub.com/googleapis/java-shared-dependencies/commit/85c979401c34454b2d5681eed9d8b3b3679413be))
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency org.mockito:mockito-core to v4.8.1 (#1471) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.8.0` -> `4.8.1` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/compatibility-slim/4.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.8.1/confidence-slim/4.8.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    mockito/mockito ### [`v4.8.1`](https://togithub.com/mockito/mockito/releases/tag/v4.8.1) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.8.0...v4.8.1) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.8.1 - 2022-10-17 - [6 commit(s)](https://togithub.com/mockito/mockito/compare/v4.8.0...v4.8.1) by andrepaschoal, dependabot\[bot] - Possible fix [#​2765](https://togithub.com/mockito/mockito/issues/2765): Add task to download package-list file from java as element-list [(#​2766)](https://togithub.com/mockito/mockito/pull/2766) - JavaDoc warning is blocking all pull requests [(#​2765)](https://togithub.com/mockito/mockito/issues/2765) - Bump versions.junitJupiter from 5.9.0 to 5.9.1 [(#​2758)](https://togithub.com/mockito/mockito/pull/2758) - Bump groovy from 3.0.12 to 3.0.13 [(#​2756)](https://togithub.com/mockito/mockito/pull/2756) - Bump com.diffplug.spotless from 6.10.0 to 6.11.0 [(#​2753)](https://togithub.com/mockito/mockito/pull/2753) - Bump org.eclipse.osgi from 3.18.0 to 3.18.100 [(#​2751)](https://togithub.com/mockito/mockito/pull/2751) - Bump versions.bytebuddy from 1.12.14 to 1.12.16 [(#​2747)](https://togithub.com/mockito/mockito/pull/2747)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore: pin versions of certifi and google-resumable-media (#1660) (#1466) chore: pin versions of certifi and google-resumable-media Source-Link: https://togithub.com/googleapis/synthtool/commit/09c4fcd0c6a0a880cf73662e118a8e8019da947c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8 * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 (#1468) * chore: Fix typo in PartialListClustersException and PartialListInstancesException message (#1473) * Fix typo in PartialListClustersException message * Update PartialListInstancesException.java * Update PartialListClustersException.java * chore: [java] remove flatten plugin dependency check (#1663) (#1474) chore: remove check for flatten plugin We have had the check for the flatten-maven-plugin in each Cloud Java client repository. However, the behavior of the plugin has been stable and its not each repository's responsibility to assert the plugin's behavior. A new check is going to be added at the googleapis/java-shared-config repository to assert the plugin's behavior when we upgrade its version. Source-Link: https://github.com/googleapis/synthtool/commit/9266ddc3b17fc15f34d2fb88ce8c5f1a4bfe64b0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.6.0 (#1476) * fix: fix attempt status tag for metrics (#1477) * fix: set a longer timeout to wait for callbacks to be executed (#1478) * fix: set a longer timeout to wait for callbacks to be executed * fix format * chore: Adding unavailableZones to PartialList*Exception message (#1475) * chore: Adding unavailableZones to PartialList*Exception message * Update PartialListInstancesException.java * fix: rename metric names to match the external name (#1479) * chore(main): release 2.15.0 (#1457) :robot: I have created a release *beep* *boop* --- ## [2.15.0](https://togithub.com/googleapis/java-bigtable/compare/v2.14.1...v2.15.0) (2022-10-26) ### Features * Add apis for Mutation and RowMutationEntry ([#1454](https://togithub.com/googleapis/java-bigtable/issues/1454)) ([a86934f](https://togithub.com/googleapis/java-bigtable/commit/a86934f4f70e1998e7368688df8695a4bac7006e)) ### Bug Fixes * Catch all throwables so version mismatch won't hang the client ([#1402](https://togithub.com/googleapis/java-bigtable/issues/1402)) ([c03b8a4](https://togithub.com/googleapis/java-bigtable/commit/c03b8a4245beab7258b8ed8ec76153e6a0275211)) * Fix attempt status tag for metrics ([#1477](https://togithub.com/googleapis/java-bigtable/issues/1477)) ([e54cf7d](https://togithub.com/googleapis/java-bigtable/commit/e54cf7d61128049cea2817b409a8524636b4a6cf)) * Rename metric names to match the external name ([#1479](https://togithub.com/googleapis/java-bigtable/issues/1479)) ([28ca7c3](https://togithub.com/googleapis/java-bigtable/commit/28ca7c310d9a157529555ab6865f89802161443b)) * Set a longer timeout to wait for callbacks to be executed ([#1478](https://togithub.com/googleapis/java-bigtable/issues/1478)) ([0d9ff6a](https://togithub.com/googleapis/java-bigtable/commit/0d9ff6ab3bd5bf853f1d371312036b14c924ae5e)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.5.0 ([#1464](https://togithub.com/googleapis/java-bigtable/issues/1464)) ([d8e58a5](https://togithub.com/googleapis/java-bigtable/commit/d8e58a5d88de7ea249d7bc141f1ac65592088da6)) * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.6.0 ([#1476](https://togithub.com/googleapis/java-bigtable/issues/1476)) ([331dcfb](https://togithub.com/googleapis/java-bigtable/commit/331dcfbd06ab578cfe9673ca70cab1f6abd5ddcd)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.5 ([#1470](https://togithub.com/googleapis/java-bigtable/issues/1470)) ([557a4fb](https://togithub.com/googleapis/java-bigtable/commit/557a4fbed77157c3ccfc3e84a0c952b647844f9b)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.15 ([#1462](https://togithub.com/googleapis/java-bigtable/issues/1462)) ([69540cb](https://togithub.com/googleapis/java-bigtable/commit/69540cb2df25d5fb716e81e7513930b01c310b72)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.16 ([#1467](https://togithub.com/googleapis/java-bigtable/issues/1467)) ([53599ca](https://togithub.com/googleapis/java-bigtable/commit/53599caa0f92bad1365adbc4b58a1dcb1e8a393e)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.15 ([#1463](https://togithub.com/googleapis/java-bigtable/issues/1463)) ([a6612f9](https://togithub.com/googleapis/java-bigtable/commit/a6612f90cd4a0ec9589ca797ff3a42d23478a6e6)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.16 ([#1468](https://togithub.com/googleapis/java-bigtable/issues/1468)) ([fe0ddb1](https://togithub.com/googleapis/java-bigtable/commit/fe0ddb1b183cfdf368c2387a645a613bbfd52a69)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.15.1-SNAPSHOT (#1481) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.15.0 (#1483) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.15.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency protobuf to v3.20.2 (#1659) (#1485) Co-authored-by: Jeffrey Rennie Co-authored-by: Tomo Suzuki Source-Link: https://togithub.com/googleapis/synthtool/commit/b59cf7b5a91ecab29e21fdfbb7e3b81066229be4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:894d56f45fc3f4f0d5f3bcf790846419ee2d8e44715eae8917d6a1bba2b7283d * Revert "chore(deps): update dependency protobuf to v3.20.2" (#1674) (#1486) Revert "chore(deps): update dependency protobuf to v3.20.2 (#1659)" This reverts commit b59cf7b5a91ecab29e21fdfbb7e3b81066229be4. Source-Link: https://github.com/googleapis/synthtool/commit/a66e34625d760ad299627f6613a1bd438c1b62a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:bd316b9a591c45264775ecaba72e37d65905925c323b68e51a08c4126e4b6d0a Co-authored-by: Owl Bot * chore: add internal api for row merging (#1465) This is a feature for an internal google integration Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * fix: only record retry count when it's > 0 (#1488) * fix: only record retry count when it's > 0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 (#1487) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: Fix the cloud bigtable link in readme (#1492) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.17 (#1495) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.17 (#1496) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.graalvm.buildtools:native-maven-plugin](https://togithub.com/graalvm/native-build-tools) | `0.9.16` -> `0.9.17` | [![age](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/compatibility-slim/0.9.16)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.graalvm.buildtools:native-maven-plugin/0.9.17/confidence-slim/0.9.16)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    graalvm/native-build-tools ### [`v0.9.17`](https://togithub.com/graalvm/native-build-tools/releases/tag/0.9.17) [Compare Source](https://togithub.com/graalvm/native-build-tools/compare/0.9.16...0.9.17) #### What's Changed Read what's new in the [documentation](https://graalvm.github.io/native-build-tools/latest/index.html#changelog). - Make GraalVM installation check lazy by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://togithub.com/graalvm/native-build-tools/pull/345](https://togithub.com/graalvm/native-build-tools/pull/345) - Add a check for the minimal GraalVM version by [@​sdeleuze](https://togithub.com/sdeleuze) in [https://togithub.com/graalvm/native-build-tools/pull/353](https://togithub.com/graalvm/native-build-tools/pull/353) - Bump metadata repo version to 0.2.4 by [@​dnestoro](https://togithub.com/dnestoro) in [https://togithub.com/graalvm/native-build-tools/pull/356](https://togithub.com/graalvm/native-build-tools/pull/356) **Full Changelog**: https://togithub.com/graalvm/native-build-tools/compare/0.9.16...0.9.17
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: fix the connectivity error count caculation (#1401) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * test: add a test for fix #1477 and few other tests to increase coverage (#1499) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore(java): update dependencies in java requirements file (#1695) (#1500) * chore(java): update gcp-releasetool and cryptography in java requirements file Source-Link: https://togithub.com/googleapis/synthtool/commit/74d0956884c1bb9dc901b52de35ca2bca025a74e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:142286d973c7b6d58186070f203b50058a20a7d7b42147996db24921a18da1b0 * fix: call record attempt compeletion on permanent failures (#1502) * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.6 (#1501) * chore(main): release 2.15.1 (#1490) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * fix: fix metric client settings (#1509) * fix: fix metric client settings * fix format * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: update google-auth to 2.14.1 (#1703) (#1507) Co-authored-by: Anthonios Partheniou Source-Link: https://github.com/googleapis/synthtool/commit/9457e69470097f8e71b6b497ceece5bc423eaf3a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:a3fe0b4c75f322520f548e535ed329df1e475ace3cb4a979b78e003cb822636a Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou * feat: remove proto ReadEfficiencyStats (#1455) * feat: remove proto ReadEfficiencyStats feat: remove field RequestStats.read_efficiency_stats feat: rename proto AllReadStats to FullReadStatsView feat: rename field RequestStats.all_read_stats to full_read_stats_view feat: rename proto ReadIteratorStats to ReadIterationStats feat: remove enum value ReadRowsRequest.RequestStatsView.REQUEST_STATS_EFFICIENCY feat: remove field ReadIterationStats.deletes_seen PiperOrigin-RevId: 479370243 Source-Link: https://github.com/googleapis/googleapis/commit/959d789bef1cb2a7706c474f8db36a04dc0724de Source-Link: https://github.com/googleapis/googleapis-gen/commit/38b425264c03f3cdca279503c801c86604c8a67a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzhiNDI1MjY0YzAzZjNjZGNhMjc5NTAzYzgwMWM4NjYwNGM4YTY3YSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update clirr ignored differences * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add note Co-authored-by: Owl Bot Co-authored-by: Kristen O'Leary Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> * chore: use gcp-docuploader 0.6.3 (#1708) (#1511) Source-Link: https://github.com/googleapis/synthtool/commit/fbc8bfe364d70c38fbffbf68ebe1cfdae54d3447 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:e76136cc48f90aa19ba29cdfbd4002111467e44a1c9d905867d98dafafbd03bb Co-authored-by: Owl Bot * chore(main): release 2.15.2-SNAPSHOT (#1506) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(main): release 2.16.0 (#1512) :robot: I have created a release *beep* *boop* --- ## [2.16.0](https://togithub.com/googleapis/java-bigtable/compare/v2.15.1...v2.16.0) (2022-11-11) ### Features * Remove proto ReadEfficiencyStats ([#1455](https://togithub.com/googleapis/java-bigtable/issues/1455)) ([f6b243d](https://togithub.com/googleapis/java-bigtable/commit/f6b243db39c0370f0d9a4e47e553cfe62493b240)) ### Bug Fixes * Fix metric client settings ([#1509](https://togithub.com/googleapis/java-bigtable/issues/1509)) ([38ac115](https://togithub.com/googleapis/java-bigtable/commit/38ac115af07432e9c178064b59729a0b358105cd)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.16.1-SNAPSHOT (#1513) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.16.0 (#1508) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.16.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * feat: next release from main branch is 2.17.0 (#1514) * test(deps): update dependency org.mockito:mockito-core to v4.9.0 (#1517) * feat: add test proxy to java-bigtable client (#1498) * feat: add test proxy to java-bigtable client * udpate * update * remove shading plugin * make client version a variable * add a read me * rebase and update version * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * nit Co-authored-by: Owl Bot * deps: update dependency kr.motd.maven:os-maven-plugin to v1.7.1 (#1518) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.5 (#1521) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.5 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * build(deps): update dependency org.apache.maven.shared:maven-dependency-tree to v3.2.1 (#1523) * chore: update readme to build the root directory first (#1526) * test(deps): update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.18 (#1528) * test(deps): update dependency org.graalvm.buildtools:junit-platform-native to v0.9.18 (#1527) * test(fix): update the test proxy to set app profile id and connect to emulator correctly (#1529) This change makes the test proxy work with the hermetic testing that exercises app_profile_id and emulator (https://togithub.com/googleapis/cloud-bigtable-clients-test) * deps: update dependency com.google.cloud:google-cloud-monitoring-bom … (#1531) …to v3.7.0 (Port #1519) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * feat: add a query paginator (#1530) * feat: add a query paginator * add some comments * add a test for full table scan * fix format * address comments * update * fix test * fix nit * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore: update native image checks to use graalvm-22.3.0 (#1534) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.5 (#1535) * build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.4.0 (#1533) * deps: update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 (#1538) * deps: update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 (#1537) * feat: implement cross-project table restore (#1536) * feat: implement cross-project table restore * move test case around. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Tracy Cui Co-authored-by: Owl Bot * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 (#1539) * chore(main): release 2.17.0 (#1516) :robot: I have created a release *beep* *boop* --- ## [2.17.0](https://togithub.com/googleapis/java-bigtable/compare/v2.16.0...v2.17.0) (2022-12-07) ### Features * Add a query paginator ([#1530](https://togithub.com/googleapis/java-bigtable/issues/1530)) ([5c8e1f6](https://togithub.com/googleapis/java-bigtable/commit/5c8e1f656b15177ecef4709b9e502cef58cca479)) * Add test proxy to java-bigtable client ([#1498](https://togithub.com/googleapis/java-bigtable/issues/1498)) ([132b4e4](https://togithub.com/googleapis/java-bigtable/commit/132b4e4fe340ca316de8eef2e2133b6dabd9dec3)) * Implement cross-project table restore ([#1536](https://togithub.com/googleapis/java-bigtable/issues/1536)) ([335977c](https://togithub.com/googleapis/java-bigtable/commit/335977c499b1776c8fa861d13195ffc49e468e0a)) * Next release from main branch is 2.17.0 ([#1514](https://togithub.com/googleapis/java-bigtable/issues/1514)) ([4fc6a93](https://togithub.com/googleapis/java-bigtable/commit/4fc6a93a25362df7bc107d48f94e1c00b6bd608d)) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom … ([#1531](https://togithub.com/googleapis/java-bigtable/issues/1531)) ([ee98338](https://togithub.com/googleapis/java-bigtable/commit/ee9833835a84cee202b142950b28704db682ac0c)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0 ([#1539](https://togithub.com/googleapis/java-bigtable/issues/1539)) ([3244cef](https://togithub.com/googleapis/java-bigtable/commit/3244cefd4d77a44bab6ccaa8f5c03e3d31575625)) * Update dependency kr.motd.maven:os-maven-plugin to v1.7.1 ([#1518](https://togithub.com/googleapis/java-bigtable/issues/1518)) ([8309681](https://togithub.com/googleapis/java-bigtable/commit/830968109a3754a12bd0bc92674fe42ae529b924)) * Update dependency org.graalvm.buildtools:junit-platform-native to v0.9.19 ([#1537](https://togithub.com/googleapis/java-bigtable/issues/1537)) ([7f7c478](https://togithub.com/googleapis/java-bigtable/commit/7f7c478a2163c46d10ed39ea3c1b046f971d4569)) * Update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.19 ([#1538](https://togithub.com/googleapis/java-bigtable/issues/1538)) ([9d3df57](https://togithub.com/googleapis/java-bigtable/commit/9d3df57d7bfeafd9cbcf56ecd58b52cc1b14ba7b)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(main): release 2.17.1-SNAPSHOT (#1540) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.17.0 (#1541) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-bigtable](https://togithub.com/googleapis/java-bigtable) | `2.16.0` -> `2.17.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/compatibility-slim/2.16.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigtable/2.17.0/confidence-slim/2.16.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * build(deps): bump certifi from 2022.9.24 to 2022.12.7 in /synthtool/gcp/templates/java_library/.kokoro (#1732) (#1547) build(deps): bump certifi Bumps [certifi](https://togithub.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7. - [Release notes](https://togithub.com/certifi/python-certifi/releases) - [Commits](https://togithub.com/certifi/python-certifi/compare/2022.09.24...2022.12.07) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeff Ching Source-Link: https://togithub.com/googleapis/synthtool/commit/ae0d43e5f17972981fe501ecf5a5d20055128bea Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:9de537d592b60e5eac73b374a28263969bae91ecdb29b445e894576fbf54851c * test(fix): update the test proxy's pom file to build a shaded jar, also correct the README about building an old version (#1546) * test(fix): update the test proxy's pom file to build a shaded jar, also correct the README about building an old version * test(fix): revert the previous commit b6b9eb623d8505ce68ef879f6e4ac0d21e8eabcc * test(fix): address the review comment about README * deps: update dependency com.google.cloud:google-cloud-monitoring-bom to v3.8.0 (#1548) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-monitoring-bom](https://togithub.com/googleapis/google-cloud-java) | `3.7.0` -> `3.8.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.8.0/compatibility-slim/3.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-monitoring-bom/3.8.0/confidence-slim/3.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * chore(main): release 2.17.1 (#1549) :robot: I have created a release *beep* *boop* --- ## [2.17.1](https://togithub.com/googleapis/java-bigtable/compare/v2.17.0...v2.17.1) (2022-12-13) ### Dependencies * Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.8.0 ([#1548](https://togithub.com/googleapis/java-bigtable/issues/1548)) ([48f136d](https://togithub.com/googleapis/java-bigtable/commit/48f136dc1422d601d5470a33763e37514cf620de)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.17.1 (#1551) * chore(deps): update dependency com.google.cloud:google-cloud-bigtable to v2.17.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(main): release 2.17.2-SNAPSHOT (#1550) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). * chore(doc): fix documentation on cloud.google.com to not show internal classes (#1554) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * feat: enable channel priming by default (#1555) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * chore: update readme on client side metrics (#1557) * chore: update readme on client side metrics * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix link * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot * chore(deps): update dependency com.google.cloud:libraries-bom to v26.2.0 (#1558) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.5` -> `26.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.2.0/compatibility-slim/26.1.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.2.0/confidence-slim/26.1.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(deps): update dependency org.mockito:mockito-core to v4.10.0 (#1556) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.mockito:mockito-core](https://togithub.com/mockito/mockito) | `4.9.0` -> `4.10.0` | [![age](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.10.0/compatibility-slim/4.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.mockito:mockito-core/4.10.0/confidence-slim/4.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
    mockito/mockito ### [`v4.10.0`](https://togithub.com/mockito/mockito/releases/tag/v4.10.0) [Compare Source](https://togithub.com/mockito/mockito/compare/v4.9.0...v4.10.0) *Changelog generated by [Shipkit Changelog Gradle Plugin](https://togithub.com/shipkit/shipkit-changelog)* ##### 4.10.0 - 2022-12-14 - [13 commit(s)](https://togithub.com/mockito/mockito/compare/v4.9.0...v4.10.0) by Andrei Solntsev, Andriy Redko, Andy Coates, Christopher Lambert, Marcono1234, Vladimir Glinskikh, dependabot\[bot] - Add new artifact mockito-subclass (to use mock-maker-subclass MockMaker) [(#​2821)](https://togithub.com/mockito/mockito/pull/2821) - Bump gradle from 7.5.1 to 7.6 [(#​2817)](https://togithub.com/mockito/mockito/pull/2817) - Fix incorrect Javadoc inline tag for MockitoJUnitRunner [(#​2816)](https://togithub.com/mockito/mockito/pull/2816) - Bump shipkit-auto-version from 1.2.1 to 1.2.2 [(#​2811)](https://togithub.com/mockito/mockito/pull/2811) - Bump com.github.ben-manes.versions from 0.42.0 to 0.44.0 [(#​2810)](https://togithub.com/mockito/mockito/pull/2810) - Bump kotlinVersion from 1.7.21 to 1.7.22 [(#​2809)](https://togithub.com/mockito/mockito/pull/2809) - Bump junit from 1.1.3 to 1.1.4 [(#​2806)](https://togithub.com/mockito/mockito/pull/2806) - Simplify `MatcherApplicationStrategy` [(#​2803)](https://togithub.com/mockito/mockito/pull/2803) - Bump kotlinVersion from 1.7.10 to 1.7.21 [(#​2801)](https://togithub.com/mockito/mockito/pull/2801) - Bump espresso-core from 3.4.0 to 3.5.0 [(#​2800)](https://togithub.com/mockito/mockito/pull/2800) - Bump versions.bytebuddy from 1.12.16 to 1.12.19 [(#​2799)](https://togithub.com/mockito/mockito/pull/2799) - Upgrade errorprone from 2.14.0 to 2.16 [(#​2794)](https://togithub.com/mockito/mockito/pull/2794) - automatically detect class to mock [(#​2779)](https://togithub.com/mockito/mockito/pull/2779)
    --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * test(fix): update the test proxy's import paths to work with the shaded jar (#1561) * fix: Call attemptStarted method with the request (#1562) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). * test(deps): update dependency org.mockito:mockito-core to v4.11.0 (#1563) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.3.0 (#1565) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.2.0` -> `26.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.3.0/compatibility-slim/26.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.3.0/confidence-slim/26.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * fix: Fix the setRefreshingChannel related errors Signed-off-by: dependabot[bot] Co-authored-by: WhiteSource Renovate Co-authored-by: Owl Bot Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Mattie Fu Co-authored-by: Mridula <66699525+mpeddada1@users.noreply.github.com> Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Blake Li Co-authored-by: Tomo Suzuki Co-authored-by: Kristen O'Leary Co-authored-by: Mohan Li <67390330+mohanli-ml@users.noreply.github.com> Co-authored-by: Billy Jacobson Co-authored-by: shantstepanian <17996546+shantstepanian@users.noreply.github.com> Co-authored-by: Jeffrey Rennie Co-authored-by: Igor Bernstein Co-authored-by: Anthonios Partheniou Co-authored-by: Prashant Mishra <11733935+prash-mi@users.noreply.github.com> Co-authored-by: J. Liu Co-authored-by: TracyCuiCan Co-authored-by: Tracy Cui Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jeff Ching Co-authored-by: Teng Zhong --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/requirements.in | 2 +- .kokoro/requirements.txt | 6 +-- .readme-partials.yml | 22 ++++++----- CHANGELOG.md | 7 ++++ README.md | 26 +++++++------ google-cloud-bigtable-bom/pom.xml | 18 ++++----- google-cloud-bigtable-deps-bom/pom.xml | 4 +- google-cloud-bigtable-emulator-core/pom.xml | 4 +- google-cloud-bigtable-emulator/pom.xml | 10 ++--- google-cloud-bigtable-stats/pom.xml | 6 +-- google-cloud-bigtable/pom.xml | 10 ++--- .../com/google/cloud/bigtable/Version.java | 2 +- .../data/v2/BigtableDataSettings.java | 30 ++++++++++----- .../data/v2/stub/BigtableChannelPrimer.java | 2 + .../v2/stub/EnhancedBigtableStubSettings.java | 24 ++++++++---- .../mutaterows/MutateRowsAttemptCallable.java | 3 +- .../data/v2/BigtableDataSettingsTest.java | 3 ++ .../stub/EnhancedBigtableStubCloseTest.java | 1 - .../EnhancedBigtableStubSettingsTest.java | 37 ++++++++++++------- .../v2/stub/EnhancedBigtableStubTest.java | 6 ++- .../bigtable/data/v2/stub/HeadersTest.java | 1 + .../ReadChangeStreamRetryTest.java | 2 +- .../stub/mutaterows/MutateRowsRetryTest.java | 2 + .../v2/stub/readrows/ReadRowsRetryTest.java | 2 + .../bigtable/test_helpers/env/CloudEnv.java | 5 ++- .../test_helpers/env/EmulatorEnv.java | 1 + grpc-google-cloud-bigtable-admin-v2/pom.xml | 8 ++-- grpc-google-cloud-bigtable-v2/pom.xml | 8 ++-- pom.xml | 27 ++++++++++---- proto-google-cloud-bigtable-admin-v2/pom.xml | 8 ++-- proto-google-cloud-bigtable-v2/pom.xml | 8 ++-- samples/install-without-bom/pom.xml | 2 +- samples/native-image-sample/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- test-proxy/README.md | 24 ++++++------ test-proxy/pom.xml | 36 +++++++++++++++++- .../bigtable/testproxy/CbtTestProxy.java | 6 +-- versions.txt | 14 +++---- 40 files changed, 244 insertions(+), 141 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0f0647b00e..288e394897 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:e76136cc48f90aa19ba29cdfbd4002111467e44a1c9d905867d98dafafbd03bb + digest: sha256:9de537d592b60e5eac73b374a28263969bae91ecdb29b445e894576fbf54851c diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index 924f94ae6f..a5010f77d4 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -17,7 +17,7 @@ pycparser==2.21 pyperclip==1.8.2 python-dateutil==2.8.2 requests==2.27.1 -certifi==2022.9.24 +certifi==2022.12.7 importlib-metadata==4.8.3 zipp==3.6.0 google_api_core==2.8.2 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 71fcafc703..15c404aa5a 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -16,9 +16,9 @@ cachetools==4.2.4 \ # via # -r requirements.in # google-auth -certifi==2022.9.24 \ - --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ - --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 +certifi==2022.12.7 \ + --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ + --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 # via # -r requirements.in # requests diff --git a/.readme-partials.yml b/.readme-partials.yml index db6f2b40d4..dc9a9e2377 100644 --- a/.readme-partials.yml +++ b/.readme-partials.yml @@ -116,18 +116,14 @@ custom_content: | TIP: If you are experiencing version conflicts with gRPC, see [Version Conflicts](#version-conflicts). ## Enabling client side metrics - + Cloud Bigtable client supports publishing client side metrics to [Cloud Monitoring](https://cloud.google.com/monitoring/docs/monitoring-overview) under the `bigtable.googleapis.com/client` namespace. - - Please fill out this [Google Form](https://forms.gle/xuhu6vCunn2MjV2m9) to sign up for the private preview of this - feature. And enable it by setting: - - ```java - BigtableDataSettings.enableBuiltinMetrics(); - ``` - + + This feature is available once you upgrade to version 2.16.0 and above. + Follow the guide on https://cloud.google.com/bigtable/docs/client-side-metrics-setup to enable. + ## Client request tracing: OpenCensus Tracing Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), @@ -203,6 +199,12 @@ custom_content: | ## Enabling Cloud Bigtable Metrics: OpenCensus Stats + --- + Note: We recommend [enabling client side built-in metrics](#enabling-client-side-metrics) + if you want to view your metrics on cloud monitoring. This integration is only for exporting the + metrics to a third party dashboard. + --- + Cloud Bigtable client supports [Opencensus Metrics](https://opencensus.io/stats/), which gives insight into the client internals and aids in debugging production issues. All Cloud Bigtable Metrics are prefixed with `cloud.google.com/java/bigtable/`. The @@ -237,7 +239,7 @@ custom_content: | each operation required, tagged by operation name and final operation status. Under normal circumstances, this will be 1. - ### GFE metric views: + #### GFE metric views: * `cloud.google.com/java/bigtable/gfe_latency`: A distribution of the latency between Google's network receives an RPC and reads back the first byte of the response. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c07611802..d1eb0eaf14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.17.1](https://github.com/googleapis/java-bigtable/compare/v2.17.0...v2.17.1) (2022-12-13) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-monitoring-bom to v3.8.0 ([#1548](https://github.com/googleapis/java-bigtable/issues/1548)) ([48f136d](https://github.com/googleapis/java-bigtable/commit/48f136dc1422d601d5470a33763e37514cf620de)) + ## [2.17.0](https://github.com/googleapis/java-bigtable/compare/v2.16.0...v2.17.0) (2022-12-07) diff --git a/README.md b/README.md index be062c7f26..053b1a5ed1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.1.5 + 26.3.0 pom import @@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigtable - 2.17.0 + 2.17.1 ``` @@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.1.5') +implementation platform('com.google.cloud:libraries-bom:26.3.0') implementation 'com.google.cloud:google-cloud-bigtable' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-bigtable:2.17.0' +implementation 'com.google.cloud:google-cloud-bigtable:2.17.1' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.17.0" +libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.17.1" ``` ## Authentication @@ -219,13 +219,9 @@ Cloud Bigtable client supports publishing client side metrics to [Cloud Monitoring](https://cloud.google.com/monitoring/docs/monitoring-overview) under the `bigtable.googleapis.com/client` namespace. -Please fill out this [Google Form](https://forms.gle/xuhu6vCunn2MjV2m9) to sign up for the private preview of this -feature. And enable it by setting: +This feature is available once you upgrade to version 2.16.0 and above. +Follow the guide on https://cloud.google.com/bigtable/docs/client-side-metrics-setup to enable. -```java -BigtableDataSettings.enableBuiltinMetrics(); -``` - ## Client request tracing: OpenCensus Tracing Cloud Bigtable client supports [OpenCensus Tracing](https://opencensus.io/tracing/), @@ -301,6 +297,12 @@ Tracing.getTraceConfig().updateActiveTraceParams( ## Enabling Cloud Bigtable Metrics: OpenCensus Stats +--- +Note: We recommend [enabling client side built-in metrics](#enabling-client-side-metrics) +if you want to view your metrics on cloud monitoring. This integration is only for exporting the +metrics to a third party dashboard. +--- + Cloud Bigtable client supports [Opencensus Metrics](https://opencensus.io/stats/), which gives insight into the client internals and aids in debugging production issues. All Cloud Bigtable Metrics are prefixed with `cloud.google.com/java/bigtable/`. The @@ -335,7 +337,7 @@ metrics will be tagged with: each operation required, tagged by operation name and final operation status. Under normal circumstances, this will be 1. -### GFE metric views: +#### GFE metric views: * `cloud.google.com/java/bigtable/gfe_latency`: A distribution of the latency between Google's network receives an RPC and reads back the first byte of the response. diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml index 7659a8b216..5dc69ff971 100644 --- a/google-cloud-bigtable-bom/pom.xml +++ b/google-cloud-bigtable-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom com.google.cloud @@ -63,42 +63,42 @@ com.google.cloud google-cloud-bigtable - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator - 0.154.1-SNAPSHOT + 0.154.2-SNAPSHOT com.google.cloud google-cloud-bigtable-emulator-core - 0.154.1-SNAPSHOT + 0.154.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.cloud google-cloud-bigtable-stats - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml index d485846d78..e0233a5008 100644 --- a/google-cloud-bigtable-deps-bom/pom.xml +++ b/google-cloud-bigtable-deps-bom/pom.xml @@ -13,7 +13,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom @@ -73,7 +73,7 @@ com.google.cloud google-cloud-monitoring-bom - 3.7.0 + 3.8.0 diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml index 5cc1dfa1ef..7d7625bd0d 100644 --- a/google-cloud-bigtable-emulator-core/pom.xml +++ b/google-cloud-bigtable-emulator-core/pom.xml @@ -7,11 +7,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT google-cloud-bigtable-emulator-core - 0.154.1-SNAPSHOT + 0.154.2-SNAPSHOT A Java wrapper for the Cloud Bigtable emulator. diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml index 05e0f41109..21bed32970 100644 --- a/google-cloud-bigtable-emulator/pom.xml +++ b/google-cloud-bigtable-emulator/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-bigtable-emulator - 0.154.1-SNAPSHOT + 0.154.2-SNAPSHOT Google Cloud Java - Bigtable Emulator https://github.com/googleapis/java-bigtable @@ -14,7 +14,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT scm:git:git@github.com:googleapis/java-bigtable.git @@ -81,14 +81,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import @@ -99,7 +99,7 @@ com.google.cloud google-cloud-bigtable-emulator-core - 0.154.1-SNAPSHOT + 0.154.2-SNAPSHOT diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index 357520c53e..cba854b64d 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -5,7 +5,7 @@ com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT 4.0.0 @@ -13,7 +13,7 @@ through Stackdriver. Built-in metrics will be implemented with shaded OpenCensus so it won't interfere with customer's application metrics. --> google-cloud-bigtable-stats - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT Experimental project to shade OpenCensus dependencies. @@ -25,7 +25,7 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 3ecf2ede99..1e50103efa 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-bigtable - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT jar Google Cloud Bigtable https://github.com/googleapis/java-bigtable @@ -12,11 +12,11 @@ com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT google-cloud-bigtable @@ -47,14 +47,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java index e546a333ba..5114712c52 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java @@ -20,6 +20,6 @@ @InternalApi("For internal use only") public final class Version { // {x-version-update-start:google-cloud-bigtable:current} - public static String VERSION = "2.17.1-SNAPSHOT"; + public static String VERSION = "2.17.2-SNAPSHOT"; // {x-version-update-end} } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java index db34f5fa65..28265b282d 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java @@ -124,6 +124,8 @@ public static Builder newBuilderForEmulator(String hostname, int port) { .stubSettings() .setCredentialsProvider(NoCredentialsProvider.create()) .setEndpoint(hostname + ":" + port) + // disable channel refreshing when creating an emulator + .setRefreshingChannel(false) .setTransportChannelProvider( InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(256 * 1024 * 1024) @@ -244,8 +246,12 @@ public String getAppProfileId() { return stubSettings.getAppProfileId(); } - /** Gets if channels will gracefully refresh connections to Cloud Bigtable service */ - @BetaApi("Channel priming is not currently stable and may change in the future") + /** + * Gets if channels will gracefully refresh connections to Cloud Bigtable service + * + * @deprecated Channel refreshing is enabled by default and this method will be deprecated. + */ + @Deprecated public boolean isRefreshingChannel() { return stubSettings.isRefreshingChannel(); } @@ -395,19 +401,25 @@ public CredentialsProvider getCredentialsProvider() { /** * Configure periodic gRPC channel refreshes. * - *

    This feature will gracefully refresh connections to the Cloud Bigtable service. This is an - * experimental feature to address tail latency caused by the service dropping long lived gRPC - * connections, which causes the client to renegotiate the gRPC connection in the request path, - * which causes periodic spikes in latency + *

    This feature will gracefully refresh connections to the Cloud Bigtable service. This is a + * feature to address tail latency caused by the service dropping long lived gRPC connections, + * which causes the client to renegotiate the gRPC connection in the request path, which causes + * periodic spikes in latency. + * + * @deprecated Channel refreshing is enabled by default and this method will be deprecated. */ - @BetaApi("Channel priming is not currently stable and may change in the future") + @Deprecated public Builder setRefreshingChannel(boolean isRefreshingChannel) { stubSettings.setRefreshingChannel(isRefreshingChannel); return this; } - /** Gets if channels will gracefully refresh connections to Cloud Bigtable service */ - @BetaApi("Channel priming is not currently stable and may change in the future") + /** + * Gets if channels will gracefully refresh connections to Cloud Bigtable service. + * + * @deprecated Channel refreshing is enabled by default and this method will be deprecated. + */ + @Deprecated public boolean isRefreshingChannel() { return stubSettings.isRefreshingChannel(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java index 303f52a8e2..ecbef85be5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableChannelPrimer.java @@ -51,6 +51,8 @@ static BigtableChannelPrimer create( .setInstanceId(instanceId) .setAppProfileId(appProfileId) .setCredentialsProvider(FixedCredentialsProvider.create(credentials)) + // Disable refreshing channel here to avoid creating settings in a loop + .setRefreshingChannel(false) .setExecutorProvider( InstantiatingExecutorProvider.newBuilder().setExecutorThreadCount(1).build()); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java index a69bb93999..b6dd063cb6 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java @@ -15,7 +15,6 @@ */ package com.google.cloud.bigtable.data.v2.stub; -import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.batching.BatchingCallSettings; import com.google.api.gax.batching.BatchingSettings; @@ -282,8 +281,12 @@ public String getAppProfileId() { return appProfileId; } - /** Returns if channels will gracefully refresh connections to Cloud Bigtable service */ - @BetaApi("This API depends on experimental gRPC APIs") + /** + * Returns if channels will gracefully refresh connections to Cloud Bigtable service + * + * @deprecated Channel refreshing is enabled by default and this method will be deprecated. + */ + @Deprecated public boolean isRefreshingChannel() { return isRefreshingChannel; } @@ -605,7 +608,7 @@ public static class Builder extends StubSettings.BuilderWhen enabled, this will wait for the connection to complete the SSL handshake and warm up - * serverside caches for all the tables of the instance. + * serverside caches for all the tables of the instance. This feature is enabled by default. * * @see com.google.cloud.bigtable.data.v2.BigtableDataSettings.Builder#setRefreshingChannel + * @deprecated Channel refreshing is enabled by default and this method will be deprecated. */ - @BetaApi("This API depends on experimental gRPC APIs") + @Deprecated public Builder setRefreshingChannel(boolean isRefreshingChannel) { this.isRefreshingChannel = isRefreshingChannel; return this; @@ -852,8 +856,12 @@ public Builder setPrimedTableIds(String... tableIds) { return this; } - /** Gets if channels will gracefully refresh connections to Cloud Bigtable service */ - @BetaApi("This API depends on experimental gRPC APIs") + /** + * Gets if channels will gracefully refresh connections to Cloud Bigtable service. + * + * @deprecated Channel refreshing is enabled by default and this method will be deprecated. + */ + @Deprecated public boolean isRefreshingChannel() { return isRefreshingChannel; } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java index de2bf6224f..36c2930bda 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java @@ -169,7 +169,8 @@ public Void call() { // variables in ApiTracer and avoid exceptions when the tracer marks the attempt as finished callContext .getTracer() - .attemptStarted(externalFuture.getAttemptSettings().getOverallAttemptCount()); + .attemptStarted( + currentRequest, externalFuture.getAttemptSettings().getOverallAttemptCount()); Preconditions.checkState( currentRequest.getEntriesCount() > 0, "Request doesn't have any mutations to send"); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java index 2b95bf821f..de4fbe92fc 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java @@ -33,6 +33,9 @@ public void testToString() { .setInstanceId("our-instance-85") .setAppProfileId("our-appProfile-06") .enableBatchMutationLatencyBasedThrottling(10) + // disable channel priming so we won't need authentication + // for sending the prime request since we're only testing the settings. + .setRefreshingChannel(false) .build(); EnhancedBigtableStubSettings stubSettings = settings.getStubSettings(); assertThat(settings.toString()) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java index 597b109b0b..e918378691 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubCloseTest.java @@ -65,7 +65,6 @@ public void setUp() throws Exception { .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) .setCredentialsProvider(NoCredentialsProvider.create()) - .setRefreshingChannel(false) .build() .getStubSettings(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java index 696fde8060..a754421ad9 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java @@ -185,7 +185,10 @@ public void readRowsIsNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + // Here and everywhere in this test, disable channel priming so we won't need + // authentication for sending the prime request since we're only testing the settings. + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -243,7 +246,8 @@ public void readRowIsNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId("my-project") - .setInstanceId("my-instance"); + .setInstanceId("my-instance") + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -295,7 +299,8 @@ public void readRowRetryCodesMustMatch() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId("my-project") - .setInstanceId("my-instance"); + .setInstanceId("my-instance") + .setRefreshingChannel(false); builder.readRowsSettings().setRetryableCodes(Code.DEADLINE_EXCEEDED); @@ -329,7 +334,8 @@ public void sampleRowKeysSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -376,7 +382,8 @@ public void mutateRowSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -423,7 +430,8 @@ public void bulkMutateRowsSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); assertThat(builder.bulkMutateRowsSettings().isLatencyBasedThrottlingEnabled()).isFalse(); @@ -536,7 +544,8 @@ public void bulkReadRowsSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder() @@ -611,7 +620,8 @@ public void checkAndMutateRowSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder().build(); builder @@ -643,7 +653,8 @@ public void generateInitialChangeStreamPartitionsSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder().build(); builder @@ -686,7 +697,8 @@ public void readChangeStreamSettingsAreNotLostTest() { EnhancedBigtableStubSettings.Builder builder = EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) - .setInstanceId(dummyInstanceId); + .setInstanceId(dummyInstanceId) + .setRefreshingChannel(false); RetrySettings retrySettings = RetrySettings.newBuilder().build(); builder @@ -752,9 +764,7 @@ public void isRefreshingChannelDefaultValueTest() { EnhancedBigtableStubSettings.newBuilder() .setProjectId(dummyProjectId) .setInstanceId(dummyInstanceId); - assertThat(builder.isRefreshingChannel()).isFalse(); - assertThat(builder.build().isRefreshingChannel()).isFalse(); - assertThat(builder.build().toBuilder().isRefreshingChannel()).isFalse(); + assertThat(builder.isRefreshingChannel()).isTrue(); } @Test @@ -798,6 +808,7 @@ public void testToString() { .setProjectId("our-project-85") .setInstanceId("our-instance-06") .setAppProfileId("our-appProfile-06") + .setRefreshingChannel(false) .build(); checkToString(defaultSettings); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java index 8176435f15..16100ad044 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java @@ -162,7 +162,6 @@ public void testJwtAudience() .setCredentialsProvider(FixedCredentialsProvider.create(jwtCreds)) .build(); enhancedBigtableStub = EnhancedBigtableStub.create(settings); - // Send rpc and grab the credentials sent enhancedBigtableStub.readRowCallable().futureCall(Query.create("fake-table")).get(); Metadata metadata = metadataInterceptor.headers.take(); @@ -208,6 +207,9 @@ public void testBatchJwtAudience() .setTransportChannelProvider( FixedTransportChannelProvider.create( GrpcTransportChannel.create(emulatorChannel))) + // Channel refreshing doesn't work with FixedTransportChannelProvider. Disable it for + // the test + .setRefreshingChannel(false) .build(); enhancedBigtableStub = EnhancedBigtableStub.create(settings); // Send rpc and grab the credentials sent @@ -342,7 +344,7 @@ public void export(Collection collection) { @Test public void testBulkMutationFlowControllerConfigured() throws Exception { BigtableDataSettings.Builder settings = - BigtableDataSettings.newBuilder() + BigtableDataSettings.newBuilderForEmulator(server.getPort()) .setProjectId("my-project") .setInstanceId("my-instance") .setCredentialsProvider(defaultSettings.getCredentialsProvider()) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java index f1655e2880..020c0a1c27 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/HeadersTest.java @@ -233,6 +233,7 @@ public void checkAndMutateRow( CheckAndMutateRowRequest request, StreamObserver responseObserver) { responseObserver.onNext(CheckAndMutateRowResponse.getDefaultInstance()); + responseObserver.onCompleted(); } @Override diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java index a0defe6375..a75db98fcb 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java @@ -83,7 +83,7 @@ public void setUp() throws IOException { serverRule.getServiceRegistry().addService(service); BigtableDataSettings.Builder settings = - BigtableDataSettings.newBuilder() + BigtableDataSettings.newBuilderForEmulator(serverRule.getServer().getPort()) .setProjectId(PROJECT_ID) .setInstanceId(INSTANCE_ID) .setCredentialsProvider(NoCredentialsProvider.create()); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java index 19ab6413a0..5d15dd5219 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsRetryTest.java @@ -69,6 +69,8 @@ public void setUp() throws IOException { .setTransportChannelProvider( FixedTransportChannelProvider.create( GrpcTransportChannel.create(serverRule.getChannel()))) + // channel priming doesn't work with FixedTransportChannelProvider. Disable it for the test + .setRefreshingChannel(false) .build(); this.client = BigtableDataClient.create(settings.build()); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java index 54a3af5cf5..0f9ad21fa0 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsRetryTest.java @@ -81,6 +81,8 @@ public void setUp() throws IOException { .setTransportChannelProvider( FixedTransportChannelProvider.create( GrpcTransportChannel.create(serverRule.getChannel()))) + // Refreshing channel doesn't work with FixedTransportChannelProvider + .setRefreshingChannel(false) .build(); client = BigtableDataClient.create(settings.build()); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java index ba0fda8b2c..f1308f3520 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java @@ -120,7 +120,10 @@ private CloudEnv( this.kmsKeyName = kmsKeyName; this.dataSettings = - BigtableDataSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId); + BigtableDataSettings.newBuilder() + .setProjectId(projectId) + .setInstanceId(instanceId) + .setRefreshingChannel(false); if (!Strings.isNullOrEmpty(dataEndpoint)) { dataSettings.stubSettings().setEndpoint(dataEndpoint); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java index e4b0a26515..bec3e0eef2 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/EmulatorEnv.java @@ -61,6 +61,7 @@ void start() throws Exception { BigtableDataSettings.newBuilderForEmulator(emulator.getPort()) .setProjectId("fake-project") .setInstanceId("fake-instance") + .setRefreshingChannel(false) .build(); dataClient = BigtableDataClient.create(dataSettings); diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml index 717bb9fd44..902b49667a 100644 --- a/grpc-google-cloud-bigtable-admin-v2/pom.xml +++ b/grpc-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT grpc-google-cloud-bigtable-admin-v2 GRPC library for grpc-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml index 19bc2d8a8f..c43c6fd1b0 100644 --- a/grpc-google-cloud-bigtable-v2/pom.xml +++ b/grpc-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT grpc-google-cloud-bigtable-v2 GRPC library for grpc-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import diff --git a/pom.xml b/pom.xml index 6f0221a3d7..f55075a2d7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ google-cloud-bigtable-parent pom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT Google Cloud Bigtable Parent https://github.com/googleapis/java-bigtable @@ -153,27 +153,27 @@ com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigtable-admin-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT com.google.cloud google-cloud-bigtable - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT @@ -207,7 +207,7 @@ org.mockito mockito-core - 4.9.0 + 4.11.0 @@ -245,6 +245,7 @@ + none protected true @@ -318,6 +319,7 @@ maven-javadoc-plugin 3.4.1 + com.microsoft.doclet.DocFxDoclet false ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.5.0.jar @@ -325,9 +327,18 @@ -outputpath ${project.build.directory}/docfx-yml -projectname ${artifactId} - -excludeclasses com\.google\.cloud\.bigtable\.admin\.v2\.internal\.:com\.google\.cloud\.bigtable\.admin\.v2\.BaseBigtableInstanceAdminClient:com\.google\.cloud\.bigtable\.admin\.v2\.BaseBigtableInstanceAdminSettings:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.GrpcBigtableInstanceAdminCallableFactory:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.GrpcBigtableInstanceAdminStub:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.BigtableInstanceAdminStub:com\.google\.cloud\.bigtable\.admin\.v2\.BaseBigtableTableAdminClient:com\.google\.cloud\.bigtable\.admin\.v2\.BaseBigtableTableAdminSettings:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.GrpcBigtableTableAdminCallableFactory:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.GrpcBigtableTableAdminStub:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.BigtableTableAdminStub:com\.google\.cloud\.bigtable\.admin\.v2\.stub\.EnhancedBigtableTableAdminStub:com\.google\.cloud\.bigtable\.data\.v2\.internal\.:com\.google\.cloud\.bigtable\.data\.v2\.BaseBigtableDataClient:com\.google\.cloud\.bigtable\.data\.v2\.BaseBigtableDataSettings:com\.google\.cloud\.bigtable\.data\.v2\.stub\.BigtableStub:com\.google\.cloud\.bigtable\.data\.v2\.stub\.BigtableStubSettings:com\.google\.cloud\.bigtable\.data\.v2\.stub\.GrpcBigtableStub:com\.google\.cloud\.bigtable\.data\.v2\.stub\.GrpcBigtableCallableFactory:com\.google\.cloud\.bigtable\.data\.v2\.stub\.EnhancedBigtableStub:com\.google\.cloud\.bigtable\.data\.v2\.stub\.mutaterows\.:com\.google\.cloud\.bigtable\.data\.v2\.stub\.readrows\.:com\.google\.cloud\.bigtable\.data\.v2\.stub\.metrics\. + + -excludeclasses com\.google\.cloud\.bigtable\.admin\.v2\.(internal\.|(Base.*).*|stub\.(?!Bigtable.*StubSettings).*):com\.google\.cloud\.bigtable\.data\.v2\.(internal\.|(Base.*).*|stub\.(?!Enhanced.*StubSettings).*) + + -excludepackages com\.google\.(bigtable\.v2|bigtable\.admin\.v2|cloud\.bigtable\.stats) + aggregate diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml index afc2a59e79..10b4b2b61c 100644 --- a/proto-google-cloud-bigtable-admin-v2/pom.xml +++ b/proto-google-cloud-bigtable-admin-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-admin-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT proto-google-cloud-bigtable-admin-v2 PROTO library for proto-google-cloud-bigtable-admin-v2 com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml index cf7f5a352c..c4b6833704 100644 --- a/proto-google-cloud-bigtable-v2/pom.xml +++ b/proto-google-cloud-bigtable-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigtable-v2 - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT proto-google-cloud-bigtable-v2 PROTO library for proto-google-cloud-bigtable-v2 com.google.cloud google-cloud-bigtable-parent - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT @@ -18,14 +18,14 @@ com.google.cloud google-cloud-bigtable-deps-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import com.google.cloud google-cloud-bigtable-bom - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT pom import diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 656b7cf8ed..fabaaf998c 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigtable - 2.17.0 + 2.17.1 diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml index 1bf3a9e595..18716b3205 100644 --- a/samples/native-image-sample/pom.xml +++ b/samples/native-image-sample/pom.xml @@ -29,7 +29,7 @@ com.google.cloud libraries-bom - 26.1.5 + 26.3.0 pom import diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index d57cced056..5cf2cc89d6 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigtable - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 7083717877..6d31e3d7c9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 26.1.5 + 26.3.0 pom import diff --git a/test-proxy/README.md b/test-proxy/README.md index a97f40094e..287c3a0f13 100644 --- a/test-proxy/README.md +++ b/test-proxy/README.md @@ -2,7 +2,7 @@ The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client. -## Set up +## Set up If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library: @@ -12,7 +12,7 @@ git clone https://github.com/googleapis/cloud-bigtable-clients-test.git ## Start test proxy -Build the proxy with the latest version of the client +Build the proxy with the latest/head version of the client ``` cd java-bigtable @@ -24,20 +24,13 @@ mvn clean install Start the proxy on default port 9999 ``` -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +java -jar target/google-cloud-bigtable-test-proxy-.jar ``` Start the proxy on a different port ``` -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1 -``` - -Build and start the proxy with an older version of the client - -``` -mvn clean install -Dbigtable.client.version= -Denforcer.skip -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +java -Dport=1 -jar target/google-cloud-bigtable-test-proxy-.jar ``` ## Run the test cases @@ -46,3 +39,12 @@ mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyM cd cloud-bigtable-clients-test/tests go test -v -proxy_addr=:9999 ``` + +## Test a released client + +To do so, you need to build the proxy with the released version of the client. +Please download the source code +[here](https://github.com/googleapis/java-bigtable/releases), and repeat the +above steps. + +Note that Kokoro presubmit test doesn't use this route. diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml index 5792703442..31bd80de4a 100644 --- a/test-proxy/pom.xml +++ b/test-proxy/pom.xml @@ -12,11 +12,11 @@ google-cloud-bigtable-parent com.google.cloud - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT - 2.17.1-SNAPSHOT + 2.17.2-SNAPSHOT @@ -134,6 +134,38 @@ true + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + com.google.cloud.bigtable.testproxy.CbtTestProxyMain + + + + + + + diff --git a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java index 18e9be1e92..54d02a7018 100644 --- a/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java +++ b/test-proxy/src/main/java/com/google/cloud/bigtable/testproxy/CbtTestProxy.java @@ -49,10 +49,10 @@ import io.grpc.ManagedChannelBuilder; import io.grpc.Status; import io.grpc.StatusException; -import io.grpc.netty.GrpcSslContexts; -import io.grpc.netty.NettyChannelBuilder; +import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts; +import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; +import io.grpc.netty.shaded.io.netty.handler.ssl.SslContext; import io.grpc.stub.StreamObserver; -import io.netty.handler.ssl.SslContext; import java.io.ByteArrayInputStream; import java.io.Closeable; import java.io.IOException; diff --git a/versions.txt b/versions.txt index 7666861b93..7cce1fdcf0 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-bigtable:2.17.0:2.17.1-SNAPSHOT -grpc-google-cloud-bigtable-admin-v2:2.17.0:2.17.1-SNAPSHOT -grpc-google-cloud-bigtable-v2:2.17.0:2.17.1-SNAPSHOT -proto-google-cloud-bigtable-admin-v2:2.17.0:2.17.1-SNAPSHOT -proto-google-cloud-bigtable-v2:2.17.0:2.17.1-SNAPSHOT -google-cloud-bigtable-emulator:0.154.0:0.154.1-SNAPSHOT -google-cloud-bigtable-emulator-core:2.17.0:2.17.1-SNAPSHOT +google-cloud-bigtable:2.17.1:2.17.2-SNAPSHOT +grpc-google-cloud-bigtable-admin-v2:2.17.1:2.17.2-SNAPSHOT +grpc-google-cloud-bigtable-v2:2.17.1:2.17.2-SNAPSHOT +proto-google-cloud-bigtable-admin-v2:2.17.1:2.17.2-SNAPSHOT +proto-google-cloud-bigtable-v2:2.17.1:2.17.2-SNAPSHOT +google-cloud-bigtable-emulator:0.154.1:0.154.2-SNAPSHOT +google-cloud-bigtable-emulator-core:2.17.1:2.17.2-SNAPSHOT From 0a12471fece5a083a19bec7af8e3465e75f8ab56 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Tue, 10 Jan 2023 15:57:29 -0500 Subject: [PATCH 18/27] Address comments --- google-cloud-bigtable/pom.xml | 35 +++- .../bigtable/data/v2/BigtableDataClient.java | 12 +- .../models/ChangeStreamContinuationToken.java | 87 +++----- .../data/v2/models/ChangeStreamMutation.java | 188 +++++------------- .../data/v2/models/ChangeStreamRecord.java | 2 +- .../v2/models/ChangeStreamRecordAdapter.java | 8 +- .../bigtable/data/v2/models/CloseStream.java | 82 ++------ .../DefaultChangeStreamRecordAdapter.java | 11 +- .../cloud/bigtable/data/v2/models/Entry.java | 3 - .../bigtable/data/v2/models/Heartbeat.java | 6 +- .../cloud/bigtable/data/v2/models/Range.java | 6 +- .../data/v2/models/ReadChangeStreamQuery.java | 6 +- .../ChangeStreamContinuationTokenTest.java | 6 +- .../v2/models/ChangeStreamRecordTest.java | 2 +- .../bigtable/data/v2/models/RangeTest.java | 2 +- ...ChangeStreamRecordMergingCallableTest.java | 2 +- ...ReadChangeStreamMergingAcceptanceTest.java | 7 +- .../proto/changestream_tests.proto | 0 .../resources/changestream.json | 0 19 files changed, 169 insertions(+), 296 deletions(-) rename google-cloud-bigtable/src/{main => test}/proto/changestream_tests.proto (100%) rename google-cloud-bigtable/src/{main => test}/resources/changestream.json (100%) diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 1e50103efa..3570e90fd2 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -37,8 +37,8 @@ Also, this property will be augmented by `internal-bigtable-prod-batch-it-prop-helper` profile --> batch-bigtable.googleapis.com:443 - 1.44.0 - 3.19.3 + 1.51.0 + 3.21.10 ${protobuf.version} @@ -605,6 +605,33 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + enforce-declared-grpc-and-proto-version + + enforce + + + + + + io.grpc:*:[${grpc.version}] + com.google.protobuf:*:[${protobuf.version}] + + + io.grpc:* + com.google.protobuf:* + + + + + + + org.xolstice.maven.plugins protobuf-maven-plugin @@ -612,8 +639,8 @@ - compile - compile-custom + test-compile + test-compile-custom diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java index 77b909b7a1..968ebaef26 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataClient.java @@ -1524,7 +1524,7 @@ public UnaryCallable readModifyWriteRowCallable() { * * @see ServerStreamingCallable For call styles. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public ServerStream generateInitialChangeStreamPartitions(String tableId) { return generateInitialChangeStreamPartitionsCallable().call(tableId); } @@ -1566,7 +1566,7 @@ public ServerStream generateInitialChangeStreamPartitions(Strin * } * } */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public void generateInitialChangeStreamPartitionsAsync( String tableId, ResponseObserver observer) { generateInitialChangeStreamPartitionsCallable().call(tableId, observer); @@ -1625,7 +1625,7 @@ public void generateInitialChangeStreamPartitionsAsync( * * @see ServerStreamingCallable For call styles. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public ServerStreamingCallable generateInitialChangeStreamPartitionsCallable() { return stub.generateInitialChangeStreamPartitionsCallable(); @@ -1668,7 +1668,7 @@ public void generateInitialChangeStreamPartitionsAsync( * @see ServerStreamingCallable For call styles. * @see ReadChangeStreamQuery For query options. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public ServerStream readChangeStream(ReadChangeStreamQuery query) { return readChangeStreamCallable().call(query); } @@ -1714,7 +1714,7 @@ public ServerStream readChangeStream(ReadChangeStreamQuery q * } * } */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public void readChangeStreamAsync( ReadChangeStreamQuery query, ResponseObserver observer) { readChangeStreamCallable().call(query, observer); @@ -1778,7 +1778,7 @@ public void readChangeStreamAsync( * @see ServerStreamingCallable For call styles. * @see ReadChangeStreamQuery For query options. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public ServerStreamingCallable readChangeStreamCallable() { return stub.readChangeStreamCallable(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java index 06e975c827..c0d2138e02 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java @@ -16,31 +16,31 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; +import com.google.api.core.InternalExtensionOnly; +import com.google.auto.value.AutoValue; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; import com.google.bigtable.v2.StreamPartition; import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; import java.io.Serializable; import javax.annotation.Nonnull; /** A simple wrapper for {@link StreamContinuationToken}. */ -public final class ChangeStreamContinuationToken implements Serializable { +@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@AutoValue +public abstract class ChangeStreamContinuationToken implements Serializable { private static final long serialVersionUID = 524679926247095L; - private final StreamContinuationToken tokenProto; - - private ChangeStreamContinuationToken(@Nonnull StreamContinuationToken tokenProto) { - this.tokenProto = tokenProto; + private static ChangeStreamContinuationToken create(@Nonnull StreamContinuationToken tokenProto) { + return new AutoValue_ChangeStreamContinuationToken(tokenProto); } - @InternalApi("Used in Changestream beam pipeline.") - public ChangeStreamContinuationToken( + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") + public static ChangeStreamContinuationToken create( @Nonnull ByteStringRange byteStringRange, @Nonnull String token) { - this.tokenProto = + return create( StreamContinuationToken.newBuilder() .setPartition( StreamPartition.newBuilder() @@ -51,68 +51,39 @@ public ChangeStreamContinuationToken( .build()) .build()) .setToken(token) - .build(); - } - - /** - * Get the partition of the current continuation token, represented by a {@link ByteStringRange}. - */ - public ByteStringRange getPartition() { - return ByteStringRange.create( - this.tokenProto.getPartition().getRowRange().getStartKeyClosed(), - this.tokenProto.getPartition().getRowRange().getEndKeyOpen()); - } - - public String getToken() { - return this.tokenProto.getToken(); - } - - // Creates the protobuf. - StreamContinuationToken toProto() { - return tokenProto; + .build()); } /** Wraps the protobuf {@link StreamContinuationToken}. */ + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") static ChangeStreamContinuationToken fromProto( @Nonnull StreamContinuationToken streamContinuationToken) { - return new ChangeStreamContinuationToken(streamContinuationToken); - } - - @InternalApi("Used in Changestream beam pipeline.") - public ByteString toByteString() { - return tokenProto.toByteString(); + return create(streamContinuationToken); } - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public static ChangeStreamContinuationToken fromByteString(ByteString byteString) throws InvalidProtocolBufferException { - return new ChangeStreamContinuationToken( - StreamContinuationToken.newBuilder().mergeFrom(byteString).build()); + return create(StreamContinuationToken.newBuilder().mergeFrom(byteString).build()); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChangeStreamContinuationToken otherToken = (ChangeStreamContinuationToken) o; - return Objects.equal(getPartition(), otherToken.getPartition()) - && Objects.equal(getToken(), otherToken.getToken()); + @Nonnull + public abstract StreamContinuationToken getTokenProto(); + + /** + * Get the partition of the current continuation token, represented by a {@link ByteStringRange}. + */ + public ByteStringRange getPartition() { + return ByteStringRange.create( + getTokenProto().getPartition().getRowRange().getStartKeyClosed(), + getTokenProto().getPartition().getRowRange().getEndKeyOpen()); } - @Override - public int hashCode() { - return Objects.hashCode(getPartition(), getToken()); + public String getToken() { + return getTokenProto().getToken(); } - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("partition", getPartition()) - .add("token", getToken()) - .toString(); + public ByteString toByteString() { + return getTokenProto().toByteString(); } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index 3d11d5d4fc..2fe9aa0d92 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -15,20 +15,16 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.api.core.InternalExtensionOnly; +import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.io.Serializable; -import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnull; @@ -64,8 +60,9 @@ * * Make this class non-final so that we can create a subclass to mock it. */ -@InternalExtensionOnly("Used in Changestream beam pipeline testing.") -public class ChangeStreamMutation implements ChangeStreamRecord, Serializable { +@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@AutoValue +public abstract class ChangeStreamMutation implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 8419520253162024218L; public enum MutationType { @@ -73,32 +70,16 @@ public enum MutationType { GARBAGE_COLLECTION } - private final ByteString rowKey; - - private final MutationType type; - - /** This should only be set when type==USER. */ - private final String sourceClusterId; - - private final Timestamp commitTimestamp; - - private final int tieBreaker; - - private transient ImmutableList.Builder entries = ImmutableList.builder(); - - private String token; - - private Timestamp lowWatermark; - - private ChangeStreamMutation(Builder builder) { - this.rowKey = builder.rowKey; - this.type = builder.type; - this.sourceClusterId = builder.sourceClusterId; - this.commitTimestamp = builder.commitTimestamp; - this.tieBreaker = builder.tieBreaker; - this.token = builder.token; - this.lowWatermark = builder.lowWatermark; - this.entries = builder.entries; + private static ChangeStreamMutation create(Builder builder) { + return new AutoValue_ChangeStreamMutation( + builder.rowKey, + builder.type, + builder.sourceClusterId, + builder.commitTimestamp, + builder.tieBreaker, + builder.token, + builder.lowWatermark, + builder.entries.build()); } /** @@ -121,68 +102,56 @@ static Builder createUserMutation( */ static Builder createGcMutation( @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { - return new Builder(rowKey, MutationType.GARBAGE_COLLECTION, null, commitTimestamp, tieBreaker); + return new Builder(rowKey, MutationType.GARBAGE_COLLECTION, "", commitTimestamp, tieBreaker); } - private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { - input.defaultReadObject(); - - @SuppressWarnings("unchecked") - ImmutableList deserialized = (ImmutableList) input.readObject(); - this.entries = ImmutableList.builder().addAll(deserialized); - } - - private void writeObject(ObjectOutputStream output) throws IOException { - output.defaultWriteObject(); - output.writeObject(entries.build()); - } + // private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { + // input.defaultReadObject(); + // + // @SuppressWarnings("unchecked") + // ImmutableList deserialized = (ImmutableList) input.readObject(); + // getEntries() = ImmutableList.builder().addAll(deserialized); + // } + // + // private void writeObject(ObjectOutputStream output) throws IOException { + // output.defaultWriteObject(); + // output.writeObject(getEntries()); + // } /** Get the row key of the current mutation. */ @Nonnull - public ByteString getRowKey() { - return this.rowKey; - } + public abstract ByteString getRowKey(); /** Get the type of the current mutation. */ @Nonnull - public MutationType getType() { - return this.type; - } + public abstract MutationType getType(); + @Nonnull /** Get the source cluster id of the current mutation. Null for Garbage collection mutation. */ - public String getSourceClusterId() { - return this.sourceClusterId; - } + public abstract String getSourceClusterId(); /** Get the commit timestamp of the current mutation. */ @Nonnull - public Timestamp getCommitTimestamp() { - return this.commitTimestamp; - } + public abstract Timestamp getCommitTimestamp(); /** * Get the tie breaker of the current mutation. This is used to resolve conflicts when multiple * mutations are applied to different clusters at the same time. */ - public int getTieBreaker() { - return this.tieBreaker; - } + @Nonnull + public abstract int getTieBreaker(); /** Get the token of the current mutation, which can be used to resume the changestream. */ - public String getToken() { - return this.token; - } + @Nonnull + public abstract String getToken(); /** Get the low watermark of the current mutation. */ - public Timestamp getLowWatermark() { - return this.lowWatermark; - } + @Nonnull + public abstract Timestamp getLowWatermark(); /** Get the list of mods of the current mutation. */ @Nonnull - public List getEntries() { - return this.entries.build(); - } + public abstract List getEntries(); /** Returns a builder containing all the values of this ChangeStreamMutation class. */ Builder toBuilder() { @@ -190,6 +159,7 @@ Builder toBuilder() { } /** Helper class to create a ChangeStreamMutation. */ + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public static class Builder { private final ByteString rowKey; @@ -221,14 +191,14 @@ private Builder( } private Builder(ChangeStreamMutation changeStreamMutation) { - this.rowKey = changeStreamMutation.rowKey; - this.type = changeStreamMutation.type; - this.sourceClusterId = changeStreamMutation.sourceClusterId; - this.commitTimestamp = changeStreamMutation.commitTimestamp; - this.tieBreaker = changeStreamMutation.tieBreaker; - this.entries = changeStreamMutation.entries; - this.token = changeStreamMutation.token; - this.lowWatermark = changeStreamMutation.lowWatermark; + this.rowKey = changeStreamMutation.getRowKey(); + this.type = changeStreamMutation.getType(); + this.sourceClusterId = changeStreamMutation.getSourceClusterId(); + this.commitTimestamp = changeStreamMutation.getCommitTimestamp(); + this.tieBreaker = changeStreamMutation.getTieBreaker(); + this.entries.addAll(changeStreamMutation.getEntries()); + this.token = changeStreamMutation.getToken(); + this.lowWatermark = changeStreamMutation.getLowWatermark(); } Builder setCell( @@ -267,13 +237,13 @@ ChangeStreamMutation build() { Preconditions.checkArgument( token != null && lowWatermark != null, "ChangeStreamMutation must have a continuation token and low watermark."); - return new ChangeStreamMutation(this); + return ChangeStreamMutation.create(this); } } public RowMutation toRowMutation(@Nonnull String tableId) { - RowMutation rowMutation = RowMutation.create(tableId, rowKey); - for (Entry entry : this.entries.build()) { + RowMutation rowMutation = RowMutation.create(tableId, getRowKey()); + for (Entry entry : getEntries()) { if (entry instanceof DeleteFamily) { rowMutation.deleteFamily(((DeleteFamily) entry).getFamilyName()); } else if (entry instanceof DeleteCells) { @@ -297,8 +267,8 @@ public RowMutation toRowMutation(@Nonnull String tableId) { } public RowMutationEntry toRowMutationEntry() { - RowMutationEntry rowMutationEntry = RowMutationEntry.create(rowKey); - for (Entry entry : this.entries.build()) { + RowMutationEntry rowMutationEntry = RowMutationEntry.create(getRowKey()); + for (Entry entry : getEntries()) { if (entry instanceof DeleteFamily) { rowMutationEntry.deleteFamily(((DeleteFamily) entry).getFamilyName()); } else if (entry instanceof DeleteCells) { @@ -320,54 +290,4 @@ public RowMutationEntry toRowMutationEntry() { } return rowMutationEntry; } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChangeStreamMutation other = (ChangeStreamMutation) o; - return Objects.equal(this.rowKey, other.rowKey) - && Objects.equal(this.type, other.type) - && Objects.equal(this.sourceClusterId, other.sourceClusterId) - && Objects.equal(this.commitTimestamp, other.commitTimestamp) - && Objects.equal(this.tieBreaker, other.tieBreaker) - && Objects.equal(this.token, other.token) - && Objects.equal(this.lowWatermark, other.lowWatermark) - && Objects.equal(this.entries.build(), other.entries.build()); - } - - @Override - public int hashCode() { - return Objects.hashCode( - rowKey, - type, - sourceClusterId, - commitTimestamp, - tieBreaker, - token, - lowWatermark, - entries.build()); - } - - @Override - public String toString() { - List entriesAsStrings = new ArrayList<>(); - for (Entry entry : this.entries.build()) { - entriesAsStrings.add(entry.toString()); - } - String entryString = "[" + String.join(";\t", entriesAsStrings) + "]"; - return MoreObjects.toStringHelper(this) - .add("rowKey", this.rowKey.toStringUtf8()) - .add("type", this.type) - .add("sourceClusterId", this.sourceClusterId) - .add("commitTimestamp", this.commitTimestamp.toString()) - .add("token", this.token) - .add("lowWatermark", this.lowWatermark) - .add("entries", entryString) - .toString(); - } } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java index 0bf5e0c31e..def50ec18f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java @@ -21,5 +21,5 @@ * Default representation of a change stream record, which can be a Heartbeat, a CloseStream, or a * logical mutation. */ -@InternalExtensionOnly +@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") public interface ChangeStreamRecord {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java index 6e9715a407..08d0ec77b7 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java @@ -33,25 +33,25 @@ public interface ChangeStreamRecordAdapter { ChangeStreamRecordBuilder createChangeStreamRecordBuilder(); /** Checks if the given change stream record is a Heartbeat. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") boolean isHeartbeat(ChangeStreamRecordT record); /** * Get the token from the given Heartbeat record. If the given record is not a Heartbeat, it will * throw an Exception. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") String getTokenFromHeartbeat(ChangeStreamRecordT heartbeatRecord); /** Checks if the given change stream record is a ChangeStreamMutation. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") boolean isChangeStreamMutation(ChangeStreamRecordT record); /** * Get the token from the given ChangeStreamMutation record. If the given record is not a * ChangeStreamMutation, it will throw an Exception. */ - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") String getTokenFromChangeStreamMutation(ChangeStreamRecordT record); /** diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java index 795e05029a..d5300514d4 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -17,15 +17,11 @@ import com.google.api.core.InternalApi; import com.google.api.core.InternalExtensionOnly; +import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.StreamContinuationToken; -import com.google.common.base.MoreObjects; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.rpc.Status; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.List; import javax.annotation.Nonnull; @@ -34,75 +30,33 @@ * A simple wrapper for {@link ReadChangeStreamResponse.CloseStream}. Make this class non-final so * that we can create a subclass to mock it. */ -@InternalExtensionOnly("Used in Changestream beam pipeline testing.") -public class CloseStream implements ChangeStreamRecord, Serializable { +@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@AutoValue +public abstract class CloseStream implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608505L; - private final Status status; - private transient ImmutableList.Builder - changeStreamContinuationTokens = ImmutableList.builder(); - private CloseStream(Status status, List continuationTokens) { - this.status = status; + private static CloseStream create( + Status status, List continuationTokens) { + ImmutableList.Builder changeStreamContinuationTokens = + ImmutableList.builder(); for (StreamContinuationToken streamContinuationToken : continuationTokens) { changeStreamContinuationTokens.add( ChangeStreamContinuationToken.fromProto(streamContinuationToken)); } - } - - @InternalApi("Used in Changestream beam pipeline.") - public com.google.cloud.bigtable.common.Status getStatus() { - return com.google.cloud.bigtable.common.Status.fromProto(this.status); - } - - @InternalApi("Used in Changestream beam pipeline.") - public List getChangeStreamContinuationTokens() { - return changeStreamContinuationTokens.build(); - } - - private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { - input.defaultReadObject(); - - @SuppressWarnings("unchecked") - ImmutableList deserialized = - (ImmutableList) input.readObject(); - this.changeStreamContinuationTokens = - ImmutableList.builder().addAll(deserialized); - } - - private void writeObject(ObjectOutputStream output) throws IOException { - output.defaultWriteObject(); - output.writeObject(changeStreamContinuationTokens.build()); + return new AutoValue_CloseStream(status, changeStreamContinuationTokens.build()); } /** Wraps the protobuf {@link ReadChangeStreamResponse.CloseStream}. */ - static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { - return new CloseStream(closeStream.getStatus(), closeStream.getContinuationTokensList()); + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") + public static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { + return create(closeStream.getStatus(), closeStream.getContinuationTokensList()); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CloseStream record = (CloseStream) o; - return Objects.equal(getStatus(), record.getStatus()) - && Objects.equal( - getChangeStreamContinuationTokens(), record.getChangeStreamContinuationTokens()); - } + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") + @Nonnull + public abstract Status getStatus(); - @Override - public int hashCode() { - return Objects.hashCode(getStatus(), getChangeStreamContinuationTokens()); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("status", getStatus()) - .add("changeStreamContinuationTokens", getChangeStreamContinuationTokens()) - .toString(); - } + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") + @Nonnull + public abstract List getChangeStreamContinuationTokens(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java index d8eb632e54..fd8d46583f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java @@ -15,17 +15,20 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; import javax.annotation.Nonnull; +import javax.annotation.Nullable; /** * Default implementation of a {@link ChangeStreamRecordAdapter} that uses {@link * ChangeStreamRecord}s to represent change stream records. */ +@InternalApi public class DefaultChangeStreamRecordAdapter implements ChangeStreamRecordAdapter { @@ -68,10 +71,10 @@ static class DefaultChangeStreamRecordBuilder private ChangeStreamMutation.Builder changeStreamMutationBuilder = null; // For the current SetCell. - private String family; - private ByteString qualifier; - private long timestampMicros; - private ByteString value; + @Nullable private String family; + @Nullable private ByteString qualifier; + @Nullable private long timestampMicros; + @Nullable private ByteString value; public DefaultChangeStreamRecordBuilder() { reset(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java index c5c30016f4..5bb55e3f4a 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java @@ -15,12 +15,9 @@ */ package com.google.cloud.bigtable.data.v2.models; -import com.google.api.core.InternalExtensionOnly; - /** * Default representation of a mod in a data change, which can be a {@link DeleteFamily}, a {@link * DeleteCells}, or a {@link SetCell} This class will be used by {@link ChangeStreamMutation} to * represent a list of mods in a logical change stream mutation. */ -@InternalExtensionOnly public interface Entry {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index 40daa9d23a..5a484b3ff5 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -24,7 +24,7 @@ import javax.annotation.Nonnull; /** A simple wrapper for {@link ReadChangeStreamResponse.Heartbeat}. */ -@InternalExtensionOnly("Used in Changestream beam pipeline testing.") +@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class Heartbeat implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608504L; @@ -41,9 +41,9 @@ static Heartbeat fromProto(@Nonnull ReadChangeStreamResponse.Heartbeat heartbeat heartbeat.getLowWatermark()); } - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public abstract ChangeStreamContinuationToken getChangeStreamContinuationToken(); - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public abstract Timestamp getLowWatermark(); } diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java index c56a4163b8..a3cdff5912 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Range.java @@ -398,8 +398,8 @@ private void writeObject(ObjectOutputStream output) throws IOException { output.defaultWriteObject(); } - @InternalApi("Used in Changestream beam pipeline.") - public static ByteString toByteString(ByteStringRange byteStringRange) { + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") + public static ByteString serializeToByteString(ByteStringRange byteStringRange) { return RowRange.newBuilder() .setStartKeyClosed(byteStringRange.getStart()) .setEndKeyOpen(byteStringRange.getEnd()) @@ -407,7 +407,7 @@ public static ByteString toByteString(ByteStringRange byteStringRange) { .toByteString(); } - @InternalApi("Used in Changestream beam pipeline.") + @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public static ByteStringRange toByteStringRange(ByteString byteString) throws InvalidProtocolBufferException { RowRange rowRange = RowRange.newBuilder().mergeFrom(byteString).build(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java index 5ac3a743f6..3198290649 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java @@ -35,6 +35,7 @@ import java.io.Serializable; import java.util.List; import javax.annotation.Nonnull; +import javax.annotation.Nullable; /** A simple wrapper to construct a query for the ReadChangeStream RPC. */ public final class ReadChangeStreamQuery implements Serializable { @@ -164,7 +165,7 @@ public ReadChangeStreamQuery continuationTokens( for (ChangeStreamContinuationToken changeStreamContinuationToken : changeStreamContinuationTokens) { builder.setContinuationTokens( - streamContinuationTokensBuilder.addTokens(changeStreamContinuationToken.toProto())); + streamContinuationTokensBuilder.addTokens(changeStreamContinuationToken.getTokenProto())); } builder.setContinuationTokens(streamContinuationTokensBuilder.build()); return this; @@ -217,7 +218,8 @@ public ReadChangeStreamQuery clone() { return query; } - private static ByteString wrapKey(String key) { + @Nullable + private static ByteString wrapKey(@Nullable String key) { if (key == null) { return null; } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java index 7716ec06f7..784d46d730 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java @@ -50,7 +50,7 @@ private RowRange rowRangeFromPartition(ByteStringRange partition) { public void basicTest() throws Exception { ByteStringRange byteStringRange = createFakeByteStringRange(); ChangeStreamContinuationToken changeStreamContinuationToken = - new ChangeStreamContinuationToken(byteStringRange, TOKEN); + ChangeStreamContinuationToken.create(byteStringRange, TOKEN); Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); @@ -80,14 +80,14 @@ public void fromProtoTest() { Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); Assert.assertEquals( changeStreamContinuationToken, - ChangeStreamContinuationToken.fromProto(changeStreamContinuationToken.toProto())); + ChangeStreamContinuationToken.fromProto(changeStreamContinuationToken.getTokenProto())); } @Test public void toByteStringTest() throws Exception { ByteStringRange byteStringRange = createFakeByteStringRange(); ChangeStreamContinuationToken changeStreamContinuationToken = - new ChangeStreamContinuationToken(byteStringRange, TOKEN); + ChangeStreamContinuationToken.create(byteStringRange, TOKEN); Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); Assert.assertEquals( diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java index ed54628f67..c6aa7580dd 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -157,7 +157,7 @@ public void closeStreamTest() { .build(); CloseStream actualCloseStream = CloseStream.fromProto(closeStreamProto); - Assert.assertEquals(status, actualCloseStream.getStatus().toProto()); + Assert.assertEquals(status, actualCloseStream.getStatus()); Assert.assertEquals( actualCloseStream.getChangeStreamContinuationTokens().get(0).getPartition(), ByteStringRange.create(rowRange1.getStartKeyClosed(), rowRange1.getEndKeyOpen())); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java index 96768e1c82..6f1061f8dc 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/RangeTest.java @@ -312,7 +312,7 @@ public void byteStringSerializationTest() throws IOException, ClassNotFoundExcep public void byteStringRangeToByteStringTest() throws InvalidProtocolBufferException { ByteStringRange expected = ByteStringRange.create("a", "z"); - ByteString serialized = ByteStringRange.toByteString(expected); + ByteString serialized = ByteStringRange.serializeToByteString(expected); ByteStringRange deserialized = ByteStringRange.toByteStringRange(serialized); assertThat(expected).isEqualTo(deserialized); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java index 56cc5aa845..5cc04f764d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java @@ -114,7 +114,7 @@ public void closeStreamTest() { ChangeStreamRecord record = results.get(0); Assert.assertTrue(record instanceof CloseStream); CloseStream closeStream = (CloseStream) record; - Assert.assertEquals(closeStream.getStatus().toProto(), closeStreamProto.getStatus()); + Assert.assertEquals(closeStream.getStatus(), closeStreamProto.getStatus()); Assert.assertEquals(closeStream.getChangeStreamContinuationTokens().size(), 1); ChangeStreamContinuationToken changeStreamContinuationToken = closeStream.getChangeStreamContinuationTokens().get(0); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java index 483562aa4a..a02013886e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -60,11 +60,11 @@ * to https://github.com/googleapis/conformance-tests/tree/main/bigtable/v2/proto/google/cloud/conformance/bigtable/v2 * and the test data to https://github.com/googleapis/conformance-tests/blob/main/bigtable/v2/readrows.json + * href="https://github.com/googleapis/conformance-tests/blob/main/bigtable/v2/changestream.json">https://github.com/googleapis/conformance-tests/blob/main/bigtable/v2/changestream.json */ @RunWith(Parameterized.class) public class ReadChangeStreamMergingAcceptanceTest { - // Location: `google-cloud-bigtable/src/main/resources/changestream.json` + // Location: `google-cloud-bigtable/src/test/resources/changestream.json` private static final String TEST_DATA_JSON_RESOURCE = "changestream.json"; private final ReadChangeStreamTest testCase; @@ -152,8 +152,7 @@ public void test() throws Exception { } else if (record instanceof CloseStream) { CloseStream closeStream = (CloseStream) record; ReadChangeStreamResponse.CloseStream.Builder builder = - ReadChangeStreamResponse.CloseStream.newBuilder() - .setStatus(closeStream.getStatus().toProto()); + ReadChangeStreamResponse.CloseStream.newBuilder().setStatus(closeStream.getStatus()); for (ChangeStreamContinuationToken token : closeStream.getChangeStreamContinuationTokens()) { builder.addContinuationTokens( diff --git a/google-cloud-bigtable/src/main/proto/changestream_tests.proto b/google-cloud-bigtable/src/test/proto/changestream_tests.proto similarity index 100% rename from google-cloud-bigtable/src/main/proto/changestream_tests.proto rename to google-cloud-bigtable/src/test/proto/changestream_tests.proto diff --git a/google-cloud-bigtable/src/main/resources/changestream.json b/google-cloud-bigtable/src/test/resources/changestream.json similarity index 100% rename from google-cloud-bigtable/src/main/resources/changestream.json rename to google-cloud-bigtable/src/test/resources/changestream.json From 46193f9ad8619274f42dcacfd82589cc98143805 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Tue, 10 Jan 2023 16:05:09 -0500 Subject: [PATCH 19/27] fix test --- google-cloud-bigtable/pom.xml | 2 ++ .../cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 3570e90fd2..d5cfb6550d 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -37,6 +37,8 @@ Also, this property will be augmented by `internal-bigtable-prod-batch-it-prop-helper` profile --> batch-bigtable.googleapis.com:443 + 1.51.0 3.21.10 ${protobuf.version} diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index 1052a1646d..aa5713e860 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -114,7 +114,7 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); Assert.assertEquals( changeStreamMutation.getType(), ChangeStreamMutation.MutationType.GARBAGE_COLLECTION); - Assert.assertNull(changeStreamMutation.getSourceClusterId()); + Assert.assertTrue(changeStreamMutation.getSourceClusterId().isEmpty()); Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); From 6108c4eacf3c18816563a446b267e652f7b226d4 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Tue, 10 Jan 2023 17:07:44 -0500 Subject: [PATCH 20/27] Correct the grpc & proto version --- google-cloud-bigtable/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index d5cfb6550d..26c84d0c8c 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -39,8 +39,8 @@ - 1.51.0 - 3.21.10 + 1.51.1 + 3.21.12 ${protobuf.version} From aff6021fe8373cbac0ffb7ebd9e0e26fe86a7ff5 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Thu, 12 Jan 2023 13:44:19 -0500 Subject: [PATCH 21/27] Address comments --- google-cloud-bigtable-stats/pom.xml | 4 ---- .../v2/models/ChangeStreamContinuationToken.java | 3 +-- .../data/v2/models/ChangeStreamMutation.java | 16 +--------------- .../data/v2/models/ChangeStreamRecord.java | 4 ++-- .../bigtable/data/v2/models/CloseStream.java | 3 +-- .../cloud/bigtable/data/v2/models/Heartbeat.java | 3 +-- 6 files changed, 6 insertions(+), 27 deletions(-) diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index cba854b64d..39b983c7e6 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -16,10 +16,6 @@ 2.17.2-SNAPSHOT Experimental project to shade OpenCensus dependencies. - - 3.4.1 - - diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java index c0d2138e02..f619d9dae0 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationToken.java @@ -16,7 +16,6 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; -import com.google.api.core.InternalExtensionOnly; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.RowRange; import com.google.bigtable.v2.StreamContinuationToken; @@ -28,7 +27,7 @@ import javax.annotation.Nonnull; /** A simple wrapper for {@link StreamContinuationToken}. */ -@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class ChangeStreamContinuationToken implements Serializable { private static final long serialVersionUID = 524679926247095L; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index 2fe9aa0d92..eb160f3032 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -16,7 +16,6 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; -import com.google.api.core.InternalExtensionOnly; import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; @@ -60,7 +59,7 @@ * * Make this class non-final so that we can create a subclass to mock it. */ -@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class ChangeStreamMutation implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 8419520253162024218L; @@ -105,19 +104,6 @@ static Builder createGcMutation( return new Builder(rowKey, MutationType.GARBAGE_COLLECTION, "", commitTimestamp, tieBreaker); } - // private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException { - // input.defaultReadObject(); - // - // @SuppressWarnings("unchecked") - // ImmutableList deserialized = (ImmutableList) input.readObject(); - // getEntries() = ImmutableList.builder().addAll(deserialized); - // } - // - // private void writeObject(ObjectOutputStream output) throws IOException { - // output.defaultWriteObject(); - // output.writeObject(getEntries()); - // } - /** Get the row key of the current mutation. */ @Nonnull public abstract ByteString getRowKey(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java index def50ec18f..edf0c1a26e 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecord.java @@ -15,11 +15,11 @@ */ package com.google.cloud.bigtable.data.v2.models; -import com.google.api.core.InternalExtensionOnly; +import com.google.api.core.InternalApi; /** * Default representation of a change stream record, which can be a Heartbeat, a CloseStream, or a * logical mutation. */ -@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") public interface ChangeStreamRecord {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java index d5300514d4..adb5cc163b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -16,7 +16,6 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; -import com.google.api.core.InternalExtensionOnly; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.StreamContinuationToken; @@ -30,7 +29,7 @@ * A simple wrapper for {@link ReadChangeStreamResponse.CloseStream}. Make this class non-final so * that we can create a subclass to mock it. */ -@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class CloseStream implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608505L; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java index 5a484b3ff5..ecf9cd1b55 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Heartbeat.java @@ -16,7 +16,6 @@ package com.google.cloud.bigtable.data.v2.models; import com.google.api.core.InternalApi; -import com.google.api.core.InternalExtensionOnly; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.protobuf.Timestamp; @@ -24,7 +23,7 @@ import javax.annotation.Nonnull; /** A simple wrapper for {@link ReadChangeStreamResponse.Heartbeat}. */ -@InternalExtensionOnly("Intended for use by the BigtableIO in apache/beam only.") +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class Heartbeat implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608504L; From 7ad8ac4a52d3ac19ea056855383315d3f1edd8fc Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Tue, 7 Feb 2023 16:01:04 -0500 Subject: [PATCH 22/27] Address comments --- .../data/v2/models/ChangeStreamMutation.java | 111 +++++---------- .../v2/models/ChangeStreamRecordAdapter.java | 9 +- .../bigtable/data/v2/models/CloseStream.java | 21 ++- .../DefaultChangeStreamRecordAdapter.java | 11 +- .../bigtable/data/v2/models/DeleteCells.java | 2 + .../bigtable/data/v2/models/DeleteFamily.java | 2 + .../cloud/bigtable/data/v2/models/Entry.java | 3 + .../data/v2/models/ReadChangeStreamQuery.java | 42 +++--- .../bigtable/data/v2/models/SetCell.java | 2 + .../ChangeStreamRecordMerger.java | 18 ++- .../ChangeStreamStateMachine.java | 52 +++++-- .../v2/models/ChangeStreamMutationTest.java | 102 ++++---------- .../DefaultChangeStreamRecordAdapterTest.java | 129 +++++++++--------- .../v2/models/ReadChangeStreamQueryTest.java | 66 ++++----- ...ReadChangeStreamMergingAcceptanceTest.java | 6 +- .../ReadChangeStreamRetryTest.java | 5 +- .../ReadChangeStreamUserCallableTest.java | 7 +- 17 files changed, 270 insertions(+), 318 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index eb160f3032..a069f87101 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -19,12 +19,9 @@ import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; -import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.protobuf.ByteString; -import com.google.protobuf.Timestamp; import java.io.Serializable; -import java.util.List; import javax.annotation.Nonnull; /** @@ -69,18 +66,6 @@ public enum MutationType { GARBAGE_COLLECTION } - private static ChangeStreamMutation create(Builder builder) { - return new AutoValue_ChangeStreamMutation( - builder.rowKey, - builder.type, - builder.sourceClusterId, - builder.commitTimestamp, - builder.tieBreaker, - builder.token, - builder.lowWatermark, - builder.entries.build()); - } - /** * Creates a new instance of a user initiated mutation. It returns a builder instead of a * ChangeStreamMutation because `token` and `loWatermark` must be set later when we finish @@ -89,9 +74,14 @@ private static ChangeStreamMutation create(Builder builder) { static Builder createUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - @Nonnull Timestamp commitTimestamp, + @Nonnull long commitTimestamp, int tieBreaker) { - return new Builder(rowKey, MutationType.USER, sourceClusterId, commitTimestamp, tieBreaker); + return builder() + .setRowKey(rowKey) + .setType(MutationType.USER) + .setSourceClusterId(sourceClusterId) + .setCommitTimestamp(commitTimestamp) + .setTieBreaker(tieBreaker); } /** @@ -100,8 +90,13 @@ static Builder createUserMutation( * mutation. */ static Builder createGcMutation( - @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { - return new Builder(rowKey, MutationType.GARBAGE_COLLECTION, "", commitTimestamp, tieBreaker); + @Nonnull ByteString rowKey, @Nonnull long commitTimestamp, int tieBreaker) { + return builder() + .setRowKey(rowKey) + .setType(MutationType.GARBAGE_COLLECTION) + .setSourceClusterId("") + .setCommitTimestamp(commitTimestamp) + .setTieBreaker(tieBreaker); } /** Get the row key of the current mutation. */ @@ -118,7 +113,7 @@ static Builder createGcMutation( /** Get the commit timestamp of the current mutation. */ @Nonnull - public abstract Timestamp getCommitTimestamp(); + public abstract long getCommitTimestamp(); /** * Get the tie breaker of the current mutation. This is used to resolve conflicts when multiple @@ -133,66 +128,43 @@ static Builder createGcMutation( /** Get the low watermark of the current mutation. */ @Nonnull - public abstract Timestamp getLowWatermark(); + public abstract long getLowWatermark(); /** Get the list of mods of the current mutation. */ @Nonnull - public abstract List getEntries(); + public abstract ImmutableList getEntries(); - /** Returns a builder containing all the values of this ChangeStreamMutation class. */ - Builder toBuilder() { - return new Builder(this); + /** Returns a new builder for this class. */ + static Builder builder() { + return new AutoValue_ChangeStreamMutation.Builder(); } /** Helper class to create a ChangeStreamMutation. */ @InternalApi("Intended for use by the BigtableIO in apache/beam only.") - public static class Builder { - private final ByteString rowKey; + @AutoValue.Builder + abstract static class Builder { + abstract Builder setRowKey(@Nonnull ByteString rowKey); - private final MutationType type; + abstract Builder setType(@Nonnull MutationType type); - private final String sourceClusterId; + abstract Builder setSourceClusterId(@Nonnull String sourceClusterId); - private final Timestamp commitTimestamp; + abstract Builder setCommitTimestamp(@Nonnull long commitTimestamp); - private final int tieBreaker; + abstract Builder setTieBreaker(@Nonnull int tieBreaker); - private transient ImmutableList.Builder entries = ImmutableList.builder(); + abstract ImmutableList.Builder entriesBuilder(); - private String token; + abstract Builder setToken(@Nonnull String token); - private Timestamp lowWatermark; - - private Builder( - ByteString rowKey, - MutationType type, - String sourceClusterId, - Timestamp commitTimestamp, - int tieBreaker) { - this.rowKey = rowKey; - this.type = type; - this.sourceClusterId = sourceClusterId; - this.commitTimestamp = commitTimestamp; - this.tieBreaker = tieBreaker; - } - - private Builder(ChangeStreamMutation changeStreamMutation) { - this.rowKey = changeStreamMutation.getRowKey(); - this.type = changeStreamMutation.getType(); - this.sourceClusterId = changeStreamMutation.getSourceClusterId(); - this.commitTimestamp = changeStreamMutation.getCommitTimestamp(); - this.tieBreaker = changeStreamMutation.getTieBreaker(); - this.entries.addAll(changeStreamMutation.getEntries()); - this.token = changeStreamMutation.getToken(); - this.lowWatermark = changeStreamMutation.getLowWatermark(); - } + abstract Builder setLowWatermark(@Nonnull long lowWatermark); Builder setCell( @Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, @Nonnull ByteString value) { - this.entries.add(SetCell.create(familyName, qualifier, timestamp, value)); + this.entriesBuilder().add(SetCell.create(familyName, qualifier, timestamp, value)); return this; } @@ -200,31 +172,16 @@ Builder deleteCells( @Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull TimestampRange timestampRange) { - this.entries.add(DeleteCells.create(familyName, qualifier, timestampRange)); + this.entriesBuilder().add(DeleteCells.create(familyName, qualifier, timestampRange)); return this; } Builder deleteFamily(@Nonnull String familyName) { - this.entries.add(DeleteFamily.create(familyName)); + this.entriesBuilder().add(DeleteFamily.create(familyName)); return this; } - Builder setToken(@Nonnull String token) { - this.token = token; - return this; - } - - Builder setLowWatermark(@Nonnull Timestamp lowWatermark) { - this.lowWatermark = lowWatermark; - return this; - } - - ChangeStreamMutation build() { - Preconditions.checkArgument( - token != null && lowWatermark != null, - "ChangeStreamMutation must have a continuation token and low watermark."); - return ChangeStreamMutation.create(this); - } + abstract ChangeStreamMutation build(); } public RowMutation toRowMutation(@Nonnull String tableId) { diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java index 08d0ec77b7..4f17d70d66 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java @@ -19,7 +19,6 @@ import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.protobuf.ByteString; -import com.google.protobuf.Timestamp; import javax.annotation.Nonnull; /** @@ -28,6 +27,7 @@ * filtering(for example, only keep DeleteFamily in the mutations). This adapter acts like a factory * for a SAX style change stream record builder. */ +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") public interface ChangeStreamRecordAdapter { /** Creates a new instance of a {@link ChangeStreamRecordBuilder}. */ ChangeStreamRecordBuilder createChangeStreamRecordBuilder(); @@ -115,7 +115,7 @@ interface ChangeStreamRecordBuilder { void startUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - @Nonnull Timestamp commitTimestamp, + @Nonnull long commitTimestamp, int tieBreaker); /** @@ -123,8 +123,7 @@ void startUserMutation( * once. If called, the current change stream record must not include any close stream message * or heartbeat. */ - void startGcMutation( - @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker); + void startGcMutation(@Nonnull ByteString rowKey, @Nonnull long commitTimestamp, int tieBreaker); /** Called to add a DeleteFamily mod. */ void deleteFamily(@Nonnull String familyName); @@ -165,7 +164,7 @@ void deleteCells( /** Called once per stream record to signal that all mods have been processed (unless reset). */ ChangeStreamRecordT finishChangeStreamMutation( - @Nonnull String token, @Nonnull Timestamp lowWatermark); + @Nonnull String token, @Nonnull long lowWatermark); /** Called when the current in progress change stream record should be dropped */ void reset(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java index adb5cc163b..4760e511e9 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/CloseStream.java @@ -18,7 +18,6 @@ import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; import com.google.bigtable.v2.ReadChangeStreamResponse; -import com.google.bigtable.v2.StreamContinuationToken; import com.google.common.collect.ImmutableList; import com.google.rpc.Status; import java.io.Serializable; @@ -26,8 +25,8 @@ import javax.annotation.Nonnull; /** - * A simple wrapper for {@link ReadChangeStreamResponse.CloseStream}. Make this class non-final so - * that we can create a subclass to mock it. + * A simple wrapper for {@link ReadChangeStreamResponse.CloseStream}. This message is received when + * the stream reading is finished(i.e. read past the stream end time), or an error has occurred. */ @InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue @@ -35,20 +34,18 @@ public abstract class CloseStream implements ChangeStreamRecord, Serializable { private static final long serialVersionUID = 7316215828353608505L; private static CloseStream create( - Status status, List continuationTokens) { - ImmutableList.Builder changeStreamContinuationTokens = - ImmutableList.builder(); - for (StreamContinuationToken streamContinuationToken : continuationTokens) { - changeStreamContinuationTokens.add( - ChangeStreamContinuationToken.fromProto(streamContinuationToken)); - } - return new AutoValue_CloseStream(status, changeStreamContinuationTokens.build()); + Status status, List changeStreamContinuationTokens) { + return new AutoValue_CloseStream(status, changeStreamContinuationTokens); } /** Wraps the protobuf {@link ReadChangeStreamResponse.CloseStream}. */ @InternalApi("Intended for use by the BigtableIO in apache/beam only.") public static CloseStream fromProto(@Nonnull ReadChangeStreamResponse.CloseStream closeStream) { - return create(closeStream.getStatus(), closeStream.getContinuationTokensList()); + return create( + closeStream.getStatus(), + closeStream.getContinuationTokensList().stream() + .map(ChangeStreamContinuationToken::fromProto) + .collect(ImmutableList.toImmutableList())); } @InternalApi("Intended for use by the BigtableIO in apache/beam only.") diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java index fd8d46583f..ae9f4c7f93 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java @@ -20,7 +20,6 @@ import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; -import com.google.protobuf.Timestamp; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -83,7 +82,7 @@ public DefaultChangeStreamRecordBuilder() { /** {@inheritDoc} */ @Override public ChangeStreamRecord onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { - Preconditions.checkArgument( + Preconditions.checkState( this.changeStreamMutationBuilder == null, "Can not create a Heartbeat when there is an existing ChangeStreamMutation being built."); return Heartbeat.fromProto(heartbeat); @@ -92,7 +91,7 @@ public ChangeStreamRecord onHeartbeat(ReadChangeStreamResponse.Heartbeat heartbe /** {@inheritDoc} */ @Override public ChangeStreamRecord onCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { - Preconditions.checkArgument( + Preconditions.checkState( this.changeStreamMutationBuilder == null, "Can not create a CloseStream when there is an existing ChangeStreamMutation being built."); return CloseStream.fromProto(closeStream); @@ -103,7 +102,7 @@ public ChangeStreamRecord onCloseStream(ReadChangeStreamResponse.CloseStream clo public void startUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - @Nonnull Timestamp commitTimestamp, + @Nonnull long commitTimestamp, int tieBreaker) { this.changeStreamMutationBuilder = ChangeStreamMutation.createUserMutation( @@ -113,7 +112,7 @@ public void startUserMutation( /** {@inheritDoc} */ @Override public void startGcMutation( - @Nonnull ByteString rowKey, @Nonnull Timestamp commitTimestamp, int tieBreaker) { + @Nonnull ByteString rowKey, @Nonnull long commitTimestamp, int tieBreaker) { this.changeStreamMutationBuilder = ChangeStreamMutation.createGcMutation(rowKey, commitTimestamp, tieBreaker); } @@ -158,7 +157,7 @@ public void finishCell() { /** {@inheritDoc} */ @Override public ChangeStreamRecord finishChangeStreamMutation( - @Nonnull String token, @Nonnull Timestamp lowWatermark) { + @Nonnull String token, @Nonnull long lowWatermark) { this.changeStreamMutationBuilder.setToken(token); this.changeStreamMutationBuilder.setLowWatermark(lowWatermark); return this.changeStreamMutationBuilder.build(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java index 238ddb1638..26fcdd1083 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteCells.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.protobuf.ByteString; @@ -22,6 +23,7 @@ import javax.annotation.Nonnull; /** Representation of a DeleteCells mod in a data change. */ +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class DeleteCells implements Entry, Serializable { private static final long serialVersionUID = 851772158721462017L; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java index 171ecccb41..367811c386 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DeleteFamily.java @@ -15,11 +15,13 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; import java.io.Serializable; import javax.annotation.Nonnull; /** Representation of a DeleteFamily mod in a data change. */ +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class DeleteFamily implements Entry, Serializable { private static final long serialVersionUID = 81806775917145615L; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java index 5bb55e3f4a..44abf53d5f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/Entry.java @@ -15,9 +15,12 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; + /** * Default representation of a mod in a data change, which can be a {@link DeleteFamily}, a {@link * DeleteCells}, or a {@link SetCell} This class will be used by {@link ChangeStreamMutation} to * represent a list of mods in a logical change stream mutation. */ +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") public interface Entry {} diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java index 3198290649..49132bec7f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java @@ -28,7 +28,7 @@ import com.google.common.base.Preconditions; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; -import com.google.protobuf.Timestamp; +import com.google.protobuf.util.Timestamps; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -38,7 +38,8 @@ import javax.annotation.Nullable; /** A simple wrapper to construct a query for the ReadChangeStream RPC. */ -public final class ReadChangeStreamQuery implements Serializable { +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") +public final class ReadChangeStreamQuery implements Serializable, Cloneable { private static final long serialVersionUID = 948588515749969176L; private final String tableId; @@ -140,45 +141,43 @@ public ReadChangeStreamQuery streamPartition(ByteStringRange range) { return streamPartition(rangeBuilder.build()); } - /** Sets the startTime to read the change stream. */ - public ReadChangeStreamQuery startTime(Timestamp value) { - Preconditions.checkArgument( + /** Sets the startTime(Nanosecond) to read the change stream. */ + public ReadChangeStreamQuery startTime(long value) { + Preconditions.checkState( !builder.hasContinuationTokens(), "startTime and continuationTokens can't be specified together"); - builder.setStartTime(value); + builder.setStartTime(Timestamps.fromNanos(value)); return this; } - /** Sets the endTime to read the change stream. */ - public ReadChangeStreamQuery endTime(Timestamp value) { - builder.setEndTime(value); + /** Sets the endTime(Nanosecond) to read the change stream. */ + public ReadChangeStreamQuery endTime(long value) { + builder.setEndTime(Timestamps.fromNanos(value)); return this; } /** Sets the stream continuation tokens to read the change stream. */ public ReadChangeStreamQuery continuationTokens( List changeStreamContinuationTokens) { - Preconditions.checkArgument( + Preconditions.checkState( !builder.hasStartTime(), "startTime and continuationTokens can't be specified together"); StreamContinuationTokens.Builder streamContinuationTokensBuilder = StreamContinuationTokens.newBuilder(); for (ChangeStreamContinuationToken changeStreamContinuationToken : changeStreamContinuationTokens) { - builder.setContinuationTokens( - streamContinuationTokensBuilder.addTokens(changeStreamContinuationToken.getTokenProto())); + streamContinuationTokensBuilder.addTokens(changeStreamContinuationToken.getTokenProto()); } - builder.setContinuationTokens(streamContinuationTokensBuilder.build()); + builder.setContinuationTokens(streamContinuationTokensBuilder); return this; } /** Sets the heartbeat duration for the change stream. */ - public ReadChangeStreamQuery heartbeatDuration(long seconds) { - return heartbeatDuration(seconds, 0); - } - - /** Sets the heartbeat duration for the change stream. */ - public ReadChangeStreamQuery heartbeatDuration(long seconds, int nanos) { - builder.setHeartbeatDuration(Duration.newBuilder().setSeconds(seconds).setNanos(nanos).build()); + public ReadChangeStreamQuery heartbeatDuration(java.time.Duration duration) { + builder.setHeartbeatDuration( + Duration.newBuilder() + .setSeconds(duration.getSeconds()) + .setNanos(duration.getNano()) + .build()); return this; } @@ -212,7 +211,8 @@ public static ReadChangeStreamQuery fromProto(@Nonnull ReadChangeStreamRequest r return query; } - public ReadChangeStreamQuery clone() { + @Override + protected ReadChangeStreamQuery clone() { ReadChangeStreamQuery query = ReadChangeStreamQuery.create(tableId); query.builder = this.builder.clone(); return query; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java index 0c1add67f8..92f9b6d386 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/SetCell.java @@ -15,6 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.models; +import com.google.api.core.InternalApi; import com.google.auto.value.AutoValue; import com.google.cloud.bigtable.data.v2.stub.changestream.ChangeStreamRecordMerger; import com.google.protobuf.ByteString; @@ -25,6 +26,7 @@ * Representation of a SetCell mod in a data change, whose value is concatenated by {@link * ChangeStreamRecordMerger} in case of SetCell value chunking. */ +@InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue public abstract class SetCell implements Entry, Serializable { private static final long serialVersionUID = 77123872266724154L; diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java index 0b4bf5acdb..30c6eb94b6 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMerger.java @@ -77,12 +77,18 @@ public ChangeStreamRecordMerger( @Override public void push(ReadChangeStreamResponse response) { - if (response.hasHeartbeat()) { - changeStreamStateMachine.handleHeartbeat(response.getHeartbeat()); - } else if (response.hasCloseStream()) { - changeStreamStateMachine.handleCloseStream(response.getCloseStream()); - } else { - changeStreamStateMachine.handleDataChange(response.getDataChange()); + switch (response.getStreamRecordCase()) { + case HEARTBEAT: + changeStreamStateMachine.handleHeartbeat(response.getHeartbeat()); + break; + case CLOSE_STREAM: + changeStreamStateMachine.handleCloseStream(response.getCloseStream()); + break; + case DATA_CHANGE: + changeStreamStateMachine.handleDataChange(response.getDataChange()); + break; + case STREAMRECORD_NOT_SET: + throw new IllegalStateException("Illegal stream record."); } if (changeStreamStateMachine.hasCompleteChangeStreamRecord()) { changeStreamRecord.add(changeStreamStateMachine.consumeChangeStreamRecord()); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java index ea555ea445..0120e3139b 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamStateMachine.java @@ -21,6 +21,7 @@ import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter.ChangeStreamRecordBuilder; import com.google.cloud.bigtable.data.v2.models.Range.TimestampRange; import com.google.common.base.Preconditions; +import com.google.protobuf.util.Timestamps; /** * A state machine to produce change stream records from a stream of {@link @@ -71,12 +72,18 @@ * ChangeStreamStateMachine changeStreamStateMachine = new ChangeStreamStateMachine<>(myChangeStreamRecordAdapter); * while(responseIterator.hasNext()) { * ReadChangeStreamResponse response = responseIterator.next(); - * if (response.hasHeartbeat()) { - * changeStreamStateMachine.handleHeartbeat(response.getHeartbeat()); - * } else if (response.hasCloseStream()) { - * changeStreamStateMachine.handleCloseStream(response.getCloseStream()); - * } else { + * switch (response.getStreamRecordCase()) { + * case HEARTBEAT: + * changeStreamStateMachine.handleHeartbeat(response.getHeartbeat()); + * break; + * case CLOSE_STREAM: + * changeStreamStateMachine.handleCloseStream(response.getCloseStream()); + * break; + * case DATA_CHANGE: * changeStreamStateMachine.handleDataChange(response.getDataChange()); + * break; + * case STREAMRECORD_NOT_SET: + * throw new IllegalStateException("Illegal stream record."); * } * if (changeStreamStateMachine.hasCompleteChangeStreamRecord()) { * MyChangeStreamRecord = changeStreamStateMachine.consumeChangeStreamRecord(); @@ -133,7 +140,7 @@ void handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { numHeartbeats++; currentState = currentState.handleHeartbeat(heartbeat); } catch (RuntimeException e) { - currentState = null; + currentState = ERROR; throw e; } } @@ -153,7 +160,7 @@ void handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { numCloseStreams++; currentState = currentState.handleCloseStream(closeStream); } catch (RuntimeException e) { - currentState = null; + currentState = ERROR; throw e; } } @@ -183,7 +190,7 @@ void handleDataChange(ReadChangeStreamResponse.DataChange dataChange) { numDataChanges++; currentState = currentState.handleMod(dataChange, 0); } catch (RuntimeException e) { - currentState = null; + currentState = ERROR; throw e; } } @@ -331,7 +338,7 @@ State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { "AWAITING_NEW_STREAM_RECORD: GC mutation shouldn't have source cluster id."); builder.startGcMutation( dataChange.getRowKey(), - dataChange.getCommitTimestamp(), + Timestamps.toNanos(dataChange.getCommitTimestamp()), dataChange.getTiebreaker()); } else if (dataChange.getType() == Type.USER) { validate( @@ -340,7 +347,7 @@ State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { builder.startUserMutation( dataChange.getRowKey(), dataChange.getSourceClusterId(), - dataChange.getCommitTimestamp(), + Timestamps.toNanos(dataChange.getCommitTimestamp()), dataChange.getTiebreaker()); } else { validate(false, "AWAITING_NEW_STREAM_RECORD: Unexpected type: " + dataChange.getType()); @@ -530,6 +537,28 @@ State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { } }; + /** + * A state that represents a broken state of the state machine. Any method called on this state + * will get an exception. + */ + private final State ERROR = + new State() { + @Override + State handleHeartbeat(ReadChangeStreamResponse.Heartbeat heartbeat) { + throw new IllegalStateException("ERROR: Failed to handle Heartbeat."); + } + + @Override + State handleCloseStream(ReadChangeStreamResponse.CloseStream closeStream) { + throw new IllegalStateException("ERROR: Failed to handle CloseStream."); + } + + @Override + State handleMod(ReadChangeStreamResponse.DataChange dataChange, int index) { + throw new IllegalStateException("ERROR: Failed to handle DataChange."); + } + }; + /** * Check if we should continue handling mods in the current DataChange or wrap up. There are 3 * cases: @@ -561,7 +590,8 @@ private State checkAndFinishMutationIfNeeded( validate(!dataChange.getToken().isEmpty(), "Last data change missing token"); validate(dataChange.hasLowWatermark(), "Last data change missing lowWatermark"); completeChangeStreamRecord = - builder.finishChangeStreamMutation(dataChange.getToken(), dataChange.getLowWatermark()); + builder.finishChangeStreamMutation( + dataChange.getToken(), Timestamps.toNanos(dataChange.getLowWatermark())); return AWAITING_STREAM_RECORD_CONSUME; } // Case 2_2): The current DataChange itself is chunked, so wait for the next diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index aa5713e860..ed7034caca 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -23,7 +23,6 @@ import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.common.primitives.Longs; import com.google.protobuf.ByteString; -import com.google.protobuf.Timestamp; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -44,17 +43,17 @@ public class ChangeStreamMutationTest { private static final String APP_PROFILE_ID = "fake-profile"; private static final RequestContext REQUEST_CONTEXT = RequestContext.create(PROJECT_ID, INSTANCE_ID, APP_PROFILE_ID); + private static final long FAKE_COMMIT_TIMESTAMP = 1000L; + private static final long FAKE_LOW_WATERMARK = 2000L; @Rule public ExpectedException expect = ExpectedException.none(); @Test public void userInitiatedMutationTest() throws IOException, ClassNotFoundException { // Create a user initiated logical mutation. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), @@ -66,17 +65,17 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Test the getters. Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); Assert.assertEquals(changeStreamMutation.getType(), ChangeStreamMutation.MutationType.USER); Assert.assertEquals(changeStreamMutation.getSourceClusterId(), "fake-source-cluster-id"); - Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); + Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), FAKE_COMMIT_TIMESTAMP); Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); - Assert.assertEquals(changeStreamMutation.getLowWatermark(), fakeLowWatermark); + Assert.assertEquals(changeStreamMutation.getLowWatermark(), FAKE_LOW_WATERMARK); // Test serialization. ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -91,11 +90,9 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti @Test public void gcMutationTest() throws IOException, ClassNotFoundException { // Create a GC mutation. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createGcMutation( - ByteString.copyFromUtf8("key"), fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), @@ -107,7 +104,7 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Test the getters. @@ -115,10 +112,10 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { Assert.assertEquals( changeStreamMutation.getType(), ChangeStreamMutation.MutationType.GARBAGE_COLLECTION); Assert.assertTrue(changeStreamMutation.getSourceClusterId().isEmpty()); - Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), fakeCommitTimestamp); + Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), FAKE_COMMIT_TIMESTAMP); Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); - Assert.assertEquals(changeStreamMutation.getLowWatermark(), fakeLowWatermark); + Assert.assertEquals(changeStreamMutation.getLowWatermark(), FAKE_LOW_WATERMARK); // Test serialization. ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -132,11 +129,9 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { @Test public void toRowMutationTest() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), @@ -148,7 +143,7 @@ public void toRowMutationTest() { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Convert it to a rowMutation and construct a MutateRowRequest. @@ -169,38 +164,33 @@ public void toRowMutationTest() { .isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void toRowMutationWithoutTokenShouldFailTest() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); - expect.expect(IllegalArgumentException.class); + expect.expect(IllegalStateException.class); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void toRowMutationWithoutLowWatermarkShouldFailTest() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setToken("fake-token") .build(); - expect.expect(IllegalArgumentException.class); + expect.expect(IllegalStateException.class); } @Test public void toRowMutationEntryTest() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), @@ -212,7 +202,7 @@ public void toRowMutationEntryTest() { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Convert it to a rowMutationEntry and construct a MutateRowRequest. @@ -230,45 +220,40 @@ public void toRowMutationEntryTest() { .isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void toRowMutationEntryWithoutTokenShouldFailTest() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); - expect.expect(IllegalArgumentException.class); + expect.expect(IllegalStateException.class); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void toRowMutationEntryWithoutLowWatermarkShouldFailTest() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setToken("fake-token") .build(); - expect.expect(IllegalArgumentException.class); + expect.expect(IllegalStateException.class); } @Test public void testWithLongValue() { - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation changeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 1000L, ByteString.copyFrom(Longs.toByteArray(1L))) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); RowMutation rowMutation = changeStreamMutation.toRowMutation(TABLE_ID); @@ -281,31 +266,4 @@ public void testWithLongValue() { assertThat(mutateRowRequest.getMutations(0).getSetCell().getValue()) .isEqualTo(ByteString.copyFromUtf8("\000\000\000\000\000\000\000\001")); } - - @Test - public void toBuilderTest() { - // Create a user initiated logical mutation. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); - ChangeStreamMutation changeStreamMutation = - ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) - .setCell( - "fake-family", - ByteString.copyFromUtf8("fake-qualifier"), - 1000, - ByteString.copyFromUtf8("fake-value")) - .deleteFamily("fake-family") - .deleteCells( - "fake-family", - ByteString.copyFromUtf8("fake-qualifier"), - Range.TimestampRange.create(1000L, 2000L)) - .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) - .build(); - - // Test round-trip of a ChangeStreamMutation through `toBuilder().build()`. - ChangeStreamMutation otherMutation = changeStreamMutation.toBuilder().build(); - assertThat(changeStreamMutation).isEqualTo(otherMutation); - } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java index e29b914ffc..8e45a7e12c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapterTest.java @@ -23,7 +23,7 @@ import com.google.bigtable.v2.TimestampRange; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecordAdapter.ChangeStreamRecordBuilder; import com.google.protobuf.ByteString; -import com.google.protobuf.Timestamp; +import com.google.protobuf.util.Timestamps; import com.google.rpc.Status; import org.junit.Assert; import org.junit.Before; @@ -38,6 +38,8 @@ public class DefaultChangeStreamRecordAdapterTest { private final DefaultChangeStreamRecordAdapter adapter = new DefaultChangeStreamRecordAdapter(); private ChangeStreamRecordBuilder changeStreamRecordBuilder; + private static final long FAKE_COMMIT_TIMESTAMP = 1000L; + private static final long FAKE_LOW_WATERMARK = 2000L; @Rule public ExpectedException expect = ExpectedException.none(); @@ -54,9 +56,9 @@ public void isHeartbeatTest() { CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); ChangeStreamRecord changeStreamMutationRecord = ChangeStreamMutation.createGcMutation( - ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0) + ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setToken("token") - .setLowWatermark(Timestamp.getDefaultInstance()) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); Assert.assertTrue(adapter.isHeartbeat(heartbeatRecord)); Assert.assertFalse(adapter.isHeartbeat(closeStreamRecord)); @@ -68,7 +70,7 @@ public void getTokenFromHeartbeatTest() { ChangeStreamRecord heartbeatRecord = Heartbeat.fromProto( ReadChangeStreamResponse.Heartbeat.newBuilder() - .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) + .setLowWatermark(Timestamps.fromNanos(FAKE_LOW_WATERMARK)) .setContinuationToken( StreamContinuationToken.newBuilder().setToken("heartbeat-token").build()) .build()); @@ -91,9 +93,9 @@ public void isChangeStreamMutationTest() { CloseStream.fromProto(ReadChangeStreamResponse.CloseStream.getDefaultInstance()); ChangeStreamRecord changeStreamMutationRecord = ChangeStreamMutation.createGcMutation( - ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0) + ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setToken("token") - .setLowWatermark(Timestamp.getDefaultInstance()) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); Assert.assertFalse(adapter.isChangeStreamMutation(heartbeatRecord)); Assert.assertFalse(adapter.isChangeStreamMutation(closeStreamRecord)); @@ -104,9 +106,9 @@ public void isChangeStreamMutationTest() { public void getTokenFromChangeStreamMutationTest() { ChangeStreamRecord changeStreamMutationRecord = ChangeStreamMutation.createGcMutation( - ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0) + ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0) .setToken("change-stream-mutation-token") - .setLowWatermark(Timestamp.getDefaultInstance()) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); Assert.assertEquals( adapter.getTokenFromChangeStreamMutation(changeStreamMutationRecord), @@ -125,7 +127,7 @@ public void getTokenFromChangeStreamMutationInvalidTypeTest() { public void heartbeatTest() { ReadChangeStreamResponse.Heartbeat expectedHeartbeat = ReadChangeStreamResponse.Heartbeat.newBuilder() - .setLowWatermark(Timestamp.newBuilder().setSeconds(1000).build()) + .setLowWatermark(Timestamps.fromNanos(FAKE_LOW_WATERMARK)) .setContinuationToken( StreamContinuationToken.newBuilder().setToken("random-token").build()) .build(); @@ -151,17 +153,17 @@ public void closeStreamTest() { .isEqualTo(CloseStream.fromProto(expectedCloseStream)); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void createHeartbeatWithExistingMutationShouldFailTest() { changeStreamRecordBuilder.startGcMutation( - ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0); + ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.onHeartbeat(ReadChangeStreamResponse.Heartbeat.getDefaultInstance()); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void createCloseStreamWithExistingMutationShouldFailTest() { changeStreamRecordBuilder.startGcMutation( - ByteString.copyFromUtf8("key"), Timestamp.getDefaultInstance(), 0); + ByteString.copyFromUtf8("key"), FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.onCloseStream( ReadChangeStreamResponse.CloseStream.getDefaultInstance()); } @@ -171,26 +173,26 @@ public void singleDeleteFamilyTest() { // Suppose this is the mod we get from the ReadChangeStreamResponse. Mutation.DeleteFromFamily deleteFromFamily = Mutation.DeleteFromFamily.newBuilder().setFamilyName("fake-family").build(); - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); // Expected logical mutation in the change stream record. ChangeStreamMutation expectedChangeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.deleteFamily(deleteFromFamily.getFamilyName()); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); // Call again. - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); } @@ -207,111 +209,109 @@ public void singleDeleteCellTest() { .setEndTimestampMicros(2000L) .build()) .build(); - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); // Expected logical mutation in the change stream record. ChangeStreamMutation expectedChangeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteCells( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.deleteCells( deleteFromColumn.getFamilyName(), deleteFromColumn.getColumnQualifier(), Range.TimestampRange.create( deleteFromColumn.getTimeRange().getStartTimestampMicros(), deleteFromColumn.getTimeRange().getEndTimestampMicros())); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); // Call again. - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); } @Test public void singleNonChunkedCellTest() { // Expected logical mutation in the change stream record. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation expectedChangeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L, ByteString.copyFromUtf8("fake-value")) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. // Suppose the SetCell is not chunked and the state machine calls `cellValue()` once. changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.startCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("fake-value")); changeStreamRecordBuilder.finishCell(); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); // Call again. - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); } @Test public void singleChunkedCellTest() { // Expected logical mutation in the change stream record. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation expectedChangeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L, ByteString.copyFromUtf8("fake-value1-value2")) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. // Suppose the SetCell is chunked into two pieces and the state machine calls `cellValue()` // twice. changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.startCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("fake-value1")); changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value2")); changeStreamRecordBuilder.finishCell(); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); // Call again. - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); } @Test public void multipleChunkedCellsTest() { // Expected logical mutation in the change stream record. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation.Builder expectedChangeStreamMutationBuilder = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); for (int i = 0; i < 10; ++i) { expectedChangeStreamMutationBuilder.setCell( "fake-family", @@ -319,11 +319,11 @@ public void multipleChunkedCellsTest() { 100L, ByteString.copyFromUtf8(i + "-fake-value1-value2-value3")); } - expectedChangeStreamMutationBuilder.setToken("fake-token").setLowWatermark(fakeLowWatermark); + expectedChangeStreamMutationBuilder.setToken("fake-token").setLowWatermark(FAKE_LOW_WATERMARK); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); for (int i = 0; i < 10; ++i) { changeStreamRecordBuilder.startCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); @@ -333,10 +333,12 @@ public void multipleChunkedCellsTest() { changeStreamRecordBuilder.finishCell(); } // Check that they're the same. - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutationBuilder.build()); // Call again. - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutationBuilder.build()); } @@ -344,11 +346,9 @@ public void multipleChunkedCellsTest() { public void multipleDifferentModsTest() { // Expected logical mutation in the change stream record, which contains one DeleteFromFamily, // one non-chunked cell, and one chunked cell. - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation.Builder expectedChangeStreamMutationBuilder = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setCell( "fake-family", @@ -361,11 +361,11 @@ public void multipleDifferentModsTest() { 100L, ByteString.copyFromUtf8("chunked-value")) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark); + .setLowWatermark(FAKE_LOW_WATERMARK); // Create the ChangeStreamMutation through the ChangeStreamRecordBuilder. changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.deleteFamily("fake-family"); // Add non-chunked cell. changeStreamRecordBuilder.startCell( @@ -378,7 +378,8 @@ public void multipleDifferentModsTest() { changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("chunked")); changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value")); changeStreamRecordBuilder.finishCell(); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutationBuilder.build()); } @@ -404,43 +405,43 @@ public void resetTest() { .setDeleteFromFamily( Mutation.DeleteFromFamily.newBuilder().setFamilyName("fake-family").build()) .build(); - Timestamp fakeCommitTimestamp = Timestamp.newBuilder().setSeconds(1000).build(); - Timestamp fakeLowWatermark = Timestamp.newBuilder().setSeconds(2000).build(); ChangeStreamMutation expectedChangeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.deleteFamily(deleteFromFamily.getDeleteFromFamily().getFamilyName()); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); // Reset a build a cell. changeStreamRecordBuilder.reset(); expectedChangeStreamMutation = ChangeStreamMutation.createUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0) + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .setCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L, ByteString.copyFromUtf8("fake-value1-value2")) .setToken("fake-token") - .setLowWatermark(fakeLowWatermark) + .setLowWatermark(FAKE_LOW_WATERMARK) .build(); changeStreamRecordBuilder.startUserMutation( - ByteString.copyFromUtf8("key"), "fake-source-cluster-id", fakeCommitTimestamp, 0); + ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0); changeStreamRecordBuilder.startCell( "fake-family", ByteString.copyFromUtf8("fake-qualifier"), 100L); changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("fake-value1")); changeStreamRecordBuilder.cellValue(ByteString.copyFromUtf8("-value2")); changeStreamRecordBuilder.finishCell(); - assertThat(changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", fakeLowWatermark)) + assertThat( + changeStreamRecordBuilder.finishChangeStreamMutation("fake-token", FAKE_LOW_WATERMARK)) .isEqualTo(expectedChangeStreamMutation); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java index cae2d93926..cf042e736c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQueryTest.java @@ -28,7 +28,7 @@ import com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange; import com.google.protobuf.ByteString; import com.google.protobuf.Duration; -import com.google.protobuf.Timestamp; +import com.google.protobuf.util.Timestamps; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -49,6 +49,8 @@ public class ReadChangeStreamQueryTest { private static final String TABLE_ID = "fake-table"; private static final String APP_PROFILE_ID = "fake-profile-id"; private RequestContext requestContext; + private static final long FAKE_START_TIME = 1000L; + private static final long FAKE_END_TIME = 2000L; @Rule public ExpectedException expect = ExpectedException.none(); @@ -118,13 +120,10 @@ public void streamPartitionTest() { @Test public void startTimeTest() { - ReadChangeStreamQuery query = - ReadChangeStreamQuery.create(TABLE_ID) - .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).startTime(FAKE_START_TIME); Builder expectedProto = - expectedProtoBuilder() - .setStartTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + expectedProtoBuilder().setStartTime(Timestamps.fromNanos(FAKE_START_TIME)); ReadChangeStreamRequest actualProto = query.toProto(requestContext); assertThat(actualProto).isEqualTo(expectedProto.build()); @@ -132,13 +131,9 @@ public void startTimeTest() { @Test public void endTimeTest() { - ReadChangeStreamQuery query = - ReadChangeStreamQuery.create(TABLE_ID) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).endTime(FAKE_END_TIME); - Builder expectedProto = - expectedProtoBuilder() - .setEndTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()); + Builder expectedProto = expectedProtoBuilder().setEndTime(Timestamps.fromNanos(FAKE_END_TIME)); ReadChangeStreamRequest actualProto = query.toProto(requestContext); assertThat(actualProto).isEqualTo(expectedProto.build()); @@ -146,7 +141,8 @@ public void endTimeTest() { @Test public void heartbeatDurationTest() { - ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(5); + ReadChangeStreamQuery query = + ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(java.time.Duration.ofSeconds(5)); Builder expectedProto = expectedProtoBuilder() @@ -183,7 +179,7 @@ public void continuationTokensTest() { assertThat(actualProto).isEqualTo(expectedProto.build()); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void createWithStartTimeAndContinuationTokensTest() { StreamContinuationToken tokenProto = StreamContinuationToken.newBuilder() @@ -200,7 +196,7 @@ public void createWithStartTimeAndContinuationTokensTest() { ChangeStreamContinuationToken token = ChangeStreamContinuationToken.fromProto(tokenProto); ReadChangeStreamQuery query = ReadChangeStreamQuery.create(TABLE_ID) - .startTime(Timestamp.newBuilder().setSeconds(5).build()) + .startTime(FAKE_START_TIME) .continuationTokens(Collections.singletonList(token)); expect.expect(IllegalArgumentException.class); expect.expectMessage("startTime and continuationTokens can't be specified together"); @@ -225,8 +221,8 @@ public void serializationTest() throws IOException, ClassNotFoundException { ReadChangeStreamQuery.create(TABLE_ID) .streamPartition("simple-begin", "simple-end") .continuationTokens(Collections.singletonList(token)) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) - .heartbeatDuration(5); + .endTime(FAKE_END_TIME) + .heartbeatDuration(java.time.Duration.ofSeconds(5)); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); @@ -271,7 +267,7 @@ public void testFromProto() { .setEndKeyClosed(ByteString.copyFromUtf8("")) .build())) .setContinuationTokens(StreamContinuationTokens.newBuilder().addTokens(token).build()) - .setEndTime(Timestamp.newBuilder().setSeconds(2000).build()) + .setEndTime(Timestamps.fromNanos(FAKE_END_TIME)) .setHeartbeatDuration(Duration.newBuilder().setSeconds(5).build()) .build(); ReadChangeStreamQuery query = ReadChangeStreamQuery.fromProto(request); @@ -291,9 +287,9 @@ public void testEquality() { ReadChangeStreamQuery request = ReadChangeStreamQuery.create(TABLE_ID) .streamPartition("simple-begin", "simple-end") - .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) - .heartbeatDuration(5); + .startTime(FAKE_START_TIME) + .endTime(FAKE_END_TIME) + .heartbeatDuration(java.time.Duration.ofSeconds(5)); // ReadChangeStreamQuery#toProto should not change the ReadChangeStreamQuery instance state request.toProto(requestContext); @@ -301,26 +297,22 @@ public void testEquality() { .isEqualTo( ReadChangeStreamQuery.create(TABLE_ID) .streamPartition("simple-begin", "simple-end") - .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) - .heartbeatDuration(5)); + .startTime(FAKE_START_TIME) + .endTime(FAKE_END_TIME) + .heartbeatDuration(java.time.Duration.ofSeconds(5))); assertThat(ReadChangeStreamQuery.create(TABLE_ID).streamPartition("begin-1", "end-1")) .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).streamPartition("begin-2", "end-1")); + assertThat(ReadChangeStreamQuery.create(TABLE_ID).startTime(FAKE_START_TIME)) + .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).startTime(1001L)); + assertThat(ReadChangeStreamQuery.create(TABLE_ID).endTime(FAKE_END_TIME)) + .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).endTime(1001L)); assertThat( ReadChangeStreamQuery.create(TABLE_ID) - .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build())) - .isNotEqualTo( - ReadChangeStreamQuery.create(TABLE_ID) - .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1001).build())); - assertThat( - ReadChangeStreamQuery.create(TABLE_ID) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build())) + .heartbeatDuration(java.time.Duration.ofSeconds(5))) .isNotEqualTo( ReadChangeStreamQuery.create(TABLE_ID) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1001).build())); - assertThat(ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(5)) - .isNotEqualTo(ReadChangeStreamQuery.create(TABLE_ID).heartbeatDuration(6)); + .heartbeatDuration(java.time.Duration.ofSeconds(6))); } @Test @@ -342,8 +334,8 @@ public void testClone() { ReadChangeStreamQuery.create(TABLE_ID) .streamPartition("begin", "end") .continuationTokens(Collections.singletonList(token)) - .endTime(Timestamp.newBuilder().setSeconds(2000).build()) - .heartbeatDuration(5); + .endTime(FAKE_END_TIME) + .heartbeatDuration(java.time.Duration.ofSeconds(5)); ReadChangeStreamRequest request = ReadChangeStreamRequest.newBuilder() .setTableName(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID)) @@ -357,7 +349,7 @@ public void testClone() { .build())) .setContinuationTokens( StreamContinuationTokens.newBuilder().addTokens(tokenProto).build()) - .setEndTime(Timestamp.newBuilder().setSeconds(2000).build()) + .setEndTime(Timestamps.fromNanos(FAKE_END_TIME)) .setHeartbeatDuration(Duration.newBuilder().setSeconds(5).build()) .build(); diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java index a02013886e..8c3f811903 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -44,6 +44,7 @@ import com.google.cloud.conformance.bigtable.v2.ChangeStreamTestDefinition.ReadChangeStreamTest; import com.google.common.base.CaseFormat; import com.google.protobuf.util.JsonFormat; +import com.google.protobuf.util.Timestamps; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -191,10 +192,11 @@ public void test() throws Exception { if (changeStreamMutation.getSourceClusterId() != null) { builder.setSourceClusterId(changeStreamMutation.getSourceClusterId()); } - builder.setCommitTimestamp(changeStreamMutation.getCommitTimestamp()); + builder.setCommitTimestamp( + Timestamps.fromNanos(changeStreamMutation.getCommitTimestamp())); builder.setTiebreaker(changeStreamMutation.getTieBreaker()); builder.setToken(changeStreamMutation.getToken()); - builder.setLowWatermark(changeStreamMutation.getLowWatermark()); + builder.setLowWatermark(Timestamps.fromNanos(changeStreamMutation.getLowWatermark())); for (Entry entry : changeStreamMutation.getEntries()) { if (entry instanceof DeleteFamily) { DeleteFamily deleteFamily = (DeleteFamily) entry; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java index a75db98fcb..d25dee23f3 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java @@ -43,6 +43,7 @@ import com.google.common.truth.Truth; import com.google.protobuf.ByteString; import com.google.protobuf.Timestamp; +import com.google.protobuf.util.Timestamps; import io.grpc.Status; import io.grpc.Status.Code; import io.grpc.StatusRuntimeException; @@ -71,7 +72,7 @@ public class ReadChangeStreamRetryTest { private static final String HEARTBEAT_TOKEN = "heartbeat-token"; private static final String CLOSE_STREAM_TOKEN = "close-stream-token"; private static final String DATA_CHANGE_TOKEN = "data-change-token"; - private static Timestamp REQUEST_START_TIME = Timestamp.newBuilder().setSeconds(1).build(); + private static final long REQUEST_START_TIME = 1000L; @Rule public GrpcServerRule serverRule = new GrpcServerRule(); private TestBigtableService service; @@ -443,7 +444,7 @@ static RpcExpectation create() { } RpcExpectation expectInitialRequest() { - requestBuilder.setStartTime(REQUEST_START_TIME); + requestBuilder.setStartTime(Timestamps.fromNanos(REQUEST_START_TIME)); return this; } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java index 4043ea78cd..abcb67634b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java @@ -21,6 +21,7 @@ import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; import com.google.cloud.bigtable.gaxx.testing.FakeStreamingApi.ServerStreamingStashCallable; import com.google.common.truth.Truth; +import java.time.Duration; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -39,9 +40,9 @@ public void testRequestIsConverted() { ReadChangeStreamQuery query = ReadChangeStreamQuery.create("fake-table") .streamPartition("begin", "end") - .startTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(1000).build()) - .endTime(com.google.protobuf.Timestamp.newBuilder().setSeconds(2000).build()) - .heartbeatDuration(5L); + .startTime(1000L) + .endTime(2000L) + .heartbeatDuration(Duration.ofSeconds(1)); callable.call(query); Truth.assertThat(innerCallable.getActualRequest()).isEqualTo(query.toProto(REQUEST_CONTEXT)); } From ab311fa897a5da9a787ae9e4cbd265fd7b2b488c Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Tue, 7 Feb 2023 16:39:48 -0500 Subject: [PATCH 23/27] Update grpc version --- google-cloud-bigtable/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index d2a2233c73..0197aa44db 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -39,7 +39,7 @@ - 1.51.1 + 1.52.1 3.21.12 ${protobuf.version} From 6907ff35c938a3ffc8ad546ba44638937676bb08 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Tue, 7 Feb 2023 16:51:38 -0500 Subject: [PATCH 24/27] Update comment --- .../cloud/bigtable/data/v2/models/ChangeStreamMutation.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index a069f87101..3c30cd3e28 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -53,8 +53,6 @@ * builder.deleteCells(...); * ChangeStreamMutation changeStreamMutation = builder.setToken(...).setLowWatermark().build(); * } - * - * Make this class non-final so that we can create a subclass to mock it. */ @InternalApi("Intended for use by the BigtableIO in apache/beam only.") @AutoValue @@ -108,7 +106,7 @@ static Builder createGcMutation( public abstract MutationType getType(); @Nonnull - /** Get the source cluster id of the current mutation. Null for Garbage collection mutation. */ + /** Get the source cluster id of the current mutation. */ public abstract String getSourceClusterId(); /** Get the commit timestamp of the current mutation. */ From dc166281e0f8135bb7b8757d5b98fb68f2a08b30 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Wed, 8 Feb 2023 14:27:30 -0500 Subject: [PATCH 25/27] Address comments --- .../data/v2/models/ChangeStreamMutation.java | 15 ++-- .../v2/models/ChangeStreamRecordAdapter.java | 7 +- .../DefaultChangeStreamRecordAdapter.java | 10 ++- .../data/v2/models/ReadChangeStreamQuery.java | 3 +- .../ReadChangeStreamResumptionStrategy.java | 3 +- .../ChangeStreamContinuationTokenTest.java | 26 +++---- .../v2/models/ChangeStreamMutationTest.java | 72 +++++++++---------- .../v2/models/ChangeStreamRecordTest.java | 32 ++++----- .../bigtable/data/v2/models/EntryTest.java | 18 ++--- ...ChangeStreamRecordMergingCallableTest.java | 31 ++++---- .../ReadChangeStreamRetryTest.java | 22 +++--- .../ReadChangeStreamUserCallableTest.java | 2 +- 12 files changed, 113 insertions(+), 128 deletions(-) diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java index 3c30cd3e28..de8475a713 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutation.java @@ -72,7 +72,7 @@ public enum MutationType { static Builder createUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - @Nonnull long commitTimestamp, + long commitTimestamp, int tieBreaker) { return builder() .setRowKey(rowKey) @@ -88,7 +88,7 @@ static Builder createUserMutation( * mutation. */ static Builder createGcMutation( - @Nonnull ByteString rowKey, @Nonnull long commitTimestamp, int tieBreaker) { + @Nonnull ByteString rowKey, long commitTimestamp, int tieBreaker) { return builder() .setRowKey(rowKey) .setType(MutationType.GARBAGE_COLLECTION) @@ -105,19 +105,17 @@ static Builder createGcMutation( @Nonnull public abstract MutationType getType(); - @Nonnull /** Get the source cluster id of the current mutation. */ + @Nonnull public abstract String getSourceClusterId(); /** Get the commit timestamp of the current mutation. */ - @Nonnull public abstract long getCommitTimestamp(); /** * Get the tie breaker of the current mutation. This is used to resolve conflicts when multiple * mutations are applied to different clusters at the same time. */ - @Nonnull public abstract int getTieBreaker(); /** Get the token of the current mutation, which can be used to resume the changestream. */ @@ -125,7 +123,6 @@ static Builder createGcMutation( public abstract String getToken(); /** Get the low watermark of the current mutation. */ - @Nonnull public abstract long getLowWatermark(); /** Get the list of mods of the current mutation. */ @@ -147,15 +144,15 @@ abstract static class Builder { abstract Builder setSourceClusterId(@Nonnull String sourceClusterId); - abstract Builder setCommitTimestamp(@Nonnull long commitTimestamp); + abstract Builder setCommitTimestamp(long commitTimestamp); - abstract Builder setTieBreaker(@Nonnull int tieBreaker); + abstract Builder setTieBreaker(int tieBreaker); abstract ImmutableList.Builder entriesBuilder(); abstract Builder setToken(@Nonnull String token); - abstract Builder setLowWatermark(@Nonnull long lowWatermark); + abstract Builder setLowWatermark(long lowWatermark); Builder setCell( @Nonnull String familyName, diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java index 4f17d70d66..ff93735b53 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordAdapter.java @@ -115,7 +115,7 @@ interface ChangeStreamRecordBuilder { void startUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - @Nonnull long commitTimestamp, + long commitTimestamp, int tieBreaker); /** @@ -123,7 +123,7 @@ void startUserMutation( * once. If called, the current change stream record must not include any close stream message * or heartbeat. */ - void startGcMutation(@Nonnull ByteString rowKey, @Nonnull long commitTimestamp, int tieBreaker); + void startGcMutation(@Nonnull ByteString rowKey, long commitTimestamp, int tieBreaker); /** Called to add a DeleteFamily mod. */ void deleteFamily(@Nonnull String familyName); @@ -163,8 +163,7 @@ void deleteCells( void finishCell(); /** Called once per stream record to signal that all mods have been processed (unless reset). */ - ChangeStreamRecordT finishChangeStreamMutation( - @Nonnull String token, @Nonnull long lowWatermark); + ChangeStreamRecordT finishChangeStreamMutation(@Nonnull String token, long lowWatermark); /** Called when the current in progress change stream record should be dropped */ void reset(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java index ae9f4c7f93..24f8b6504d 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/DefaultChangeStreamRecordAdapter.java @@ -72,7 +72,7 @@ static class DefaultChangeStreamRecordBuilder // For the current SetCell. @Nullable private String family; @Nullable private ByteString qualifier; - @Nullable private long timestampMicros; + private long timestampMicros; @Nullable private ByteString value; public DefaultChangeStreamRecordBuilder() { @@ -102,7 +102,7 @@ public ChangeStreamRecord onCloseStream(ReadChangeStreamResponse.CloseStream clo public void startUserMutation( @Nonnull ByteString rowKey, @Nonnull String sourceClusterId, - @Nonnull long commitTimestamp, + long commitTimestamp, int tieBreaker) { this.changeStreamMutationBuilder = ChangeStreamMutation.createUserMutation( @@ -111,8 +111,7 @@ public void startUserMutation( /** {@inheritDoc} */ @Override - public void startGcMutation( - @Nonnull ByteString rowKey, @Nonnull long commitTimestamp, int tieBreaker) { + public void startGcMutation(@Nonnull ByteString rowKey, long commitTimestamp, int tieBreaker) { this.changeStreamMutationBuilder = ChangeStreamMutation.createGcMutation(rowKey, commitTimestamp, tieBreaker); } @@ -156,8 +155,7 @@ public void finishCell() { /** {@inheritDoc} */ @Override - public ChangeStreamRecord finishChangeStreamMutation( - @Nonnull String token, @Nonnull long lowWatermark) { + public ChangeStreamRecord finishChangeStreamMutation(@Nonnull String token, long lowWatermark) { this.changeStreamMutationBuilder.setToken(token); this.changeStreamMutationBuilder.setLowWatermark(lowWatermark); return this.changeStreamMutationBuilder.build(); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java index 49132bec7f..e6bfd8c431 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/models/ReadChangeStreamQuery.java @@ -97,7 +97,8 @@ public ReadChangeStreamQuery streamPartition(String start, String end) { * infinity. * @param end The end of the range (exclusive). Can be null to represent positive infinity. */ - public ReadChangeStreamQuery streamPartition(ByteString start, ByteString end) { + public ReadChangeStreamQuery streamPartition( + @Nullable ByteString start, @Nullable ByteString end) { RowRange.Builder rangeBuilder = RowRange.newBuilder(); if (start != null) { rangeBuilder.setStartKeyClosed(start); diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java index a3532180fc..660466db95 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamResumptionStrategy.java @@ -59,8 +59,7 @@ public ChangeStreamRecordT processResponse(ChangeStreamRecordT response) { // will return an OK status right after sending a CloseStream. if (changeStreamRecordAdapter.isHeartbeat(response)) { this.token = changeStreamRecordAdapter.getTokenFromHeartbeat(response); - } - if (changeStreamRecordAdapter.isChangeStreamMutation(response)) { + } else if (changeStreamRecordAdapter.isChangeStreamMutation(response)) { this.token = changeStreamRecordAdapter.getTokenFromChangeStreamMutation(response); } return response; diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java index 784d46d730..7e15ad5bbb 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamContinuationTokenTest.java @@ -25,7 +25,6 @@ import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -51,8 +50,8 @@ public void basicTest() throws Exception { ByteStringRange byteStringRange = createFakeByteStringRange(); ChangeStreamContinuationToken changeStreamContinuationToken = ChangeStreamContinuationToken.create(byteStringRange, TOKEN); - Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); - Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); + assertThat(changeStreamContinuationToken.getPartition()).isEqualTo(byteStringRange); + assertThat(changeStreamContinuationToken.getToken()).isEqualTo(TOKEN); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); @@ -76,11 +75,11 @@ public void fromProtoTest() { .build(); ChangeStreamContinuationToken changeStreamContinuationToken = ChangeStreamContinuationToken.fromProto(proto); - Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); - Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); - Assert.assertEquals( - changeStreamContinuationToken, - ChangeStreamContinuationToken.fromProto(changeStreamContinuationToken.getTokenProto())); + assertThat(changeStreamContinuationToken.getPartition()).isEqualTo(byteStringRange); + assertThat(changeStreamContinuationToken.getToken()).isEqualTo(TOKEN); + assertThat(changeStreamContinuationToken) + .isEqualTo( + ChangeStreamContinuationToken.fromProto(changeStreamContinuationToken.getTokenProto())); } @Test @@ -88,10 +87,11 @@ public void toByteStringTest() throws Exception { ByteStringRange byteStringRange = createFakeByteStringRange(); ChangeStreamContinuationToken changeStreamContinuationToken = ChangeStreamContinuationToken.create(byteStringRange, TOKEN); - Assert.assertEquals(changeStreamContinuationToken.getPartition(), byteStringRange); - Assert.assertEquals(changeStreamContinuationToken.getToken(), TOKEN); - Assert.assertEquals( - changeStreamContinuationToken, - ChangeStreamContinuationToken.fromByteString(changeStreamContinuationToken.toByteString())); + assertThat(changeStreamContinuationToken.getPartition()).isEqualTo(byteStringRange); + assertThat(changeStreamContinuationToken.getToken()).isEqualTo(TOKEN); + assertThat(changeStreamContinuationToken) + .isEqualTo( + ChangeStreamContinuationToken.fromByteString( + changeStreamContinuationToken.toByteString())); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java index ed7034caca..bdb0133fce 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamMutationTest.java @@ -29,9 +29,7 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.junit.Assert; -import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -46,8 +44,6 @@ public class ChangeStreamMutationTest { private static final long FAKE_COMMIT_TIMESTAMP = 1000L; private static final long FAKE_LOW_WATERMARK = 2000L; - @Rule public ExpectedException expect = ExpectedException.none(); - @Test public void userInitiatedMutationTest() throws IOException, ClassNotFoundException { // Create a user initiated logical mutation. @@ -69,13 +65,13 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti .build(); // Test the getters. - Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); - Assert.assertEquals(changeStreamMutation.getType(), ChangeStreamMutation.MutationType.USER); - Assert.assertEquals(changeStreamMutation.getSourceClusterId(), "fake-source-cluster-id"); - Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), FAKE_COMMIT_TIMESTAMP); - Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); - Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); - Assert.assertEquals(changeStreamMutation.getLowWatermark(), FAKE_LOW_WATERMARK); + assertThat(changeStreamMutation.getRowKey()).isEqualTo(ByteString.copyFromUtf8("key")); + assertThat(changeStreamMutation.getType()).isEqualTo(ChangeStreamMutation.MutationType.USER); + assertThat(changeStreamMutation.getSourceClusterId()).isEqualTo("fake-source-cluster-id"); + assertThat(changeStreamMutation.getCommitTimestamp()).isEqualTo(FAKE_COMMIT_TIMESTAMP); + assertThat(changeStreamMutation.getTieBreaker()).isEqualTo(0); + assertThat(changeStreamMutation.getToken()).isEqualTo("fake-token"); + assertThat(changeStreamMutation.getLowWatermark()).isEqualTo(FAKE_LOW_WATERMARK); // Test serialization. ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -84,7 +80,7 @@ public void userInitiatedMutationTest() throws IOException, ClassNotFoundExcepti oos.close(); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); ChangeStreamMutation actual = (ChangeStreamMutation) ois.readObject(); - Assert.assertEquals(actual, changeStreamMutation); + assertThat(actual).isEqualTo(changeStreamMutation); } @Test @@ -108,14 +104,14 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { .build(); // Test the getters. - Assert.assertEquals(changeStreamMutation.getRowKey(), ByteString.copyFromUtf8("key")); - Assert.assertEquals( - changeStreamMutation.getType(), ChangeStreamMutation.MutationType.GARBAGE_COLLECTION); + assertThat(changeStreamMutation.getRowKey()).isEqualTo(ByteString.copyFromUtf8("key")); + assertThat(changeStreamMutation.getType()) + .isEqualTo(ChangeStreamMutation.MutationType.GARBAGE_COLLECTION); Assert.assertTrue(changeStreamMutation.getSourceClusterId().isEmpty()); - Assert.assertEquals(changeStreamMutation.getCommitTimestamp(), FAKE_COMMIT_TIMESTAMP); - Assert.assertEquals(changeStreamMutation.getTieBreaker(), 0); - Assert.assertEquals(changeStreamMutation.getToken(), "fake-token"); - Assert.assertEquals(changeStreamMutation.getLowWatermark(), FAKE_LOW_WATERMARK); + assertThat(changeStreamMutation.getCommitTimestamp()).isEqualTo(FAKE_COMMIT_TIMESTAMP); + assertThat(changeStreamMutation.getTieBreaker()).isEqualTo(0); + assertThat(changeStreamMutation.getToken()).isEqualTo("fake-token"); + assertThat(changeStreamMutation.getLowWatermark()).isEqualTo(FAKE_LOW_WATERMARK); // Test serialization. ByteArrayOutputStream bos = new ByteArrayOutputStream(); @@ -124,7 +120,7 @@ public void gcMutationTest() throws IOException, ClassNotFoundException { oos.close(); ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray())); ChangeStreamMutation actual = (ChangeStreamMutation) ois.readObject(); - Assert.assertEquals(actual, changeStreamMutation); + assertThat(actual).isEqualTo(changeStreamMutation); } @Test @@ -164,26 +160,24 @@ public void toRowMutationTest() { .isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); } - @Test(expected = IllegalStateException.class) + @Test public void toRowMutationWithoutTokenShouldFailTest() { - ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.Builder builder = ChangeStreamMutation.createUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setLowWatermark(FAKE_LOW_WATERMARK) - .build(); - expect.expect(IllegalStateException.class); + .setLowWatermark(FAKE_LOW_WATERMARK); + Assert.assertThrows(IllegalStateException.class, builder::build); } - @Test(expected = IllegalStateException.class) + @Test public void toRowMutationWithoutLowWatermarkShouldFailTest() { - ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.Builder builder = ChangeStreamMutation.createUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setToken("fake-token") - .build(); - expect.expect(IllegalStateException.class); + .setToken("fake-token"); + Assert.assertThrows(IllegalStateException.class, builder::build); } @Test @@ -220,26 +214,24 @@ public void toRowMutationEntryTest() { .isEqualTo(ByteString.copyFromUtf8("fake-qualifier")); } - @Test(expected = IllegalStateException.class) + @Test public void toRowMutationEntryWithoutTokenShouldFailTest() { - ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.Builder builder = ChangeStreamMutation.createUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setLowWatermark(FAKE_LOW_WATERMARK) - .build(); - expect.expect(IllegalStateException.class); + .setLowWatermark(FAKE_LOW_WATERMARK); + Assert.assertThrows(IllegalStateException.class, builder::build); } - @Test(expected = IllegalStateException.class) + @Test public void toRowMutationEntryWithoutLowWatermarkShouldFailTest() { - ChangeStreamMutation changeStreamMutation = + ChangeStreamMutation.Builder builder = ChangeStreamMutation.createUserMutation( ByteString.copyFromUtf8("key"), "fake-source-cluster-id", FAKE_COMMIT_TIMESTAMP, 0) .deleteFamily("fake-family") - .setToken("fake-token") - .build(); - expect.expect(IllegalStateException.class); + .setToken("fake-token"); + Assert.assertThrows(IllegalStateException.class, builder::build); } @Test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java index c6aa7580dd..72697aa29c 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/ChangeStreamRecordTest.java @@ -30,7 +30,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -119,11 +118,10 @@ public void heartbeatTest() { .build(); Heartbeat actualHeartbeat = Heartbeat.fromProto(heartbeatProto); - Assert.assertEquals(actualHeartbeat.getLowWatermark(), lowWatermark); - Assert.assertEquals( - actualHeartbeat.getChangeStreamContinuationToken().getPartition(), - ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); - Assert.assertEquals(actualHeartbeat.getChangeStreamContinuationToken().getToken(), token); + assertThat(actualHeartbeat.getLowWatermark()).isEqualTo(lowWatermark); + assertThat(actualHeartbeat.getChangeStreamContinuationToken().getPartition()) + .isEqualTo(ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); + assertThat(actualHeartbeat.getChangeStreamContinuationToken().getToken()).isEqualTo(token); } @Test @@ -157,16 +155,16 @@ public void closeStreamTest() { .build(); CloseStream actualCloseStream = CloseStream.fromProto(closeStreamProto); - Assert.assertEquals(status, actualCloseStream.getStatus()); - Assert.assertEquals( - actualCloseStream.getChangeStreamContinuationTokens().get(0).getPartition(), - ByteStringRange.create(rowRange1.getStartKeyClosed(), rowRange1.getEndKeyOpen())); - Assert.assertEquals( - token1, actualCloseStream.getChangeStreamContinuationTokens().get(0).getToken()); - Assert.assertEquals( - actualCloseStream.getChangeStreamContinuationTokens().get(1).getPartition(), - ByteStringRange.create(rowRange2.getStartKeyClosed(), rowRange2.getEndKeyOpen())); - Assert.assertEquals( - token2, actualCloseStream.getChangeStreamContinuationTokens().get(1).getToken()); + assertThat(status).isEqualTo(actualCloseStream.getStatus()); + assertThat(actualCloseStream.getChangeStreamContinuationTokens().get(0).getPartition()) + .isEqualTo( + ByteStringRange.create(rowRange1.getStartKeyClosed(), rowRange1.getEndKeyOpen())); + assertThat(token1) + .isEqualTo(actualCloseStream.getChangeStreamContinuationTokens().get(0).getToken()); + assertThat(actualCloseStream.getChangeStreamContinuationTokens().get(1).getPartition()) + .isEqualTo( + ByteStringRange.create(rowRange2.getStartKeyClosed(), rowRange2.getEndKeyOpen())); + assertThat(token2) + .isEqualTo(actualCloseStream.getChangeStreamContinuationTokens().get(1).getToken()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java index 11ff0a9f02..748df81af6 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/models/EntryTest.java @@ -23,7 +23,6 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -68,7 +67,7 @@ public void serializationTest() throws IOException, ClassNotFoundException { public void deleteFamilyTest() { Entry deleteFamilyEntry = DeleteFamily.create("fake-family"); DeleteFamily deleteFamily = (DeleteFamily) deleteFamilyEntry; - Assert.assertEquals("fake-family", deleteFamily.getFamilyName()); + assertThat("fake-family").isEqualTo(deleteFamily.getFamilyName()); } @Test @@ -79,9 +78,10 @@ public void deleteCellsTest() { ByteString.copyFromUtf8("fake-qualifier"), Range.TimestampRange.create(1000L, 2000L)); DeleteCells deleteCells = (DeleteCells) deleteCellEntry; - Assert.assertEquals("fake-family", deleteCells.getFamilyName()); - Assert.assertEquals(ByteString.copyFromUtf8("fake-qualifier"), deleteCells.getQualifier()); - Assert.assertEquals(Range.TimestampRange.create(1000L, 2000L), deleteCells.getTimestampRange()); + assertThat("fake-family").isEqualTo(deleteCells.getFamilyName()); + assertThat(ByteString.copyFromUtf8("fake-qualifier")).isEqualTo(deleteCells.getQualifier()); + assertThat(Range.TimestampRange.create(1000L, 2000L)) + .isEqualTo(deleteCells.getTimestampRange()); } @Test @@ -93,9 +93,9 @@ public void setSellTest() { 1000, ByteString.copyFromUtf8("fake-value")); SetCell setCell = (SetCell) setCellEntry; - Assert.assertEquals("fake-family", setCell.getFamilyName()); - Assert.assertEquals(ByteString.copyFromUtf8("fake-qualifier"), setCell.getQualifier()); - Assert.assertEquals(1000, setCell.getTimestamp()); - Assert.assertEquals(ByteString.copyFromUtf8("fake-value"), setCell.getValue()); + assertThat("fake-family").isEqualTo(setCell.getFamilyName()); + assertThat(ByteString.copyFromUtf8("fake-qualifier")).isEqualTo(setCell.getQualifier()); + assertThat(1000).isEqualTo(setCell.getTimestamp()); + assertThat(ByteString.copyFromUtf8("fake-value")).isEqualTo(setCell.getValue()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java index 5cc04f764d..314f1dd73e 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ChangeStreamRecordMergingCallableTest.java @@ -15,6 +15,8 @@ */ package com.google.cloud.bigtable.data.v2.stub.changestream; +import static com.google.common.truth.Truth.assertThat; + import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.bigtable.v2.ReadChangeStreamResponse; import com.google.bigtable.v2.RowRange; @@ -69,17 +71,15 @@ public void heartbeatTest() { mergingCallable.all().call(ReadChangeStreamRequest.getDefaultInstance()); // Validate the result. - Assert.assertEquals(results.size(), 1); + assertThat(results.size()).isEqualTo(1); ChangeStreamRecord record = results.get(0); Assert.assertTrue(record instanceof Heartbeat); Heartbeat heartbeat = (Heartbeat) record; - Assert.assertEquals( - heartbeat.getChangeStreamContinuationToken().getPartition(), - ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); - Assert.assertEquals( - heartbeat.getChangeStreamContinuationToken().getToken(), - heartbeatProto.getContinuationToken().getToken()); - Assert.assertEquals(heartbeat.getLowWatermark(), heartbeatProto.getLowWatermark()); + assertThat(heartbeat.getChangeStreamContinuationToken().getPartition()) + .isEqualTo(ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); + assertThat(heartbeat.getChangeStreamContinuationToken().getToken()) + .isEqualTo(heartbeatProto.getContinuationToken().getToken()); + assertThat(heartbeat.getLowWatermark()).isEqualTo(heartbeatProto.getLowWatermark()); } @Test @@ -110,18 +110,17 @@ public void closeStreamTest() { mergingCallable.all().call(ReadChangeStreamRequest.getDefaultInstance()); // Validate the result. - Assert.assertEquals(results.size(), 1); + assertThat(results.size()).isEqualTo(1); ChangeStreamRecord record = results.get(0); Assert.assertTrue(record instanceof CloseStream); CloseStream closeStream = (CloseStream) record; - Assert.assertEquals(closeStream.getStatus(), closeStreamProto.getStatus()); - Assert.assertEquals(closeStream.getChangeStreamContinuationTokens().size(), 1); + assertThat(closeStream.getStatus()).isEqualTo(closeStreamProto.getStatus()); + assertThat(closeStream.getChangeStreamContinuationTokens().size()).isEqualTo(1); ChangeStreamContinuationToken changeStreamContinuationToken = closeStream.getChangeStreamContinuationTokens().get(0); - Assert.assertEquals( - changeStreamContinuationToken.getPartition(), - ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); - Assert.assertEquals( - changeStreamContinuationToken.getToken(), streamContinuationToken.getToken()); + assertThat(changeStreamContinuationToken.getPartition()) + .isEqualTo(ByteStringRange.create(rowRange.getStartKeyClosed(), rowRange.getEndKeyOpen())); + assertThat(changeStreamContinuationToken.getToken()) + .isEqualTo(streamContinuationToken.getToken()); } } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java index d25dee23f3..3548be167b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamRetryTest.java @@ -15,6 +15,8 @@ */ package com.google.cloud.bigtable.data.v2.stub.changestream; +import static com.google.common.truth.Truth.assertThat; + import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GrpcStatusCode; import com.google.api.gax.grpc.GrpcTransportChannel; @@ -168,7 +170,7 @@ public void happyPathHeartbeatTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(heartbeatResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); } @@ -180,7 +182,7 @@ public void happyPathCloseStreamTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(closeStreamResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof CloseStream); } @@ -193,7 +195,7 @@ public void happyPathCompleteDataChangeTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(dataChangeResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); } @@ -210,7 +212,7 @@ public void singleHeartbeatImmediateRetryTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(heartbeatResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); } @@ -226,7 +228,7 @@ public void singleCloseStreamImmediateRetryTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(closeStreamResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof CloseStream); } @@ -242,7 +244,7 @@ public void singleCompleteDataChangeImmediateRetryTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(dataChangeResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); } @@ -268,7 +270,7 @@ public void errorAfterHeartbeatShouldResumeWithTokenTest() { StreamContinuationTokens.newBuilder().addTokens(streamContinuationToken).build())); List actualResults = getResults(); // This is the Heartbeat we get before UNAVAILABLE. - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); } @@ -292,7 +294,7 @@ public void errorAfterDataChangeWithDoneShouldResumeWithTokenTest() { .addTokens(createStreamContinuationToken(DATA_CHANGE_TOKEN)) .build())); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); } @@ -343,7 +345,7 @@ public void shouldResumeWithLastTokenTest() { .addTokens(createStreamContinuationToken(HEARTBEAT_TOKEN)) .build())); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 2); + assertThat(actualResults.size()).isEqualTo(2); Assert.assertTrue(actualResults.get(0) instanceof ChangeStreamMutation); Assert.assertTrue(actualResults.get(1) instanceof Heartbeat); } @@ -368,7 +370,7 @@ public void retryRstStreamExceptionTest() { service.expectations.add( RpcExpectation.create().expectInitialRequest().respondWith(heartbeatResponse)); List actualResults = getResults(); - Assert.assertEquals(actualResults.size(), 1); + assertThat(actualResults.size()).isEqualTo(1); Assert.assertTrue(actualResults.get(0) instanceof Heartbeat); } diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java index abcb67634b..2f50c7065b 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamUserCallableTest.java @@ -15,7 +15,7 @@ */ package com.google.cloud.bigtable.data.v2.stub.changestream; -import com.google.bigtable.v2.*; +import com.google.bigtable.v2.ReadChangeStreamRequest; import com.google.cloud.bigtable.data.v2.internal.RequestContext; import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord; import com.google.cloud.bigtable.data.v2.models.ReadChangeStreamQuery; From 00421c72587e190e97ad4bc9af76fc6242cf7140 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Fri, 10 Feb 2023 11:30:25 -0500 Subject: [PATCH 26/27] Delete accidentally added dependency-reduced-pom.xml file --- .../dependency-reduced-pom.xml | 414 ------------------ 1 file changed, 414 deletions(-) delete mode 100644 google-cloud-bigtable-stats/dependency-reduced-pom.xml diff --git a/google-cloud-bigtable-stats/dependency-reduced-pom.xml b/google-cloud-bigtable-stats/dependency-reduced-pom.xml deleted file mode 100644 index 0e0e31ff6f..0000000000 --- a/google-cloud-bigtable-stats/dependency-reduced-pom.xml +++ /dev/null @@ -1,414 +0,0 @@ - - - - google-cloud-bigtable-parent - com.google.cloud - 2.18.5-SNAPSHOT - - 4.0.0 - google-cloud-bigtable-stats - 2.18.5-SNAPSHOT - Experimental project to shade OpenCensus dependencies. - - - - maven-shade-plugin - 3.2.4 - - - package - - shade - - - false - true - - - io.opencensus:* - - - - - io.opencensus - com.google.bigtable.veneer.repackaged.io.opencensus - - - - - - - - - - - - - maven-dependency-plugin - 3.5.0 - - - io.opencensus:opencensus-exporter-metrics-util:* - io.opencensus:opencensus-exporter-stats-stackdriver:* - - - - - org.codehaus.mojo - clirr-maven-plugin - - - com/google/bigtable/veneer/repackaged/** - - - - - maven-enforcer-plugin - - - enforce-version-consistency - - enforce - - - - - - io.opencensus:*:[0.31.1] - io.opencensus:opencensus-proto:[0.2.0] - - - - - - - - - org.codehaus.mojo - license-maven-plugin - 2.0.0 - - - default-cli - generate-resources - - add-third-party - - - test - io.opencensus:* - true - - - - - - - - - io.grpc - grpc-context - 1.52.1 - compile - - - io.grpc - grpc-auth - 1.52.1 - compile - - - io.grpc - grpc-core - 1.52.1 - compile - - - io.perfmark - perfmark-api - 0.26.0 - runtime - - - io.grpc - grpc-netty-shaded - 1.52.1 - compile - - - io.grpc - grpc-stub - 1.52.1 - compile - - - com.lmax - disruptor - 3.4.2 - runtime - - - com.google.cloud - google-cloud-monitoring - 3.11.0 - compile - - - google-http-client-gson - com.google.http-client - - - - - io.grpc - grpc-api - 1.52.1 - compile - - - com.google.errorprone - error_prone_annotations - 2.18.0 - compile - - - io.grpc - grpc-protobuf - 1.52.1 - compile - - - io.grpc - grpc-protobuf-lite - 1.52.1 - compile - - - protobuf-javalite - com.google.protobuf - - - - - com.google.auto.value - auto-value-annotations - 1.10.1 - compile - - - com.google.auto.value - auto-value - 1.10.1 - compile - - - javax.annotation - javax.annotation-api - 1.3.2 - compile - - - com.google.guava - failureaccess - 1.0.1 - compile - - - com.google.guava - listenablefuture - 9999.0-empty-to-avoid-conflict-with-guava - compile - - - org.checkerframework - checker-qual - 3.30.0 - compile - - - com.google.j2objc - j2objc-annotations - 1.3 - compile - - - io.grpc - grpc-alts - 1.52.1 - compile - - - io.grpc - grpc-grpclb - 1.52.1 - compile - - - com.google.protobuf - protobuf-java-util - 3.21.12 - runtime - - - org.conscrypt - conscrypt-openjdk-uber - 2.5.2 - compile - - - com.google.android - annotations - 4.1.1.4 - runtime - - - org.codehaus.mojo - animal-sniffer-annotations - 1.22 - runtime - - - io.grpc - grpc-googleapis - 1.52.1 - runtime - - - io.grpc - grpc-xds - 1.52.1 - runtime - - - io.grpc - grpc-services - 1.52.1 - runtime - - - com.google.re2j - re2j - 1.6 - runtime - - - com.google.auth - google-auth-library-oauth2-http - 1.15.0 - compile - - - google-http-client-gson - com.google.http-client - - - - - org.apache.httpcomponents - httpclient - 4.5.14 - runtime - - - commons-logging - commons-logging - 1.2 - runtime - - - commons-codec - commons-codec - 1.15 - runtime - - - org.apache.httpcomponents - httpcore - 4.4.16 - runtime - - - com.google.code.gson - gson - 2.10.1 - runtime - - - com.google.api.grpc - proto-google-cloud-monitoring-v3 - 3.11.0 - compile - - - com.google.api.grpc - proto-google-common-protos - 2.14.0 - compile - - - com.google.auth - google-auth-library-credentials - 1.15.0 - compile - - - com.google.api - gax - 2.23.0 - compile - - - com.google.api - api-common - 2.6.0 - compile - - - com.google.api - gax-grpc - 2.23.0 - compile - - - com.google.protobuf - protobuf-java - 3.21.12 - compile - - - com.google.guava - guava - 31.1-jre - compile - - - org.threeten - threetenbp - 1.6.5 - compile - - - com.google.code.findbugs - jsr305 - 3.0.2 - compile - - - com.google.http-client - google-http-client - 1.42.3 - runtime - - - - - - com.google.cloud - google-cloud-bigtable-deps-bom - 2.18.5-SNAPSHOT - pom - import - - - - From 3cb1dfc35f3e33abb0797083fef83c9b32a29108 Mon Sep 17 00:00:00 2001 From: Teng Zhong Date: Fri, 10 Feb 2023 11:41:28 -0500 Subject: [PATCH 27/27] Fix test --- ...ReadChangeStreamMergingAcceptanceTest.java | 2 +- .../src/test/proto/changestream_tests.proto | 2 +- .../src/test/resources/changestream.json | 60 +++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java index 367c5af4f9..b745d7ef2d 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/changestream/ReadChangeStreamMergingAcceptanceTest.java @@ -196,7 +196,7 @@ public void test() throws Exception { Timestamps.fromNanos(changeStreamMutation.getCommitTimestamp())); builder.setTiebreaker(changeStreamMutation.getTieBreaker()); builder.setToken(changeStreamMutation.getToken()); - builder.setLowWatermark( + builder.setEstimatedLowWatermark( Timestamps.fromNanos(changeStreamMutation.getEstimatedLowWatermark())); for (Entry entry : changeStreamMutation.getEntries()) { if (entry instanceof DeleteFamily) { diff --git a/google-cloud-bigtable/src/test/proto/changestream_tests.proto b/google-cloud-bigtable/src/test/proto/changestream_tests.proto index 779cdfba35..82f0fff492 100644 --- a/google-cloud-bigtable/src/test/proto/changestream_tests.proto +++ b/google-cloud-bigtable/src/test/proto/changestream_tests.proto @@ -38,7 +38,7 @@ message ReadChangeStreamTest { google.protobuf.Timestamp commit_timestamp = 4; int64 tiebreaker = 5; string token = 6; - google.protobuf.Timestamp low_watermark = 7; + google.protobuf.Timestamp estimated_low_watermark = 7; repeated google.bigtable.v2.Mutation mutations = 8; } diff --git a/google-cloud-bigtable/src/test/resources/changestream.json b/google-cloud-bigtable/src/test/resources/changestream.json index 2dd886f805..9d9e2d46cc 100644 --- a/google-cloud-bigtable/src/test/resources/changestream.json +++ b/google-cloud-bigtable/src/test/resources/changestream.json @@ -14,7 +14,7 @@ }, "token": "heartbeat-token" }, - "low_watermark": "2022-07-01T00:00:00Z" + "estimated_low_watermark": "2022-07-01T00:00:00Z" } } ], @@ -31,7 +31,7 @@ }, "token": "heartbeat-token" }, - "low_watermark": "2022-07-01T00:00:00Z" + "estimated_low_watermark": "2022-07-01T00:00:00Z" } }, "error": false @@ -118,7 +118,7 @@ }, "token": "heartbeat-token" }, - "low_watermark": "2022-07-01T00:00:00Z" + "estimated_low_watermark": "2022-07-01T00:00:00Z" } }, { @@ -154,7 +154,7 @@ }, "token": "heartbeat-token" }, - "low_watermark": "2022-07-01T00:00:00Z" + "estimated_low_watermark": "2022-07-01T00:00:00Z" } }, "error": false @@ -194,7 +194,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "mutation": { @@ -238,7 +238,7 @@ "type": "USER", "source_cluster_id": "source-cluster-id", "commit_timestamp": "2022-07-01T00:00:00Z", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", "mutations": [ @@ -311,7 +311,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "mutation": { @@ -334,7 +334,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "delete_from_family": { @@ -379,7 +379,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -408,7 +408,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "set_cell": { @@ -456,7 +456,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -512,7 +512,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -532,7 +532,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -561,7 +561,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "set_cell": { @@ -641,7 +641,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -670,7 +670,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "set_cell": { @@ -726,7 +726,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -765,7 +765,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "set_cell": { @@ -831,7 +831,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -860,7 +860,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "set_cell": { @@ -923,7 +923,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -959,7 +959,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "delete_from_family": { @@ -1017,7 +1017,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "chunk_info": { @@ -1065,7 +1065,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "set_cell": { @@ -1122,7 +1122,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "mutation": { @@ -1158,7 +1158,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "delete_from_family": { @@ -1212,7 +1212,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "mutation": { @@ -1247,7 +1247,7 @@ "data_change": { "type": "CONTINUATION", "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "chunks": [ { "mutation": { @@ -1299,7 +1299,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "delete_from_family": { @@ -1325,7 +1325,7 @@ "commit_timestamp": "2022-07-01T00:00:00Z", "tiebreaker": 100, "token": "data-change-token", - "low_watermark": "2022-07-01T00:00:00Z", + "estimated_low_watermark": "2022-07-01T00:00:00Z", "mutations": [ { "delete_from_family": {