+ * Feature flags supported by a client. + * This is intended to be sent as part of request metadata to assure the server + * that certain behaviors are safe to enable. This proto is meant to be + * serialized and websafe-base64 encoded under the `bigtable-features` metadata + * key. The value will remain constant for the lifetime of a client and due to + * HTTP2's HPACK compression, the request overhead will be tiny. + * This is an internal implementation detail and should not be used by endusers + * directly. + *+ * + * Protobuf type {@code google.bigtable.v2.FeatureFlags} + */ +public final class FeatureFlags extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.FeatureFlags) + FeatureFlagsOrBuilder { + private static final long serialVersionUID = 0L; + // Use FeatureFlags.newBuilder() to construct. + private FeatureFlags(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private FeatureFlags() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FeatureFlags(); + } + + @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.FeatureFlagsProto + .internal_static_google_bigtable_v2_FeatureFlags_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.FeatureFlagsProto + .internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.FeatureFlags.class, + com.google.bigtable.v2.FeatureFlags.Builder.class); + } + + public static final int MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER = 3; + private boolean mutateRowsRateLimit_ = false; + /** + * + * + *
+ * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. + *+ * + *
bool mutate_rows_rate_limit = 3;
+ *
+ * @return The mutateRowsRateLimit.
+ */
+ @java.lang.Override
+ public boolean getMutateRowsRateLimit() {
+ return mutateRowsRateLimit_;
+ }
+
+ 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 (mutateRowsRateLimit_ != false) {
+ output.writeBool(3, mutateRowsRateLimit_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (mutateRowsRateLimit_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, mutateRowsRateLimit_);
+ }
+ 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.FeatureFlags)) {
+ return super.equals(obj);
+ }
+ com.google.bigtable.v2.FeatureFlags other = (com.google.bigtable.v2.FeatureFlags) obj;
+
+ if (getMutateRowsRateLimit() != other.getMutateRowsRateLimit()) 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) + MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMutateRowsRateLimit());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags 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.FeatureFlags parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags 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.FeatureFlags parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags 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.FeatureFlags parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags 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.FeatureFlags parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags 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.FeatureFlags 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;
+ }
+ /**
+ *
+ *
+ * + * Feature flags supported by a client. + * This is intended to be sent as part of request metadata to assure the server + * that certain behaviors are safe to enable. This proto is meant to be + * serialized and websafe-base64 encoded under the `bigtable-features` metadata + * key. The value will remain constant for the lifetime of a client and due to + * HTTP2's HPACK compression, the request overhead will be tiny. + * This is an internal implementation detail and should not be used by endusers + * directly. + *+ * + * Protobuf type {@code google.bigtable.v2.FeatureFlags} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. + *+ * + *
bool mutate_rows_rate_limit = 3;
+ *
+ * @return The mutateRowsRateLimit.
+ */
+ @java.lang.Override
+ public boolean getMutateRowsRateLimit() {
+ return mutateRowsRateLimit_;
+ }
+ /**
+ *
+ *
+ * + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. + *+ * + *
bool mutate_rows_rate_limit = 3;
+ *
+ * @param value The mutateRowsRateLimit to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMutateRowsRateLimit(boolean value) {
+
+ mutateRowsRateLimit_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. + *+ * + *
bool mutate_rows_rate_limit = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMutateRowsRateLimit() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ mutateRowsRateLimit_ = false;
+ 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.FeatureFlags)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.bigtable.v2.FeatureFlags)
+ private static final com.google.bigtable.v2.FeatureFlags DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.bigtable.v2.FeatureFlags();
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Notify the server that the client enables batch write flow control by + * requesting RateLimitInfo from MutateRowsResponse. + *+ * + *
bool mutate_rows_rate_limit = 3;
+ *
+ * @return The mutateRowsRateLimit.
+ */
+ boolean getMutateRowsRateLimit();
+}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java
new file mode 100644
index 0000000000..3bbdf09eca
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java
@@ -0,0 +1,66 @@
+/*
+ * 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/feature_flags.proto
+
+package com.google.bigtable.v2;
+
+public final class FeatureFlagsProto {
+ private FeatureFlagsProto() {}
+
+ 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_FeatureFlags_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_bigtable_v2_FeatureFlags_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/feature_flags.proto"
+ + "\022\022google.bigtable.v2\".\n\014FeatureFlags\022\036\n\026"
+ + "mutate_rows_rate_limit\030\003 \001(\010B\275\001\n\026com.goo"
+ + "gle.bigtable.v2B\021FeatureFlagsProtoP\001Z:go"
+ + "ogle.golang.org/genproto/googleapis/bigt"
+ + "able/v2;bigtable\252\002\030Google.Cloud.Bigtable"
+ + ".V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google:"
+ + ":Cloud::Bigtable::V2b\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
+ internal_static_google_bigtable_v2_FeatureFlags_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_bigtable_v2_FeatureFlags_descriptor,
+ new java.lang.String[] {
+ "MutateRowsRateLimit",
+ });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
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 24803ec454..f9e3dde3f1 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
@@ -947,6 +947,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType
}
}
+ private int bitField0_;
public static final int ENTRIES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
@@ -1018,6 +1019,62 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil
return entries_.get(index);
}
+ public static final int RATE_LIMIT_INFO_FIELD_NUMBER = 3;
+ private com.google.bigtable.v2.RateLimitInfo rateLimitInfo_;
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return Whether the rateLimitInfo field is set.
+ */
+ @java.lang.Override
+ public boolean hasRateLimitInfo() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return The rateLimitInfo.
+ */
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -1035,6 +1092,9 @@ 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));
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(3, getRateLimitInfo());
+ }
getUnknownFields().writeTo(output);
}
@@ -1047,6 +1107,9 @@ public int getSerializedSize() {
for (int i = 0; i < entries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i));
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRateLimitInfo());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -1064,6 +1127,10 @@ public boolean equals(final java.lang.Object obj) {
(com.google.bigtable.v2.MutateRowsResponse) obj;
if (!getEntriesList().equals(other.getEntriesList())) return false;
+ if (hasRateLimitInfo() != other.hasRateLimitInfo()) return false;
+ if (hasRateLimitInfo()) {
+ if (!getRateLimitInfo().equals(other.getRateLimitInfo())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1079,6 +1146,10 @@ public int hashCode() {
hash = (37 * hash) + ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getEntriesList().hashCode();
}
+ if (hasRateLimitInfo()) {
+ hash = (37 * hash) + RATE_LIMIT_INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getRateLimitInfo().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -1208,10 +1279,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.bigtable.v2.MutateRowsResponse.newBuilder()
- private Builder() {}
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getEntriesFieldBuilder();
+ getRateLimitInfoFieldBuilder();
+ }
}
@java.lang.Override
@@ -1225,6 +1306,11 @@ public Builder clear() {
entriesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
+ rateLimitInfo_ = null;
+ if (rateLimitInfoBuilder_ != null) {
+ rateLimitInfoBuilder_.dispose();
+ rateLimitInfoBuilder_ = null;
+ }
return this;
}
@@ -1274,6 +1360,13 @@ private void buildPartialRepeatedFields(com.google.bigtable.v2.MutateRowsRespons
private void buildPartial0(com.google.bigtable.v2.MutateRowsResponse result) {
int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.rateLimitInfo_ =
+ rateLimitInfoBuilder_ == null ? rateLimitInfo_ : rateLimitInfoBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
@@ -1348,6 +1441,9 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsResponse other) {
}
}
}
+ if (other.hasRateLimitInfo()) {
+ mergeRateLimitInfo(other.getRateLimitInfo());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -1388,6 +1484,12 @@ public Builder mergeFrom(
}
break;
} // case 10
+ case 26:
+ {
+ input.readMessage(getRateLimitInfoFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1758,6 +1860,207 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder
return entriesBuilder_;
}
+ private com.google.bigtable.v2.RateLimitInfo rateLimitInfo_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.bigtable.v2.RateLimitInfo,
+ com.google.bigtable.v2.RateLimitInfo.Builder,
+ com.google.bigtable.v2.RateLimitInfoOrBuilder>
+ rateLimitInfoBuilder_;
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return Whether the rateLimitInfo field is set.
+ */
+ public boolean hasRateLimitInfo() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return The rateLimitInfo.
+ */
+ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() {
+ if (rateLimitInfoBuilder_ == null) {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ } else {
+ return rateLimitInfoBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) {
+ if (rateLimitInfoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ rateLimitInfo_ = value;
+ } else {
+ rateLimitInfoBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo.Builder builderForValue) {
+ if (rateLimitInfoBuilder_ == null) {
+ rateLimitInfo_ = builderForValue.build();
+ } else {
+ rateLimitInfoBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder mergeRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) {
+ if (rateLimitInfoBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && rateLimitInfo_ != null
+ && rateLimitInfo_ != com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()) {
+ getRateLimitInfoBuilder().mergeFrom(value);
+ } else {
+ rateLimitInfo_ = value;
+ }
+ } else {
+ rateLimitInfoBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder clearRateLimitInfo() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ rateLimitInfo_ = null;
+ if (rateLimitInfoBuilder_ != null) {
+ rateLimitInfoBuilder_.dispose();
+ rateLimitInfoBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public com.google.bigtable.v2.RateLimitInfo.Builder getRateLimitInfoBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getRateLimitInfoFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() {
+ if (rateLimitInfoBuilder_ != null) {
+ return rateLimitInfoBuilder_.getMessageOrBuilder();
+ } else {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.bigtable.v2.RateLimitInfo,
+ com.google.bigtable.v2.RateLimitInfo.Builder,
+ com.google.bigtable.v2.RateLimitInfoOrBuilder>
+ getRateLimitInfoFieldBuilder() {
+ if (rateLimitInfoBuilder_ == null) {
+ rateLimitInfoBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.bigtable.v2.RateLimitInfo,
+ com.google.bigtable.v2.RateLimitInfo.Builder,
+ com.google.bigtable.v2.RateLimitInfoOrBuilder>(
+ getRateLimitInfo(), getParentForChildren(), isClean());
+ rateLimitInfo_ = null;
+ }
+ return rateLimitInfoBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java
index ca4b764ba7..8afab73c07 100644
--- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java
@@ -74,4 +74,45 @@ public interface MutateRowsResponseOrBuilder
* repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1;
*/
com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return Whether the rateLimitInfo field is set.
+ */
+ boolean hasRateLimitInfo();
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return The rateLimitInfo.
+ */
+ com.google.bigtable.v2.RateLimitInfo getRateLimitInfo();
+ /**
+ *
+ *
+ * + * Information about how client should limit the rate (QPS). Primirily used by + * supported official Cloud Bigtable clients. If unset, the rate limit info is + * not provided by the server. + *+ * + *
optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder();
}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java
new file mode 100644
index 0000000000..f3826c4adf
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java
@@ -0,0 +1,882 @@
+/*
+ * 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/bigtable.proto
+
+package com.google.bigtable.v2;
+
+/**
+ *
+ *
+ * + * Information about how client should adjust the load to Bigtable. + *+ * + * Protobuf type {@code google.bigtable.v2.RateLimitInfo} + */ +public final class RateLimitInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.bigtable.v2.RateLimitInfo) + RateLimitInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use RateLimitInfo.newBuilder() to construct. + private RateLimitInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private RateLimitInfo() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RateLimitInfo(); + } + + @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.BigtableProto + .internal_static_google_bigtable_v2_RateLimitInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.bigtable.v2.BigtableProto + .internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.bigtable.v2.RateLimitInfo.class, + com.google.bigtable.v2.RateLimitInfo.Builder.class); + } + + public static final int PERIOD_FIELD_NUMBER = 1; + private com.google.protobuf.Duration period_; + /** + * + * + *
+ * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ *
+ * @return Whether the period field is set.
+ */
+ @java.lang.Override
+ public boolean hasPeriod() {
+ return period_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ *
+ * @return The period.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getPeriod() {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ }
+
+ public static final int FACTOR_FIELD_NUMBER = 2;
+ private double factor_ = 0D;
+ /**
+ *
+ *
+ * + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + *+ * + *
double factor = 2;
+ *
+ * @return The factor.
+ */
+ @java.lang.Override
+ public double getFactor() {
+ return factor_;
+ }
+
+ 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 (period_ != null) {
+ output.writeMessage(1, getPeriod());
+ }
+ if (java.lang.Double.doubleToRawLongBits(factor_) != 0) {
+ output.writeDouble(2, factor_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (period_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPeriod());
+ }
+ if (java.lang.Double.doubleToRawLongBits(factor_) != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, factor_);
+ }
+ 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.RateLimitInfo)) {
+ return super.equals(obj);
+ }
+ com.google.bigtable.v2.RateLimitInfo other = (com.google.bigtable.v2.RateLimitInfo) obj;
+
+ if (hasPeriod() != other.hasPeriod()) return false;
+ if (hasPeriod()) {
+ if (!getPeriod().equals(other.getPeriod())) return false;
+ }
+ if (java.lang.Double.doubleToLongBits(getFactor())
+ != java.lang.Double.doubleToLongBits(other.getFactor())) 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 (hasPeriod()) {
+ hash = (37 * hash) + PERIOD_FIELD_NUMBER;
+ hash = (53 * hash) + getPeriod().hashCode();
+ }
+ hash = (37 * hash) + FACTOR_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getFactor()));
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo 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.RateLimitInfo parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo 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.RateLimitInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo 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.RateLimitInfo parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo 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.RateLimitInfo parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo 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.RateLimitInfo 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;
+ }
+ /**
+ *
+ *
+ * + * Information about how client should adjust the load to Bigtable. + *+ * + * Protobuf type {@code google.bigtable.v2.RateLimitInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ *
+ * @return Whether the period field is set.
+ */
+ public boolean hasPeriod() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ *
+ * @return The period.
+ */
+ public com.google.protobuf.Duration getPeriod() {
+ if (periodBuilder_ == null) {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ } else {
+ return periodBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ public Builder setPeriod(com.google.protobuf.Duration value) {
+ if (periodBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ period_ = value;
+ } else {
+ periodBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ public Builder setPeriod(com.google.protobuf.Duration.Builder builderForValue) {
+ if (periodBuilder_ == null) {
+ period_ = builderForValue.build();
+ } else {
+ periodBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ public Builder mergePeriod(com.google.protobuf.Duration value) {
+ if (periodBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && period_ != null
+ && period_ != com.google.protobuf.Duration.getDefaultInstance()) {
+ getPeriodBuilder().mergeFrom(value);
+ } else {
+ period_ = value;
+ }
+ } else {
+ periodBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ public Builder clearPeriod() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ period_ = null;
+ if (periodBuilder_ != null) {
+ periodBuilder_.dispose();
+ periodBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ public com.google.protobuf.Duration.Builder getPeriodBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getPeriodFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
+ if (periodBuilder_ != null) {
+ return periodBuilder_.getMessageOrBuilder();
+ } else {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getPeriodFieldBuilder() {
+ if (periodBuilder_ == null) {
+ periodBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getPeriod(), getParentForChildren(), isClean());
+ period_ = null;
+ }
+ return periodBuilder_;
+ }
+
+ private double factor_;
+ /**
+ *
+ *
+ * + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + *+ * + *
double factor = 2;
+ *
+ * @return The factor.
+ */
+ @java.lang.Override
+ public double getFactor() {
+ return factor_;
+ }
+ /**
+ *
+ *
+ * + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + *+ * + *
double factor = 2;
+ *
+ * @param value The factor to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFactor(double value) {
+
+ factor_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + *+ * + *
double factor = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFactor() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ factor_ = 0D;
+ 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.RateLimitInfo)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.bigtable.v2.RateLimitInfo)
+ private static final com.google.bigtable.v2.RateLimitInfo DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.bigtable.v2.RateLimitInfo();
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ *
+ * @return Whether the period field is set.
+ */
+ boolean hasPeriod();
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ *
+ * @return The period.
+ */
+ com.google.protobuf.Duration getPeriod();
+ /**
+ *
+ *
+ * + * Time that clients should wait before adjusting the target rate again. + * If clients adjust rate too frequently, the impact of the previous + * adjustment may not have been taken into account and may + * over-throttle or under-throttle. If clients adjust rate too slowly, they + * will not be responsive to load changes on server side, and may + * over-throttle or under-throttle. + *+ * + *
.google.protobuf.Duration period = 1;
+ */
+ com.google.protobuf.DurationOrBuilder getPeriodOrBuilder();
+
+ /**
+ *
+ *
+ * + * If it has been at least one `period` since the last load adjustment, the + * client should multiply the current load by this value to get the new target + * load. For example, if the current load is 100 and `factor` is 0.8, the new + * target load should be 80. After adjusting, the client should ignore + * `factor` until another `period` has passed. + * The client can measure its load using any unit that's comparable over time + * For example, QPS can be used as long as each request involves a similar + * amount of work. + *+ * + *
double factor = 2;
+ *
+ * @return The factor.
+ */
+ double getFactor();
+}
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 00e8124f77..9eda7db192 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
@@ -300,8 +300,8 @@ public com.google.protobuf.ByteString getTableNameBytes() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -324,8 +324,8 @@ public java.lang.String getAppProfileId() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1104,8 +1104,8 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1127,8 +1127,8 @@ public java.lang.String getAppProfileId() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1150,8 +1150,8 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1172,8 +1172,8 @@ public Builder setAppProfileId(java.lang.String value) {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1190,8 +1190,8 @@ public Builder clearAppProfileId() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
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 2b2e969f06..ed43da6171 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. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -73,8 +73,8 @@ public interface ReadRowsRequestOrBuilder
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
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 098d17e3e7..8624833ade 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
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -227,7 +227,6 @@ 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.
@@ -254,8 +253,8 @@ message ReadRowsRequest {
}
];
- // This value specifies routing for replication. This API only accepts the
- // empty value of app_profile_id.
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
string app_profile_id = 5;
// The row keys and/or ranges to read sequentially. If not specified, reads
@@ -489,6 +488,33 @@ message MutateRowsResponse {
// One or more results for Entries from the batch request.
repeated Entry entries = 1;
+
+ // Information about how client should limit the rate (QPS). Primirily used by
+ // supported official Cloud Bigtable clients. If unset, the rate limit info is
+ // not provided by the server.
+ optional RateLimitInfo rate_limit_info = 3;
+}
+
+// Information about how client should adjust the load to Bigtable.
+message RateLimitInfo {
+ // Time that clients should wait before adjusting the target rate again.
+ // If clients adjust rate too frequently, the impact of the previous
+ // adjustment may not have been taken into account and may
+ // over-throttle or under-throttle. If clients adjust rate too slowly, they
+ // will not be responsive to load changes on server side, and may
+ // over-throttle or under-throttle.
+ google.protobuf.Duration period = 1;
+
+ // If it has been at least one `period` since the last load adjustment, the
+ // client should multiply the current load by this value to get the new target
+ // load. For example, if the current load is 100 and `factor` is 0.8, the new
+ // target load should be 80. After adjusting, the client should ignore
+ // `factor` until another `period` has passed.
+ //
+ // The client can measure its load using any unit that's comparable over time
+ // For example, QPS can be used as long as each request involves a similar
+ // amount of work.
+ double factor = 2;
}
// Request message for Bigtable.CheckAndMutateRow.
diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto
new file mode 100644
index 0000000000..ba10707a3f
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto
@@ -0,0 +1,39 @@
+// Copyright 2023 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;
+
+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 = "FeatureFlagsProto";
+option java_package = "com.google.bigtable.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\V2";
+option ruby_package = "Google::Cloud::Bigtable::V2";
+
+// Feature flags supported by a client.
+// This is intended to be sent as part of request metadata to assure the server
+// that certain behaviors are safe to enable. This proto is meant to be
+// serialized and websafe-base64 encoded under the `bigtable-features` metadata
+// key. The value will remain constant for the lifetime of a client and due to
+// HTTP2's HPACK compression, the request overhead will be tiny.
+// This is an internal implementation detail and should not be used by endusers
+// directly.
+message FeatureFlags {
+ // Notify the server that the client enables batch write flow control by
+ // requesting RateLimitInfo from MutateRowsResponse.
+ bool mutate_rows_rate_limit = 3;
+}
From ee0da11664d978e808d1088a419cdbd2270da147 Mon Sep 17 00:00:00 2001
From: Mattie Fu This is different from the {@link FlowController} that's always enabled on batch reads and
+ * batch writes, which limits the number of outstanding requests to the Bigtable server.
+ */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public Builder setBulkMutationFlowControl(boolean isEnableFlowControl) {
+ stubSettings.bulkMutateRowsSettings().setServerInitiatedFlowControl(isEnableFlowControl);
+ return this;
+ }
+
+ /**
+ * Gets if flow control is enabled for {@link BigtableDataClient#newBulkMutationBatcher(String)}
+ * based on the load of the Bigtable server.
+ */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public boolean isBulkMutationFlowControlEnabled() {
+ return stubSettings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled();
+ }
+
/**
* Returns the underlying settings for making RPC calls. The settings should be changed with
* care.
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java
index 09e657ac07..21f837f87f 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java
@@ -16,6 +16,7 @@
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.BatchingDescriptor;
import com.google.api.gax.batching.BatchingSettings;
@@ -66,6 +67,8 @@ public final class BigtableBatchingCallSettings extends UnaryCallSettings