Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding feature flags for routing cookie and retry info #2031

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,7 @@ public final Table modifyColumnFamilies(
* ModifyColumnFamiliesRequest.newBuilder()
* .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
* .addAllModifications(new ArrayList<ModifyColumnFamiliesRequest.Modification>())
* .setIgnoreWarnings(true)
* .build();
* Table response = baseBigtableTableAdminClient.modifyColumnFamilies(request);
* }
Expand Down Expand Up @@ -1428,6 +1429,7 @@ public final Table modifyColumnFamilies(ModifyColumnFamiliesRequest request) {
* ModifyColumnFamiliesRequest.newBuilder()
* .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
* .addAllModifications(new ArrayList<ModifyColumnFamiliesRequest.Modification>())
* .setIgnoreWarnings(true)
* .build();
* ApiFuture<Table> future =
* baseBigtableTableAdminClient.modifyColumnFamiliesCallable().futureCall(request);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,24 @@ public com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification get
return modifications_.get(index);
}

public static final int IGNORE_WARNINGS_FIELD_NUMBER = 3;
private boolean ignoreWarnings_ = false;
/**
*
*
* <pre>
* Optional. If true, ignore safety checks when modifying the column families.
* </pre>
*
* <code>bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The ignoreWarnings.
*/
@java.lang.Override
public boolean getIgnoreWarnings() {
return ignoreWarnings_;
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand All @@ -1839,6 +1857,9 @@ 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));
}
if (ignoreWarnings_ != false) {
output.writeBool(3, ignoreWarnings_);
}
getUnknownFields().writeTo(output);
}

Expand All @@ -1854,6 +1875,9 @@ public int getSerializedSize() {
for (int i = 0; i < modifications_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, modifications_.get(i));
}
if (ignoreWarnings_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreWarnings_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -1872,6 +1896,7 @@ public boolean equals(final java.lang.Object obj) {

if (!getName().equals(other.getName())) return false;
if (!getModificationsList().equals(other.getModificationsList())) return false;
if (getIgnoreWarnings() != other.getIgnoreWarnings()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
Expand All @@ -1889,6 +1914,8 @@ public int hashCode() {
hash = (37 * hash) + MODIFICATIONS_FIELD_NUMBER;
hash = (53 * hash) + getModificationsList().hashCode();
}
hash = (37 * hash) + IGNORE_WARNINGS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreWarnings());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -2038,6 +2065,7 @@ public Builder clear() {
modificationsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
ignoreWarnings_ = false;
return this;
}

Expand Down Expand Up @@ -2091,6 +2119,9 @@ private void buildPartial0(com.google.bigtable.admin.v2.ModifyColumnFamiliesRequ
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.ignoreWarnings_ = ignoreWarnings_;
}
}

@java.lang.Override
Expand Down Expand Up @@ -2171,6 +2202,9 @@ public Builder mergeFrom(com.google.bigtable.admin.v2.ModifyColumnFamiliesReques
}
}
}
if (other.getIgnoreWarnings() != false) {
setIgnoreWarnings(other.getIgnoreWarnings());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
Expand Down Expand Up @@ -2218,6 +2252,12 @@ public Builder mergeFrom(
}
break;
} // case 18
case 24:
{
ignoreWarnings_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -2833,6 +2873,59 @@ public Builder removeModifications(int index) {
return modificationsBuilder_;
}

private boolean ignoreWarnings_;
/**
*
*
* <pre>
* Optional. If true, ignore safety checks when modifying the column families.
* </pre>
*
* <code>bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The ignoreWarnings.
*/
@java.lang.Override
public boolean getIgnoreWarnings() {
return ignoreWarnings_;
}
/**
*
*
* <pre>
* Optional. If true, ignore safety checks when modifying the column families.
* </pre>
*
* <code>bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @param value The ignoreWarnings to set.
* @return This builder for chaining.
*/
public Builder setIgnoreWarnings(boolean value) {

ignoreWarnings_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
* <pre>
* Optional. If true, ignore safety checks when modifying the column families.
* </pre>
*
* <code>bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return This builder for chaining.
*/
public Builder clearIgnoreWarnings() {
bitField0_ = (bitField0_ & ~0x00000004);
ignoreWarnings_ = false;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,17 @@ public interface ModifyColumnFamiliesRequestOrBuilder
*/
com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest.ModificationOrBuilder
getModificationsOrBuilder(int index);

/**
*
*
* <pre>
* Optional. If true, ignore safety checks when modifying the column families.
* </pre>
*
* <code>bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The ignoreWarnings.
*/
boolean getIgnoreWarnings();
}
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,9 @@ message ModifyColumnFamiliesRequest {
// family, for example).
repeated Modification modifications = 2
[(google.api.field_behavior) = REQUIRED];

// Optional. If true, ignore safety checks when modifying the column families.
bool ignore_warnings = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
Expand Down
Loading
Loading