Skip to content

Commit

Permalink
feat: Adding feature flags for routing cookie and retry info (#2031)
Browse files Browse the repository at this point in the history
* feat: Modify ModifyColumnFamiliesRequest proto to expose ignore_warnings field

PiperOrigin-RevId: 590940407

Source-Link: googleapis/googleapis@fb027c8

Source-Link: googleapis/googleapis-gen@f0728cd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjA3MjhjZGEyMjdiMzg4MzU4MjJjNGU1NTE5ZTU2OGNlOGQyYjVhYyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: Adding feature flags for routing cookie and retry info

PiperOrigin-RevId: 591912877

Source-Link: googleapis/googleapis@f6505fe

Source-Link: googleapis/googleapis-gen@7499187
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzQ5OTE4NzQxNWY4ZDQwNWVmMGQ0NmRkNmZmNjA4YjEyNWM1M2M4ZiJ9

* 🦉 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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 2, 2024
1 parent f1b7fc7 commit 08c5bf1
Show file tree
Hide file tree
Showing 9 changed files with 567 additions and 222 deletions.
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.

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
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();
}
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

0 comments on commit 08c5bf1

Please sign in to comment.