Skip to content

Commit

Permalink
driver/redis: expose tls required boolean
Browse files Browse the repository at this point in the history
Addresses ENG-42

GitOrigin-RevId: 1b472ac877661bd58782c22d4914a6e6ff94531e
  • Loading branch information
200sc authored and SupportSDM committed Nov 23, 2022
1 parent 29760cd commit a48051c
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 33 deletions.
10 changes: 10 additions & 0 deletions com/strongdm/api/Redis.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ public void setTags(java.util.Map<String, String> in) {
this.tags.putAll(in);
}

private boolean tlsRequired;
/** */
public boolean getTlsRequired() {
return this.tlsRequired;
}
/** */
public void setTlsRequired(boolean in) {
this.tlsRequired = in;
}

private String username;
/** */
public String getUsername() {
Expand Down
82 changes: 78 additions & 4 deletions com/strongdm/api/plumbing/DriversPlumbing.java
Original file line number Diff line number Diff line change
Expand Up @@ -177833,6 +177833,12 @@ public interface RedisOrBuilder extends
*/
int getPortOverride();

/**
* <code>bool tls_required = 6 [deprecated = false, (.v1.field_options) = { ... }</code>
* @return The tlsRequired.
*/
boolean getTlsRequired();

/**
* <code>string username = 5 [deprecated = false, (.v1.field_options) = { ... }</code>
* @return The username.
Expand Down Expand Up @@ -177926,6 +177932,11 @@ private Redis(
username_ = s;
break;
}
case 48: {

tlsRequired_ = input.readBool();
break;
}
case 262146: {
java.lang.String s = input.readStringRequireUtf8();

Expand Down Expand Up @@ -178389,6 +178400,17 @@ public int getPortOverride() {
return portOverride_;
}

public static final int TLS_REQUIRED_FIELD_NUMBER = 6;
private boolean tlsRequired_;
/**
* <code>bool tls_required = 6 [deprecated = false, (.v1.field_options) = { ... }</code>
* @return The tlsRequired.
*/
@java.lang.Override
public boolean getTlsRequired() {
return tlsRequired_;
}

public static final int USERNAME_FIELD_NUMBER = 5;
private volatile java.lang.Object username_;
/**
Expand Down Expand Up @@ -178456,6 +178478,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, username_);
}
if (tlsRequired_ != false) {
output.writeBool(6, tlsRequired_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 32768, id_);
}
Expand Down Expand Up @@ -178503,6 +178528,10 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, username_);
}
if (tlsRequired_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, tlsRequired_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(32768, id_);
}
Expand Down Expand Up @@ -178566,6 +178595,8 @@ public boolean equals(final java.lang.Object obj) {
!= other.getPort()) return false;
if (getPortOverride()
!= other.getPortOverride()) return false;
if (getTlsRequired()
!= other.getTlsRequired()) return false;
if (!getUsername()
.equals(other.getUsername())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
Expand Down Expand Up @@ -178604,6 +178635,9 @@ public int hashCode() {
hash = (53 * hash) + getPort();
hash = (37 * hash) + PORT_OVERRIDE_FIELD_NUMBER;
hash = (53 * hash) + getPortOverride();
hash = (37 * hash) + TLS_REQUIRED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTlsRequired());
hash = (37 * hash) + USERNAME_FIELD_NUMBER;
hash = (53 * hash) + getUsername().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
Expand Down Expand Up @@ -178765,6 +178799,8 @@ public Builder clear() {

portOverride_ = 0;

tlsRequired_ = false;

username_ = "";

return this;
Expand Down Expand Up @@ -178808,6 +178844,7 @@ public com.strongdm.api.plumbing.DriversPlumbing.Redis buildPartial() {
result.password_ = password_;
result.port_ = port_;
result.portOverride_ = portOverride_;
result.tlsRequired_ = tlsRequired_;
result.username_ = username_;
onBuilt();
return result;
Expand Down Expand Up @@ -178897,6 +178934,9 @@ public Builder mergeFrom(com.strongdm.api.plumbing.DriversPlumbing.Redis other)
if (other.getPortOverride() != 0) {
setPortOverride(other.getPortOverride());
}
if (other.getTlsRequired() != false) {
setTlsRequired(other.getTlsRequired());
}
if (!other.getUsername().isEmpty()) {
username_ = other.username_;
onChanged();
Expand Down Expand Up @@ -179822,6 +179862,37 @@ public Builder clearPortOverride() {
return this;
}

private boolean tlsRequired_ ;
/**
* <code>bool tls_required = 6 [deprecated = false, (.v1.field_options) = { ... }</code>
* @return The tlsRequired.
*/
@java.lang.Override
public boolean getTlsRequired() {
return tlsRequired_;
}
/**
* <code>bool tls_required = 6 [deprecated = false, (.v1.field_options) = { ... }</code>
* @param value The tlsRequired to set.
* @return This builder for chaining.
*/
public Builder setTlsRequired(boolean value) {

tlsRequired_ = value;
onChanged();
return this;
}
/**
* <code>bool tls_required = 6 [deprecated = false, (.v1.field_options) = { ... }</code>
* @return This builder for chaining.
*/
public Builder clearTlsRequired() {

tlsRequired_ = false;
onChanged();
return this;
}

private java.lang.Object username_ = "";
/**
* <code>string username = 5 [deprecated = false, (.v1.field_options) = { ... }</code>
Expand Down Expand Up @@ -209514,7 +209585,7 @@ public com.strongdm.api.plumbing.DriversPlumbing.Teradata getDefaultInstanceForT
"\001\362\370\263\007\005\300\363\263\007\000\362\370\263\007\005\350\363\263\007\000\362\370\263\007\005\230\364\263\007\000\362\370\263\007\005\240\364\263\007" +
"\000:e\030\000\372\370\263\007\005\250\363\263\007\001\372\370\263\007T\312\363\263\007O\302\364\263\007\r\n\003cli\022\006raw" +
"tcp\302\364\263\007\026\n\014json_gateway\022\006rawtcp\302\364\263\007\035\n\022ter" +
"raform-provider\022\007raw_tcp\"\317\007\n\005Redis\022\030\n\002id" +
"raform-provider\022\007raw_tcp\"\307\010\n\005Redis\022\030\n\002id" +
"\030\200\200\002 \001(\tB\n\362\370\263\007\005\260\363\263\007\001\022$\n\004name\030\201\200\002 \001(\tB\024\362\370" +
"\263\007\005\260\363\263\007\001\362\370\263\007\005\300\363\263\007\001\022O\n\007healthy\030\202\200\002 \001(\010B<\362" +
"\370\263\007\005\260\363\263\007\001\362\370\263\007\005\230\364\263\007\001\362\370\263\007\006\262\364\263\007\001*\362\370\263\007\030\262\364\263\007\023" +
Expand All @@ -209533,6 +209604,9 @@ public com.strongdm.api.plumbing.DriversPlumbing.Teradata getDefaultInstanceForT
"\370\263\007\005\350\363\263\007\000\362\370\263\007\005\230\364\263\007\000\362\370\263\007\005\240\364\263\007\000\022x\n\rport_ov" +
"erride\030\002 \001(\005Ba\030\000\362\370\263\007\005\260\363\263\007\001\362\370\263\007\036\312\363\263\007\031\302\364\263\007" +
"\024\n\003cli\022\rport-override\362\370\263\007\005\320\364\263\007\001\362\370\263\007\005\300\363\263\007" +
"\000\362\370\263\007\005\350\363\263\007\000\362\370\263\007\005\230\364\263\007\000\362\370\263\007\005\240\364\263\007\000\022v\n\014tls_r" +
"equired\030\006 \001(\010B`\030\000\362\370\263\007\005\260\363\263\007\001\362\370\263\007\035\312\363\263\007\030\302\364\263" +
"\007\023\n\003cli\022\014tls-required\362\370\263\007\005\320\364\263\007\000\362\370\263\007\005\300\363\263\007" +
"\000\362\370\263\007\005\350\363\263\007\000\362\370\263\007\005\230\364\263\007\000\362\370\263\007\005\240\364\263\007\000\022n\n\010usern" +
"ame\030\005 \001(\tB\\\030\000\362\370\263\007\005\260\363\263\007\001\362\370\263\007\031\312\363\263\007\024\302\364\263\007\017\n\003" +
"cli\022\010username\362\370\263\007\005\320\364\263\007\000\362\370\263\007\005\300\363\263\007\000\362\370\263\007\005\350\363" +
Expand Down Expand Up @@ -209747,10 +209821,10 @@ public com.strongdm.api.plumbing.DriversPlumbing.Teradata getDefaultInstanceForT
"\205\200\002 \001(\tB\n\362\370\263\007\005\260\363\263\007\001\022.\n\016bind_interface\030\206\200" +
"\002 \001(\tB\024\362\370\263\007\005\260\363\263\007\001\362\370\263\007\005\320\364\263\007\001\022n\n\010database\030" +
"\004 \001(\tB\\\030\000\362\370\263\007\005\260\363\263\007\001\362\370\263\007\031\312\363\263\007\024\302\364\263\007\017\n\003cli\022" +
"\010database\362\370\263\007\005\320\364\263\007\000\362\370\263\007\005\300\363\263\007\001\362\370\263\007\005\350\363\263\007\000\362" +
"\010database\362\370\263\007\005\320\364\263\007\000\362\370\263\007\005\300\363\263\007\001\362\370\263\007\005\350\363\263\007\000\362",
"\370\263\007\005\230\364\263\007\000\362\370\263\007\005\240\364\263\007\000\022n\n\010hostname\030\001 \001(\tB\\\030" +
"\000\362\370\263\007\005\260\363\263\007\001\362\370\263\007\031\312\363\263\007\024\302\364\263\007\017\n\003cli\022\010hostnam" +
"e\362\370\263\007\005\320\364\263\007\000\362\370\263\007\005\300\363\263\007\001\362\370\263\007\005\350\363\263\007\000\362\370\263\007\005\230\364\263\007",
"e\362\370\263\007\005\320\364\263\007\000\362\370\263\007\005\300\363\263\007\001\362\370\263\007\005\350\363\263\007\000\362\370\263\007\005\230\364\263\007" +
"\000\362\370\263\007\005\240\364\263\007\000\022n\n\010password\030\003 \001(\tB\\\030\000\362\370\263\007\005\260\363" +
"\263\007\001\362\370\263\007\031\312\363\263\007\024\302\364\263\007\017\n\003cli\022\010password\362\370\263\007\005\320\364" +
"\263\007\000\362\370\263\007\005\300\363\263\007\001\362\370\263\007\005\350\363\263\007\001\362\370\263\007\005\230\364\263\007\000\362\370\263\007\005\240\364" +
Expand Down Expand Up @@ -210262,7 +210336,7 @@ public com.strongdm.api.plumbing.DriversPlumbing.Teradata getDefaultInstanceForT
internal_static_v1_Redis_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_v1_Redis_descriptor,
new java.lang.String[] { "Id", "Name", "Healthy", "Tags", "SecretStoreId", "EgressFilter", "BindInterface", "Hostname", "Password", "Port", "PortOverride", "Username", });
new java.lang.String[] { "Id", "Name", "Healthy", "Tags", "SecretStoreId", "EgressFilter", "BindInterface", "Hostname", "Password", "Port", "PortOverride", "TlsRequired", "Username", });
internal_static_v1_Redshift_descriptor =
getDescriptor().getMessageTypes().get(65);
internal_static_v1_Redshift_fieldAccessorTable = new
Expand Down
2 changes: 2 additions & 0 deletions com/strongdm/api/plumbing/Plumbing.java
Original file line number Diff line number Diff line change
Expand Up @@ -6344,6 +6344,7 @@ public static com.strongdm.api.Redis convertRedisToPorcelain(Redis plumbing) {
porcelain.setPortOverride((plumbing.getPortOverride()));
porcelain.setSecretStoreId((plumbing.getSecretStoreId()));
porcelain.setTags(Plumbing.convertTagsToPorcelain(plumbing.getTags()));
porcelain.setTlsRequired((plumbing.getTlsRequired()));
porcelain.setUsername((plumbing.getUsername()));
return porcelain;
}
Expand Down Expand Up @@ -6380,6 +6381,7 @@ public static Redis convertRedisToPlumbing(com.strongdm.api.Redis porcelain) {
if (porcelain.getTags() != null) {
builder.setTags(Plumbing.convertTagsToPlumbing(porcelain.getTags()));
}
builder.setTlsRequired(porcelain.getTlsRequired());
if (porcelain.getUsername() != null) {
builder.setUsername((porcelain.getUsername()));
}
Expand Down
Loading

0 comments on commit a48051c

Please sign in to comment.