From 6ecc7958d4f611b61904f66cc335ce8094f8233c Mon Sep 17 00:00:00 2001 From: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:15:08 -0400 Subject: [PATCH 1/2] checkpoint --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 79e8149c..18c6ce4b 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ GO ?= go ARGS ?= --strict_message JAVA_COMPILE_OPTIONS = --enable-preview --release $(JAVA_VERSION) JAVA_OPTIONS = --enable-preview -PROTOVALIDATE_VERSION ?= v0.2.2 +PROTOVALIDATE_VERSION ?= v0.3.1 JAVA_MAIN_CLASS = build.buf.protovalidate JAVA_SOURCES = $(wildcard src/main/java/**/**/**/*.java, src/main/java/**/**/*.java) JAVA_CLASSES = $(patsubst src/main/java/%.java, target/classes/%.class, $(JAVA_SOURCES)) From c0f2f2308c717e31c9d91acc666260dfdcb2f970 Mon Sep 17 00:00:00 2001 From: Elliot Jackson <13633636+ElliotMJackson@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:58:31 -0400 Subject: [PATCH 2/2] checkpoint --- .../java/build/buf/validate/DoubleRules.java | 510 ++-- .../buf/validate/DoubleRulesOrBuilder.java | 20 +- .../build/buf/validate/DurationRules.java | 838 ++++--- .../buf/validate/DurationRulesOrBuilder.java | 28 +- .../java/build/buf/validate/Fixed32Rules.java | 494 ++-- .../buf/validate/Fixed32RulesOrBuilder.java | 20 +- .../java/build/buf/validate/Fixed64Rules.java | 502 ++-- .../buf/validate/Fixed64RulesOrBuilder.java | 20 +- .../java/build/buf/validate/FloatRules.java | 510 ++-- .../buf/validate/FloatRulesOrBuilder.java | 20 +- .../java/build/buf/validate/Int32Rules.java | 494 ++-- .../buf/validate/Int32RulesOrBuilder.java | 20 +- .../java/build/buf/validate/Int64Rules.java | 502 ++-- .../buf/validate/Int64RulesOrBuilder.java | 20 +- .../build/buf/validate/SFixed32Rules.java | 494 ++-- .../buf/validate/SFixed32RulesOrBuilder.java | 20 +- .../build/buf/validate/SFixed64Rules.java | 502 ++-- .../buf/validate/SFixed64RulesOrBuilder.java | 20 +- .../java/build/buf/validate/SInt32Rules.java | 494 ++-- .../buf/validate/SInt32RulesOrBuilder.java | 20 +- .../java/build/buf/validate/SInt64Rules.java | 502 ++-- .../buf/validate/SInt64RulesOrBuilder.java | 20 +- .../build/buf/validate/TimestampRules.java | 1236 +++++---- .../buf/validate/TimestampRulesOrBuilder.java | 98 +- .../java/build/buf/validate/UInt32Rules.java | 494 ++-- .../buf/validate/UInt32RulesOrBuilder.java | 20 +- .../java/build/buf/validate/UInt64Rules.java | 502 ++-- .../buf/validate/UInt64RulesOrBuilder.java | 20 +- .../build/buf/validate/ValidateProto.java | 2232 ++++++++--------- 29 files changed, 6558 insertions(+), 4114 deletions(-) diff --git a/src/main/java/build/buf/validate/DoubleRules.java b/src/main/java/build/buf/validate/DoubleRules.java index 4a40fa2d..d5ee1a89 100644 --- a/src/main/java/build/buf/validate/DoubleRules.java +++ b/src/main/java/build/buf/validate/DoubleRules.java @@ -46,6 +46,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private double const_ = 0D; /** @@ -90,7 +174,6 @@ public double getConst() { } public static final int LT_FIELD_NUMBER = 2; - private double lt_ = 0D; /** *
    * `lt` requires the field value to be less than the specified value (field <
@@ -105,12 +188,12 @@ public double getConst() {
    *```
    * 
* - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -126,16 +209,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public double getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Double) lessThan_; + } + return 0D; } public static final int LTE_FIELD_NUMBER = 3; - private double lte_ = 0D; /** *
    *`lte` requires the field value to be less than or equal to the specified value
@@ -150,12 +235,12 @@ public double getLt() {
    *```
    * 
* - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -171,16 +256,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public double getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Double) lessThan_; + } + return 0D; } public static final int GT_FIELD_NUMBER = 4; - private double gt_ = 0D; /** *
    * `gt` requires the field value to be greater than the specified value
@@ -203,12 +290,12 @@ public double getLte() {
    *```
    * 
* - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -232,16 +319,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public double getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Double) greaterThan_; + } + return 0D; } public static final int GTE_FIELD_NUMBER = 5; - private double gte_ = 0D; /** *
    * `gte` requires the field value to be greater than or equal to the specified
@@ -264,12 +353,12 @@ public double getGt() {
    *```
    * 
* - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +382,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public double getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Double) greaterThan_; + } + return 0D; } public static final int IN_FIELD_NUMBER = 6; @@ -471,17 +563,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeDouble(2, lt_); + if (lessThanCase_ == 2) { + output.writeDouble( + 2, (double)((java.lang.Double) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeDouble(3, lte_); + if (lessThanCase_ == 3) { + output.writeDouble( + 3, (double)((java.lang.Double) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeDouble(4, gt_); + if (greaterThanCase_ == 4) { + output.writeDouble( + 4, (double)((java.lang.Double) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeDouble(5, gte_); + if (greaterThanCase_ == 5) { + output.writeDouble( + 5, (double)((java.lang.Double) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -513,21 +609,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, lt_); + .computeDoubleSize( + 2, (double)((java.lang.Double) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, lte_); + .computeDoubleSize( + 3, (double)((java.lang.Double) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(4, gt_); + .computeDoubleSize( + 4, (double)((java.lang.Double) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(5, gte_); + .computeDoubleSize( + 5, (double)((java.lang.Double) greaterThan_)); } { int dataSize = 0; @@ -576,36 +676,42 @@ public boolean equals(final java.lang.Object obj) { != java.lang.Double.doubleToLongBits( other.getConst())) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (java.lang.Double.doubleToLongBits(getLt()) - != java.lang.Double.doubleToLongBits( - other.getLt())) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (java.lang.Double.doubleToLongBits(getLte()) - != java.lang.Double.doubleToLongBits( - other.getLte())) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (java.lang.Double.doubleToLongBits(getGt()) - != java.lang.Double.doubleToLongBits( - other.getGt())) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (java.lang.Double.doubleToLongBits(getGte()) - != java.lang.Double.doubleToLongBits( - other.getGte())) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; if (getFinite() != other.getFinite()) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (java.lang.Double.doubleToLongBits(getLt()) + != java.lang.Double.doubleToLongBits( + other.getLt())) return false; + break; + case 3: + if (java.lang.Double.doubleToLongBits(getLte()) + != java.lang.Double.doubleToLongBits( + other.getLte())) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (java.lang.Double.doubleToLongBits(getGt()) + != java.lang.Double.doubleToLongBits( + other.getGt())) return false; + break; + case 5: + if (java.lang.Double.doubleToLongBits(getGte()) + != java.lang.Double.doubleToLongBits( + other.getGte())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -622,26 +728,6 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getConst())); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLt())); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getLte())); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getGt())); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getGte())); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -653,6 +739,34 @@ public int hashCode() { hash = (37 * hash) + FINITE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFinite()); + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLt())); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLte())); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getGt())); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getGte())); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -790,13 +904,13 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0D; - lt_ = 0D; - lte_ = 0D; - gt_ = 0D; - gte_ = 0D; in_ = emptyDoubleList(); notIn_ = emptyDoubleList(); finite_ = false; + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -825,6 +939,7 @@ public build.buf.validate.DoubleRules buildPartial() { build.buf.validate.DoubleRules result = new build.buf.validate.DoubleRules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -849,28 +964,19 @@ private void buildPartial0(build.buf.validate.DoubleRules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } if (((from_bitField0_ & 0x00000080) != 0)) { result.finite_ = finite_; } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.DoubleRules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -918,18 +1024,6 @@ public Builder mergeFrom(build.buf.validate.DoubleRules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -953,6 +1047,32 @@ public Builder mergeFrom(build.buf.validate.DoubleRules other) { if (other.getFinite() != false) { setFinite(other.getFinite()); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -985,23 +1105,23 @@ public Builder mergeFrom( break; } // case 9 case 17: { - lt_ = input.readDouble(); - bitField0_ |= 0x00000002; + lessThan_ = input.readDouble(); + lessThanCase_ = 2; break; } // case 17 case 25: { - lte_ = input.readDouble(); - bitField0_ |= 0x00000004; + lessThan_ = input.readDouble(); + lessThanCase_ = 3; break; } // case 25 case 33: { - gt_ = input.readDouble(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readDouble(); + greaterThanCase_ = 4; break; } // case 33 case 41: { - gte_ = input.readDouble(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readDouble(); + greaterThanCase_ = 5; break; } // case 41 case 49: { @@ -1056,6 +1176,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private double const_ ; @@ -1146,7 +1296,6 @@ public Builder clearConst() { return this; } - private double lt_ ; /** *
      * `lt` requires the field value to be less than the specified value (field <
@@ -1161,12 +1310,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1182,12 +1330,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public double getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Double) lessThan_; + } + return 0D; } /** *
@@ -1203,14 +1353,14 @@ public double getLt() {
      *```
      * 
* - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(double value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1228,17 +1378,18 @@ public Builder setLt(double value) { *``` * * - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0D; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private double lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified value
@@ -1253,12 +1404,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1274,12 +1424,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public double getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Double) lessThan_; + } + return 0D; } /** *
@@ -1295,14 +1447,14 @@ public double getLte() {
      *```
      * 
* - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(double value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1320,17 +1472,18 @@ public Builder setLte(double value) { *``` * * - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0D; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private double gt_ ; /** *
      * `gt` requires the field value to be greater than the specified value
@@ -1353,12 +1506,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1382,12 +1534,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public double getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Double) greaterThan_; + } + return 0D; } /** *
@@ -1411,14 +1565,14 @@ public double getGt() {
      *```
      * 
* - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(double value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1444,17 +1598,18 @@ public Builder setGt(double value) { *``` * * - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0D; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private double gte_ ; /** *
      * `gte` requires the field value to be greater than or equal to the specified
@@ -1477,12 +1632,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1506,12 +1660,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public double getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Double) greaterThan_; + } + return 0D; } /** *
@@ -1535,14 +1691,14 @@ public double getGte() {
      *```
      * 
* - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(double value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1568,13 +1724,15 @@ public Builder setGte(double value) { *``` * * - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0D; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java b/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java index e91419d7..2075ede4 100644 --- a/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java +++ b/src/main/java/build/buf/validate/DoubleRulesOrBuilder.java @@ -56,7 +56,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * double lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ double getLt(); @@ -93,7 +93,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * double lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ double getLte(); @@ -138,7 +138,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * double gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ double getGt(); @@ -191,7 +191,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface DoubleRulesOrBuilder extends *``` * * - * optional double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * double gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ double getGte(); @@ -344,4 +344,8 @@ public interface DoubleRulesOrBuilder extends * @return The finite. */ boolean getFinite(); + + build.buf.validate.DoubleRules.LessThanCase getLessThanCase(); + + build.buf.validate.DoubleRules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/DurationRules.java b/src/main/java/build/buf/validate/DurationRules.java index 653d0b3f..5c2894f6 100644 --- a/src/main/java/build/buf/validate/DurationRules.java +++ b/src/main/java/build/buf/validate/DurationRules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(3), + LTE(4), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 3: return LT; + case 4: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(5), + GTE(6), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 5: return GT; + case 6: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 2; private com.google.protobuf.Duration const_; /** @@ -111,7 +195,6 @@ public com.google.protobuf.DurationOrBuilder getConstOrBuilder() { } public static final int LT_FIELD_NUMBER = 3; - private com.google.protobuf.Duration lt_; /** *
    *`lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
@@ -126,12 +209,12 @@ public com.google.protobuf.DurationOrBuilder getConstOrBuilder() {
    *```
    * 
* - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 3; } /** *
@@ -147,12 +230,15 @@ public boolean hasLt() {
    *```
    * 
* - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public com.google.protobuf.Duration getLt() { - return lt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } /** *
@@ -168,15 +254,17 @@ public com.google.protobuf.Duration getLt() {
    *```
    * 
* - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getLtOrBuilder() { - return lt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } public static final int LTE_FIELD_NUMBER = 4; - private com.google.protobuf.Duration lte_; /** *
    *`lte` indicates that the field must be less than or equal to the specified
@@ -191,12 +279,12 @@ public com.google.protobuf.DurationOrBuilder getLtOrBuilder() {
    *```
    * 
* - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 4; } /** *
@@ -212,12 +300,15 @@ public boolean hasLte() {
    *```
    * 
* - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public com.google.protobuf.Duration getLte() { - return lte_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } /** *
@@ -233,15 +324,17 @@ public com.google.protobuf.Duration getLte() {
    *```
    * 
* - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getLteOrBuilder() { - return lte_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } public static final int GT_FIELD_NUMBER = 5; - private com.google.protobuf.Duration gt_; /** *
    * `gt` requires the duration field value to be greater than the specified
@@ -264,12 +357,12 @@ public com.google.protobuf.DurationOrBuilder getLteOrBuilder() {
    *```
    * 
* - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +386,15 @@ public boolean hasGt() {
    *```
    * 
* - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public com.google.protobuf.Duration getGt() { - return gt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } /** *
@@ -322,15 +418,17 @@ public com.google.protobuf.Duration getGt() {
    *```
    * 
* - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getGtOrBuilder() { - return gt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } public static final int GTE_FIELD_NUMBER = 6; - private com.google.protobuf.Duration gte_; /** *
    * `gte` requires the duration field value to be greater than or equal to the
@@ -353,12 +451,12 @@ public com.google.protobuf.DurationOrBuilder getGtOrBuilder() {
    *```
    * 
* - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 6; } /** *
@@ -382,12 +480,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public com.google.protobuf.Duration getGte() { - return gte_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } /** *
@@ -411,11 +512,14 @@ public com.google.protobuf.Duration getGte() {
    *```
    * 
* - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getGteOrBuilder() { - return gte_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } public static final int IN_FIELD_NUMBER = 7; @@ -652,17 +756,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getConst()); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getLt()); + if (lessThanCase_ == 3) { + output.writeMessage(3, (com.google.protobuf.Duration) lessThan_); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getLte()); + if (lessThanCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Duration) lessThan_); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(5, getGt()); + if (greaterThanCase_ == 5) { + output.writeMessage(5, (com.google.protobuf.Duration) greaterThan_); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(6, getGte()); + if (greaterThanCase_ == 6) { + output.writeMessage(6, (com.google.protobuf.Duration) greaterThan_); } for (int i = 0; i < in_.size(); i++) { output.writeMessage(7, in_.get(i)); @@ -683,21 +787,21 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getConst()); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getLt()); + .computeMessageSize(3, (com.google.protobuf.Duration) lessThan_); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getLte()); + .computeMessageSize(4, (com.google.protobuf.Duration) lessThan_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getGt()); + .computeMessageSize(5, (com.google.protobuf.Duration) greaterThan_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 6) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getGte()); + .computeMessageSize(6, (com.google.protobuf.Duration) greaterThan_); } for (int i = 0; i < in_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -727,30 +831,36 @@ public boolean equals(final java.lang.Object obj) { if (!getConst() .equals(other.getConst())) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (!getLt() - .equals(other.getLt())) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (!getLte() - .equals(other.getLte())) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (!getGt() - .equals(other.getGt())) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (!getGte() - .equals(other.getGte())) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 3: + if (!getLt() + .equals(other.getLt())) return false; + break; + case 4: + if (!getLte() + .equals(other.getLte())) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 5: + if (!getGt() + .equals(other.getGt())) return false; + break; + case 6: + if (!getGte() + .equals(other.getGte())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -766,22 +876,6 @@ public int hashCode() { hash = (37 * hash) + CONST_FIELD_NUMBER; hash = (53 * hash) + getConst().hashCode(); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt().hashCode(); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte().hashCode(); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt().hashCode(); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte().hashCode(); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -790,6 +884,30 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 3: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + getLt().hashCode(); + break; + case 4: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + getLte().hashCode(); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 5: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + getGt().hashCode(); + break; + case 6: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + getGte().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -925,10 +1043,6 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getConstFieldBuilder(); - getLtFieldBuilder(); - getLteFieldBuilder(); - getGtFieldBuilder(); - getGteFieldBuilder(); getInFieldBuilder(); getNotInFieldBuilder(); } @@ -942,25 +1056,17 @@ public Builder clear() { constBuilder_.dispose(); constBuilder_ = null; } - lt_ = null; if (ltBuilder_ != null) { - ltBuilder_.dispose(); - ltBuilder_ = null; + ltBuilder_.clear(); } - lte_ = null; if (lteBuilder_ != null) { - lteBuilder_.dispose(); - lteBuilder_ = null; + lteBuilder_.clear(); } - gt_ = null; if (gtBuilder_ != null) { - gtBuilder_.dispose(); - gtBuilder_ = null; + gtBuilder_.clear(); } - gte_ = null; if (gteBuilder_ != null) { - gteBuilder_.dispose(); - gteBuilder_ = null; + gteBuilder_.clear(); } if (inBuilder_ == null) { in_ = java.util.Collections.emptyList(); @@ -976,6 +1082,10 @@ public Builder clear() { notInBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -1004,6 +1114,7 @@ public build.buf.validate.DurationRules buildPartial() { build.buf.validate.DurationRules result = new build.buf.validate.DurationRules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -1038,33 +1149,32 @@ private void buildPartial0(build.buf.validate.DurationRules result) { : constBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = ltBuilder_ == null - ? lt_ - : ltBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lteBuilder_ == null - ? lte_ - : lteBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gtBuilder_ == null - ? gt_ - : gtBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gteBuilder_ == null - ? gte_ - : gteBuilder_.build(); - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.DurationRules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + if (lessThanCase_ == 3 && + ltBuilder_ != null) { + result.lessThan_ = ltBuilder_.build(); + } + if (lessThanCase_ == 4 && + lteBuilder_ != null) { + result.lessThan_ = lteBuilder_.build(); + } + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + if (greaterThanCase_ == 5 && + gtBuilder_ != null) { + result.greaterThan_ = gtBuilder_.build(); + } + if (greaterThanCase_ == 6 && + gteBuilder_ != null) { + result.greaterThan_ = gteBuilder_.build(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -1112,18 +1222,6 @@ public Builder mergeFrom(build.buf.validate.DurationRules other) { if (other.hasConst()) { mergeConst(other.getConst()); } - if (other.hasLt()) { - mergeLt(other.getLt()); - } - if (other.hasLte()) { - mergeLte(other.getLte()); - } - if (other.hasGt()) { - mergeGt(other.getGt()); - } - if (other.hasGte()) { - mergeGte(other.getGte()); - } if (inBuilder_ == null) { if (!other.in_.isEmpty()) { if (in_.isEmpty()) { @@ -1176,6 +1274,32 @@ public Builder mergeFrom(build.buf.validate.DurationRules other) { } } } + switch (other.getLessThanCase()) { + case LT: { + mergeLt(other.getLt()); + break; + } + case LTE: { + mergeLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + mergeGt(other.getGt()); + break; + } + case GTE: { + mergeGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1213,28 +1337,28 @@ public Builder mergeFrom( input.readMessage( getLtFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + lessThanCase_ = 3; break; } // case 26 case 34: { input.readMessage( getLteFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + lessThanCase_ = 4; break; } // case 34 case 42: { input.readMessage( getGtFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + greaterThanCase_ = 5; break; } // case 42 case 50: { input.readMessage( getGteFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + greaterThanCase_ = 6; break; } // case 50 case 58: { @@ -1278,6 +1402,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private com.google.protobuf.Duration const_; @@ -1516,7 +1670,6 @@ public com.google.protobuf.DurationOrBuilder getConstOrBuilder() { return constBuilder_; } - private com.google.protobuf.Duration lt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ltBuilder_; /** @@ -1533,11 +1686,12 @@ public com.google.protobuf.DurationOrBuilder getConstOrBuilder() { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ + @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 3; } /** *
@@ -1553,14 +1707,21 @@ public boolean hasLt() {
      *```
      * 
* - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ + @java.lang.Override public com.google.protobuf.Duration getLt() { if (ltBuilder_ == null) { - return lt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } else { - return ltBuilder_.getMessage(); + if (lessThanCase_ == 3) { + return ltBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -1577,19 +1738,19 @@ public com.google.protobuf.Duration getLt() { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder setLt(com.google.protobuf.Duration value) { if (ltBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - lt_ = value; + lessThan_ = value; + onChanged(); } else { ltBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; - onChanged(); + lessThanCase_ = 3; return this; } /** @@ -1606,17 +1767,17 @@ public Builder setLt(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder setLt( com.google.protobuf.Duration.Builder builderForValue) { if (ltBuilder_ == null) { - lt_ = builderForValue.build(); + lessThan_ = builderForValue.build(); + onChanged(); } else { ltBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; - onChanged(); + lessThanCase_ = 3; return this; } /** @@ -1633,22 +1794,26 @@ public Builder setLt( *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder mergeLt(com.google.protobuf.Duration value) { if (ltBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - lt_ != null && - lt_ != com.google.protobuf.Duration.getDefaultInstance()) { - getLtBuilder().mergeFrom(value); + if (lessThanCase_ == 3 && + lessThan_ != com.google.protobuf.Duration.getDefaultInstance()) { + lessThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) lessThan_) + .mergeFrom(value).buildPartial(); } else { - lt_ = value; + lessThan_ = value; } + onChanged(); } else { - ltBuilder_.mergeFrom(value); + if (lessThanCase_ == 3) { + ltBuilder_.mergeFrom(value); + } else { + ltBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000002; - onChanged(); + lessThanCase_ = 3; return this; } /** @@ -1665,16 +1830,22 @@ public Builder mergeLt(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = null; - if (ltBuilder_ != null) { - ltBuilder_.dispose(); - ltBuilder_ = null; + if (ltBuilder_ == null) { + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } + } else { + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + } + ltBuilder_.clear(); } - onChanged(); return this; } /** @@ -1691,11 +1862,9 @@ public Builder clearLt() { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Duration.Builder getLtBuilder() { - bitField0_ |= 0x00000002; - onChanged(); return getLtFieldBuilder().getBuilder(); } /** @@ -1712,14 +1881,17 @@ public com.google.protobuf.Duration.Builder getLtBuilder() { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getLtOrBuilder() { - if (ltBuilder_ != null) { + if ((lessThanCase_ == 3) && (ltBuilder_ != null)) { return ltBuilder_.getMessageOrBuilder(); } else { - return lt_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -1736,23 +1908,27 @@ public com.google.protobuf.DurationOrBuilder getLtOrBuilder() { *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getLtFieldBuilder() { if (ltBuilder_ == null) { + if (!(lessThanCase_ == 3)) { + lessThan_ = com.google.protobuf.Duration.getDefaultInstance(); + } ltBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getLt(), + (com.google.protobuf.Duration) lessThan_, getParentForChildren(), isClean()); - lt_ = null; + lessThan_ = null; } + lessThanCase_ = 3; + onChanged(); return ltBuilder_; } - private com.google.protobuf.Duration lte_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> lteBuilder_; /** @@ -1769,11 +1945,12 @@ public com.google.protobuf.DurationOrBuilder getLtOrBuilder() { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ + @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 4; } /** *
@@ -1789,14 +1966,21 @@ public boolean hasLte() {
      *```
      * 
* - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ + @java.lang.Override public com.google.protobuf.Duration getLte() { if (lteBuilder_ == null) { - return lte_ == null ? com.google.protobuf.Duration.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } else { - return lteBuilder_.getMessage(); + if (lessThanCase_ == 4) { + return lteBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -1813,19 +1997,19 @@ public com.google.protobuf.Duration getLte() { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder setLte(com.google.protobuf.Duration value) { if (lteBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - lte_ = value; + lessThan_ = value; + onChanged(); } else { lteBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; - onChanged(); + lessThanCase_ = 4; return this; } /** @@ -1842,17 +2026,17 @@ public Builder setLte(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder setLte( com.google.protobuf.Duration.Builder builderForValue) { if (lteBuilder_ == null) { - lte_ = builderForValue.build(); + lessThan_ = builderForValue.build(); + onChanged(); } else { lteBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; - onChanged(); + lessThanCase_ = 4; return this; } /** @@ -1869,22 +2053,26 @@ public Builder setLte( *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder mergeLte(com.google.protobuf.Duration value) { if (lteBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - lte_ != null && - lte_ != com.google.protobuf.Duration.getDefaultInstance()) { - getLteBuilder().mergeFrom(value); + if (lessThanCase_ == 4 && + lessThan_ != com.google.protobuf.Duration.getDefaultInstance()) { + lessThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) lessThan_) + .mergeFrom(value).buildPartial(); } else { - lte_ = value; + lessThan_ = value; } + onChanged(); } else { - lteBuilder_.mergeFrom(value); + if (lessThanCase_ == 4) { + lteBuilder_.mergeFrom(value); + } else { + lteBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000004; - onChanged(); + lessThanCase_ = 4; return this; } /** @@ -1901,16 +2089,22 @@ public Builder mergeLte(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = null; - if (lteBuilder_ != null) { - lteBuilder_.dispose(); - lteBuilder_ = null; + if (lteBuilder_ == null) { + if (lessThanCase_ == 4) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } + } else { + if (lessThanCase_ == 4) { + lessThanCase_ = 0; + lessThan_ = null; + } + lteBuilder_.clear(); } - onChanged(); return this; } /** @@ -1927,11 +2121,9 @@ public Builder clearLte() { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Duration.Builder getLteBuilder() { - bitField0_ |= 0x00000004; - onChanged(); return getLteFieldBuilder().getBuilder(); } /** @@ -1948,14 +2140,17 @@ public com.google.protobuf.Duration.Builder getLteBuilder() { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getLteOrBuilder() { - if (lteBuilder_ != null) { + if ((lessThanCase_ == 4) && (lteBuilder_ != null)) { return lteBuilder_.getMessageOrBuilder(); } else { - return lte_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Duration) lessThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -1972,23 +2167,27 @@ public com.google.protobuf.DurationOrBuilder getLteOrBuilder() { *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getLteFieldBuilder() { if (lteBuilder_ == null) { + if (!(lessThanCase_ == 4)) { + lessThan_ = com.google.protobuf.Duration.getDefaultInstance(); + } lteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getLte(), + (com.google.protobuf.Duration) lessThan_, getParentForChildren(), isClean()); - lte_ = null; + lessThan_ = null; } + lessThanCase_ = 4; + onChanged(); return lteBuilder_; } - private com.google.protobuf.Duration gt_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> gtBuilder_; /** @@ -2013,11 +2212,12 @@ public com.google.protobuf.DurationOrBuilder getLteOrBuilder() { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ + @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 5; } /** *
@@ -2041,14 +2241,21 @@ public boolean hasGt() {
      *```
      * 
* - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ + @java.lang.Override public com.google.protobuf.Duration getGt() { if (gtBuilder_ == null) { - return gt_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } else { - return gtBuilder_.getMessage(); + if (greaterThanCase_ == 5) { + return gtBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -2073,19 +2280,19 @@ public com.google.protobuf.Duration getGt() { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder setGt(com.google.protobuf.Duration value) { if (gtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - gt_ = value; + greaterThan_ = value; + onChanged(); } else { gtBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; - onChanged(); + greaterThanCase_ = 5; return this; } /** @@ -2110,17 +2317,17 @@ public Builder setGt(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder setGt( com.google.protobuf.Duration.Builder builderForValue) { if (gtBuilder_ == null) { - gt_ = builderForValue.build(); + greaterThan_ = builderForValue.build(); + onChanged(); } else { gtBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; - onChanged(); + greaterThanCase_ = 5; return this; } /** @@ -2145,22 +2352,26 @@ public Builder setGt( *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder mergeGt(com.google.protobuf.Duration value) { if (gtBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - gt_ != null && - gt_ != com.google.protobuf.Duration.getDefaultInstance()) { - getGtBuilder().mergeFrom(value); + if (greaterThanCase_ == 5 && + greaterThan_ != com.google.protobuf.Duration.getDefaultInstance()) { + greaterThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) greaterThan_) + .mergeFrom(value).buildPartial(); } else { - gt_ = value; + greaterThan_ = value; } + onChanged(); } else { - gtBuilder_.mergeFrom(value); + if (greaterThanCase_ == 5) { + gtBuilder_.mergeFrom(value); + } else { + gtBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000008; - onChanged(); + greaterThanCase_ = 5; return this; } /** @@ -2185,16 +2396,22 @@ public Builder mergeGt(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = null; - if (gtBuilder_ != null) { - gtBuilder_.dispose(); - gtBuilder_ = null; + if (gtBuilder_ == null) { + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } + } else { + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + } + gtBuilder_.clear(); } - onChanged(); return this; } /** @@ -2219,11 +2436,9 @@ public Builder clearGt() { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Duration.Builder getGtBuilder() { - bitField0_ |= 0x00000008; - onChanged(); return getGtFieldBuilder().getBuilder(); } /** @@ -2248,14 +2463,17 @@ public com.google.protobuf.Duration.Builder getGtBuilder() { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getGtOrBuilder() { - if (gtBuilder_ != null) { + if ((greaterThanCase_ == 5) && (gtBuilder_ != null)) { return gtBuilder_.getMessageOrBuilder(); } else { - return gt_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -2280,23 +2498,27 @@ public com.google.protobuf.DurationOrBuilder getGtOrBuilder() { *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getGtFieldBuilder() { if (gtBuilder_ == null) { + if (!(greaterThanCase_ == 5)) { + greaterThan_ = com.google.protobuf.Duration.getDefaultInstance(); + } gtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getGt(), + (com.google.protobuf.Duration) greaterThan_, getParentForChildren(), isClean()); - gt_ = null; + greaterThan_ = null; } + greaterThanCase_ = 5; + onChanged(); return gtBuilder_; } - private com.google.protobuf.Duration gte_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> gteBuilder_; /** @@ -2321,11 +2543,12 @@ public com.google.protobuf.DurationOrBuilder getGtOrBuilder() { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ + @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 6; } /** *
@@ -2349,14 +2572,21 @@ public boolean hasGte() {
      *```
      * 
* - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ + @java.lang.Override public com.google.protobuf.Duration getGte() { if (gteBuilder_ == null) { - return gte_ == null ? com.google.protobuf.Duration.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } else { - return gteBuilder_.getMessage(); + if (greaterThanCase_ == 6) { + return gteBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -2381,19 +2611,19 @@ public com.google.protobuf.Duration getGte() { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder setGte(com.google.protobuf.Duration value) { if (gteBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - gte_ = value; + greaterThan_ = value; + onChanged(); } else { gteBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; - onChanged(); + greaterThanCase_ = 6; return this; } /** @@ -2418,17 +2648,17 @@ public Builder setGte(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder setGte( com.google.protobuf.Duration.Builder builderForValue) { if (gteBuilder_ == null) { - gte_ = builderForValue.build(); + greaterThan_ = builderForValue.build(); + onChanged(); } else { gteBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; - onChanged(); + greaterThanCase_ = 6; return this; } /** @@ -2453,22 +2683,26 @@ public Builder setGte( *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder mergeGte(com.google.protobuf.Duration value) { if (gteBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - gte_ != null && - gte_ != com.google.protobuf.Duration.getDefaultInstance()) { - getGteBuilder().mergeFrom(value); + if (greaterThanCase_ == 6 && + greaterThan_ != com.google.protobuf.Duration.getDefaultInstance()) { + greaterThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) greaterThan_) + .mergeFrom(value).buildPartial(); } else { - gte_ = value; + greaterThan_ = value; } + onChanged(); } else { - gteBuilder_.mergeFrom(value); + if (greaterThanCase_ == 6) { + gteBuilder_.mergeFrom(value); + } else { + gteBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000010; - onChanged(); + greaterThanCase_ = 6; return this; } /** @@ -2493,16 +2727,22 @@ public Builder mergeGte(com.google.protobuf.Duration value) { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = null; - if (gteBuilder_ != null) { - gteBuilder_.dispose(); - gteBuilder_ = null; + if (gteBuilder_ == null) { + if (greaterThanCase_ == 6) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } + } else { + if (greaterThanCase_ == 6) { + greaterThanCase_ = 0; + greaterThan_ = null; + } + gteBuilder_.clear(); } - onChanged(); return this; } /** @@ -2527,11 +2767,9 @@ public Builder clearGte() { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Duration.Builder getGteBuilder() { - bitField0_ |= 0x00000010; - onChanged(); return getGteFieldBuilder().getBuilder(); } /** @@ -2556,14 +2794,17 @@ public com.google.protobuf.Duration.Builder getGteBuilder() { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.DurationOrBuilder getGteOrBuilder() { - if (gteBuilder_ != null) { + if ((greaterThanCase_ == 6) && (gteBuilder_ != null)) { return gteBuilder_.getMessageOrBuilder(); } else { - return gte_ == null ? - com.google.protobuf.Duration.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Duration) greaterThan_; + } + return com.google.protobuf.Duration.getDefaultInstance(); } } /** @@ -2588,19 +2829,24 @@ public com.google.protobuf.DurationOrBuilder getGteOrBuilder() { *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> getGteFieldBuilder() { if (gteBuilder_ == null) { + if (!(greaterThanCase_ == 6)) { + greaterThan_ = com.google.protobuf.Duration.getDefaultInstance(); + } gteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( - getGte(), + (com.google.protobuf.Duration) greaterThan_, getParentForChildren(), isClean()); - gte_ = null; + greaterThan_ = null; } + greaterThanCase_ = 6; + onChanged(); return gteBuilder_; } diff --git a/src/main/java/build/buf/validate/DurationRulesOrBuilder.java b/src/main/java/build/buf/validate/DurationRulesOrBuilder.java index 211f2c98..0efbddae 100644 --- a/src/main/java/build/buf/validate/DurationRulesOrBuilder.java +++ b/src/main/java/build/buf/validate/DurationRulesOrBuilder.java @@ -75,7 +75,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -93,7 +93,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ com.google.protobuf.Duration getLt(); @@ -111,7 +111,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.DurationOrBuilder getLtOrBuilder(); @@ -129,7 +129,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -147,7 +147,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ com.google.protobuf.Duration getLte(); @@ -165,7 +165,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.DurationOrBuilder getLteOrBuilder(); @@ -191,7 +191,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -217,7 +217,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ com.google.protobuf.Duration getGt(); @@ -243,7 +243,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.DurationOrBuilder getGtOrBuilder(); @@ -269,7 +269,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -295,7 +295,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ com.google.protobuf.Duration getGte(); @@ -321,7 +321,7 @@ public interface DurationRulesOrBuilder extends *``` * * - * optional .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.DurationOrBuilder getGteOrBuilder(); @@ -507,4 +507,8 @@ com.google.protobuf.DurationOrBuilder getInOrBuilder( */ com.google.protobuf.DurationOrBuilder getNotInOrBuilder( int index); + + build.buf.validate.DurationRules.LessThanCase getLessThanCase(); + + build.buf.validate.DurationRules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/Fixed32Rules.java b/src/main/java/build/buf/validate/Fixed32Rules.java index 79e5885c..8409fd41 100644 --- a/src/main/java/build/buf/validate/Fixed32Rules.java +++ b/src/main/java/build/buf/validate/Fixed32Rules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private int const_ = 0; /** @@ -89,7 +173,6 @@ public int getConst() { } public static final int LT_FIELD_NUMBER = 2; - private int lt_ = 0; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -104,12 +187,12 @@ public int getConst() {
    *```
    * 
* - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -125,16 +208,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int LTE_FIELD_NUMBER = 3; - private int lte_ = 0; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -149,12 +234,12 @@ public int getLt() {
    *```
    * 
* - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -170,16 +255,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int GT_FIELD_NUMBER = 4; - private int gt_ = 0; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -202,12 +289,12 @@ public int getLte() {
    *```
    * 
* - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -231,16 +318,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int GTE_FIELD_NUMBER = 5; - private int gte_ = 0; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -263,12 +352,12 @@ public int getGt() {
    *```
    * 
* - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -292,12 +381,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int IN_FIELD_NUMBER = 6; @@ -454,17 +546,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeFixed32(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeFixed32(2, lt_); + if (lessThanCase_ == 2) { + output.writeFixed32( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeFixed32(3, lte_); + if (lessThanCase_ == 3) { + output.writeFixed32( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeFixed32(4, gt_); + if (greaterThanCase_ == 4) { + output.writeFixed32( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeFixed32(5, gte_); + if (greaterThanCase_ == 5) { + output.writeFixed32( + 5, (int)((java.lang.Integer) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -493,21 +589,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeFixed32Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(2, lt_); + .computeFixed32Size( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(3, lte_); + .computeFixed32Size( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(4, gt_); + .computeFixed32Size( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(5, gte_); + .computeFixed32Size( + 5, (int)((java.lang.Integer) greaterThan_)); } { int dataSize = 0; @@ -551,30 +651,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,22 +696,6 @@ public int hashCode() { hash = (37 * hash) + CONST_FIELD_NUMBER; hash = (53 * hash) + getConst(); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -614,6 +704,30 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + getLt(); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + getLte(); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + getGt(); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + getGte(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -750,12 +864,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0; - lt_ = 0; - lte_ = 0; - gt_ = 0; - gte_ = 0; in_ = emptyIntList(); notIn_ = emptyIntList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -784,6 +898,7 @@ public build.buf.validate.Fixed32Rules buildPartial() { build.buf.validate.Fixed32Rules result = new build.buf.validate.Fixed32Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -808,25 +923,16 @@ private void buildPartial0(build.buf.validate.Fixed32Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.Fixed32Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -874,18 +980,6 @@ public Builder mergeFrom(build.buf.validate.Fixed32Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -906,6 +1000,32 @@ public Builder mergeFrom(build.buf.validate.Fixed32Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -938,23 +1058,23 @@ public Builder mergeFrom( break; } // case 13 case 21: { - lt_ = input.readFixed32(); - bitField0_ |= 0x00000002; + lessThan_ = input.readFixed32(); + lessThanCase_ = 2; break; } // case 21 case 29: { - lte_ = input.readFixed32(); - bitField0_ |= 0x00000004; + lessThan_ = input.readFixed32(); + lessThanCase_ = 3; break; } // case 29 case 37: { - gt_ = input.readFixed32(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readFixed32(); + greaterThanCase_ = 4; break; } // case 37 case 45: { - gte_ = input.readFixed32(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readFixed32(); + greaterThanCase_ = 5; break; } // case 45 case 53: { @@ -1004,6 +1124,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private int const_ ; @@ -1094,7 +1244,6 @@ public Builder clearConst() { return this; } - private int lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1109,12 +1258,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1130,12 +1278,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1151,14 +1301,14 @@ public int getLt() {
      *```
      * 
* - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(int value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1176,17 +1326,18 @@ public Builder setLt(int value) { *``` * * - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1201,12 +1352,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1222,12 +1372,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1243,14 +1395,14 @@ public int getLte() {
      *```
      * 
* - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(int value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1268,17 +1420,18 @@ public Builder setLte(int value) { *``` * * - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1301,12 +1454,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1330,12 +1482,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1359,14 +1513,14 @@ public int getGt() {
      *```
      * 
* - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(int value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1392,17 +1546,18 @@ public Builder setGt(int value) { *``` * * - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private int gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1425,12 +1580,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1454,12 +1608,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1483,14 +1639,14 @@ public int getGte() {
      *```
      * 
* - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(int value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1516,13 +1672,15 @@ public Builder setGte(int value) { *``` * * - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java b/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java index b24903a9..0f7451c7 100644 --- a/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/Fixed32RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ int getLt(); @@ -93,7 +93,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ int getLte(); @@ -138,7 +138,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ int getGt(); @@ -191,7 +191,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface Fixed32RulesOrBuilder extends *``` * * - * optional fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ int getGte(); @@ -333,4 +333,8 @@ public interface Fixed32RulesOrBuilder extends * @return The notIn at the given index. */ int getNotIn(int index); + + build.buf.validate.Fixed32Rules.LessThanCase getLessThanCase(); + + build.buf.validate.Fixed32Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/Fixed64Rules.java b/src/main/java/build/buf/validate/Fixed64Rules.java index 8cabf46d..4530ef38 100644 --- a/src/main/java/build/buf/validate/Fixed64Rules.java +++ b/src/main/java/build/buf/validate/Fixed64Rules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private long const_ = 0L; /** @@ -89,7 +173,6 @@ public long getConst() { } public static final int LT_FIELD_NUMBER = 2; - private long lt_ = 0L; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -104,12 +187,12 @@ public long getConst() {
    *```
    * 
* - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -125,16 +208,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int LTE_FIELD_NUMBER = 3; - private long lte_ = 0L; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -149,12 +234,12 @@ public long getLt() {
    *```
    * 
* - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -170,16 +255,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int GT_FIELD_NUMBER = 4; - private long gt_ = 0L; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -202,12 +289,12 @@ public long getLte() {
    *```
    * 
* - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -231,16 +318,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int GTE_FIELD_NUMBER = 5; - private long gte_ = 0L; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -263,12 +352,12 @@ public long getGt() {
    *```
    * 
* - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -292,12 +381,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int IN_FIELD_NUMBER = 6; @@ -454,17 +546,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeFixed64(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeFixed64(2, lt_); + if (lessThanCase_ == 2) { + output.writeFixed64( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeFixed64(3, lte_); + if (lessThanCase_ == 3) { + output.writeFixed64( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeFixed64(4, gt_); + if (greaterThanCase_ == 4) { + output.writeFixed64( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeFixed64(5, gte_); + if (greaterThanCase_ == 5) { + output.writeFixed64( + 5, (long)((java.lang.Long) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -493,21 +589,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeFixed64Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(2, lt_); + .computeFixed64Size( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(3, lte_); + .computeFixed64Size( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(4, gt_); + .computeFixed64Size( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeFixed64Size(5, gte_); + .computeFixed64Size( + 5, (long)((java.lang.Long) greaterThan_)); } { int dataSize = 0; @@ -551,30 +651,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -591,26 +697,6 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConst()); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -619,6 +705,34 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLt()); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLte()); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGt()); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGte()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -755,12 +869,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0L; - lt_ = 0L; - lte_ = 0L; - gt_ = 0L; - gte_ = 0L; in_ = emptyLongList(); notIn_ = emptyLongList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -789,6 +903,7 @@ public build.buf.validate.Fixed64Rules buildPartial() { build.buf.validate.Fixed64Rules result = new build.buf.validate.Fixed64Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -813,25 +928,16 @@ private void buildPartial0(build.buf.validate.Fixed64Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.Fixed64Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -879,18 +985,6 @@ public Builder mergeFrom(build.buf.validate.Fixed64Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -911,6 +1005,32 @@ public Builder mergeFrom(build.buf.validate.Fixed64Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -943,23 +1063,23 @@ public Builder mergeFrom( break; } // case 9 case 17: { - lt_ = input.readFixed64(); - bitField0_ |= 0x00000002; + lessThan_ = input.readFixed64(); + lessThanCase_ = 2; break; } // case 17 case 25: { - lte_ = input.readFixed64(); - bitField0_ |= 0x00000004; + lessThan_ = input.readFixed64(); + lessThanCase_ = 3; break; } // case 25 case 33: { - gt_ = input.readFixed64(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readFixed64(); + greaterThanCase_ = 4; break; } // case 33 case 41: { - gte_ = input.readFixed64(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readFixed64(); + greaterThanCase_ = 5; break; } // case 41 case 49: { @@ -1009,6 +1129,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private long const_ ; @@ -1099,7 +1249,6 @@ public Builder clearConst() { return this; } - private long lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1114,12 +1263,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1135,12 +1283,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1156,14 +1306,14 @@ public long getLt() {
      *```
      * 
* - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(long value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1181,17 +1331,18 @@ public Builder setLt(long value) { *``` * * - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0L; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1206,12 +1357,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1227,12 +1377,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1248,14 +1400,14 @@ public long getLte() {
      *```
      * 
* - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(long value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1273,17 +1425,18 @@ public Builder setLte(long value) { *``` * * - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0L; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1306,12 +1459,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1335,12 +1487,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1364,14 +1518,14 @@ public long getGt() {
      *```
      * 
* - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(long value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1397,17 +1551,18 @@ public Builder setGt(long value) { *``` * * - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0L; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private long gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1430,12 +1585,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1459,12 +1613,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1488,14 +1644,14 @@ public long getGte() {
      *```
      * 
* - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(long value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1521,13 +1677,15 @@ public Builder setGte(long value) { *``` * * - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0L; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java b/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java index 7d312387..1a76385b 100644 --- a/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/Fixed64RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * fixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ long getLt(); @@ -93,7 +93,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * fixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ long getLte(); @@ -138,7 +138,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * fixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ long getGt(); @@ -191,7 +191,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface Fixed64RulesOrBuilder extends *``` * * - * optional fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * fixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ long getGte(); @@ -333,4 +333,8 @@ public interface Fixed64RulesOrBuilder extends * @return The notIn at the given index. */ long getNotIn(int index); + + build.buf.validate.Fixed64Rules.LessThanCase getLessThanCase(); + + build.buf.validate.Fixed64Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/FloatRules.java b/src/main/java/build/buf/validate/FloatRules.java index fb8e3246..f965cde7 100644 --- a/src/main/java/build/buf/validate/FloatRules.java +++ b/src/main/java/build/buf/validate/FloatRules.java @@ -46,6 +46,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private float const_ = 0F; /** @@ -90,7 +174,6 @@ public float getConst() { } public static final int LT_FIELD_NUMBER = 2; - private float lt_ = 0F; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -105,12 +188,12 @@ public float getConst() {
    *```
    * 
* - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -126,16 +209,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public float getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Float) lessThan_; + } + return 0F; } public static final int LTE_FIELD_NUMBER = 3; - private float lte_ = 0F; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -150,12 +235,12 @@ public float getLt() {
    *```
    * 
* - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -171,16 +256,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public float getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Float) lessThan_; + } + return 0F; } public static final int GT_FIELD_NUMBER = 4; - private float gt_ = 0F; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -203,12 +290,12 @@ public float getLte() {
    *```
    * 
* - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -232,16 +319,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public float getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Float) greaterThan_; + } + return 0F; } public static final int GTE_FIELD_NUMBER = 5; - private float gte_ = 0F; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -264,12 +353,12 @@ public float getGt() {
    *```
    * 
* - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +382,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public float getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Float) greaterThan_; + } + return 0F; } public static final int IN_FIELD_NUMBER = 6; @@ -471,17 +563,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeFloat(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeFloat(2, lt_); + if (lessThanCase_ == 2) { + output.writeFloat( + 2, (float)((java.lang.Float) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeFloat(3, lte_); + if (lessThanCase_ == 3) { + output.writeFloat( + 3, (float)((java.lang.Float) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeFloat(4, gt_); + if (greaterThanCase_ == 4) { + output.writeFloat( + 4, (float)((java.lang.Float) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeFloat(5, gte_); + if (greaterThanCase_ == 5) { + output.writeFloat( + 5, (float)((java.lang.Float) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -513,21 +609,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeFloatSize(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, lt_); + .computeFloatSize( + 2, (float)((java.lang.Float) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, lte_); + .computeFloatSize( + 3, (float)((java.lang.Float) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, gt_); + .computeFloatSize( + 4, (float)((java.lang.Float) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, gte_); + .computeFloatSize( + 5, (float)((java.lang.Float) greaterThan_)); } { int dataSize = 0; @@ -576,36 +676,42 @@ public boolean equals(final java.lang.Object obj) { != java.lang.Float.floatToIntBits( other.getConst())) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (java.lang.Float.floatToIntBits(getLt()) - != java.lang.Float.floatToIntBits( - other.getLt())) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (java.lang.Float.floatToIntBits(getLte()) - != java.lang.Float.floatToIntBits( - other.getLte())) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (java.lang.Float.floatToIntBits(getGt()) - != java.lang.Float.floatToIntBits( - other.getGt())) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (java.lang.Float.floatToIntBits(getGte()) - != java.lang.Float.floatToIntBits( - other.getGte())) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; if (getFinite() != other.getFinite()) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (java.lang.Float.floatToIntBits(getLt()) + != java.lang.Float.floatToIntBits( + other.getLt())) return false; + break; + case 3: + if (java.lang.Float.floatToIntBits(getLte()) + != java.lang.Float.floatToIntBits( + other.getLte())) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (java.lang.Float.floatToIntBits(getGt()) + != java.lang.Float.floatToIntBits( + other.getGt())) return false; + break; + case 5: + if (java.lang.Float.floatToIntBits(getGte()) + != java.lang.Float.floatToIntBits( + other.getGte())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -622,26 +728,6 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits( getConst()); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLt()); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getLte()); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getGt()); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits( - getGte()); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -653,6 +739,34 @@ public int hashCode() { hash = (37 * hash) + FINITE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFinite()); + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLt()); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getLte()); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getGt()); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getGte()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -790,13 +904,13 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0F; - lt_ = 0F; - lte_ = 0F; - gt_ = 0F; - gte_ = 0F; in_ = emptyFloatList(); notIn_ = emptyFloatList(); finite_ = false; + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -825,6 +939,7 @@ public build.buf.validate.FloatRules buildPartial() { build.buf.validate.FloatRules result = new build.buf.validate.FloatRules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -849,28 +964,19 @@ private void buildPartial0(build.buf.validate.FloatRules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } if (((from_bitField0_ & 0x00000080) != 0)) { result.finite_ = finite_; } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.FloatRules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -918,18 +1024,6 @@ public Builder mergeFrom(build.buf.validate.FloatRules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -953,6 +1047,32 @@ public Builder mergeFrom(build.buf.validate.FloatRules other) { if (other.getFinite() != false) { setFinite(other.getFinite()); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -985,23 +1105,23 @@ public Builder mergeFrom( break; } // case 13 case 21: { - lt_ = input.readFloat(); - bitField0_ |= 0x00000002; + lessThan_ = input.readFloat(); + lessThanCase_ = 2; break; } // case 21 case 29: { - lte_ = input.readFloat(); - bitField0_ |= 0x00000004; + lessThan_ = input.readFloat(); + lessThanCase_ = 3; break; } // case 29 case 37: { - gt_ = input.readFloat(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readFloat(); + greaterThanCase_ = 4; break; } // case 37 case 45: { - gte_ = input.readFloat(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readFloat(); + greaterThanCase_ = 5; break; } // case 45 case 53: { @@ -1056,6 +1176,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private float const_ ; @@ -1146,7 +1296,6 @@ public Builder clearConst() { return this; } - private float lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1161,12 +1310,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1182,12 +1330,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public float getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Float) lessThan_; + } + return 0F; } /** *
@@ -1203,14 +1353,14 @@ public float getLt() {
      *```
      * 
* - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(float value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1228,17 +1378,18 @@ public Builder setLt(float value) { *``` * * - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0F; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private float lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1253,12 +1404,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1274,12 +1424,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public float getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Float) lessThan_; + } + return 0F; } /** *
@@ -1295,14 +1447,14 @@ public float getLte() {
      *```
      * 
* - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(float value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1320,17 +1472,18 @@ public Builder setLte(float value) { *``` * * - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0F; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private float gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1353,12 +1506,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1382,12 +1534,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public float getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Float) greaterThan_; + } + return 0F; } /** *
@@ -1411,14 +1565,14 @@ public float getGt() {
      *```
      * 
* - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(float value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1444,17 +1598,18 @@ public Builder setGt(float value) { *``` * * - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0F; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private float gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1477,12 +1632,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1506,12 +1660,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public float getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Float) greaterThan_; + } + return 0F; } /** *
@@ -1535,14 +1691,14 @@ public float getGte() {
      *```
      * 
* - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(float value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1568,13 +1724,15 @@ public Builder setGte(float value) { *``` * * - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0F; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/FloatRulesOrBuilder.java b/src/main/java/build/buf/validate/FloatRulesOrBuilder.java index 52e08261..cb651093 100644 --- a/src/main/java/build/buf/validate/FloatRulesOrBuilder.java +++ b/src/main/java/build/buf/validate/FloatRulesOrBuilder.java @@ -56,7 +56,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * float lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ float getLt(); @@ -93,7 +93,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * float lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ float getLte(); @@ -138,7 +138,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * float gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ float getGt(); @@ -191,7 +191,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface FloatRulesOrBuilder extends *``` * * - * optional float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * float gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ float getGte(); @@ -344,4 +344,8 @@ public interface FloatRulesOrBuilder extends * @return The finite. */ boolean getFinite(); + + build.buf.validate.FloatRules.LessThanCase getLessThanCase(); + + build.buf.validate.FloatRules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/Int32Rules.java b/src/main/java/build/buf/validate/Int32Rules.java index 5802a5cc..3ea2b976 100644 --- a/src/main/java/build/buf/validate/Int32Rules.java +++ b/src/main/java/build/buf/validate/Int32Rules.java @@ -46,6 +46,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private int const_ = 0; /** @@ -90,7 +174,6 @@ public int getConst() { } public static final int LT_FIELD_NUMBER = 2; - private int lt_ = 0; /** *
    * `lt` requires the field value to be less than the specified value (field
@@ -105,12 +188,12 @@ public int getConst() {
    *```
    * 
* - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -126,16 +209,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int LTE_FIELD_NUMBER = 3; - private int lte_ = 0; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -150,12 +235,12 @@ public int getLt() {
    *```
    * 
* - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -171,16 +256,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int GT_FIELD_NUMBER = 4; - private int gt_ = 0; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -203,12 +290,12 @@ public int getLte() {
    *```
    * 
* - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -232,16 +319,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int GTE_FIELD_NUMBER = 5; - private int gte_ = 0; /** *
    *`gte` requires the field value to be greater than or equal to the specified value
@@ -264,12 +353,12 @@ public int getGt() {
    *```
    * 
* - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +382,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int IN_FIELD_NUMBER = 6; @@ -455,17 +547,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt32(2, lt_); + if (lessThanCase_ == 2) { + output.writeInt32( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeInt32(3, lte_); + if (lessThanCase_ == 3) { + output.writeInt32( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt32(4, gt_); + if (greaterThanCase_ == 4) { + output.writeInt32( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeInt32(5, gte_); + if (greaterThanCase_ == 5) { + output.writeInt32( + 5, (int)((java.lang.Integer) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -494,21 +590,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, lt_); + .computeInt32Size( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, lte_); + .computeInt32Size( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, gt_); + .computeInt32Size( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, gte_); + .computeInt32Size( + 5, (int)((java.lang.Integer) greaterThan_)); } { int dataSize = 0; @@ -558,30 +658,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -597,22 +703,6 @@ public int hashCode() { hash = (37 * hash) + CONST_FIELD_NUMBER; hash = (53 * hash) + getConst(); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -621,6 +711,30 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + getLt(); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + getLte(); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + getGt(); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + getGte(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -758,12 +872,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0; - lt_ = 0; - lte_ = 0; - gt_ = 0; - gte_ = 0; in_ = emptyIntList(); notIn_ = emptyIntList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -792,6 +906,7 @@ public build.buf.validate.Int32Rules buildPartial() { build.buf.validate.Int32Rules result = new build.buf.validate.Int32Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -816,25 +931,16 @@ private void buildPartial0(build.buf.validate.Int32Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.Int32Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -882,18 +988,6 @@ public Builder mergeFrom(build.buf.validate.Int32Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -914,6 +1008,32 @@ public Builder mergeFrom(build.buf.validate.Int32Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -946,23 +1066,23 @@ public Builder mergeFrom( break; } // case 8 case 16: { - lt_ = input.readInt32(); - bitField0_ |= 0x00000002; + lessThan_ = input.readInt32(); + lessThanCase_ = 2; break; } // case 16 case 24: { - lte_ = input.readInt32(); - bitField0_ |= 0x00000004; + lessThan_ = input.readInt32(); + lessThanCase_ = 3; break; } // case 24 case 32: { - gt_ = input.readInt32(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readInt32(); + greaterThanCase_ = 4; break; } // case 32 case 40: { - gte_ = input.readInt32(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readInt32(); + greaterThanCase_ = 5; break; } // case 40 case 48: { @@ -1012,6 +1132,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private int const_ ; @@ -1102,7 +1252,6 @@ public Builder clearConst() { return this; } - private int lt_ ; /** *
      * `lt` requires the field value to be less than the specified value (field
@@ -1117,12 +1266,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1138,12 +1286,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1159,14 +1309,14 @@ public int getLt() {
      *```
      * 
* - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(int value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1184,17 +1334,18 @@ public Builder setLt(int value) { *``` * * - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1209,12 +1360,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1230,12 +1380,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1251,14 +1403,14 @@ public int getLte() {
      *```
      * 
* - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(int value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1276,17 +1428,18 @@ public Builder setLte(int value) { *``` * * - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1309,12 +1462,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1338,12 +1490,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1367,14 +1521,14 @@ public int getGt() {
      *```
      * 
* - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(int value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1400,17 +1554,18 @@ public Builder setGt(int value) { *``` * * - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private int gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified value
@@ -1433,12 +1588,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1462,12 +1616,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1491,14 +1647,14 @@ public int getGte() {
      *```
      * 
* - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(int value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1524,13 +1680,15 @@ public Builder setGte(int value) { *``` * * - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/Int32RulesOrBuilder.java b/src/main/java/build/buf/validate/Int32RulesOrBuilder.java index 5c72e505..b6283cba 100644 --- a/src/main/java/build/buf/validate/Int32RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/Int32RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ int getLt(); @@ -93,7 +93,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ int getLte(); @@ -138,7 +138,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ int getGt(); @@ -191,7 +191,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface Int32RulesOrBuilder extends *``` * * - * optional int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ int getGte(); @@ -333,4 +333,8 @@ public interface Int32RulesOrBuilder extends * @return The notIn at the given index. */ int getNotIn(int index); + + build.buf.validate.Int32Rules.LessThanCase getLessThanCase(); + + build.buf.validate.Int32Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/Int64Rules.java b/src/main/java/build/buf/validate/Int64Rules.java index 29c1c31b..6ba018b6 100644 --- a/src/main/java/build/buf/validate/Int64Rules.java +++ b/src/main/java/build/buf/validate/Int64Rules.java @@ -46,6 +46,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private long const_ = 0L; /** @@ -90,7 +174,6 @@ public long getConst() { } public static final int LT_FIELD_NUMBER = 2; - private long lt_ = 0L; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -105,12 +188,12 @@ public long getConst() {
    *```
    * 
* - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -126,16 +209,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int LTE_FIELD_NUMBER = 3; - private long lte_ = 0L; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -150,12 +235,12 @@ public long getLt() {
    *```
    * 
* - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -171,16 +256,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int GT_FIELD_NUMBER = 4; - private long gt_ = 0L; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -203,12 +290,12 @@ public long getLte() {
    *```
    * 
* - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -232,16 +319,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int GTE_FIELD_NUMBER = 5; - private long gte_ = 0L; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -264,12 +353,12 @@ public long getGt() {
    *```
    * 
* - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +382,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int IN_FIELD_NUMBER = 6; @@ -455,17 +547,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeInt64(2, lt_); + if (lessThanCase_ == 2) { + output.writeInt64( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeInt64(3, lte_); + if (lessThanCase_ == 3) { + output.writeInt64( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt64(4, gt_); + if (greaterThanCase_ == 4) { + output.writeInt64( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeInt64(5, gte_); + if (greaterThanCase_ == 5) { + output.writeInt64( + 5, (long)((java.lang.Long) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -494,21 +590,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, lt_); + .computeInt64Size( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, lte_); + .computeInt64Size( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, gt_); + .computeInt64Size( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, gte_); + .computeInt64Size( + 5, (long)((java.lang.Long) greaterThan_)); } { int dataSize = 0; @@ -558,30 +658,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -598,26 +704,6 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConst()); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -626,6 +712,34 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLt()); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLte()); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGt()); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGte()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -763,12 +877,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0L; - lt_ = 0L; - lte_ = 0L; - gt_ = 0L; - gte_ = 0L; in_ = emptyLongList(); notIn_ = emptyLongList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -797,6 +911,7 @@ public build.buf.validate.Int64Rules buildPartial() { build.buf.validate.Int64Rules result = new build.buf.validate.Int64Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -821,25 +936,16 @@ private void buildPartial0(build.buf.validate.Int64Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.Int64Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -887,18 +993,6 @@ public Builder mergeFrom(build.buf.validate.Int64Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -919,6 +1013,32 @@ public Builder mergeFrom(build.buf.validate.Int64Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -951,23 +1071,23 @@ public Builder mergeFrom( break; } // case 8 case 16: { - lt_ = input.readInt64(); - bitField0_ |= 0x00000002; + lessThan_ = input.readInt64(); + lessThanCase_ = 2; break; } // case 16 case 24: { - lte_ = input.readInt64(); - bitField0_ |= 0x00000004; + lessThan_ = input.readInt64(); + lessThanCase_ = 3; break; } // case 24 case 32: { - gt_ = input.readInt64(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readInt64(); + greaterThanCase_ = 4; break; } // case 32 case 40: { - gte_ = input.readInt64(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readInt64(); + greaterThanCase_ = 5; break; } // case 40 case 48: { @@ -1017,6 +1137,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private long const_ ; @@ -1107,7 +1257,6 @@ public Builder clearConst() { return this; } - private long lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1122,12 +1271,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1143,12 +1291,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1164,14 +1314,14 @@ public long getLt() {
      *```
      * 
* - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(long value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1189,17 +1339,18 @@ public Builder setLt(long value) { *``` * * - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0L; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1214,12 +1365,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1235,12 +1385,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1256,14 +1408,14 @@ public long getLte() {
      *```
      * 
* - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(long value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1281,17 +1433,18 @@ public Builder setLte(long value) { *``` * * - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0L; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1314,12 +1467,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1343,12 +1495,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1372,14 +1526,14 @@ public long getGt() {
      *```
      * 
* - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(long value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1405,17 +1559,18 @@ public Builder setGt(long value) { *``` * * - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0L; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private long gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1438,12 +1593,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1467,12 +1621,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1496,14 +1652,14 @@ public long getGte() {
      *```
      * 
* - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(long value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1529,13 +1685,15 @@ public Builder setGte(long value) { *``` * * - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0L; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/Int64RulesOrBuilder.java b/src/main/java/build/buf/validate/Int64RulesOrBuilder.java index a196b913..ef64d873 100644 --- a/src/main/java/build/buf/validate/Int64RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/Int64RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * int64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ long getLt(); @@ -93,7 +93,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * int64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ long getLte(); @@ -138,7 +138,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * int64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ long getGt(); @@ -191,7 +191,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface Int64RulesOrBuilder extends *``` * * - * optional int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * int64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ long getGte(); @@ -333,4 +333,8 @@ public interface Int64RulesOrBuilder extends * @return The notIn at the given index. */ long getNotIn(int index); + + build.buf.validate.Int64Rules.LessThanCase getLessThanCase(); + + build.buf.validate.Int64Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/SFixed32Rules.java b/src/main/java/build/buf/validate/SFixed32Rules.java index 17c579dc..b6d8f1e7 100644 --- a/src/main/java/build/buf/validate/SFixed32Rules.java +++ b/src/main/java/build/buf/validate/SFixed32Rules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private int const_ = 0; /** @@ -89,7 +173,6 @@ public int getConst() { } public static final int LT_FIELD_NUMBER = 2; - private int lt_ = 0; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -104,12 +187,12 @@ public int getConst() {
    *```
    * 
* - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -125,16 +208,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int LTE_FIELD_NUMBER = 3; - private int lte_ = 0; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -149,12 +234,12 @@ public int getLt() {
    *```
    * 
* - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -170,16 +255,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int GT_FIELD_NUMBER = 4; - private int gt_ = 0; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -202,12 +289,12 @@ public int getLte() {
    *```
    * 
* - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -231,16 +318,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int GTE_FIELD_NUMBER = 5; - private int gte_ = 0; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -263,12 +352,12 @@ public int getGt() {
    *```
    * 
* - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -292,12 +381,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int IN_FIELD_NUMBER = 6; @@ -454,17 +546,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeSFixed32(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeSFixed32(2, lt_); + if (lessThanCase_ == 2) { + output.writeSFixed32( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeSFixed32(3, lte_); + if (lessThanCase_ == 3) { + output.writeSFixed32( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeSFixed32(4, gt_); + if (greaterThanCase_ == 4) { + output.writeSFixed32( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeSFixed32(5, gte_); + if (greaterThanCase_ == 5) { + output.writeSFixed32( + 5, (int)((java.lang.Integer) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -493,21 +589,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeSFixed32Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(2, lt_); + .computeSFixed32Size( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(3, lte_); + .computeSFixed32Size( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(4, gt_); + .computeSFixed32Size( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeSFixed32Size(5, gte_); + .computeSFixed32Size( + 5, (int)((java.lang.Integer) greaterThan_)); } { int dataSize = 0; @@ -551,30 +651,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,22 +696,6 @@ public int hashCode() { hash = (37 * hash) + CONST_FIELD_NUMBER; hash = (53 * hash) + getConst(); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -614,6 +704,30 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + getLt(); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + getLte(); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + getGt(); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + getGte(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -750,12 +864,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0; - lt_ = 0; - lte_ = 0; - gt_ = 0; - gte_ = 0; in_ = emptyIntList(); notIn_ = emptyIntList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -784,6 +898,7 @@ public build.buf.validate.SFixed32Rules buildPartial() { build.buf.validate.SFixed32Rules result = new build.buf.validate.SFixed32Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -808,25 +923,16 @@ private void buildPartial0(build.buf.validate.SFixed32Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.SFixed32Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -874,18 +980,6 @@ public Builder mergeFrom(build.buf.validate.SFixed32Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -906,6 +1000,32 @@ public Builder mergeFrom(build.buf.validate.SFixed32Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -938,23 +1058,23 @@ public Builder mergeFrom( break; } // case 13 case 21: { - lt_ = input.readSFixed32(); - bitField0_ |= 0x00000002; + lessThan_ = input.readSFixed32(); + lessThanCase_ = 2; break; } // case 21 case 29: { - lte_ = input.readSFixed32(); - bitField0_ |= 0x00000004; + lessThan_ = input.readSFixed32(); + lessThanCase_ = 3; break; } // case 29 case 37: { - gt_ = input.readSFixed32(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readSFixed32(); + greaterThanCase_ = 4; break; } // case 37 case 45: { - gte_ = input.readSFixed32(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readSFixed32(); + greaterThanCase_ = 5; break; } // case 45 case 53: { @@ -1004,6 +1124,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private int const_ ; @@ -1094,7 +1244,6 @@ public Builder clearConst() { return this; } - private int lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1109,12 +1258,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1130,12 +1278,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1151,14 +1301,14 @@ public int getLt() {
      *```
      * 
* - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(int value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1176,17 +1326,18 @@ public Builder setLt(int value) { *``` * * - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1201,12 +1352,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1222,12 +1372,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1243,14 +1395,14 @@ public int getLte() {
      *```
      * 
* - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(int value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1268,17 +1420,18 @@ public Builder setLte(int value) { *``` * * - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1301,12 +1454,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1330,12 +1482,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1359,14 +1513,14 @@ public int getGt() {
      *```
      * 
* - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(int value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1392,17 +1546,18 @@ public Builder setGt(int value) { *``` * * - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private int gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1425,12 +1580,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1454,12 +1608,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1483,14 +1639,14 @@ public int getGte() {
      *```
      * 
* - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(int value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1516,13 +1672,15 @@ public Builder setGte(int value) { *``` * * - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java b/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java index e8f41a8d..3904a46e 100644 --- a/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/SFixed32RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ int getLt(); @@ -93,7 +93,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ int getLte(); @@ -138,7 +138,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ int getGt(); @@ -191,7 +191,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface SFixed32RulesOrBuilder extends *``` * * - * optional sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ int getGte(); @@ -333,4 +333,8 @@ public interface SFixed32RulesOrBuilder extends * @return The notIn at the given index. */ int getNotIn(int index); + + build.buf.validate.SFixed32Rules.LessThanCase getLessThanCase(); + + build.buf.validate.SFixed32Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/SFixed64Rules.java b/src/main/java/build/buf/validate/SFixed64Rules.java index 9d818adb..af1c415f 100644 --- a/src/main/java/build/buf/validate/SFixed64Rules.java +++ b/src/main/java/build/buf/validate/SFixed64Rules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private long const_ = 0L; /** @@ -89,7 +173,6 @@ public long getConst() { } public static final int LT_FIELD_NUMBER = 2; - private long lt_ = 0L; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -104,12 +187,12 @@ public long getConst() {
    *```
    * 
* - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -125,16 +208,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int LTE_FIELD_NUMBER = 3; - private long lte_ = 0L; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -149,12 +234,12 @@ public long getLt() {
    *```
    * 
* - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -170,16 +255,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int GT_FIELD_NUMBER = 4; - private long gt_ = 0L; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -202,12 +289,12 @@ public long getLte() {
    *```
    * 
* - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -231,16 +318,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int GTE_FIELD_NUMBER = 5; - private long gte_ = 0L; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -263,12 +352,12 @@ public long getGt() {
    *```
    * 
* - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -292,12 +381,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int IN_FIELD_NUMBER = 6; @@ -454,17 +546,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeSFixed64(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeSFixed64(2, lt_); + if (lessThanCase_ == 2) { + output.writeSFixed64( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeSFixed64(3, lte_); + if (lessThanCase_ == 3) { + output.writeSFixed64( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeSFixed64(4, gt_); + if (greaterThanCase_ == 4) { + output.writeSFixed64( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeSFixed64(5, gte_); + if (greaterThanCase_ == 5) { + output.writeSFixed64( + 5, (long)((java.lang.Long) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -493,21 +589,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeSFixed64Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(2, lt_); + .computeSFixed64Size( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(3, lte_); + .computeSFixed64Size( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(4, gt_); + .computeSFixed64Size( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeSFixed64Size(5, gte_); + .computeSFixed64Size( + 5, (long)((java.lang.Long) greaterThan_)); } { int dataSize = 0; @@ -551,30 +651,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -591,26 +697,6 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConst()); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -619,6 +705,34 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLt()); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLte()); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGt()); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGte()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -755,12 +869,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0L; - lt_ = 0L; - lte_ = 0L; - gt_ = 0L; - gte_ = 0L; in_ = emptyLongList(); notIn_ = emptyLongList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -789,6 +903,7 @@ public build.buf.validate.SFixed64Rules buildPartial() { build.buf.validate.SFixed64Rules result = new build.buf.validate.SFixed64Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -813,25 +928,16 @@ private void buildPartial0(build.buf.validate.SFixed64Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.SFixed64Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -879,18 +985,6 @@ public Builder mergeFrom(build.buf.validate.SFixed64Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -911,6 +1005,32 @@ public Builder mergeFrom(build.buf.validate.SFixed64Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -943,23 +1063,23 @@ public Builder mergeFrom( break; } // case 9 case 17: { - lt_ = input.readSFixed64(); - bitField0_ |= 0x00000002; + lessThan_ = input.readSFixed64(); + lessThanCase_ = 2; break; } // case 17 case 25: { - lte_ = input.readSFixed64(); - bitField0_ |= 0x00000004; + lessThan_ = input.readSFixed64(); + lessThanCase_ = 3; break; } // case 25 case 33: { - gt_ = input.readSFixed64(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readSFixed64(); + greaterThanCase_ = 4; break; } // case 33 case 41: { - gte_ = input.readSFixed64(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readSFixed64(); + greaterThanCase_ = 5; break; } // case 41 case 49: { @@ -1009,6 +1129,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private long const_ ; @@ -1099,7 +1249,6 @@ public Builder clearConst() { return this; } - private long lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1114,12 +1263,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1135,12 +1283,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1156,14 +1306,14 @@ public long getLt() {
      *```
      * 
* - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(long value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1181,17 +1331,18 @@ public Builder setLt(long value) { *``` * * - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0L; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1206,12 +1357,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1227,12 +1377,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1248,14 +1400,14 @@ public long getLte() {
      *```
      * 
* - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(long value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1273,17 +1425,18 @@ public Builder setLte(long value) { *``` * * - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0L; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1306,12 +1459,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1335,12 +1487,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1364,14 +1518,14 @@ public long getGt() {
      *```
      * 
* - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(long value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1397,17 +1551,18 @@ public Builder setGt(long value) { *``` * * - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0L; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private long gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1430,12 +1585,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1459,12 +1613,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1488,14 +1644,14 @@ public long getGte() {
      *```
      * 
* - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(long value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1521,13 +1677,15 @@ public Builder setGte(long value) { *``` * * - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0L; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java b/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java index 8474944f..58966f8f 100644 --- a/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/SFixed64RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sfixed64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ long getLt(); @@ -93,7 +93,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sfixed64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ long getLte(); @@ -138,7 +138,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sfixed64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ long getGt(); @@ -191,7 +191,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface SFixed64RulesOrBuilder extends *``` * * - * optional sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sfixed64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ long getGte(); @@ -333,4 +333,8 @@ public interface SFixed64RulesOrBuilder extends * @return The notIn at the given index. */ long getNotIn(int index); + + build.buf.validate.SFixed64Rules.LessThanCase getLessThanCase(); + + build.buf.validate.SFixed64Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/SInt32Rules.java b/src/main/java/build/buf/validate/SInt32Rules.java index 5860587a..76a84601 100644 --- a/src/main/java/build/buf/validate/SInt32Rules.java +++ b/src/main/java/build/buf/validate/SInt32Rules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private int const_ = 0; /** @@ -89,7 +173,6 @@ public int getConst() { } public static final int LT_FIELD_NUMBER = 2; - private int lt_ = 0; /** *
    *`lt` requires the field value to be less than the specified value (field
@@ -104,12 +187,12 @@ public int getConst() {
    *```
    * 
* - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -125,16 +208,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int LTE_FIELD_NUMBER = 3; - private int lte_ = 0; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -149,12 +234,12 @@ public int getLt() {
    *```
    * 
* - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -170,16 +255,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int GT_FIELD_NUMBER = 4; - private int gt_ = 0; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -202,12 +289,12 @@ public int getLte() {
    *```
    * 
* - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -231,16 +318,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int GTE_FIELD_NUMBER = 5; - private int gte_ = 0; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -263,12 +352,12 @@ public int getGt() {
    *```
    * 
* - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -292,12 +381,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int IN_FIELD_NUMBER = 6; @@ -454,17 +546,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeSInt32(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeSInt32(2, lt_); + if (lessThanCase_ == 2) { + output.writeSInt32( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeSInt32(3, lte_); + if (lessThanCase_ == 3) { + output.writeSInt32( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeSInt32(4, gt_); + if (greaterThanCase_ == 4) { + output.writeSInt32( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeSInt32(5, gte_); + if (greaterThanCase_ == 5) { + output.writeSInt32( + 5, (int)((java.lang.Integer) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -493,21 +589,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeSInt32Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, lt_); + .computeSInt32Size( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, lte_); + .computeSInt32Size( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(4, gt_); + .computeSInt32Size( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(5, gte_); + .computeSInt32Size( + 5, (int)((java.lang.Integer) greaterThan_)); } { int dataSize = 0; @@ -557,30 +657,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -596,22 +702,6 @@ public int hashCode() { hash = (37 * hash) + CONST_FIELD_NUMBER; hash = (53 * hash) + getConst(); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -620,6 +710,30 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + getLt(); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + getLte(); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + getGt(); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + getGte(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -756,12 +870,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0; - lt_ = 0; - lte_ = 0; - gt_ = 0; - gte_ = 0; in_ = emptyIntList(); notIn_ = emptyIntList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -790,6 +904,7 @@ public build.buf.validate.SInt32Rules buildPartial() { build.buf.validate.SInt32Rules result = new build.buf.validate.SInt32Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -814,25 +929,16 @@ private void buildPartial0(build.buf.validate.SInt32Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.SInt32Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -880,18 +986,6 @@ public Builder mergeFrom(build.buf.validate.SInt32Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -912,6 +1006,32 @@ public Builder mergeFrom(build.buf.validate.SInt32Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -944,23 +1064,23 @@ public Builder mergeFrom( break; } // case 8 case 16: { - lt_ = input.readSInt32(); - bitField0_ |= 0x00000002; + lessThan_ = input.readSInt32(); + lessThanCase_ = 2; break; } // case 16 case 24: { - lte_ = input.readSInt32(); - bitField0_ |= 0x00000004; + lessThan_ = input.readSInt32(); + lessThanCase_ = 3; break; } // case 24 case 32: { - gt_ = input.readSInt32(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readSInt32(); + greaterThanCase_ = 4; break; } // case 32 case 40: { - gte_ = input.readSInt32(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readSInt32(); + greaterThanCase_ = 5; break; } // case 40 case 48: { @@ -1010,6 +1130,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private int const_ ; @@ -1100,7 +1250,6 @@ public Builder clearConst() { return this; } - private int lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field
@@ -1115,12 +1264,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1136,12 +1284,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1157,14 +1307,14 @@ public int getLt() {
      *```
      * 
* - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(int value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1182,17 +1332,18 @@ public Builder setLt(int value) { *``` * * - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1207,12 +1358,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1228,12 +1378,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1249,14 +1401,14 @@ public int getLte() {
      *```
      * 
* - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(int value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1274,17 +1426,18 @@ public Builder setLte(int value) { *``` * * - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1307,12 +1460,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1336,12 +1488,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1365,14 +1519,14 @@ public int getGt() {
      *```
      * 
* - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(int value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1398,17 +1552,18 @@ public Builder setGt(int value) { *``` * * - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private int gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1431,12 +1586,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1460,12 +1614,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1489,14 +1645,14 @@ public int getGte() {
      *```
      * 
* - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(int value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1522,13 +1678,15 @@ public Builder setGte(int value) { *``` * * - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java b/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java index 5e1fdd92..75acc7f3 100644 --- a/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/SInt32RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ int getLt(); @@ -93,7 +93,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ int getLte(); @@ -138,7 +138,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ int getGt(); @@ -191,7 +191,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface SInt32RulesOrBuilder extends *``` * * - * optional sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ int getGte(); @@ -333,4 +333,8 @@ public interface SInt32RulesOrBuilder extends * @return The notIn at the given index. */ int getNotIn(int index); + + build.buf.validate.SInt32Rules.LessThanCase getLessThanCase(); + + build.buf.validate.SInt32Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/SInt64Rules.java b/src/main/java/build/buf/validate/SInt64Rules.java index 83ec2c31..dae338ac 100644 --- a/src/main/java/build/buf/validate/SInt64Rules.java +++ b/src/main/java/build/buf/validate/SInt64Rules.java @@ -45,6 +45,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private long const_ = 0L; /** @@ -89,7 +173,6 @@ public long getConst() { } public static final int LT_FIELD_NUMBER = 2; - private long lt_ = 0L; /** *
    *`lt` requires the field value to be less than the specified value (field
@@ -104,12 +187,12 @@ public long getConst() {
    *```
    * 
* - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -125,16 +208,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int LTE_FIELD_NUMBER = 3; - private long lte_ = 0L; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -149,12 +234,12 @@ public long getLt() {
    *```
    * 
* - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -170,16 +255,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int GT_FIELD_NUMBER = 4; - private long gt_ = 0L; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -202,12 +289,12 @@ public long getLte() {
    *```
    * 
* - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -231,16 +318,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int GTE_FIELD_NUMBER = 5; - private long gte_ = 0L; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -263,12 +352,12 @@ public long getGt() {
    *```
    * 
* - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -292,12 +381,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int IN_FIELD_NUMBER = 6; @@ -454,17 +546,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeSInt64(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeSInt64(2, lt_); + if (lessThanCase_ == 2) { + output.writeSInt64( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeSInt64(3, lte_); + if (lessThanCase_ == 3) { + output.writeSInt64( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeSInt64(4, gt_); + if (greaterThanCase_ == 4) { + output.writeSInt64( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeSInt64(5, gte_); + if (greaterThanCase_ == 5) { + output.writeSInt64( + 5, (long)((java.lang.Long) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -493,21 +589,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeSInt64Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(2, lt_); + .computeSInt64Size( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(3, lte_); + .computeSInt64Size( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(4, gt_); + .computeSInt64Size( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(5, gte_); + .computeSInt64Size( + 5, (long)((java.lang.Long) greaterThan_)); } { int dataSize = 0; @@ -557,30 +657,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -597,26 +703,6 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConst()); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -625,6 +711,34 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLt()); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLte()); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGt()); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGte()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -761,12 +875,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0L; - lt_ = 0L; - lte_ = 0L; - gt_ = 0L; - gte_ = 0L; in_ = emptyLongList(); notIn_ = emptyLongList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -795,6 +909,7 @@ public build.buf.validate.SInt64Rules buildPartial() { build.buf.validate.SInt64Rules result = new build.buf.validate.SInt64Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -819,25 +934,16 @@ private void buildPartial0(build.buf.validate.SInt64Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.SInt64Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -885,18 +991,6 @@ public Builder mergeFrom(build.buf.validate.SInt64Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -917,6 +1011,32 @@ public Builder mergeFrom(build.buf.validate.SInt64Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -949,23 +1069,23 @@ public Builder mergeFrom( break; } // case 8 case 16: { - lt_ = input.readSInt64(); - bitField0_ |= 0x00000002; + lessThan_ = input.readSInt64(); + lessThanCase_ = 2; break; } // case 16 case 24: { - lte_ = input.readSInt64(); - bitField0_ |= 0x00000004; + lessThan_ = input.readSInt64(); + lessThanCase_ = 3; break; } // case 24 case 32: { - gt_ = input.readSInt64(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readSInt64(); + greaterThanCase_ = 4; break; } // case 32 case 40: { - gte_ = input.readSInt64(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readSInt64(); + greaterThanCase_ = 5; break; } // case 40 case 48: { @@ -1015,6 +1135,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private long const_ ; @@ -1105,7 +1255,6 @@ public Builder clearConst() { return this; } - private long lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field
@@ -1120,12 +1269,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1141,12 +1289,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1162,14 +1312,14 @@ public long getLt() {
      *```
      * 
* - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(long value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1187,17 +1337,18 @@ public Builder setLt(long value) { *``` * * - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0L; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1212,12 +1363,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1233,12 +1383,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1254,14 +1406,14 @@ public long getLte() {
      *```
      * 
* - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(long value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1279,17 +1431,18 @@ public Builder setLte(long value) { *``` * * - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0L; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1312,12 +1465,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1341,12 +1493,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1370,14 +1524,14 @@ public long getGt() {
      *```
      * 
* - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(long value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1403,17 +1557,18 @@ public Builder setGt(long value) { *``` * * - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0L; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private long gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1436,12 +1591,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1465,12 +1619,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1494,14 +1650,14 @@ public long getGte() {
      *```
      * 
* - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(long value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1527,13 +1683,15 @@ public Builder setGte(long value) { *``` * * - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0L; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java b/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java index 20d43c5d..0d9aab0a 100644 --- a/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/SInt64RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * sint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ long getLt(); @@ -93,7 +93,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * sint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ long getLte(); @@ -138,7 +138,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * sint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ long getGt(); @@ -191,7 +191,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface SInt64RulesOrBuilder extends *``` * * - * optional sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * sint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ long getGte(); @@ -333,4 +333,8 @@ public interface SInt64RulesOrBuilder extends * @return The notIn at the given index. */ long getNotIn(int index); + + build.buf.validate.SInt64Rules.LessThanCase getLessThanCase(); + + build.buf.validate.SInt64Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/TimestampRules.java b/src/main/java/build/buf/validate/TimestampRules.java index 7861f1cc..8cbcc28b 100644 --- a/src/main/java/build/buf/validate/TimestampRules.java +++ b/src/main/java/build/buf/validate/TimestampRules.java @@ -43,6 +43,94 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(3), + LTE(4), + LT_NOW(7), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 3: return LT; + case 4: return LTE; + case 7: return LT_NOW; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(5), + GTE(6), + GT_NOW(8), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 5: return GT; + case 6: return GTE; + case 8: return GT_NOW; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp const_; /** @@ -103,7 +191,6 @@ public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() { } public static final int LT_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp lt_; /** *
    * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
@@ -116,12 +203,12 @@ public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() {
    * ```
    * 
* - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 3; } /** *
@@ -135,12 +222,15 @@ public boolean hasLt() {
    * ```
    * 
* - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public com.google.protobuf.Timestamp getLt() { - return lt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
@@ -154,15 +244,17 @@ public com.google.protobuf.Timestamp getLt() {
    * ```
    * 
* - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() { - return lt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } public static final int LTE_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp lte_; /** *
    * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
@@ -175,12 +267,12 @@ public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() {
    * ```
    * 
* - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 4; } /** *
@@ -194,12 +286,15 @@ public boolean hasLte() {
    * ```
    * 
* - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public com.google.protobuf.Timestamp getLte() { - return lte_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
@@ -213,15 +308,60 @@ public com.google.protobuf.Timestamp getLte() {
    * ```
    * 
* - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() { - return lte_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + + public static final int LT_NOW_FIELD_NUMBER = 7; + /** + *
+   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+   *
+   *```proto
+   *message MyTimestamp {
+   *  // value must be less than now
+   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+   *}
+   *```
+   * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return Whether the ltNow field is set. + */ + @java.lang.Override + public boolean hasLtNow() { + return lessThanCase_ == 7; + } + /** + *
+   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+   *
+   *```proto
+   *message MyTimestamp {
+   *  // value must be less than now
+   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+   *}
+   *```
+   * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return The ltNow. + */ + @java.lang.Override + public boolean getLtNow() { + if (lessThanCase_ == 7) { + return (java.lang.Boolean) lessThan_; + } + return false; } public static final int GT_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp gt_; /** *
    *`gt` requires the timestamp field value to be greater than the specified
@@ -244,12 +384,12 @@ public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() {
    *```
    * 
* - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 5; } /** *
@@ -273,12 +413,15 @@ public boolean hasGt() {
    *```
    * 
* - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public com.google.protobuf.Timestamp getGt() { - return gt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
@@ -302,15 +445,17 @@ public com.google.protobuf.Timestamp getGt() {
    *```
    * 
* - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() { - return gt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } public static final int GTE_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp gte_; /** *
    *`gte` requires the timestamp field value to be greater than or equal to the
@@ -333,12 +478,12 @@ public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() {
    *```
    * 
* - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 6; } /** *
@@ -362,12 +507,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public com.google.protobuf.Timestamp getGte() { - return gte_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } /** *
@@ -391,56 +539,17 @@ public com.google.protobuf.Timestamp getGte() {
    *```
    * 
* - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() { - return gte_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : gte_; - } - - public static final int LT_NOW_FIELD_NUMBER = 7; - private boolean ltNow_ = false; - /** - *
-   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   *```proto
-   *message MyTimestamp {
-   *  // value must be less than now
-   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   *}
-   *```
-   * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return Whether the ltNow field is set. - */ - @java.lang.Override - public boolean hasLtNow() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   *```proto
-   *message MyTimestamp {
-   *  // value must be less than now
-   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   *}
-   *```
-   * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return The ltNow. - */ - @java.lang.Override - public boolean getLtNow() { - return ltNow_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } public static final int GT_NOW_FIELD_NUMBER = 8; - private boolean gtNow_ = false; /** *
    *`gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
@@ -453,12 +562,12 @@ public boolean getLtNow() {
    *```
    * 
* - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return Whether the gtNow field is set. */ @java.lang.Override public boolean hasGtNow() { - return ((bitField0_ & 0x00000040) != 0); + return greaterThanCase_ == 8; } /** *
@@ -472,12 +581,15 @@ public boolean hasGtNow() {
    *```
    * 
* - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return The gtNow. */ @java.lang.Override public boolean getGtNow() { - return gtNow_; + if (greaterThanCase_ == 8) { + return (java.lang.Boolean) greaterThan_; + } + return false; } public static final int WITHIN_FIELD_NUMBER = 9; @@ -499,7 +611,7 @@ public boolean getGtNow() { */ @java.lang.Override public boolean hasWithin() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** *
@@ -556,25 +668,27 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
     if (((bitField0_ & 0x00000001) != 0)) {
       output.writeMessage(2, getConst());
     }
-    if (((bitField0_ & 0x00000002) != 0)) {
-      output.writeMessage(3, getLt());
+    if (lessThanCase_ == 3) {
+      output.writeMessage(3, (com.google.protobuf.Timestamp) lessThan_);
     }
-    if (((bitField0_ & 0x00000004) != 0)) {
-      output.writeMessage(4, getLte());
+    if (lessThanCase_ == 4) {
+      output.writeMessage(4, (com.google.protobuf.Timestamp) lessThan_);
     }
-    if (((bitField0_ & 0x00000008) != 0)) {
-      output.writeMessage(5, getGt());
+    if (greaterThanCase_ == 5) {
+      output.writeMessage(5, (com.google.protobuf.Timestamp) greaterThan_);
     }
-    if (((bitField0_ & 0x00000010) != 0)) {
-      output.writeMessage(6, getGte());
+    if (greaterThanCase_ == 6) {
+      output.writeMessage(6, (com.google.protobuf.Timestamp) greaterThan_);
     }
-    if (((bitField0_ & 0x00000020) != 0)) {
-      output.writeBool(7, ltNow_);
+    if (lessThanCase_ == 7) {
+      output.writeBool(
+          7, (boolean)((java.lang.Boolean) lessThan_));
     }
-    if (((bitField0_ & 0x00000040) != 0)) {
-      output.writeBool(8, gtNow_);
+    if (greaterThanCase_ == 8) {
+      output.writeBool(
+          8, (boolean)((java.lang.Boolean) greaterThan_));
     }
-    if (((bitField0_ & 0x00000080) != 0)) {
+    if (((bitField0_ & 0x00000002) != 0)) {
       output.writeMessage(9, getWithin());
     }
     getUnknownFields().writeTo(output);
@@ -590,31 +704,33 @@ public int getSerializedSize() {
       size += com.google.protobuf.CodedOutputStream
         .computeMessageSize(2, getConst());
     }
-    if (((bitField0_ & 0x00000002) != 0)) {
+    if (lessThanCase_ == 3) {
       size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(3, getLt());
+        .computeMessageSize(3, (com.google.protobuf.Timestamp) lessThan_);
     }
-    if (((bitField0_ & 0x00000004) != 0)) {
+    if (lessThanCase_ == 4) {
       size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(4, getLte());
+        .computeMessageSize(4, (com.google.protobuf.Timestamp) lessThan_);
     }
-    if (((bitField0_ & 0x00000008) != 0)) {
+    if (greaterThanCase_ == 5) {
       size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(5, getGt());
+        .computeMessageSize(5, (com.google.protobuf.Timestamp) greaterThan_);
     }
-    if (((bitField0_ & 0x00000010) != 0)) {
+    if (greaterThanCase_ == 6) {
       size += com.google.protobuf.CodedOutputStream
-        .computeMessageSize(6, getGte());
+        .computeMessageSize(6, (com.google.protobuf.Timestamp) greaterThan_);
     }
-    if (((bitField0_ & 0x00000020) != 0)) {
+    if (lessThanCase_ == 7) {
       size += com.google.protobuf.CodedOutputStream
-        .computeBoolSize(7, ltNow_);
+        .computeBoolSize(
+            7, (boolean)((java.lang.Boolean) lessThan_));
     }
-    if (((bitField0_ & 0x00000040) != 0)) {
+    if (greaterThanCase_ == 8) {
       size += com.google.protobuf.CodedOutputStream
-        .computeBoolSize(8, gtNow_);
+        .computeBoolSize(
+            8, (boolean)((java.lang.Boolean) greaterThan_));
     }
-    if (((bitField0_ & 0x00000080) != 0)) {
+    if (((bitField0_ & 0x00000002) != 0)) {
       size += com.google.protobuf.CodedOutputStream
         .computeMessageSize(9, getWithin());
     }
@@ -638,41 +754,45 @@ public boolean equals(final java.lang.Object obj) {
       if (!getConst()
           .equals(other.getConst())) return false;
     }
-    if (hasLt() != other.hasLt()) return false;
-    if (hasLt()) {
-      if (!getLt()
-          .equals(other.getLt())) return false;
-    }
-    if (hasLte() != other.hasLte()) return false;
-    if (hasLte()) {
-      if (!getLte()
-          .equals(other.getLte())) return false;
-    }
-    if (hasGt() != other.hasGt()) return false;
-    if (hasGt()) {
-      if (!getGt()
-          .equals(other.getGt())) return false;
-    }
-    if (hasGte() != other.hasGte()) return false;
-    if (hasGte()) {
-      if (!getGte()
-          .equals(other.getGte())) return false;
-    }
-    if (hasLtNow() != other.hasLtNow()) return false;
-    if (hasLtNow()) {
-      if (getLtNow()
-          != other.getLtNow()) return false;
-    }
-    if (hasGtNow() != other.hasGtNow()) return false;
-    if (hasGtNow()) {
-      if (getGtNow()
-          != other.getGtNow()) return false;
-    }
     if (hasWithin() != other.hasWithin()) return false;
     if (hasWithin()) {
       if (!getWithin()
           .equals(other.getWithin())) return false;
     }
+    if (!getLessThanCase().equals(other.getLessThanCase())) return false;
+    switch (lessThanCase_) {
+      case 3:
+        if (!getLt()
+            .equals(other.getLt())) return false;
+        break;
+      case 4:
+        if (!getLte()
+            .equals(other.getLte())) return false;
+        break;
+      case 7:
+        if (getLtNow()
+            != other.getLtNow()) return false;
+        break;
+      case 0:
+      default:
+    }
+    if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false;
+    switch (greaterThanCase_) {
+      case 5:
+        if (!getGt()
+            .equals(other.getGt())) return false;
+        break;
+      case 6:
+        if (!getGte()
+            .equals(other.getGte())) return false;
+        break;
+      case 8:
+        if (getGtNow()
+            != other.getGtNow()) return false;
+        break;
+      case 0:
+      default:
+    }
     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
@@ -688,36 +808,44 @@ public int hashCode() {
       hash = (37 * hash) + CONST_FIELD_NUMBER;
       hash = (53 * hash) + getConst().hashCode();
     }
-    if (hasLt()) {
-      hash = (37 * hash) + LT_FIELD_NUMBER;
-      hash = (53 * hash) + getLt().hashCode();
-    }
-    if (hasLte()) {
-      hash = (37 * hash) + LTE_FIELD_NUMBER;
-      hash = (53 * hash) + getLte().hashCode();
-    }
-    if (hasGt()) {
-      hash = (37 * hash) + GT_FIELD_NUMBER;
-      hash = (53 * hash) + getGt().hashCode();
-    }
-    if (hasGte()) {
-      hash = (37 * hash) + GTE_FIELD_NUMBER;
-      hash = (53 * hash) + getGte().hashCode();
-    }
-    if (hasLtNow()) {
-      hash = (37 * hash) + LT_NOW_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
-          getLtNow());
-    }
-    if (hasGtNow()) {
-      hash = (37 * hash) + GT_NOW_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
-          getGtNow());
-    }
     if (hasWithin()) {
       hash = (37 * hash) + WITHIN_FIELD_NUMBER;
       hash = (53 * hash) + getWithin().hashCode();
     }
+    switch (lessThanCase_) {
+      case 3:
+        hash = (37 * hash) + LT_FIELD_NUMBER;
+        hash = (53 * hash) + getLt().hashCode();
+        break;
+      case 4:
+        hash = (37 * hash) + LTE_FIELD_NUMBER;
+        hash = (53 * hash) + getLte().hashCode();
+        break;
+      case 7:
+        hash = (37 * hash) + LT_NOW_FIELD_NUMBER;
+        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+            getLtNow());
+        break;
+      case 0:
+      default:
+    }
+    switch (greaterThanCase_) {
+      case 5:
+        hash = (37 * hash) + GT_FIELD_NUMBER;
+        hash = (53 * hash) + getGt().hashCode();
+        break;
+      case 6:
+        hash = (37 * hash) + GTE_FIELD_NUMBER;
+        hash = (53 * hash) + getGte().hashCode();
+        break;
+      case 8:
+        hash = (37 * hash) + GT_NOW_FIELD_NUMBER;
+        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+            getGtNow());
+        break;
+      case 0:
+      default:
+    }
     hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
@@ -853,10 +981,6 @@ private void maybeForceBuilderInitialization() {
       if (com.google.protobuf.GeneratedMessageV3
               .alwaysUseFieldBuilders) {
         getConstFieldBuilder();
-        getLtFieldBuilder();
-        getLteFieldBuilder();
-        getGtFieldBuilder();
-        getGteFieldBuilder();
         getWithinFieldBuilder();
       }
     }
@@ -869,33 +993,27 @@ public Builder clear() {
         constBuilder_.dispose();
         constBuilder_ = null;
       }
-      lt_ = null;
       if (ltBuilder_ != null) {
-        ltBuilder_.dispose();
-        ltBuilder_ = null;
+        ltBuilder_.clear();
       }
-      lte_ = null;
       if (lteBuilder_ != null) {
-        lteBuilder_.dispose();
-        lteBuilder_ = null;
+        lteBuilder_.clear();
       }
-      gt_ = null;
       if (gtBuilder_ != null) {
-        gtBuilder_.dispose();
-        gtBuilder_ = null;
+        gtBuilder_.clear();
       }
-      gte_ = null;
       if (gteBuilder_ != null) {
-        gteBuilder_.dispose();
-        gteBuilder_ = null;
+        gteBuilder_.clear();
       }
-      ltNow_ = false;
-      gtNow_ = false;
       within_ = null;
       if (withinBuilder_ != null) {
         withinBuilder_.dispose();
         withinBuilder_ = null;
       }
+      lessThanCase_ = 0;
+      lessThan_ = null;
+      greaterThanCase_ = 0;
+      greaterThan_ = null;
       return this;
     }
 
@@ -923,6 +1041,7 @@ public build.buf.validate.TimestampRules build() {
     public build.buf.validate.TimestampRules buildPartial() {
       build.buf.validate.TimestampRules result = new build.buf.validate.TimestampRules(this);
       if (bitField0_ != 0) { buildPartial0(result); }
+      buildPartialOneofs(result);
       onBuilt();
       return result;
     }
@@ -936,47 +1055,38 @@ private void buildPartial0(build.buf.validate.TimestampRules result) {
             : constBuilder_.build();
         to_bitField0_ |= 0x00000001;
       }
-      if (((from_bitField0_ & 0x00000002) != 0)) {
-        result.lt_ = ltBuilder_ == null
-            ? lt_
-            : ltBuilder_.build();
-        to_bitField0_ |= 0x00000002;
-      }
-      if (((from_bitField0_ & 0x00000004) != 0)) {
-        result.lte_ = lteBuilder_ == null
-            ? lte_
-            : lteBuilder_.build();
-        to_bitField0_ |= 0x00000004;
-      }
-      if (((from_bitField0_ & 0x00000008) != 0)) {
-        result.gt_ = gtBuilder_ == null
-            ? gt_
-            : gtBuilder_.build();
-        to_bitField0_ |= 0x00000008;
-      }
-      if (((from_bitField0_ & 0x00000010) != 0)) {
-        result.gte_ = gteBuilder_ == null
-            ? gte_
-            : gteBuilder_.build();
-        to_bitField0_ |= 0x00000010;
-      }
-      if (((from_bitField0_ & 0x00000020) != 0)) {
-        result.ltNow_ = ltNow_;
-        to_bitField0_ |= 0x00000020;
-      }
-      if (((from_bitField0_ & 0x00000040) != 0)) {
-        result.gtNow_ = gtNow_;
-        to_bitField0_ |= 0x00000040;
-      }
       if (((from_bitField0_ & 0x00000080) != 0)) {
         result.within_ = withinBuilder_ == null
             ? within_
             : withinBuilder_.build();
-        to_bitField0_ |= 0x00000080;
+        to_bitField0_ |= 0x00000002;
       }
       result.bitField0_ |= to_bitField0_;
     }
 
+    private void buildPartialOneofs(build.buf.validate.TimestampRules result) {
+      result.lessThanCase_ = lessThanCase_;
+      result.lessThan_ = this.lessThan_;
+      if (lessThanCase_ == 3 &&
+          ltBuilder_ != null) {
+        result.lessThan_ = ltBuilder_.build();
+      }
+      if (lessThanCase_ == 4 &&
+          lteBuilder_ != null) {
+        result.lessThan_ = lteBuilder_.build();
+      }
+      result.greaterThanCase_ = greaterThanCase_;
+      result.greaterThan_ = this.greaterThan_;
+      if (greaterThanCase_ == 5 &&
+          gtBuilder_ != null) {
+        result.greaterThan_ = gtBuilder_.build();
+      }
+      if (greaterThanCase_ == 6 &&
+          gteBuilder_ != null) {
+        result.greaterThan_ = gteBuilder_.build();
+      }
+    }
+
     @java.lang.Override
     public Builder clone() {
       return super.clone();
@@ -1024,27 +1134,43 @@ public Builder mergeFrom(build.buf.validate.TimestampRules other) {
       if (other.hasConst()) {
         mergeConst(other.getConst());
       }
-      if (other.hasLt()) {
-        mergeLt(other.getLt());
-      }
-      if (other.hasLte()) {
-        mergeLte(other.getLte());
-      }
-      if (other.hasGt()) {
-        mergeGt(other.getGt());
-      }
-      if (other.hasGte()) {
-        mergeGte(other.getGte());
-      }
-      if (other.hasLtNow()) {
-        setLtNow(other.getLtNow());
-      }
-      if (other.hasGtNow()) {
-        setGtNow(other.getGtNow());
-      }
       if (other.hasWithin()) {
         mergeWithin(other.getWithin());
       }
+      switch (other.getLessThanCase()) {
+        case LT: {
+          mergeLt(other.getLt());
+          break;
+        }
+        case LTE: {
+          mergeLte(other.getLte());
+          break;
+        }
+        case LT_NOW: {
+          setLtNow(other.getLtNow());
+          break;
+        }
+        case LESSTHAN_NOT_SET: {
+          break;
+        }
+      }
+      switch (other.getGreaterThanCase()) {
+        case GT: {
+          mergeGt(other.getGt());
+          break;
+        }
+        case GTE: {
+          mergeGte(other.getGte());
+          break;
+        }
+        case GT_NOW: {
+          setGtNow(other.getGtNow());
+          break;
+        }
+        case GREATERTHAN_NOT_SET: {
+          break;
+        }
+      }
       this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
@@ -1082,38 +1208,38 @@ public Builder mergeFrom(
               input.readMessage(
                   getLtFieldBuilder().getBuilder(),
                   extensionRegistry);
-              bitField0_ |= 0x00000002;
+              lessThanCase_ = 3;
               break;
             } // case 26
             case 34: {
               input.readMessage(
                   getLteFieldBuilder().getBuilder(),
                   extensionRegistry);
-              bitField0_ |= 0x00000004;
+              lessThanCase_ = 4;
               break;
             } // case 34
             case 42: {
               input.readMessage(
                   getGtFieldBuilder().getBuilder(),
                   extensionRegistry);
-              bitField0_ |= 0x00000008;
+              greaterThanCase_ = 5;
               break;
             } // case 42
             case 50: {
               input.readMessage(
                   getGteFieldBuilder().getBuilder(),
                   extensionRegistry);
-              bitField0_ |= 0x00000010;
+              greaterThanCase_ = 6;
               break;
             } // case 50
             case 56: {
-              ltNow_ = input.readBool();
-              bitField0_ |= 0x00000020;
+              lessThan_ = input.readBool();
+              lessThanCase_ = 7;
               break;
             } // case 56
             case 64: {
-              gtNow_ = input.readBool();
-              bitField0_ |= 0x00000040;
+              greaterThan_ = input.readBool();
+              greaterThanCase_ = 8;
               break;
             } // case 64
             case 74: {
@@ -1138,6 +1264,36 @@ public Builder mergeFrom(
       } // finally
       return this;
     }
+    private int lessThanCase_ = 0;
+    private java.lang.Object lessThan_;
+    public LessThanCase
+        getLessThanCase() {
+      return LessThanCase.forNumber(
+          lessThanCase_);
+    }
+
+    public Builder clearLessThan() {
+      lessThanCase_ = 0;
+      lessThan_ = null;
+      onChanged();
+      return this;
+    }
+
+    private int greaterThanCase_ = 0;
+    private java.lang.Object greaterThan_;
+    public GreaterThanCase
+        getGreaterThanCase() {
+      return GreaterThanCase.forNumber(
+          greaterThanCase_);
+    }
+
+    public Builder clearGreaterThan() {
+      greaterThanCase_ = 0;
+      greaterThan_ = null;
+      onChanged();
+      return this;
+    }
+
     private int bitField0_;
 
     private com.google.protobuf.Timestamp const_;
@@ -1358,7 +1514,6 @@ public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() {
       return constBuilder_;
     }
 
-    private com.google.protobuf.Timestamp lt_;
     private com.google.protobuf.SingleFieldBuilderV3<
         com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> ltBuilder_;
     /**
@@ -1373,11 +1528,12 @@ public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() {
      * ```
      * 
* - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ + @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 3; } /** *
@@ -1391,14 +1547,21 @@ public boolean hasLt() {
      * ```
      * 
* - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ + @java.lang.Override public com.google.protobuf.Timestamp getLt() { if (ltBuilder_ == null) { - return lt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } else { - return ltBuilder_.getMessage(); + if (lessThanCase_ == 3) { + return ltBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -1413,19 +1576,19 @@ public com.google.protobuf.Timestamp getLt() { * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder setLt(com.google.protobuf.Timestamp value) { if (ltBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - lt_ = value; + lessThan_ = value; + onChanged(); } else { ltBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; - onChanged(); + lessThanCase_ = 3; return this; } /** @@ -1440,17 +1603,17 @@ public Builder setLt(com.google.protobuf.Timestamp value) { * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder setLt( com.google.protobuf.Timestamp.Builder builderForValue) { if (ltBuilder_ == null) { - lt_ = builderForValue.build(); + lessThan_ = builderForValue.build(); + onChanged(); } else { ltBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; - onChanged(); + lessThanCase_ = 3; return this; } /** @@ -1465,22 +1628,26 @@ public Builder setLt( * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder mergeLt(com.google.protobuf.Timestamp value) { if (ltBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - lt_ != null && - lt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLtBuilder().mergeFrom(value); + if (lessThanCase_ == 3 && + lessThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + lessThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) lessThan_) + .mergeFrom(value).buildPartial(); } else { - lt_ = value; + lessThan_ = value; } + onChanged(); } else { - ltBuilder_.mergeFrom(value); + if (lessThanCase_ == 3) { + ltBuilder_.mergeFrom(value); + } else { + ltBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000002; - onChanged(); + lessThanCase_ = 3; return this; } /** @@ -1495,16 +1662,22 @@ public Builder mergeLt(com.google.protobuf.Timestamp value) { * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = null; - if (ltBuilder_ != null) { - ltBuilder_.dispose(); - ltBuilder_ = null; + if (ltBuilder_ == null) { + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } + } else { + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + } + ltBuilder_.clear(); } - onChanged(); return this; } /** @@ -1519,11 +1692,9 @@ public Builder clearLt() { * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Timestamp.Builder getLtBuilder() { - bitField0_ |= 0x00000002; - onChanged(); return getLtFieldBuilder().getBuilder(); } /** @@ -1538,14 +1709,17 @@ public com.google.protobuf.Timestamp.Builder getLtBuilder() { * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() { - if (ltBuilder_ != null) { + if ((lessThanCase_ == 3) && (ltBuilder_ != null)) { return ltBuilder_.getMessageOrBuilder(); } else { - return lt_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lt_; + if (lessThanCase_ == 3) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -1560,23 +1734,27 @@ public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() { * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getLtFieldBuilder() { if (ltBuilder_ == null) { + if (!(lessThanCase_ == 3)) { + lessThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } ltBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLt(), + (com.google.protobuf.Timestamp) lessThan_, getParentForChildren(), isClean()); - lt_ = null; + lessThan_ = null; } + lessThanCase_ = 3; + onChanged(); return ltBuilder_; } - private com.google.protobuf.Timestamp lte_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lteBuilder_; /** @@ -1591,11 +1769,12 @@ public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ + @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 4; } /** *
@@ -1609,14 +1788,21 @@ public boolean hasLte() {
      * ```
      * 
* - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ + @java.lang.Override public com.google.protobuf.Timestamp getLte() { if (lteBuilder_ == null) { - return lte_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } else { - return lteBuilder_.getMessage(); + if (lessThanCase_ == 4) { + return lteBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -1631,19 +1817,19 @@ public com.google.protobuf.Timestamp getLte() { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder setLte(com.google.protobuf.Timestamp value) { if (lteBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - lte_ = value; + lessThan_ = value; + onChanged(); } else { lteBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; - onChanged(); + lessThanCase_ = 4; return this; } /** @@ -1658,17 +1844,17 @@ public Builder setLte(com.google.protobuf.Timestamp value) { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder setLte( com.google.protobuf.Timestamp.Builder builderForValue) { if (lteBuilder_ == null) { - lte_ = builderForValue.build(); + lessThan_ = builderForValue.build(); + onChanged(); } else { lteBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; - onChanged(); + lessThanCase_ = 4; return this; } /** @@ -1683,22 +1869,26 @@ public Builder setLte( * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder mergeLte(com.google.protobuf.Timestamp value) { if (lteBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - lte_ != null && - lte_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getLteBuilder().mergeFrom(value); + if (lessThanCase_ == 4 && + lessThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + lessThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) lessThan_) + .mergeFrom(value).buildPartial(); } else { - lte_ = value; + lessThan_ = value; } + onChanged(); } else { - lteBuilder_.mergeFrom(value); + if (lessThanCase_ == 4) { + lteBuilder_.mergeFrom(value); + } else { + lteBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000004; - onChanged(); + lessThanCase_ = 4; return this; } /** @@ -1713,16 +1903,22 @@ public Builder mergeLte(com.google.protobuf.Timestamp value) { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = null; - if (lteBuilder_ != null) { - lteBuilder_.dispose(); - lteBuilder_ = null; + if (lteBuilder_ == null) { + if (lessThanCase_ == 4) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } + } else { + if (lessThanCase_ == 4) { + lessThanCase_ = 0; + lessThan_ = null; + } + lteBuilder_.clear(); } - onChanged(); return this; } /** @@ -1737,11 +1933,9 @@ public Builder clearLte() { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Timestamp.Builder getLteBuilder() { - bitField0_ |= 0x00000004; - onChanged(); return getLteFieldBuilder().getBuilder(); } /** @@ -1756,14 +1950,17 @@ public com.google.protobuf.Timestamp.Builder getLteBuilder() { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() { - if (lteBuilder_ != null) { + if ((lessThanCase_ == 4) && (lteBuilder_ != null)) { return lteBuilder_.getMessageOrBuilder(); } else { - return lte_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : lte_; + if (lessThanCase_ == 4) { + return (com.google.protobuf.Timestamp) lessThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -1778,23 +1975,113 @@ public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() { * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getLteFieldBuilder() { if (lteBuilder_ == null) { + if (!(lessThanCase_ == 4)) { + lessThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } lteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getLte(), + (com.google.protobuf.Timestamp) lessThan_, getParentForChildren(), isClean()); - lte_ = null; + lessThan_ = null; } + lessThanCase_ = 4; + onChanged(); return lteBuilder_; } - private com.google.protobuf.Timestamp gt_; + /** + *
+     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+     *
+     *```proto
+     *message MyTimestamp {
+     *  // value must be less than now
+     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+     *}
+     *```
+     * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return Whether the ltNow field is set. + */ + public boolean hasLtNow() { + return lessThanCase_ == 7; + } + /** + *
+     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+     *
+     *```proto
+     *message MyTimestamp {
+     *  // value must be less than now
+     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+     *}
+     *```
+     * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return The ltNow. + */ + public boolean getLtNow() { + if (lessThanCase_ == 7) { + return (java.lang.Boolean) lessThan_; + } + return false; + } + /** + *
+     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+     *
+     *```proto
+     *message MyTimestamp {
+     *  // value must be less than now
+     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+     *}
+     *```
+     * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @param value The ltNow to set. + * @return This builder for chaining. + */ + public Builder setLtNow(boolean value) { + + lessThanCase_ = 7; + lessThan_ = value; + onChanged(); + return this; + } + /** + *
+     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+     *
+     *```proto
+     *message MyTimestamp {
+     *  // value must be less than now
+     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+     *}
+     *```
+     * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearLtNow() { + if (lessThanCase_ == 7) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } + return this; + } + private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> gtBuilder_; /** @@ -1819,11 +2106,12 @@ public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ + @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1847,14 +2135,21 @@ public boolean hasGt() {
      *```
      * 
* - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ + @java.lang.Override public com.google.protobuf.Timestamp getGt() { if (gtBuilder_ == null) { - return gt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } else { - return gtBuilder_.getMessage(); + if (greaterThanCase_ == 5) { + return gtBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -1879,19 +2174,19 @@ public com.google.protobuf.Timestamp getGt() { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder setGt(com.google.protobuf.Timestamp value) { if (gtBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - gt_ = value; + greaterThan_ = value; + onChanged(); } else { gtBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; - onChanged(); + greaterThanCase_ = 5; return this; } /** @@ -1916,17 +2211,17 @@ public Builder setGt(com.google.protobuf.Timestamp value) { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder setGt( com.google.protobuf.Timestamp.Builder builderForValue) { if (gtBuilder_ == null) { - gt_ = builderForValue.build(); + greaterThan_ = builderForValue.build(); + onChanged(); } else { gtBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; - onChanged(); + greaterThanCase_ = 5; return this; } /** @@ -1951,22 +2246,26 @@ public Builder setGt( *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder mergeGt(com.google.protobuf.Timestamp value) { if (gtBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - gt_ != null && - gt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getGtBuilder().mergeFrom(value); + if (greaterThanCase_ == 5 && + greaterThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + greaterThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) greaterThan_) + .mergeFrom(value).buildPartial(); } else { - gt_ = value; + greaterThan_ = value; } + onChanged(); } else { - gtBuilder_.mergeFrom(value); + if (greaterThanCase_ == 5) { + gtBuilder_.mergeFrom(value); + } else { + gtBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000008; - onChanged(); + greaterThanCase_ = 5; return this; } /** @@ -1991,16 +2290,22 @@ public Builder mergeGt(com.google.protobuf.Timestamp value) { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = null; - if (gtBuilder_ != null) { - gtBuilder_.dispose(); - gtBuilder_ = null; + if (gtBuilder_ == null) { + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } + } else { + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + } + gtBuilder_.clear(); } - onChanged(); return this; } /** @@ -2025,11 +2330,9 @@ public Builder clearGt() { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Timestamp.Builder getGtBuilder() { - bitField0_ |= 0x00000008; - onChanged(); return getGtFieldBuilder().getBuilder(); } /** @@ -2054,14 +2357,17 @@ public com.google.protobuf.Timestamp.Builder getGtBuilder() { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() { - if (gtBuilder_ != null) { + if ((greaterThanCase_ == 5) && (gtBuilder_ != null)) { return gtBuilder_.getMessageOrBuilder(); } else { - return gt_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : gt_; + if (greaterThanCase_ == 5) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -2086,23 +2392,27 @@ public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() { *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getGtFieldBuilder() { if (gtBuilder_ == null) { + if (!(greaterThanCase_ == 5)) { + greaterThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } gtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getGt(), + (com.google.protobuf.Timestamp) greaterThan_, getParentForChildren(), isClean()); - gt_ = null; + greaterThan_ = null; } + greaterThanCase_ = 5; + onChanged(); return gtBuilder_; } - private com.google.protobuf.Timestamp gte_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> gteBuilder_; /** @@ -2127,11 +2437,12 @@ public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ + @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 6; } /** *
@@ -2155,14 +2466,21 @@ public boolean hasGte() {
      *```
      * 
* - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ + @java.lang.Override public com.google.protobuf.Timestamp getGte() { if (gteBuilder_ == null) { - return gte_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } else { - return gteBuilder_.getMessage(); + if (greaterThanCase_ == 6) { + return gteBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -2187,19 +2505,19 @@ public com.google.protobuf.Timestamp getGte() { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder setGte(com.google.protobuf.Timestamp value) { if (gteBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - gte_ = value; + greaterThan_ = value; + onChanged(); } else { gteBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; - onChanged(); + greaterThanCase_ = 6; return this; } /** @@ -2224,17 +2542,17 @@ public Builder setGte(com.google.protobuf.Timestamp value) { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder setGte( com.google.protobuf.Timestamp.Builder builderForValue) { if (gteBuilder_ == null) { - gte_ = builderForValue.build(); + greaterThan_ = builderForValue.build(); + onChanged(); } else { gteBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; - onChanged(); + greaterThanCase_ = 6; return this; } /** @@ -2259,22 +2577,26 @@ public Builder setGte( *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder mergeGte(com.google.protobuf.Timestamp value) { if (gteBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) && - gte_ != null && - gte_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getGteBuilder().mergeFrom(value); + if (greaterThanCase_ == 6 && + greaterThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + greaterThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) greaterThan_) + .mergeFrom(value).buildPartial(); } else { - gte_ = value; + greaterThan_ = value; } + onChanged(); } else { - gteBuilder_.mergeFrom(value); + if (greaterThanCase_ == 6) { + gteBuilder_.mergeFrom(value); + } else { + gteBuilder_.setMessage(value); + } } - bitField0_ |= 0x00000010; - onChanged(); + greaterThanCase_ = 6; return this; } /** @@ -2299,16 +2621,22 @@ public Builder mergeGte(com.google.protobuf.Timestamp value) { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = null; - if (gteBuilder_ != null) { - gteBuilder_.dispose(); - gteBuilder_ = null; + if (gteBuilder_ == null) { + if (greaterThanCase_ == 6) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } + } else { + if (greaterThanCase_ == 6) { + greaterThanCase_ = 0; + greaterThan_ = null; + } + gteBuilder_.clear(); } - onChanged(); return this; } /** @@ -2333,11 +2661,9 @@ public Builder clearGte() { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ public com.google.protobuf.Timestamp.Builder getGteBuilder() { - bitField0_ |= 0x00000010; - onChanged(); return getGteFieldBuilder().getBuilder(); } /** @@ -2362,14 +2688,17 @@ public com.google.protobuf.Timestamp.Builder getGteBuilder() { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() { - if (gteBuilder_ != null) { + if ((greaterThanCase_ == 6) && (gteBuilder_ != null)) { return gteBuilder_.getMessageOrBuilder(); } else { - return gte_ == null ? - com.google.protobuf.Timestamp.getDefaultInstance() : gte_; + if (greaterThanCase_ == 6) { + return (com.google.protobuf.Timestamp) greaterThan_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); } } /** @@ -2394,107 +2723,27 @@ public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() { *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getGteFieldBuilder() { if (gteBuilder_ == null) { + if (!(greaterThanCase_ == 6)) { + greaterThan_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } gteBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( - getGte(), + (com.google.protobuf.Timestamp) greaterThan_, getParentForChildren(), isClean()); - gte_ = null; + greaterThan_ = null; } - return gteBuilder_; - } - - private boolean ltNow_ ; - /** - *
-     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     *```proto
-     *message MyTimestamp {
-     *  // value must be less than now
-     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     *}
-     *```
-     * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return Whether the ltNow field is set. - */ - @java.lang.Override - public boolean hasLtNow() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - *
-     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     *```proto
-     *message MyTimestamp {
-     *  // value must be less than now
-     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     *}
-     *```
-     * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return The ltNow. - */ - @java.lang.Override - public boolean getLtNow() { - return ltNow_; - } - /** - *
-     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     *```proto
-     *message MyTimestamp {
-     *  // value must be less than now
-     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     *}
-     *```
-     * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @param value The ltNow to set. - * @return This builder for chaining. - */ - public Builder setLtNow(boolean value) { - - ltNow_ = value; - bitField0_ |= 0x00000020; + greaterThanCase_ = 6; onChanged(); - return this; - } - /** - *
-     *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-     *
-     *```proto
-     *message MyTimestamp {
-     *  // value must be less than now
-     *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-     *}
-     *```
-     * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearLtNow() { - bitField0_ = (bitField0_ & ~0x00000020); - ltNow_ = false; - onChanged(); - return this; + return gteBuilder_; } - private boolean gtNow_ ; /** *
      *`gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
@@ -2507,12 +2756,11 @@ public Builder clearLtNow() {
      *```
      * 
* - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return Whether the gtNow field is set. */ - @java.lang.Override public boolean hasGtNow() { - return ((bitField0_ & 0x00000040) != 0); + return greaterThanCase_ == 8; } /** *
@@ -2526,12 +2774,14 @@ public boolean hasGtNow() {
      *```
      * 
* - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return The gtNow. */ - @java.lang.Override public boolean getGtNow() { - return gtNow_; + if (greaterThanCase_ == 8) { + return (java.lang.Boolean) greaterThan_; + } + return false; } /** *
@@ -2545,14 +2795,14 @@ public boolean getGtNow() {
      *```
      * 
* - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @param value The gtNow to set. * @return This builder for chaining. */ public Builder setGtNow(boolean value) { - gtNow_ = value; - bitField0_ |= 0x00000040; + greaterThanCase_ = 8; + greaterThan_ = value; onChanged(); return this; } @@ -2568,13 +2818,15 @@ public Builder setGtNow(boolean value) { *``` * * - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGtNow() { - bitField0_ = (bitField0_ & ~0x00000040); - gtNow_ = false; - onChanged(); + if (greaterThanCase_ == 8) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java b/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java index 036d0d5b..2518a4cb 100644 --- a/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java +++ b/src/main/java/build/buf/validate/TimestampRulesOrBuilder.java @@ -67,7 +67,7 @@ public interface TimestampRulesOrBuilder extends * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -83,7 +83,7 @@ public interface TimestampRulesOrBuilder extends * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ com.google.protobuf.Timestamp getLt(); @@ -99,7 +99,7 @@ public interface TimestampRulesOrBuilder extends * ``` * * - * optional .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.TimestampOrBuilder getLtOrBuilder(); @@ -115,7 +115,7 @@ public interface TimestampRulesOrBuilder extends * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -131,7 +131,7 @@ public interface TimestampRulesOrBuilder extends * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ com.google.protobuf.Timestamp getLte(); @@ -147,10 +147,43 @@ public interface TimestampRulesOrBuilder extends * ``` * * - * optional .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.TimestampOrBuilder getLteOrBuilder(); + /** + *
+   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+   *
+   *```proto
+   *message MyTimestamp {
+   *  // value must be less than now
+   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+   *}
+   *```
+   * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return Whether the ltNow field is set. + */ + boolean hasLtNow(); + /** + *
+   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
+   *
+   *```proto
+   *message MyTimestamp {
+   *  // value must be less than now
+   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
+   *}
+   *```
+   * 
+ * + * bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } + * @return The ltNow. + */ + boolean getLtNow(); + /** *
    *`gt` requires the timestamp field value to be greater than the specified
@@ -173,7 +206,7 @@ public interface TimestampRulesOrBuilder extends
    *```
    * 
* - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -199,7 +232,7 @@ public interface TimestampRulesOrBuilder extends *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ com.google.protobuf.Timestamp getGt(); @@ -225,7 +258,7 @@ public interface TimestampRulesOrBuilder extends *``` * * - * optional .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.TimestampOrBuilder getGtOrBuilder(); @@ -251,7 +284,7 @@ public interface TimestampRulesOrBuilder extends *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -277,7 +310,7 @@ public interface TimestampRulesOrBuilder extends *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ com.google.protobuf.Timestamp getGte(); @@ -303,43 +336,10 @@ public interface TimestampRulesOrBuilder extends *``` * * - * optional .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.TimestampOrBuilder getGteOrBuilder(); - /** - *
-   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   *```proto
-   *message MyTimestamp {
-   *  // value must be less than now
-   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   *}
-   *```
-   * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return Whether the ltNow field is set. - */ - boolean hasLtNow(); - /** - *
-   *`lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
-   *
-   *```proto
-   *message MyTimestamp {
-   *  // value must be less than now
-   *   google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
-   *}
-   *```
-   * 
- * - * optional bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... } - * @return The ltNow. - */ - boolean getLtNow(); - /** *
    *`gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
@@ -352,7 +352,7 @@ public interface TimestampRulesOrBuilder extends
    *```
    * 
* - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return Whether the gtNow field is set. */ boolean hasGtNow(); @@ -368,7 +368,7 @@ public interface TimestampRulesOrBuilder extends *``` * * - * optional bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } + * bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... } * @return The gtNow. */ boolean getGtNow(); @@ -420,4 +420,8 @@ public interface TimestampRulesOrBuilder extends * optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... } */ com.google.protobuf.DurationOrBuilder getWithinOrBuilder(); + + build.buf.validate.TimestampRules.LessThanCase getLessThanCase(); + + build.buf.validate.TimestampRules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/UInt32Rules.java b/src/main/java/build/buf/validate/UInt32Rules.java index 3a229a3a..9164c54b 100644 --- a/src/main/java/build/buf/validate/UInt32Rules.java +++ b/src/main/java/build/buf/validate/UInt32Rules.java @@ -46,6 +46,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private int const_ = 0; /** @@ -90,7 +174,6 @@ public int getConst() { } public static final int LT_FIELD_NUMBER = 2; - private int lt_ = 0; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -105,12 +188,12 @@ public int getConst() {
    *```
    * 
* - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -126,16 +209,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int LTE_FIELD_NUMBER = 3; - private int lte_ = 0; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -150,12 +235,12 @@ public int getLt() {
    *```
    * 
* - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -171,16 +256,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } public static final int GT_FIELD_NUMBER = 4; - private int gt_ = 0; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -203,12 +290,12 @@ public int getLte() {
    *```
    * 
* - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -232,16 +319,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int GTE_FIELD_NUMBER = 5; - private int gte_ = 0; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -264,12 +353,12 @@ public int getGt() {
    *```
    * 
* - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +382,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } public static final int IN_FIELD_NUMBER = 6; @@ -455,17 +547,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt32(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt32(2, lt_); + if (lessThanCase_ == 2) { + output.writeUInt32( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt32(3, lte_); + if (lessThanCase_ == 3) { + output.writeUInt32( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeUInt32(4, gt_); + if (greaterThanCase_ == 4) { + output.writeUInt32( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeUInt32(5, gte_); + if (greaterThanCase_ == 5) { + output.writeUInt32( + 5, (int)((java.lang.Integer) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -494,21 +590,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, lt_); + .computeUInt32Size( + 2, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, lte_); + .computeUInt32Size( + 3, (int)((java.lang.Integer) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, gt_); + .computeUInt32Size( + 4, (int)((java.lang.Integer) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, gte_); + .computeUInt32Size( + 5, (int)((java.lang.Integer) greaterThan_)); } { int dataSize = 0; @@ -558,30 +658,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -597,22 +703,6 @@ public int hashCode() { hash = (37 * hash) + CONST_FIELD_NUMBER; hash = (53 * hash) + getConst(); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + getLt(); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + getLte(); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + getGt(); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + getGte(); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -621,6 +711,30 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + getLt(); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + getLte(); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + getGt(); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + getGte(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -758,12 +872,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0; - lt_ = 0; - lte_ = 0; - gt_ = 0; - gte_ = 0; in_ = emptyIntList(); notIn_ = emptyIntList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -792,6 +906,7 @@ public build.buf.validate.UInt32Rules buildPartial() { build.buf.validate.UInt32Rules result = new build.buf.validate.UInt32Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -816,25 +931,16 @@ private void buildPartial0(build.buf.validate.UInt32Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.UInt32Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -882,18 +988,6 @@ public Builder mergeFrom(build.buf.validate.UInt32Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -914,6 +1008,32 @@ public Builder mergeFrom(build.buf.validate.UInt32Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -946,23 +1066,23 @@ public Builder mergeFrom( break; } // case 8 case 16: { - lt_ = input.readUInt32(); - bitField0_ |= 0x00000002; + lessThan_ = input.readUInt32(); + lessThanCase_ = 2; break; } // case 16 case 24: { - lte_ = input.readUInt32(); - bitField0_ |= 0x00000004; + lessThan_ = input.readUInt32(); + lessThanCase_ = 3; break; } // case 24 case 32: { - gt_ = input.readUInt32(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readUInt32(); + greaterThanCase_ = 4; break; } // case 32 case 40: { - gte_ = input.readUInt32(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readUInt32(); + greaterThanCase_ = 5; break; } // case 40 case 48: { @@ -1012,6 +1132,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private int const_ ; @@ -1102,7 +1252,6 @@ public Builder clearConst() { return this; } - private int lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1117,12 +1266,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1138,12 +1286,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public int getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1159,14 +1309,14 @@ public int getLt() {
      *```
      * 
* - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(int value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1184,17 +1334,18 @@ public Builder setLt(int value) { *``` * * - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1209,12 +1360,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1230,12 +1380,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public int getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Integer) lessThan_; + } + return 0; } /** *
@@ -1251,14 +1403,14 @@ public int getLte() {
      *```
      * 
* - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(int value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1276,17 +1428,18 @@ public Builder setLte(int value) { *``` * * - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private int gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1309,12 +1462,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1338,12 +1490,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public int getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1367,14 +1521,14 @@ public int getGt() {
      *```
      * 
* - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(int value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1400,17 +1554,18 @@ public Builder setGt(int value) { *``` * * - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private int gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1433,12 +1588,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1462,12 +1616,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public int getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Integer) greaterThan_; + } + return 0; } /** *
@@ -1491,14 +1647,14 @@ public int getGte() {
      *```
      * 
* - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(int value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1524,13 +1680,15 @@ public Builder setGte(int value) { *``` * * - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java b/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java index aabc0b21..b55a0872 100644 --- a/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/UInt32RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint32 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ int getLt(); @@ -93,7 +93,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint32 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ int getLte(); @@ -138,7 +138,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint32 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ int getGt(); @@ -191,7 +191,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface UInt32RulesOrBuilder extends *``` * * - * optional uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint32 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ int getGte(); @@ -333,4 +333,8 @@ public interface UInt32RulesOrBuilder extends * @return The notIn at the given index. */ int getNotIn(int index); + + build.buf.validate.UInt32Rules.LessThanCase getLessThanCase(); + + build.buf.validate.UInt32Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/UInt64Rules.java b/src/main/java/build/buf/validate/UInt64Rules.java index 359a343e..8b642540 100644 --- a/src/main/java/build/buf/validate/UInt64Rules.java +++ b/src/main/java/build/buf/validate/UInt64Rules.java @@ -46,6 +46,90 @@ protected java.lang.Object newInstance( } private int bitField0_; + private int lessThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object lessThan_; + public enum LessThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LT(2), + LTE(3), + LESSTHAN_NOT_SET(0); + private final int value; + private LessThanCase(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 LessThanCase valueOf(int value) { + return forNumber(value); + } + + public static LessThanCase forNumber(int value) { + switch (value) { + case 2: return LT; + case 3: return LTE; + case 0: return LESSTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + private int greaterThanCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object greaterThan_; + public enum GreaterThanCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GT(4), + GTE(5), + GREATERTHAN_NOT_SET(0); + private final int value; + private GreaterThanCase(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 GreaterThanCase valueOf(int value) { + return forNumber(value); + } + + public static GreaterThanCase forNumber(int value) { + switch (value) { + case 4: return GT; + case 5: return GTE; + case 0: return GREATERTHAN_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + public static final int CONST_FIELD_NUMBER = 1; private long const_ = 0L; /** @@ -90,7 +174,6 @@ public long getConst() { } public static final int LT_FIELD_NUMBER = 2; - private long lt_ = 0L; /** *
    *`lt` requires the field value to be less than the specified value (field <
@@ -105,12 +188,12 @@ public long getConst() {
    *```
    * 
* - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -126,16 +209,18 @@ public boolean hasLt() {
    *```
    * 
* - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int LTE_FIELD_NUMBER = 3; - private long lte_ = 0L; /** *
    *`lte` requires the field value to be less than or equal to the specified
@@ -150,12 +235,12 @@ public long getLt() {
    *```
    * 
* - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -171,16 +256,18 @@ public boolean hasLte() {
    *```
    * 
* - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } public static final int GT_FIELD_NUMBER = 4; - private long gt_ = 0L; /** *
    *`gt` requires the field value to be greater than the specified value
@@ -203,12 +290,12 @@ public long getLte() {
    *```
    * 
* - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -232,16 +319,18 @@ public boolean hasGt() {
    *```
    * 
* - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int GTE_FIELD_NUMBER = 5; - private long gte_ = 0L; /** *
    *`gte` requires the field value to be greater than or equal to the specified
@@ -264,12 +353,12 @@ public long getGt() {
    *```
    * 
* - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -293,12 +382,15 @@ public boolean hasGte() {
    *```
    * 
* - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } public static final int IN_FIELD_NUMBER = 6; @@ -455,17 +547,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt64(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeUInt64(2, lt_); + if (lessThanCase_ == 2) { + output.writeUInt64( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeUInt64(3, lte_); + if (lessThanCase_ == 3) { + output.writeUInt64( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeUInt64(4, gt_); + if (greaterThanCase_ == 4) { + output.writeUInt64( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeUInt64(5, gte_); + if (greaterThanCase_ == 5) { + output.writeUInt64( + 5, (long)((java.lang.Long) greaterThan_)); } if (getInList().size() > 0) { output.writeUInt32NoTag(50); @@ -494,21 +590,25 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, const_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (lessThanCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, lt_); + .computeUInt64Size( + 2, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000004) != 0)) { + if (lessThanCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, lte_); + .computeUInt64Size( + 3, (long)((java.lang.Long) lessThan_)); } - if (((bitField0_ & 0x00000008) != 0)) { + if (greaterThanCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(4, gt_); + .computeUInt64Size( + 4, (long)((java.lang.Long) greaterThan_)); } - if (((bitField0_ & 0x00000010) != 0)) { + if (greaterThanCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(5, gte_); + .computeUInt64Size( + 5, (long)((java.lang.Long) greaterThan_)); } { int dataSize = 0; @@ -558,30 +658,36 @@ public boolean equals(final java.lang.Object obj) { if (getConst() != other.getConst()) return false; } - if (hasLt() != other.hasLt()) return false; - if (hasLt()) { - if (getLt() - != other.getLt()) return false; - } - if (hasLte() != other.hasLte()) return false; - if (hasLte()) { - if (getLte() - != other.getLte()) return false; - } - if (hasGt() != other.hasGt()) return false; - if (hasGt()) { - if (getGt() - != other.getGt()) return false; - } - if (hasGte() != other.hasGte()) return false; - if (hasGte()) { - if (getGte() - != other.getGte()) return false; - } if (!getInList() .equals(other.getInList())) return false; if (!getNotInList() .equals(other.getNotInList())) return false; + if (!getLessThanCase().equals(other.getLessThanCase())) return false; + switch (lessThanCase_) { + case 2: + if (getLt() + != other.getLt()) return false; + break; + case 3: + if (getLte() + != other.getLte()) return false; + break; + case 0: + default: + } + if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false; + switch (greaterThanCase_) { + case 4: + if (getGt() + != other.getGt()) return false; + break; + case 5: + if (getGte() + != other.getGte()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -598,26 +704,6 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConst()); } - if (hasLt()) { - hash = (37 * hash) + LT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLt()); - } - if (hasLte()) { - hash = (37 * hash) + LTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLte()); - } - if (hasGt()) { - hash = (37 * hash) + GT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGt()); - } - if (hasGte()) { - hash = (37 * hash) + GTE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getGte()); - } if (getInCount() > 0) { hash = (37 * hash) + IN_FIELD_NUMBER; hash = (53 * hash) + getInList().hashCode(); @@ -626,6 +712,34 @@ public int hashCode() { hash = (37 * hash) + NOT_IN_FIELD_NUMBER; hash = (53 * hash) + getNotInList().hashCode(); } + switch (lessThanCase_) { + case 2: + hash = (37 * hash) + LT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLt()); + break; + case 3: + hash = (37 * hash) + LTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLte()); + break; + case 0: + default: + } + switch (greaterThanCase_) { + case 4: + hash = (37 * hash) + GT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGt()); + break; + case 5: + hash = (37 * hash) + GTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGte()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -763,12 +877,12 @@ public Builder clear() { super.clear(); bitField0_ = 0; const_ = 0L; - lt_ = 0L; - lte_ = 0L; - gt_ = 0L; - gte_ = 0L; in_ = emptyLongList(); notIn_ = emptyLongList(); + lessThanCase_ = 0; + lessThan_ = null; + greaterThanCase_ = 0; + greaterThan_ = null; return this; } @@ -797,6 +911,7 @@ public build.buf.validate.UInt64Rules buildPartial() { build.buf.validate.UInt64Rules result = new build.buf.validate.UInt64Rules(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -821,25 +936,16 @@ private void buildPartial0(build.buf.validate.UInt64Rules result) { result.const_ = const_; to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.lt_ = lt_; - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.lte_ = lte_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.gt_ = gt_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.gte_ = gte_; - to_bitField0_ |= 0x00000010; - } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs(build.buf.validate.UInt64Rules result) { + result.lessThanCase_ = lessThanCase_; + result.lessThan_ = this.lessThan_; + result.greaterThanCase_ = greaterThanCase_; + result.greaterThan_ = this.greaterThan_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -887,18 +993,6 @@ public Builder mergeFrom(build.buf.validate.UInt64Rules other) { if (other.hasConst()) { setConst(other.getConst()); } - if (other.hasLt()) { - setLt(other.getLt()); - } - if (other.hasLte()) { - setLte(other.getLte()); - } - if (other.hasGt()) { - setGt(other.getGt()); - } - if (other.hasGte()) { - setGte(other.getGte()); - } if (!other.in_.isEmpty()) { if (in_.isEmpty()) { in_ = other.in_; @@ -919,6 +1013,32 @@ public Builder mergeFrom(build.buf.validate.UInt64Rules other) { } onChanged(); } + switch (other.getLessThanCase()) { + case LT: { + setLt(other.getLt()); + break; + } + case LTE: { + setLte(other.getLte()); + break; + } + case LESSTHAN_NOT_SET: { + break; + } + } + switch (other.getGreaterThanCase()) { + case GT: { + setGt(other.getGt()); + break; + } + case GTE: { + setGte(other.getGte()); + break; + } + case GREATERTHAN_NOT_SET: { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -951,23 +1071,23 @@ public Builder mergeFrom( break; } // case 8 case 16: { - lt_ = input.readUInt64(); - bitField0_ |= 0x00000002; + lessThan_ = input.readUInt64(); + lessThanCase_ = 2; break; } // case 16 case 24: { - lte_ = input.readUInt64(); - bitField0_ |= 0x00000004; + lessThan_ = input.readUInt64(); + lessThanCase_ = 3; break; } // case 24 case 32: { - gt_ = input.readUInt64(); - bitField0_ |= 0x00000008; + greaterThan_ = input.readUInt64(); + greaterThanCase_ = 4; break; } // case 32 case 40: { - gte_ = input.readUInt64(); - bitField0_ |= 0x00000010; + greaterThan_ = input.readUInt64(); + greaterThanCase_ = 5; break; } // case 40 case 48: { @@ -1017,6 +1137,36 @@ public Builder mergeFrom( } // finally return this; } + private int lessThanCase_ = 0; + private java.lang.Object lessThan_; + public LessThanCase + getLessThanCase() { + return LessThanCase.forNumber( + lessThanCase_); + } + + public Builder clearLessThan() { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + return this; + } + + private int greaterThanCase_ = 0; + private java.lang.Object greaterThan_; + public GreaterThanCase + getGreaterThanCase() { + return GreaterThanCase.forNumber( + greaterThanCase_); + } + + public Builder clearGreaterThan() { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + return this; + } + private int bitField0_; private long const_ ; @@ -1107,7 +1257,6 @@ public Builder clearConst() { return this; } - private long lt_ ; /** *
      *`lt` requires the field value to be less than the specified value (field <
@@ -1122,12 +1271,11 @@ public Builder clearConst() {
      *```
      * 
* - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ - @java.lang.Override public boolean hasLt() { - return ((bitField0_ & 0x00000002) != 0); + return lessThanCase_ == 2; } /** *
@@ -1143,12 +1291,14 @@ public boolean hasLt() {
      *```
      * 
* - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ - @java.lang.Override public long getLt() { - return lt_; + if (lessThanCase_ == 2) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1164,14 +1314,14 @@ public long getLt() {
      *```
      * 
* - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @param value The lt to set. * @return This builder for chaining. */ public Builder setLt(long value) { - lt_ = value; - bitField0_ |= 0x00000002; + lessThanCase_ = 2; + lessThan_ = value; onChanged(); return this; } @@ -1189,17 +1339,18 @@ public Builder setLt(long value) { *``` * * - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLt() { - bitField0_ = (bitField0_ & ~0x00000002); - lt_ = 0L; - onChanged(); + if (lessThanCase_ == 2) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long lte_ ; /** *
      *`lte` requires the field value to be less than or equal to the specified
@@ -1214,12 +1365,11 @@ public Builder clearLt() {
      *```
      * 
* - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ - @java.lang.Override public boolean hasLte() { - return ((bitField0_ & 0x00000004) != 0); + return lessThanCase_ == 3; } /** *
@@ -1235,12 +1385,14 @@ public boolean hasLte() {
      *```
      * 
* - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ - @java.lang.Override public long getLte() { - return lte_; + if (lessThanCase_ == 3) { + return (java.lang.Long) lessThan_; + } + return 0L; } /** *
@@ -1256,14 +1408,14 @@ public long getLte() {
      *```
      * 
* - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @param value The lte to set. * @return This builder for chaining. */ public Builder setLte(long value) { - lte_ = value; - bitField0_ |= 0x00000004; + lessThanCase_ = 3; + lessThan_ = value; onChanged(); return this; } @@ -1281,17 +1433,18 @@ public Builder setLte(long value) { *``` * * - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearLte() { - bitField0_ = (bitField0_ & ~0x00000004); - lte_ = 0L; - onChanged(); + if (lessThanCase_ == 3) { + lessThanCase_ = 0; + lessThan_ = null; + onChanged(); + } return this; } - private long gt_ ; /** *
      *`gt` requires the field value to be greater than the specified value
@@ -1314,12 +1467,11 @@ public Builder clearLte() {
      *```
      * 
* - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ - @java.lang.Override public boolean hasGt() { - return ((bitField0_ & 0x00000008) != 0); + return greaterThanCase_ == 4; } /** *
@@ -1343,12 +1495,14 @@ public boolean hasGt() {
      *```
      * 
* - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ - @java.lang.Override public long getGt() { - return gt_; + if (greaterThanCase_ == 4) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1372,14 +1526,14 @@ public long getGt() {
      *```
      * 
* - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @param value The gt to set. * @return This builder for chaining. */ public Builder setGt(long value) { - gt_ = value; - bitField0_ |= 0x00000008; + greaterThanCase_ = 4; + greaterThan_ = value; onChanged(); return this; } @@ -1405,17 +1559,18 @@ public Builder setGt(long value) { *``` * * - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGt() { - bitField0_ = (bitField0_ & ~0x00000008); - gt_ = 0L; - onChanged(); + if (greaterThanCase_ == 4) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } - private long gte_ ; /** *
      *`gte` requires the field value to be greater than or equal to the specified
@@ -1438,12 +1593,11 @@ public Builder clearGt() {
      *```
      * 
* - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ - @java.lang.Override public boolean hasGte() { - return ((bitField0_ & 0x00000010) != 0); + return greaterThanCase_ == 5; } /** *
@@ -1467,12 +1621,14 @@ public boolean hasGte() {
      *```
      * 
* - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ - @java.lang.Override public long getGte() { - return gte_; + if (greaterThanCase_ == 5) { + return (java.lang.Long) greaterThan_; + } + return 0L; } /** *
@@ -1496,14 +1652,14 @@ public long getGte() {
      *```
      * 
* - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @param value The gte to set. * @return This builder for chaining. */ public Builder setGte(long value) { - gte_ = value; - bitField0_ |= 0x00000010; + greaterThanCase_ = 5; + greaterThan_ = value; onChanged(); return this; } @@ -1529,13 +1685,15 @@ public Builder setGte(long value) { *``` * * - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return This builder for chaining. */ public Builder clearGte() { - bitField0_ = (bitField0_ & ~0x00000010); - gte_ = 0L; - onChanged(); + if (greaterThanCase_ == 5) { + greaterThanCase_ = 0; + greaterThan_ = null; + onChanged(); + } return this; } diff --git a/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java b/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java index 226aee7b..c88a8fab 100644 --- a/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java +++ b/src/main/java/build/buf/validate/UInt64RulesOrBuilder.java @@ -56,7 +56,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return Whether the lt field is set. */ boolean hasLt(); @@ -74,7 +74,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } + * uint64 lt = 2 [json_name = "lt", (.buf.validate.priv.field) = { ... } * @return The lt. */ long getLt(); @@ -93,7 +93,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return Whether the lte field is set. */ boolean hasLte(); @@ -111,7 +111,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } + * uint64 lte = 3 [json_name = "lte", (.buf.validate.priv.field) = { ... } * @return The lte. */ long getLte(); @@ -138,7 +138,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return Whether the gt field is set. */ boolean hasGt(); @@ -164,7 +164,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } + * uint64 gt = 4 [json_name = "gt", (.buf.validate.priv.field) = { ... } * @return The gt. */ long getGt(); @@ -191,7 +191,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return Whether the gte field is set. */ boolean hasGte(); @@ -217,7 +217,7 @@ public interface UInt64RulesOrBuilder extends *``` * * - * optional uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } + * uint64 gte = 5 [json_name = "gte", (.buf.validate.priv.field) = { ... } * @return The gte. */ long getGte(); @@ -333,4 +333,8 @@ public interface UInt64RulesOrBuilder extends * @return The notIn at the given index. */ long getNotIn(int index); + + build.buf.validate.UInt64Rules.LessThanCase getLessThanCase(); + + build.buf.validate.UInt64Rules.GreaterThanCase getGreaterThanCase(); } diff --git a/src/main/java/build/buf/validate/ValidateProto.java b/src/main/java/build/buf/validate/ValidateProto.java index dde8823d..93a0bb38 100644 --- a/src/main/java/build/buf/validate/ValidateProto.java +++ b/src/main/java/build/buf/validate/ValidateProto.java @@ -235,1173 +235,1167 @@ public static void registerAllExtensions( "H\000R\003any\0229\n\010duration\030\025 \001(\0132\033.buf.validate" + ".DurationRulesH\000R\010duration\022<\n\ttimestamp\030" + "\026 \001(\0132\034.buf.validate.TimestampRulesH\000R\tt" + - "imestampB\006\n\004type\"\202\026\n\nFloatRules\022u\n\005const" + + "imestampB\006\n\004type\"\365\025\n\nFloatRules\022u\n\005const" + "\030\001 \001(\002BZ\302HW\nU\n\013float.const\032Fthis != rule" + "s.const ? \'value must equal %s\'.format([" + - "rules.const]) : \'\'H\000R\005const\210\001\001\022\221\001\n\002lt\030\002 " + + "rules.const]) : \'\'H\002R\005const\210\001\001\022\216\001\n\002lt\030\002 " + "\001(\002B|\302Hy\nw\n\010float.lt\032k!has(rules.gte) &&" + " !has(rules.gt) && this >= rules.lt? \'va" + "lue must be less than %s\'.format([rules." + - "lt]) : \'\'H\001R\002lt\210\001\001\022\244\001\n\003lte\030\003 \001(\002B\214\001\302H\210\001\n" + - "\205\001\n\tfloat.lte\032x!has(rules.gte) && !has(r" + - "ules.gt) && this > rules.lte? \'value mus" + - "t be less than or equal to %s\'.format([r" + - "ules.lte]) : \'\'H\002R\003lte\210\001\001\022\236\007\n\002gt\030\004 \001(\002B\210" + - "\007\302H\204\007\nz\n\010float.gt\032n!has(rules.lt) && !ha" + - "s(rules.lte) && this <= rules.gt? \'value" + - " must be greater than %s\'.format([rules." + - "gt]) : \'\'\n\263\001\n\013float.gt_lt\032\243\001has(rules.lt" + - ") && rules.lt >= rules.gt && (this >= ru" + - "les.lt || this <= rules.gt)? \'value must" + - " be greater than %s and less than %s\'.fo" + - "rmat([rules.gt, rules.lt]) : \'\'\n\273\001\n\025floa" + - "t.gt_lt_exclusive\032\241\001has(rules.lt) && rul" + - "es.lt < rules.gt && (rules.lt <= this &&" + - " this <= rules.gt)? \'value must be great" + - "er than %s or less than %s\'.format([rule" + - "s.gt, rules.lt]) : \'\'\n\303\001\n\014float.gt_lte\032\262" + - "\001has(rules.lte) && rules.lte >= rules.gt" + - " && (this > rules.lte || this <= rules.g" + - "t)? \'value must be greater than %s and l" + + "lt]) : \'\'H\000R\002lt\022\241\001\n\003lte\030\003 \001(\002B\214\001\302H\210\001\n\205\001\n" + + "\tfloat.lte\032x!has(rules.gte) && !has(rule" + + "s.gt) && this > rules.lte? \'value must b" + + "e less than or equal to %s\'.format([rule" + + "s.lte]) : \'\'H\000R\003lte\022\233\007\n\002gt\030\004 \001(\002B\210\007\302H\204\007\n" + + "z\n\010float.gt\032n!has(rules.lt) && !has(rule" + + "s.lte) && this <= rules.gt? \'value must " + + "be greater than %s\'.format([rules.gt]) :" + + " \'\'\n\263\001\n\013float.gt_lt\032\243\001has(rules.lt) && r" + + "ules.lt >= rules.gt && (this >= rules.lt" + + " || this <= rules.gt)? \'value must be gr" + + "eater than %s and less than %s\'.format([" + + "rules.gt, rules.lt]) : \'\'\n\273\001\n\025float.gt_l" + + "t_exclusive\032\241\001has(rules.lt) && rules.lt " + + "< rules.gt && (rules.lt <= this && this " + + "<= rules.gt)? \'value must be greater tha" + + "n %s or less than %s\'.format([rules.gt, " + + "rules.lt]) : \'\'\n\303\001\n\014float.gt_lte\032\262\001has(r" + + "ules.lte) && rules.lte >= rules.gt && (t" + + "his > rules.lte || this <= rules.gt)? \'v" + + "alue must be greater than %s and less th" + + "an or equal to %s\'.format([rules.gt, rul" + + "es.lte]) : \'\'\n\313\001\n\026float.gt_lte_exclusive" + + "\032\260\001has(rules.lte) && rules.lte < rules.g" + + "t && (rules.lte < this && this <= rules." + + "gt)? \'value must be greater than %s or l" + "ess than or equal to %s\'.format([rules.g" + - "t, rules.lte]) : \'\'\n\313\001\n\026float.gt_lte_exc" + - "lusive\032\260\001has(rules.lte) && rules.lte < r" + - "ules.gt && (rules.lte < this && this <= " + - "rules.gt)? \'value must be greater than %" + - "s or less than or equal to %s\'.format([r" + - "ules.gt, rules.lte]) : \'\'H\003R\002gt\210\001\001\022\353\007\n\003g" + - "te\030\005 \001(\002B\323\007\302H\317\007\n\210\001\n\tfloat.gte\032{!has(rule" + - "s.lt) && !has(rules.lte) && this < rules" + - ".gte? \'value must be greater than or equ" + - "al to %s\'.format([rules.gte]) : \'\'\n\302\001\n\014f" + - "loat.gte_lt\032\261\001has(rules.lt) && rules.lt " + - ">= rules.gte && (this >= rules.lt || thi" + - "s < rules.gte)? \'value must be greater t" + - "han or equal to %s and less than %s\'.for" + - "mat([rules.gte, rules.lt]) : \'\'\n\312\001\n\026floa" + - "t.gte_lt_exclusive\032\257\001has(rules.lt) && ru" + - "les.lt < rules.gte && (rules.lt <= this " + - "&& this < rules.gte)? \'value must be gre" + - "ater than or equal to %s or less than %s" + - "\'.format([rules.gte, rules.lt]) : \'\'\n\322\001\n" + - "\rfloat.gte_lte\032\300\001has(rules.lte) && rules" + - ".lte >= rules.gte && (this > rules.lte |" + - "| this < rules.gte)? \'value must be grea" + - "ter than or equal to %s and less than or" + - " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'\n\332\001\n\027float.gte_lte_exclusive\032\276\001" + - "has(rules.lte) && rules.lte < rules.gte " + - "&& (rules.lte < this && this < rules.gte" + - ")? \'value must be greater than or equal " + - "to %s or less than or equal to %s\'.forma" + - "t([rules.gte, rules.lte]) : \'\'H\004R\003gte\210\001\001" + - "\022y\n\002in\030\006 \003(\002Bi\302Hf\nd\n\010float.in\032X!(this in" + - " dyn(rules)[\'in\']) ? \'value must be in l" + - "ist %s\'.format([dyn(rules)[\'in\']]) : \'\'R" + - "\002in\022}\n\006not_in\030\007 \003(\002Bf\302Hc\na\n\014float.not_in" + - "\032Qthis in rules.not_in ? \'value must not" + - " be in list %s\'.format([rules.not_in]) :" + - " \'\'R\005notIn\022\220\001\n\006finite\030\010 \001(\010Bx\302Hu\ns\n\014floa" + - "t.finite\032cthis == 1.0/0.0 || this == -1." + - "0/0.0 || string(this) in [\'NaN\', \'nan\'] " + - "? \'value must be finite\' : \'\'R\006finiteB\010\n" + - "\006_constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\223\026" + - "\n\013DoubleRules\022v\n\005const\030\001 \001(\001B[\302HX\nV\n\014dou" + - "ble.const\032Fthis != rules.const ? \'value " + - "must equal %s\'.format([rules.const]) : \'" + - "\'H\000R\005const\210\001\001\022\222\001\n\002lt\030\002 \001(\001B}\302Hz\nx\n\tdoubl" + - "e.lt\032k!has(rules.gte) && !has(rules.gt) " + - "&& this >= rules.lt? \'value must be less" + - " than %s\'.format([rules.lt]) : \'\'H\001R\002lt\210" + - "\001\001\022\245\001\n\003lte\030\003 \001(\001B\215\001\302H\211\001\n\206\001\n\ndouble.lte\032x" + - "!has(rules.gte) && !has(rules.gt) && thi" + - "s > rules.lte? \'value must be less than " + - "or equal to %s\'.format([rules.lte]) : \'\'" + - "H\002R\003lte\210\001\001\022\243\007\n\002gt\030\004 \001(\001B\215\007\302H\211\007\n{\n\tdouble" + - ".gt\032n!has(rules.lt) && !has(rules.lte) &" + - "& this <= rules.gt? \'value must be great" + - "er than %s\'.format([rules.gt]) : \'\'\n\264\001\n\014" + - "double.gt_lt\032\243\001has(rules.lt) && rules.lt" + - " >= rules.gt && (this >= rules.lt || thi" + - "s <= rules.gt)? \'value must be greater t" + - "han %s and less than %s\'.format([rules.g" + - "t, rules.lt]) : \'\'\n\274\001\n\026double.gt_lt_excl" + - "usive\032\241\001has(rules.lt) && rules.lt < rule" + - "s.gt && (rules.lt <= this && this <= rul" + - "es.gt)? \'value must be greater than %s o" + - "r less than %s\'.format([rules.gt, rules." + - "lt]) : \'\'\n\304\001\n\rdouble.gt_lte\032\262\001has(rules." + - "lte) && rules.lte >= rules.gt && (this >" + - " rules.lte || this <= rules.gt)? \'value " + - "must be greater than %s and less than or" + - " equal to %s\'.format([rules.gt, rules.lt" + - "e]) : \'\'\n\314\001\n\027double.gt_lte_exclusive\032\260\001h" + - "as(rules.lte) && rules.lte < rules.gt &&" + - " (rules.lte < this && this <= rules.gt)?" + - " \'value must be greater than %s or less " + - "than or equal to %s\'.format([rules.gt, r" + - "ules.lte]) : \'\'H\003R\002gt\210\001\001\022\360\007\n\003gte\030\005 \001(\001B\330" + - "\007\302H\324\007\n\211\001\n\ndouble.gte\032{!has(rules.lt) && " + + "t, rules.lte]) : \'\'H\001R\002gt\022\350\007\n\003gte\030\005 \001(\002B" + + "\323\007\302H\317\007\n\210\001\n\tfloat.gte\032{!has(rules.lt) && " + "!has(rules.lte) && this < rules.gte? \'va" + "lue must be greater than or equal to %s\'" + - ".format([rules.gte]) : \'\'\n\303\001\n\rdouble.gte" + - "_lt\032\261\001has(rules.lt) && rules.lt >= rules" + - ".gte && (this >= rules.lt || this < rule" + - "s.gte)? \'value must be greater than or e" + - "qual to %s and less than %s\'.format([rul" + - "es.gte, rules.lt]) : \'\'\n\313\001\n\027double.gte_l" + - "t_exclusive\032\257\001has(rules.lt) && rules.lt " + - "< rules.gte && (rules.lt <= this && this" + - " < rules.gte)? \'value must be greater th" + - "an or equal to %s or less than %s\'.forma" + - "t([rules.gte, rules.lt]) : \'\'\n\323\001\n\016double" + - ".gte_lte\032\300\001has(rules.lte) && rules.lte >" + - "= rules.gte && (this > rules.lte || this" + - " < rules.gte)? \'value must be greater th" + - "an or equal to %s and less than or equal" + - " to %s\'.format([rules.gte, rules.lte]) :" + - " \'\'\n\333\001\n\030double.gte_lte_exclusive\032\276\001has(r" + - "ules.lte) && rules.lte < rules.gte && (r" + - "ules.lte < this && this < rules.gte)? \'v" + - "alue must be greater than or equal to %s" + - " or less than or equal to %s\'.format([ru" + - "les.gte, rules.lte]) : \'\'H\004R\003gte\210\001\001\022z\n\002i" + - "n\030\006 \003(\001Bj\302Hg\ne\n\tdouble.in\032X!(this in dyn" + - "(rules)[\'in\']) ? \'value must be in list " + - "%s\'.format([dyn(rules)[\'in\']]) : \'\'R\002in\022" + - "~\n\006not_in\030\007 \003(\001Bg\302Hd\nb\n\rdouble.not_in\032Qt" + - "his in rules.not_in ? \'value must not be" + - " in list %s\'.format([rules.not_in]) : \'\'" + - "R\005notIn\022\221\001\n\006finite\030\010 \001(\010By\302Hv\nt\n\rdouble." + - "finite\032cthis == 1.0/0.0 || this == -1.0/" + - "0.0 || string(this) in [\'NaN\', \'nan\'] ? " + - "\'value must be finite\' : \'\'R\006finiteB\010\n\006_" + - "constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\357\024\n\n" + - "Int32Rules\022u\n\005const\030\001 \001(\005BZ\302HW\nU\n\013int32." + - "const\032Fthis != rules.const ? \'value must" + - " equal %s\'.format([rules.const]) : \'\'H\000R" + - "\005const\210\001\001\022\221\001\n\002lt\030\002 \001(\005B|\302Hy\nw\n\010int32.lt\032" + - "k!has(rules.gte) && !has(rules.gt) && th" + - "is >= rules.lt? \'value must be less than" + - " %s\'.format([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\244\001" + - "\n\003lte\030\003 \001(\005B\214\001\302H\210\001\n\205\001\n\tint32.lte\032x!has(r" + - "ules.gte) && !has(rules.gt) && this > ru" + - "les.lte? \'value must be less than or equ" + - "al to %s\'.format([rules.lte]) : \'\'H\002R\003lt" + - "e\210\001\001\022\236\007\n\002gt\030\004 \001(\005B\210\007\302H\204\007\nz\n\010int32.gt\032n!h" + - "as(rules.lt) && !has(rules.lte) && this " + - "<= rules.gt? \'value must be greater than" + - " %s\'.format([rules.gt]) : \'\'\n\263\001\n\013int32.g" + - "t_lt\032\243\001has(rules.lt) && rules.lt >= rule" + - "s.gt && (this >= rules.lt || this <= rul" + - "es.gt)? \'value must be greater than %s a" + - "nd less than %s\'.format([rules.gt, rules" + - ".lt]) : \'\'\n\273\001\n\025int32.gt_lt_exclusive\032\241\001h" + - "as(rules.lt) && rules.lt < rules.gt && (" + - "rules.lt <= this && this <= rules.gt)? \'" + - "value must be greater than %s or less th" + - "an %s\'.format([rules.gt, rules.lt]) : \'\'" + - "\n\303\001\n\014int32.gt_lte\032\262\001has(rules.lte) && ru" + - "les.lte >= rules.gt && (this > rules.lte" + - " || this <= rules.gt)? \'value must be gr" + - "eater than %s and less than or equal to " + - "%s\'.format([rules.gt, rules.lte]) : \'\'\n\313" + - "\001\n\026int32.gt_lte_exclusive\032\260\001has(rules.lt" + - "e) && rules.lte < rules.gt && (rules.lte" + - " < this && this <= rules.gt)? \'value mus" + - "t be greater than %s or less than or equ" + - "al to %s\'.format([rules.gt, rules.lte]) " + - ": \'\'H\003R\002gt\210\001\001\022\353\007\n\003gte\030\005 \001(\005B\323\007\302H\317\007\n\210\001\n\ti" + - "nt32.gte\032{!has(rules.lt) && !has(rules.l" + - "te) && this < rules.gte? \'value must be " + - "greater than or equal to %s\'.format([rul" + - "es.gte]) : \'\'\n\302\001\n\014int32.gte_lt\032\261\001has(rul" + - "es.lt) && rules.lt >= rules.gte && (this" + - " >= rules.lt || this < rules.gte)? \'valu" + - "e must be greater than or equal to %s an" + - "d less than %s\'.format([rules.gte, rules" + - ".lt]) : \'\'\n\312\001\n\026int32.gte_lt_exclusive\032\257\001" + - "has(rules.lt) && rules.lt < rules.gte &&" + - " (rules.lt <= this && this < rules.gte)?" + - " \'value must be greater than or equal to" + - " %s or less than %s\'.format([rules.gte, " + - "rules.lt]) : \'\'\n\322\001\n\rint32.gte_lte\032\300\001has(" + - "rules.lte) && rules.lte >= rules.gte && " + - "(this > rules.lte || this < rules.gte)? " + - "\'value must be greater than or equal to " + - "%s and less than or equal to %s\'.format(" + - "[rules.gte, rules.lte]) : \'\'\n\332\001\n\027int32.g" + - "te_lte_exclusive\032\276\001has(rules.lte) && rul" + - "es.lte < rules.gte && (rules.lte < this " + - "&& this < rules.gte)? \'value must be gre" + - "ater than or equal to %s or less than or" + - " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'H\004R\003gte\210\001\001\022y\n\002in\030\006 \003(\005Bi\302Hf\nd\n\010" + - "int32.in\032X!(this in dyn(rules)[\'in\']) ? " + - "\'value must be in list %s\'.format([dyn(r" + - "ules)[\'in\']]) : \'\'R\002in\022}\n\006not_in\030\007 \003(\005Bf" + - "\302Hc\na\n\014int32.not_in\032Qthis in rules.not_i" + - "n ? \'value must not be in list %s\'.forma" + - "t([rules.not_in]) : \'\'R\005notInB\010\n\006_constB" + - "\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\357\024\n\nInt64R" + - "ules\022u\n\005const\030\001 \001(\003BZ\302HW\nU\n\013int64.const\032" + - "Fthis != rules.const ? \'value must equal" + - " %s\'.format([rules.const]) : \'\'H\000R\005const" + - "\210\001\001\022\221\001\n\002lt\030\002 \001(\003B|\302Hy\nw\n\010int64.lt\032k!has(" + - "rules.gte) && !has(rules.gt) && this >= " + - "rules.lt? \'value must be less than %s\'.f" + - "ormat([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\244\001\n\003lte\030" + - "\003 \001(\003B\214\001\302H\210\001\n\205\001\n\tint64.lte\032x!has(rules.g" + - "te) && !has(rules.gt) && this > rules.lt" + - "e? \'value must be less than or equal to " + - "%s\'.format([rules.lte]) : \'\'H\002R\003lte\210\001\001\022\236" + - "\007\n\002gt\030\004 \001(\003B\210\007\302H\204\007\nz\n\010int64.gt\032n!has(rul" + - "es.lt) && !has(rules.lte) && this <= rul" + - "es.gt? \'value must be greater than %s\'.f" + - "ormat([rules.gt]) : \'\'\n\263\001\n\013int64.gt_lt\032\243" + - "\001has(rules.lt) && rules.lt >= rules.gt &" + - "& (this >= rules.lt || this <= rules.gt)" + - "? \'value must be greater than %s and les" + - "s than %s\'.format([rules.gt, rules.lt]) " + - ": \'\'\n\273\001\n\025int64.gt_lt_exclusive\032\241\001has(rul" + - "es.lt) && rules.lt < rules.gt && (rules." + - "lt <= this && this <= rules.gt)? \'value " + - "must be greater than %s or less than %s\'" + - ".format([rules.gt, rules.lt]) : \'\'\n\303\001\n\014i" + - "nt64.gt_lte\032\262\001has(rules.lte) && rules.lt" + - "e >= rules.gt && (this > rules.lte || th" + - "is <= rules.gt)? \'value must be greater " + - "than %s and less than or equal to %s\'.fo" + - "rmat([rules.gt, rules.lte]) : \'\'\n\313\001\n\026int" + - "64.gt_lte_exclusive\032\260\001has(rules.lte) && " + - "rules.lte < rules.gt && (rules.lte < thi" + - "s && this <= rules.gt)? \'value must be g" + - "reater than %s or less than or equal to " + - "%s\'.format([rules.gt, rules.lte]) : \'\'H\003" + - "R\002gt\210\001\001\022\353\007\n\003gte\030\005 \001(\003B\323\007\302H\317\007\n\210\001\n\tint64.g" + - "te\032{!has(rules.lt) && !has(rules.lte) &&" + - " this < rules.gte? \'value must be greate" + - "r than or equal to %s\'.format([rules.gte" + - "]) : \'\'\n\302\001\n\014int64.gte_lt\032\261\001has(rules.lt)" + - " && rules.lt >= rules.gte && (this >= ru" + - "les.lt || this < rules.gte)? \'value must" + - " be greater than or equal to %s and less" + - " than %s\'.format([rules.gte, rules.lt]) " + - ": \'\'\n\312\001\n\026int64.gte_lt_exclusive\032\257\001has(ru" + - "les.lt) && rules.lt < rules.gte && (rule" + - "s.lt <= this && this < rules.gte)? \'valu" + - "e must be greater than or equal to %s or" + - " less than %s\'.format([rules.gte, rules." + - "lt]) : \'\'\n\322\001\n\rint64.gte_lte\032\300\001has(rules." + - "lte) && rules.lte >= rules.gte && (this " + - "> rules.lte || this < rules.gte)? \'value" + - " must be greater than or equal to %s and" + - " less than or equal to %s\'.format([rules" + - ".gte, rules.lte]) : \'\'\n\332\001\n\027int64.gte_lte" + + ".format([rules.gte]) : \'\'\n\302\001\n\014float.gte_" + + "lt\032\261\001has(rules.lt) && rules.lt >= rules." + + "gte && (this >= rules.lt || this < rules" + + ".gte)? \'value must be greater than or eq" + + "ual to %s and less than %s\'.format([rule" + + "s.gte, rules.lt]) : \'\'\n\312\001\n\026float.gte_lt_" + + "exclusive\032\257\001has(rules.lt) && rules.lt < " + + "rules.gte && (rules.lt <= this && this <" + + " rules.gte)? \'value must be greater than" + + " or equal to %s or less than %s\'.format(" + + "[rules.gte, rules.lt]) : \'\'\n\322\001\n\rfloat.gt" + + "e_lte\032\300\001has(rules.lte) && rules.lte >= r" + + "ules.gte && (this > rules.lte || this < " + + "rules.gte)? \'value must be greater than " + + "or equal to %s and less than or equal to" + + " %s\'.format([rules.gte, rules.lte]) : \'\'" + + "\n\332\001\n\027float.gte_lte_exclusive\032\276\001has(rules" + + ".lte) && rules.lte < rules.gte && (rules" + + ".lte < this && this < rules.gte)? \'value" + + " must be greater than or equal to %s or " + + "less than or equal to %s\'.format([rules." + + "gte, rules.lte]) : \'\'H\001R\003gte\022y\n\002in\030\006 \003(\002" + + "Bi\302Hf\nd\n\010float.in\032X!(this in dyn(rules)[" + + "\'in\']) ? \'value must be in list %s\'.form" + + "at([dyn(rules)[\'in\']]) : \'\'R\002in\022}\n\006not_i" + + "n\030\007 \003(\002Bf\302Hc\na\n\014float.not_in\032Qthis in ru" + + "les.not_in ? \'value must not be in list " + + "%s\'.format([rules.not_in]) : \'\'R\005notIn\022\220" + + "\001\n\006finite\030\010 \001(\010Bx\302Hu\ns\n\014float.finite\032cth" + + "is == 1.0/0.0 || this == -1.0/0.0 || str" + + "ing(this) in [\'NaN\', \'nan\'] ? \'value mus" + + "t be finite\' : \'\'R\006finiteB\013\n\tless_thanB\016" + + "\n\014greater_thanB\010\n\006_const\"\206\026\n\013DoubleRules" + + "\022v\n\005const\030\001 \001(\001B[\302HX\nV\n\014double.const\032Fth" + + "is != rules.const ? \'value must equal %s" + + "\'.format([rules.const]) : \'\'H\002R\005const\210\001\001" + + "\022\217\001\n\002lt\030\002 \001(\001B}\302Hz\nx\n\tdouble.lt\032k!has(ru" + + "les.gte) && !has(rules.gt) && this >= ru" + + "les.lt? \'value must be less than %s\'.for" + + "mat([rules.lt]) : \'\'H\000R\002lt\022\242\001\n\003lte\030\003 \001(\001" + + "B\215\001\302H\211\001\n\206\001\n\ndouble.lte\032x!has(rules.gte) " + + "&& !has(rules.gt) && this > rules.lte? \'" + + "value must be less than or equal to %s\'." + + "format([rules.lte]) : \'\'H\000R\003lte\022\240\007\n\002gt\030\004" + + " \001(\001B\215\007\302H\211\007\n{\n\tdouble.gt\032n!has(rules.lt)" + + " && !has(rules.lte) && this <= rules.gt?" + + " \'value must be greater than %s\'.format(" + + "[rules.gt]) : \'\'\n\264\001\n\014double.gt_lt\032\243\001has(" + + "rules.lt) && rules.lt >= rules.gt && (th" + + "is >= rules.lt || this <= rules.gt)? \'va" + + "lue must be greater than %s and less tha" + + "n %s\'.format([rules.gt, rules.lt]) : \'\'\n" + + "\274\001\n\026double.gt_lt_exclusive\032\241\001has(rules.l" + + "t) && rules.lt < rules.gt && (rules.lt <" + + "= this && this <= rules.gt)? \'value must" + + " be greater than %s or less than %s\'.for" + + "mat([rules.gt, rules.lt]) : \'\'\n\304\001\n\rdoubl" + + "e.gt_lte\032\262\001has(rules.lte) && rules.lte >" + + "= rules.gt && (this > rules.lte || this " + + "<= rules.gt)? \'value must be greater tha" + + "n %s and less than or equal to %s\'.forma" + + "t([rules.gt, rules.lte]) : \'\'\n\314\001\n\027double" + + ".gt_lte_exclusive\032\260\001has(rules.lte) && ru" + + "les.lte < rules.gt && (rules.lte < this " + + "&& this <= rules.gt)? \'value must be gre" + + "ater than %s or less than or equal to %s" + + "\'.format([rules.gt, rules.lte]) : \'\'H\001R\002" + + "gt\022\355\007\n\003gte\030\005 \001(\001B\330\007\302H\324\007\n\211\001\n\ndouble.gte\032{" + + "!has(rules.lt) && !has(rules.lte) && thi" + + "s < rules.gte? \'value must be greater th" + + "an or equal to %s\'.format([rules.gte]) :" + + " \'\'\n\303\001\n\rdouble.gte_lt\032\261\001has(rules.lt) &&" + + " rules.lt >= rules.gte && (this >= rules" + + ".lt || this < rules.gte)? \'value must be" + + " greater than or equal to %s and less th" + + "an %s\'.format([rules.gte, rules.lt]) : \'" + + "\'\n\313\001\n\027double.gte_lt_exclusive\032\257\001has(rule" + + "s.lt) && rules.lt < rules.gte && (rules." + + "lt <= this && this < rules.gte)? \'value " + + "must be greater than or equal to %s or l" + + "ess than %s\'.format([rules.gte, rules.lt" + + "]) : \'\'\n\323\001\n\016double.gte_lte\032\300\001has(rules.l" + + "te) && rules.lte >= rules.gte && (this >" + + " rules.lte || this < rules.gte)? \'value " + + "must be greater than or equal to %s and " + + "less than or equal to %s\'.format([rules." + + "gte, rules.lte]) : \'\'\n\333\001\n\030double.gte_lte" + "_exclusive\032\276\001has(rules.lte) && rules.lte" + " < rules.gte && (rules.lte < this && thi" + "s < rules.gte)? \'value must be greater t" + "han or equal to %s or less than or equal" + " to %s\'.format([rules.gte, rules.lte]) :" + - " \'\'H\004R\003gte\210\001\001\022y\n\002in\030\006 \003(\003Bi\302Hf\nd\n\010int64." + - "in\032X!(this in dyn(rules)[\'in\']) ? \'value" + - " must be in list %s\'.format([dyn(rules)[" + - "\'in\']]) : \'\'R\002in\022}\n\006not_in\030\007 \003(\003Bf\302Hc\na\n" + - "\014int64.not_in\032Qthis in rules.not_in ? \'v" + - "alue must not be in list %s\'.format([rul" + - "es.not_in]) : \'\'R\005notInB\010\n\006_constB\005\n\003_lt" + - "B\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\377\024\n\013UInt32Rules\022" + - "v\n\005const\030\001 \001(\rB[\302HX\nV\n\014uint32.const\032Fthi" + - "s != rules.const ? \'value must equal %s\'" + - ".format([rules.const]) : \'\'H\000R\005const\210\001\001\022" + - "\222\001\n\002lt\030\002 \001(\rB}\302Hz\nx\n\tuint32.lt\032k!has(rul" + - "es.gte) && !has(rules.gt) && this >= rul" + - "es.lt? \'value must be less than %s\'.form" + - "at([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\245\001\n\003lte\030\003 \001" + - "(\rB\215\001\302H\211\001\n\206\001\n\nuint32.lte\032x!has(rules.gte" + + " \'\'H\001R\003gte\022z\n\002in\030\006 \003(\001Bj\302Hg\ne\n\tdouble.in" + + "\032X!(this in dyn(rules)[\'in\']) ? \'value m" + + "ust be in list %s\'.format([dyn(rules)[\'i" + + "n\']]) : \'\'R\002in\022~\n\006not_in\030\007 \003(\001Bg\302Hd\nb\n\rd" + + "ouble.not_in\032Qthis in rules.not_in ? \'va" + + "lue must not be in list %s\'.format([rule" + + "s.not_in]) : \'\'R\005notIn\022\221\001\n\006finite\030\010 \001(\010B" + + "y\302Hv\nt\n\rdouble.finite\032cthis == 1.0/0.0 |" + + "| this == -1.0/0.0 || string(this) in [\'" + + "NaN\', \'nan\'] ? \'value must be finite\' : " + + "\'\'R\006finiteB\013\n\tless_thanB\016\n\014greater_thanB" + + "\010\n\006_const\"\342\024\n\nInt32Rules\022u\n\005const\030\001 \001(\005B" + + "Z\302HW\nU\n\013int32.const\032Fthis != rules.const" + + " ? \'value must equal %s\'.format([rules.c" + + "onst]) : \'\'H\002R\005const\210\001\001\022\216\001\n\002lt\030\002 \001(\005B|\302H" + + "y\nw\n\010int32.lt\032k!has(rules.gte) && !has(r" + + "ules.gt) && this >= rules.lt? \'value mus" + + "t be less than %s\'.format([rules.lt]) : " + + "\'\'H\000R\002lt\022\241\001\n\003lte\030\003 \001(\005B\214\001\302H\210\001\n\205\001\n\tint32." + + "lte\032x!has(rules.gte) && !has(rules.gt) &" + + "& this > rules.lte? \'value must be less " + + "than or equal to %s\'.format([rules.lte])" + + " : \'\'H\000R\003lte\022\233\007\n\002gt\030\004 \001(\005B\210\007\302H\204\007\nz\n\010int3" + + "2.gt\032n!has(rules.lt) && !has(rules.lte) " + + "&& this <= rules.gt? \'value must be grea" + + "ter than %s\'.format([rules.gt]) : \'\'\n\263\001\n" + + "\013int32.gt_lt\032\243\001has(rules.lt) && rules.lt" + + " >= rules.gt && (this >= rules.lt || thi" + + "s <= rules.gt)? \'value must be greater t" + + "han %s and less than %s\'.format([rules.g" + + "t, rules.lt]) : \'\'\n\273\001\n\025int32.gt_lt_exclu" + + "sive\032\241\001has(rules.lt) && rules.lt < rules" + + ".gt && (rules.lt <= this && this <= rule" + + "s.gt)? \'value must be greater than %s or" + + " less than %s\'.format([rules.gt, rules.l" + + "t]) : \'\'\n\303\001\n\014int32.gt_lte\032\262\001has(rules.lt" + + "e) && rules.lte >= rules.gt && (this > r" + + "ules.lte || this <= rules.gt)? \'value mu" + + "st be greater than %s and less than or e" + + "qual to %s\'.format([rules.gt, rules.lte]" + + ") : \'\'\n\313\001\n\026int32.gt_lte_exclusive\032\260\001has(" + + "rules.lte) && rules.lte < rules.gt && (r" + + "ules.lte < this && this <= rules.gt)? \'v" + + "alue must be greater than %s or less tha" + + "n or equal to %s\'.format([rules.gt, rule" + + "s.lte]) : \'\'H\001R\002gt\022\350\007\n\003gte\030\005 \001(\005B\323\007\302H\317\007\n" + + "\210\001\n\tint32.gte\032{!has(rules.lt) && !has(ru" + + "les.lte) && this < rules.gte? \'value mus" + + "t be greater than or equal to %s\'.format" + + "([rules.gte]) : \'\'\n\302\001\n\014int32.gte_lt\032\261\001ha" + + "s(rules.lt) && rules.lt >= rules.gte && " + + "(this >= rules.lt || this < rules.gte)? " + + "\'value must be greater than or equal to " + + "%s and less than %s\'.format([rules.gte, " + + "rules.lt]) : \'\'\n\312\001\n\026int32.gte_lt_exclusi" + + "ve\032\257\001has(rules.lt) && rules.lt < rules.g" + + "te && (rules.lt <= this && this < rules." + + "gte)? \'value must be greater than or equ" + + "al to %s or less than %s\'.format([rules." + + "gte, rules.lt]) : \'\'\n\322\001\n\rint32.gte_lte\032\300" + + "\001has(rules.lte) && rules.lte >= rules.gt" + + "e && (this > rules.lte || this < rules.g" + + "te)? \'value must be greater than or equa" + + "l to %s and less than or equal to %s\'.fo" + + "rmat([rules.gte, rules.lte]) : \'\'\n\332\001\n\027in" + + "t32.gte_lte_exclusive\032\276\001has(rules.lte) &" + + "& rules.lte < rules.gte && (rules.lte < " + + "this && this < rules.gte)? \'value must b" + + "e greater than or equal to %s or less th" + + "an or equal to %s\'.format([rules.gte, ru" + + "les.lte]) : \'\'H\001R\003gte\022y\n\002in\030\006 \003(\005Bi\302Hf\nd" + + "\n\010int32.in\032X!(this in dyn(rules)[\'in\']) " + + "? \'value must be in list %s\'.format([dyn" + + "(rules)[\'in\']]) : \'\'R\002in\022}\n\006not_in\030\007 \003(\005" + + "Bf\302Hc\na\n\014int32.not_in\032Qthis in rules.not" + + "_in ? \'value must not be in list %s\'.for" + + "mat([rules.not_in]) : \'\'R\005notInB\013\n\tless_" + + "thanB\016\n\014greater_thanB\010\n\006_const\"\342\024\n\nInt64" + + "Rules\022u\n\005const\030\001 \001(\003BZ\302HW\nU\n\013int64.const" + + "\032Fthis != rules.const ? \'value must equa" + + "l %s\'.format([rules.const]) : \'\'H\002R\005cons" + + "t\210\001\001\022\216\001\n\002lt\030\002 \001(\003B|\302Hy\nw\n\010int64.lt\032k!has" + + "(rules.gte) && !has(rules.gt) && this >=" + + " rules.lt? \'value must be less than %s\'." + + "format([rules.lt]) : \'\'H\000R\002lt\022\241\001\n\003lte\030\003 " + + "\001(\003B\214\001\302H\210\001\n\205\001\n\tint64.lte\032x!has(rules.gte" + ") && !has(rules.gt) && this > rules.lte?" + " \'value must be less than or equal to %s" + - "\'.format([rules.lte]) : \'\'H\002R\003lte\210\001\001\022\243\007\n" + - "\002gt\030\004 \001(\rB\215\007\302H\211\007\n{\n\tuint32.gt\032n!has(rule" + - "s.lt) && !has(rules.lte) && this <= rule" + - "s.gt? \'value must be greater than %s\'.fo" + - "rmat([rules.gt]) : \'\'\n\264\001\n\014uint32.gt_lt\032\243" + - "\001has(rules.lt) && rules.lt >= rules.gt &" + - "& (this >= rules.lt || this <= rules.gt)" + - "? \'value must be greater than %s and les" + - "s than %s\'.format([rules.gt, rules.lt]) " + - ": \'\'\n\274\001\n\026uint32.gt_lt_exclusive\032\241\001has(ru" + - "les.lt) && rules.lt < rules.gt && (rules" + - ".lt <= this && this <= rules.gt)? \'value" + - " must be greater than %s or less than %s" + - "\'.format([rules.gt, rules.lt]) : \'\'\n\304\001\n\r" + - "uint32.gt_lte\032\262\001has(rules.lte) && rules." + - "lte >= rules.gt && (this > rules.lte || " + - "this <= rules.gt)? \'value must be greate" + - "r than %s and less than or equal to %s\'." + - "format([rules.gt, rules.lte]) : \'\'\n\314\001\n\027u" + - "int32.gt_lte_exclusive\032\260\001has(rules.lte) " + - "&& rules.lte < rules.gt && (rules.lte < " + - "this && this <= rules.gt)? \'value must b" + - "e greater than %s or less than or equal " + - "to %s\'.format([rules.gt, rules.lte]) : \'" + - "\'H\003R\002gt\210\001\001\022\360\007\n\003gte\030\005 \001(\rB\330\007\302H\324\007\n\211\001\n\nuint" + - "32.gte\032{!has(rules.lt) && !has(rules.lte" + - ") && this < rules.gte? \'value must be gr" + - "eater than or equal to %s\'.format([rules" + - ".gte]) : \'\'\n\303\001\n\ruint32.gte_lt\032\261\001has(rule" + - "s.lt) && rules.lt >= rules.gte && (this " + - ">= rules.lt || this < rules.gte)? \'value" + - " must be greater than or equal to %s and" + - " less than %s\'.format([rules.gte, rules." + - "lt]) : \'\'\n\313\001\n\027uint32.gte_lt_exclusive\032\257\001" + - "has(rules.lt) && rules.lt < rules.gte &&" + - " (rules.lt <= this && this < rules.gte)?" + - " \'value must be greater than or equal to" + - " %s or less than %s\'.format([rules.gte, " + - "rules.lt]) : \'\'\n\323\001\n\016uint32.gte_lte\032\300\001has" + - "(rules.lte) && rules.lte >= rules.gte &&" + - " (this > rules.lte || this < rules.gte)?" + - " \'value must be greater than or equal to" + - " %s and less than or equal to %s\'.format" + - "([rules.gte, rules.lte]) : \'\'\n\333\001\n\030uint32" + - ".gte_lte_exclusive\032\276\001has(rules.lte) && r" + - "ules.lte < rules.gte && (rules.lte < thi" + - "s && this < rules.gte)? \'value must be g" + - "reater than or equal to %s or less than " + - "or equal to %s\'.format([rules.gte, rules" + - ".lte]) : \'\'H\004R\003gte\210\001\001\022z\n\002in\030\006 \003(\rBj\302Hg\ne" + - "\n\tuint32.in\032X!(this in dyn(rules)[\'in\'])" + - " ? \'value must be in list %s\'.format([dy" + - "n(rules)[\'in\']]) : \'\'R\002in\022~\n\006not_in\030\007 \003(" + - "\rBg\302Hd\nb\n\ruint32.not_in\032Qthis in rules.n" + - "ot_in ? \'value must not be in list %s\'.f" + - "ormat([rules.not_in]) : \'\'R\005notInB\010\n\006_co" + - "nstB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\377\024\n\013UI" + - "nt64Rules\022v\n\005const\030\001 \001(\004B[\302HX\nV\n\014uint64." + - "const\032Fthis != rules.const ? \'value must" + - " equal %s\'.format([rules.const]) : \'\'H\000R" + - "\005const\210\001\001\022\222\001\n\002lt\030\002 \001(\004B}\302Hz\nx\n\tuint64.lt" + - "\032k!has(rules.gte) && !has(rules.gt) && t" + - "his >= rules.lt? \'value must be less tha" + - "n %s\'.format([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\245" + - "\001\n\003lte\030\003 \001(\004B\215\001\302H\211\001\n\206\001\n\nuint64.lte\032x!has" + - "(rules.gte) && !has(rules.gt) && this > " + - "rules.lte? \'value must be less than or e" + - "qual to %s\'.format([rules.lte]) : \'\'H\002R\003" + - "lte\210\001\001\022\243\007\n\002gt\030\004 \001(\004B\215\007\302H\211\007\n{\n\tuint64.gt\032" + - "n!has(rules.lt) && !has(rules.lte) && th" + - "is <= rules.gt? \'value must be greater t" + - "han %s\'.format([rules.gt]) : \'\'\n\264\001\n\014uint" + - "64.gt_lt\032\243\001has(rules.lt) && rules.lt >= ", - "rules.gt && (this >= rules.lt || this <=" + + "\'.format([rules.lte]) : \'\'H\000R\003lte\022\233\007\n\002gt" + + "\030\004 \001(\003B\210\007\302H\204\007\nz\n\010int64.gt\032n!has(rules.lt" + + ") && !has(rules.lte) && this <= rules.gt" + + "? \'value must be greater than %s\'.format" + + "([rules.gt]) : \'\'\n\263\001\n\013int64.gt_lt\032\243\001has(" + + "rules.lt) && rules.lt >= rules.gt && (th" + + "is >= rules.lt || this <= rules.gt)? \'va" + + "lue must be greater than %s and less tha" + + "n %s\'.format([rules.gt, rules.lt]) : \'\'\n" + + "\273\001\n\025int64.gt_lt_exclusive\032\241\001has(rules.lt" + + ") && rules.lt < rules.gt && (rules.lt <=" + + " this && this <= rules.gt)? \'value must " + + "be greater than %s or less than %s\'.form" + + "at([rules.gt, rules.lt]) : \'\'\n\303\001\n\014int64." + + "gt_lte\032\262\001has(rules.lte) && rules.lte >= " + + "rules.gt && (this > rules.lte || this <=" + " rules.gt)? \'value must be greater than " + - "%s and less than %s\'.format([rules.gt, r" + - "ules.lt]) : \'\'\n\274\001\n\026uint64.gt_lt_exclusiv" + - "e\032\241\001has(rules.lt) && rules.lt < rules.gt" + - " && (rules.lt <= this && this <= rules.g" + - "t)? \'value must be greater than %s or le" + - "ss than %s\'.format([rules.gt, rules.lt])" + - " : \'\'\n\304\001\n\ruint64.gt_lte\032\262\001has(rules.lte)" + - " && rules.lte >= rules.gt && (this > rul" + - "es.lte || this <= rules.gt)? \'value must" + - " be greater than %s and less than or equ" + - "al to %s\'.format([rules.gt, rules.lte]) " + - ": \'\'\n\314\001\n\027uint64.gt_lte_exclusive\032\260\001has(r" + - "ules.lte) && rules.lte < rules.gt && (ru" + - "les.lte < this && this <= rules.gt)? \'va" + - "lue must be greater than %s or less than" + - " or equal to %s\'.format([rules.gt, rules" + - ".lte]) : \'\'H\003R\002gt\210\001\001\022\360\007\n\003gte\030\005 \001(\004B\330\007\302H\324" + - "\007\n\211\001\n\nuint64.gte\032{!has(rules.lt) && !has" + + "%s and less than or equal to %s\'.format(" + + "[rules.gt, rules.lte]) : \'\'\n\313\001\n\026int64.gt" + + "_lte_exclusive\032\260\001has(rules.lte) && rules" + + ".lte < rules.gt && (rules.lte < this && " + + "this <= rules.gt)? \'value must be greate" + + "r than %s or less than or equal to %s\'.f" + + "ormat([rules.gt, rules.lte]) : \'\'H\001R\002gt\022" + + "\350\007\n\003gte\030\005 \001(\003B\323\007\302H\317\007\n\210\001\n\tint64.gte\032{!has" + + "(rules.lt) && !has(rules.lte) && this < " + + "rules.gte? \'value must be greater than o" + + "r equal to %s\'.format([rules.gte]) : \'\'\n" + + "\302\001\n\014int64.gte_lt\032\261\001has(rules.lt) && rule" + + "s.lt >= rules.gte && (this >= rules.lt |" + + "| this < rules.gte)? \'value must be grea" + + "ter than or equal to %s and less than %s" + + "\'.format([rules.gte, rules.lt]) : \'\'\n\312\001\n" + + "\026int64.gte_lt_exclusive\032\257\001has(rules.lt) " + + "&& rules.lt < rules.gte && (rules.lt <= " + + "this && this < rules.gte)? \'value must b" + + "e greater than or equal to %s or less th" + + "an %s\'.format([rules.gte, rules.lt]) : \'" + + "\'\n\322\001\n\rint64.gte_lte\032\300\001has(rules.lte) && " + + "rules.lte >= rules.gte && (this > rules." + + "lte || this < rules.gte)? \'value must be" + + " greater than or equal to %s and less th" + + "an or equal to %s\'.format([rules.gte, ru" + + "les.lte]) : \'\'\n\332\001\n\027int64.gte_lte_exclusi" + + "ve\032\276\001has(rules.lte) && rules.lte < rules" + + ".gte && (rules.lte < this && this < rule" + + "s.gte)? \'value must be greater than or e" + + "qual to %s or less than or equal to %s\'." + + "format([rules.gte, rules.lte]) : \'\'H\001R\003g" + + "te\022y\n\002in\030\006 \003(\003Bi\302Hf\nd\n\010int64.in\032X!(this " + + "in dyn(rules)[\'in\']) ? \'value must be in" + + " list %s\'.format([dyn(rules)[\'in\']]) : \'" + + "\'R\002in\022}\n\006not_in\030\007 \003(\003Bf\302Hc\na\n\014int64.not_" + + "in\032Qthis in rules.not_in ? \'value must n" + + "ot be in list %s\'.format([rules.not_in])" + + " : \'\'R\005notInB\013\n\tless_thanB\016\n\014greater_tha" + + "nB\010\n\006_const\"\362\024\n\013UInt32Rules\022v\n\005const\030\001 \001" + + "(\rB[\302HX\nV\n\014uint32.const\032Fthis != rules.c" + + "onst ? \'value must equal %s\'.format([rul" + + "es.const]) : \'\'H\002R\005const\210\001\001\022\217\001\n\002lt\030\002 \001(\r" + + "B}\302Hz\nx\n\tuint32.lt\032k!has(rules.gte) && !" + + "has(rules.gt) && this >= rules.lt? \'valu" + + "e must be less than %s\'.format([rules.lt" + + "]) : \'\'H\000R\002lt\022\242\001\n\003lte\030\003 \001(\rB\215\001\302H\211\001\n\206\001\n\nu" + + "int32.lte\032x!has(rules.gte) && !has(rules" + + ".gt) && this > rules.lte? \'value must be" + + " less than or equal to %s\'.format([rules" + + ".lte]) : \'\'H\000R\003lte\022\240\007\n\002gt\030\004 \001(\rB\215\007\302H\211\007\n{" + + "\n\tuint32.gt\032n!has(rules.lt) && !has(rule" + + "s.lte) && this <= rules.gt? \'value must " + + "be greater than %s\'.format([rules.gt]) :" + + " \'\'\n\264\001\n\014uint32.gt_lt\032\243\001has(rules.lt) && " + + "rules.lt >= rules.gt && (this >= rules.l" + + "t || this <= rules.gt)? \'value must be g" + + "reater than %s and less than %s\'.format(" + + "[rules.gt, rules.lt]) : \'\'\n\274\001\n\026uint32.gt" + + "_lt_exclusive\032\241\001has(rules.lt) && rules.l" + + "t < rules.gt && (rules.lt <= this && thi" + + "s <= rules.gt)? \'value must be greater t" + + "han %s or less than %s\'.format([rules.gt" + + ", rules.lt]) : \'\'\n\304\001\n\ruint32.gt_lte\032\262\001ha" + + "s(rules.lte) && rules.lte >= rules.gt &&" + + " (this > rules.lte || this <= rules.gt)?" + + " \'value must be greater than %s and less" + + " than or equal to %s\'.format([rules.gt, " + + "rules.lte]) : \'\'\n\314\001\n\027uint32.gt_lte_exclu" + + "sive\032\260\001has(rules.lte) && rules.lte < rul" + + "es.gt && (rules.lte < this && this <= ru" + + "les.gt)? \'value must be greater than %s " + + "or less than or equal to %s\'.format([rul" + + "es.gt, rules.lte]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005 " + + "\001(\rB\330\007\302H\324\007\n\211\001\n\nuint32.gte\032{!has(rules.lt" + + ") && !has(rules.lte) && this < rules.gte" + + "? \'value must be greater than or equal t" + + "o %s\'.format([rules.gte]) : \'\'\n\303\001\n\ruint3" + + "2.gte_lt\032\261\001has(rules.lt) && rules.lt >= " + + "rules.gte && (this >= rules.lt || this <" + + " rules.gte)? \'value must be greater than" + + " or equal to %s and less than %s\'.format" + + "([rules.gte, rules.lt]) : \'\'\n\313\001\n\027uint32." + + "gte_lt_exclusive\032\257\001has(rules.lt) && rule" + + "s.lt < rules.gte && (rules.lt <= this &&" + + " this < rules.gte)? \'value must be great" + + "er than or equal to %s or less than %s\'." + + "format([rules.gte, rules.lt]) : \'\'\n\323\001\n\016u" + + "int32.gte_lte\032\300\001has(rules.lte) && rules." + + "lte >= rules.gte && (this > rules.lte ||" + + " this < rules.gte)? \'value must be great" + + "er than or equal to %s and less than or " + + "equal to %s\'.format([rules.gte, rules.lt" + + "e]) : \'\'\n\333\001\n\030uint32.gte_lte_exclusive\032\276\001" + + "has(rules.lte) && rules.lte < rules.gte " + + "&& (rules.lte < this && this < rules.gte" + + ")? \'value must be greater than or equal " + + "to %s or less than or equal to %s\'.forma" + + "t([rules.gte, rules.lte]) : \'\'H\001R\003gte\022z\n" + + "\002in\030\006 \003(\rBj\302Hg\ne\n\tuint32.in\032X!(this in d" + + "yn(rules)[\'in\']) ? \'value must be in lis" + + "t %s\'.format([dyn(rules)[\'in\']]) : \'\'R\002i" + + "n\022~\n\006not_in\030\007 \003(\rBg\302Hd\nb\n\ruint32.not_in\032" + + "Qthis in rules.not_in ? \'value must not " + + "be in list %s\'.format([rules.not_in]) : " + + "\'\'R\005notInB\013\n\tless_thanB\016\n\014greater_thanB\010" + + "\n\006_const\"\362\024\n\013UInt64Rules\022v\n\005const\030\001 \001(\004B" + + "[\302HX\nV\n\014uint64.const\032Fthis != rules.cons" + + "t ? \'value must equal %s\'.format([rules." + + "const]) : \'\'H\002R\005const\210\001\001\022\217\001\n\002lt\030\002 \001(\004B}\302" + + "Hz\nx\n\tuint64.lt\032k!has(rules.gte) && !has" + + "(rules.gt) && this >= rules.lt? \'value m" + + "ust be less than %s\'.format([rules.lt]) " + + ": \'\'H\000R\002lt\022\242\001\n\003lte\030\003 \001(\004B\215\001\302H\211\001\n\206\001\n\nuint" + + "64.lte\032x!has(rules.gte) && !has(rules.gt" + + ") && this > rules.lte? \'value must be le" + + "ss than or equal to %s\'.format([rules.lt" + + "e]) : \'\'H\000R\003lte\022\240\007\n\002gt\030\004 \001(\004B\215\007\302H\211\007\n{\n\tu" + + "int64.gt\032n!has(rules.lt) && !has(rules.l" + + "te) && this <= rules.gt? \'value must be " + + "greater than %s\'.format([rules.gt]) : \'\'" + + "\n\264\001\n\014uint64.gt_lt\032\243\001has(rules.lt) && rul" + + "es.lt >= rules.gt && (this >= rules.lt |" + + "| this <= rules.gt)? \'value must be grea", + "ter than %s and less than %s\'.format([ru" + + "les.gt, rules.lt]) : \'\'\n\274\001\n\026uint64.gt_lt" + + "_exclusive\032\241\001has(rules.lt) && rules.lt <" + + " rules.gt && (rules.lt <= this && this <" + + "= rules.gt)? \'value must be greater than" + + " %s or less than %s\'.format([rules.gt, r" + + "ules.lt]) : \'\'\n\304\001\n\ruint64.gt_lte\032\262\001has(r" + + "ules.lte) && rules.lte >= rules.gt && (t" + + "his > rules.lte || this <= rules.gt)? \'v" + + "alue must be greater than %s and less th" + + "an or equal to %s\'.format([rules.gt, rul" + + "es.lte]) : \'\'\n\314\001\n\027uint64.gt_lte_exclusiv" + + "e\032\260\001has(rules.lte) && rules.lte < rules." + + "gt && (rules.lte < this && this <= rules" + + ".gt)? \'value must be greater than %s or " + + "less than or equal to %s\'.format([rules." + + "gt, rules.lte]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005 \001(\004" + + "B\330\007\302H\324\007\n\211\001\n\nuint64.gte\032{!has(rules.lt) &" + + "& !has(rules.lte) && this < rules.gte? \'" + + "value must be greater than or equal to %" + + "s\'.format([rules.gte]) : \'\'\n\303\001\n\ruint64.g" + + "te_lt\032\261\001has(rules.lt) && rules.lt >= rul" + + "es.gte && (this >= rules.lt || this < ru" + + "les.gte)? \'value must be greater than or" + + " equal to %s and less than %s\'.format([r" + + "ules.gte, rules.lt]) : \'\'\n\313\001\n\027uint64.gte" + + "_lt_exclusive\032\257\001has(rules.lt) && rules.l" + + "t < rules.gte && (rules.lt <= this && th" + + "is < rules.gte)? \'value must be greater " + + "than or equal to %s or less than %s\'.for" + + "mat([rules.gte, rules.lt]) : \'\'\n\323\001\n\016uint" + + "64.gte_lte\032\300\001has(rules.lte) && rules.lte" + + " >= rules.gte && (this > rules.lte || th" + + "is < rules.gte)? \'value must be greater " + + "than or equal to %s and less than or equ" + + "al to %s\'.format([rules.gte, rules.lte])" + + " : \'\'\n\333\001\n\030uint64.gte_lte_exclusive\032\276\001has" + + "(rules.lte) && rules.lte < rules.gte && " + + "(rules.lte < this && this < rules.gte)? " + + "\'value must be greater than or equal to " + + "%s or less than or equal to %s\'.format([" + + "rules.gte, rules.lte]) : \'\'H\001R\003gte\022z\n\002in" + + "\030\006 \003(\004Bj\302Hg\ne\n\tuint64.in\032X!(this in dyn(" + + "rules)[\'in\']) ? \'value must be in list %" + + "s\'.format([dyn(rules)[\'in\']]) : \'\'R\002in\022~" + + "\n\006not_in\030\007 \003(\004Bg\302Hd\nb\n\ruint64.not_in\032Qth" + + "is in rules.not_in ? \'value must not be " + + "in list %s\'.format([rules.not_in]) : \'\'R" + + "\005notInB\013\n\tless_thanB\016\n\014greater_thanB\010\n\006_" + + "const\"\362\024\n\013SInt32Rules\022v\n\005const\030\001 \001(\021B[\302H" + + "X\nV\n\014sint32.const\032Fthis != rules.const ?" + + " \'value must equal %s\'.format([rules.con" + + "st]) : \'\'H\002R\005const\210\001\001\022\217\001\n\002lt\030\002 \001(\021B}\302Hz\n" + + "x\n\tsint32.lt\032k!has(rules.gte) && !has(ru" + + "les.gt) && this >= rules.lt? \'value must" + + " be less than %s\'.format([rules.lt]) : \'" + + "\'H\000R\002lt\022\242\001\n\003lte\030\003 \001(\021B\215\001\302H\211\001\n\206\001\n\nsint32." + + "lte\032x!has(rules.gte) && !has(rules.gt) &" + + "& this > rules.lte? \'value must be less " + + "than or equal to %s\'.format([rules.lte])" + + " : \'\'H\000R\003lte\022\240\007\n\002gt\030\004 \001(\021B\215\007\302H\211\007\n{\n\tsint" + + "32.gt\032n!has(rules.lt) && !has(rules.lte)" + + " && this <= rules.gt? \'value must be gre" + + "ater than %s\'.format([rules.gt]) : \'\'\n\264\001" + + "\n\014sint32.gt_lt\032\243\001has(rules.lt) && rules." + + "lt >= rules.gt && (this >= rules.lt || t" + + "his <= rules.gt)? \'value must be greater" + + " than %s and less than %s\'.format([rules" + + ".gt, rules.lt]) : \'\'\n\274\001\n\026sint32.gt_lt_ex" + + "clusive\032\241\001has(rules.lt) && rules.lt < ru" + + "les.gt && (rules.lt <= this && this <= r" + + "ules.gt)? \'value must be greater than %s" + + " or less than %s\'.format([rules.gt, rule" + + "s.lt]) : \'\'\n\304\001\n\rsint32.gt_lte\032\262\001has(rule" + + "s.lte) && rules.lte >= rules.gt && (this" + + " > rules.lte || this <= rules.gt)? \'valu" + + "e must be greater than %s and less than " + + "or equal to %s\'.format([rules.gt, rules." + + "lte]) : \'\'\n\314\001\n\027sint32.gt_lte_exclusive\032\260" + + "\001has(rules.lte) && rules.lte < rules.gt " + + "&& (rules.lte < this && this <= rules.gt" + + ")? \'value must be greater than %s or les" + + "s than or equal to %s\'.format([rules.gt," + + " rules.lte]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005 \001(\021B\330\007" + + "\302H\324\007\n\211\001\n\nsint32.gte\032{!has(rules.lt) && !" + + "has(rules.lte) && this < rules.gte? \'val" + + "ue must be greater than or equal to %s\'." + + "format([rules.gte]) : \'\'\n\303\001\n\rsint32.gte_" + + "lt\032\261\001has(rules.lt) && rules.lt >= rules." + + "gte && (this >= rules.lt || this < rules" + + ".gte)? \'value must be greater than or eq" + + "ual to %s and less than %s\'.format([rule" + + "s.gte, rules.lt]) : \'\'\n\313\001\n\027sint32.gte_lt" + + "_exclusive\032\257\001has(rules.lt) && rules.lt <" + + " rules.gte && (rules.lt <= this && this " + + "< rules.gte)? \'value must be greater tha" + + "n or equal to %s or less than %s\'.format" + + "([rules.gte, rules.lt]) : \'\'\n\323\001\n\016sint32." + + "gte_lte\032\300\001has(rules.lte) && rules.lte >=" + + " rules.gte && (this > rules.lte || this " + + "< rules.gte)? \'value must be greater tha" + + "n or equal to %s and less than or equal " + + "to %s\'.format([rules.gte, rules.lte]) : " + + "\'\'\n\333\001\n\030sint32.gte_lte_exclusive\032\276\001has(ru" + + "les.lte) && rules.lte < rules.gte && (ru" + + "les.lte < this && this < rules.gte)? \'va" + + "lue must be greater than or equal to %s " + + "or less than or equal to %s\'.format([rul" + + "es.gte, rules.lte]) : \'\'H\001R\003gte\022z\n\002in\030\006 " + + "\003(\021Bj\302Hg\ne\n\tsint32.in\032X!(this in dyn(rul" + + "es)[\'in\']) ? \'value must be in list %s\'." + + "format([dyn(rules)[\'in\']]) : \'\'R\002in\022~\n\006n" + + "ot_in\030\007 \003(\021Bg\302Hd\nb\n\rsint32.not_in\032Qthis " + + "in rules.not_in ? \'value must not be in " + + "list %s\'.format([rules.not_in]) : \'\'R\005no" + + "tInB\013\n\tless_thanB\016\n\014greater_thanB\010\n\006_con" + + "st\"\362\024\n\013SInt64Rules\022v\n\005const\030\001 \001(\022B[\302HX\nV" + + "\n\014sint64.const\032Fthis != rules.const ? \'v" + + "alue must equal %s\'.format([rules.const]" + + ") : \'\'H\002R\005const\210\001\001\022\217\001\n\002lt\030\002 \001(\022B}\302Hz\nx\n\t" + + "sint64.lt\032k!has(rules.gte) && !has(rules" + + ".gt) && this >= rules.lt? \'value must be" + + " less than %s\'.format([rules.lt]) : \'\'H\000" + + "R\002lt\022\242\001\n\003lte\030\003 \001(\022B\215\001\302H\211\001\n\206\001\n\nsint64.lte" + + "\032x!has(rules.gte) && !has(rules.gt) && t" + + "his > rules.lte? \'value must be less tha" + + "n or equal to %s\'.format([rules.lte]) : " + + "\'\'H\000R\003lte\022\240\007\n\002gt\030\004 \001(\022B\215\007\302H\211\007\n{\n\tsint64." + + "gt\032n!has(rules.lt) && !has(rules.lte) &&" + + " this <= rules.gt? \'value must be greate" + + "r than %s\'.format([rules.gt]) : \'\'\n\264\001\n\014s" + + "int64.gt_lt\032\243\001has(rules.lt) && rules.lt " + + ">= rules.gt && (this >= rules.lt || this" + + " <= rules.gt)? \'value must be greater th" + + "an %s and less than %s\'.format([rules.gt" + + ", rules.lt]) : \'\'\n\274\001\n\026sint64.gt_lt_exclu" + + "sive\032\241\001has(rules.lt) && rules.lt < rules" + + ".gt && (rules.lt <= this && this <= rule" + + "s.gt)? \'value must be greater than %s or" + + " less than %s\'.format([rules.gt, rules.l" + + "t]) : \'\'\n\304\001\n\rsint64.gt_lte\032\262\001has(rules.l" + + "te) && rules.lte >= rules.gt && (this > " + + "rules.lte || this <= rules.gt)? \'value m" + + "ust be greater than %s and less than or " + + "equal to %s\'.format([rules.gt, rules.lte" + + "]) : \'\'\n\314\001\n\027sint64.gt_lte_exclusive\032\260\001ha" + + "s(rules.lte) && rules.lte < rules.gt && " + + "(rules.lte < this && this <= rules.gt)? " + + "\'value must be greater than %s or less t" + + "han or equal to %s\'.format([rules.gt, ru" + + "les.lte]) : \'\'H\001R\002gt\022\355\007\n\003gte\030\005 \001(\022B\330\007\302H\324" + + "\007\n\211\001\n\nsint64.gte\032{!has(rules.lt) && !has" + "(rules.lte) && this < rules.gte? \'value " + "must be greater than or equal to %s\'.for" + - "mat([rules.gte]) : \'\'\n\303\001\n\ruint64.gte_lt\032" + + "mat([rules.gte]) : \'\'\n\303\001\n\rsint64.gte_lt\032" + "\261\001has(rules.lt) && rules.lt >= rules.gte" + " && (this >= rules.lt || this < rules.gt" + "e)? \'value must be greater than or equal" + " to %s and less than %s\'.format([rules.g" + - "te, rules.lt]) : \'\'\n\313\001\n\027uint64.gte_lt_ex" + + "te, rules.lt]) : \'\'\n\313\001\n\027sint64.gte_lt_ex" + "clusive\032\257\001has(rules.lt) && rules.lt < ru" + "les.gte && (rules.lt <= this && this < r" + "ules.gte)? \'value must be greater than o" + "r equal to %s or less than %s\'.format([r" + - "ules.gte, rules.lt]) : \'\'\n\323\001\n\016uint64.gte" + + "ules.gte, rules.lt]) : \'\'\n\323\001\n\016sint64.gte" + "_lte\032\300\001has(rules.lte) && rules.lte >= ru" + "les.gte && (this > rules.lte || this < r" + "ules.gte)? \'value must be greater than o" + "r equal to %s and less than or equal to " + "%s\'.format([rules.gte, rules.lte]) : \'\'\n" + - "\333\001\n\030uint64.gte_lte_exclusive\032\276\001has(rules" + + "\333\001\n\030sint64.gte_lte_exclusive\032\276\001has(rules" + ".lte) && rules.lte < rules.gte && (rules" + ".lte < this && this < rules.gte)? \'value" + " must be greater than or equal to %s or " + "less than or equal to %s\'.format([rules." + - "gte, rules.lte]) : \'\'H\004R\003gte\210\001\001\022z\n\002in\030\006 " + - "\003(\004Bj\302Hg\ne\n\tuint64.in\032X!(this in dyn(rul" + - "es)[\'in\']) ? \'value must be in list %s\'." + - "format([dyn(rules)[\'in\']]) : \'\'R\002in\022~\n\006n" + - "ot_in\030\007 \003(\004Bg\302Hd\nb\n\ruint64.not_in\032Qthis " + - "in rules.not_in ? \'value must not be in " + - "list %s\'.format([rules.not_in]) : \'\'R\005no" + - "tInB\010\n\006_constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_" + - "gte\"\377\024\n\013SInt32Rules\022v\n\005const\030\001 \001(\021B[\302HX\n" + - "V\n\014sint32.const\032Fthis != rules.const ? \'" + - "value must equal %s\'.format([rules.const" + - "]) : \'\'H\000R\005const\210\001\001\022\222\001\n\002lt\030\002 \001(\021B}\302Hz\nx\n" + - "\tsint32.lt\032k!has(rules.gte) && !has(rule" + - "s.gt) && this >= rules.lt? \'value must b" + - "e less than %s\'.format([rules.lt]) : \'\'H" + - "\001R\002lt\210\001\001\022\245\001\n\003lte\030\003 \001(\021B\215\001\302H\211\001\n\206\001\n\nsint32" + - ".lte\032x!has(rules.gte) && !has(rules.gt) " + - "&& this > rules.lte? \'value must be less" + - " than or equal to %s\'.format([rules.lte]" + - ") : \'\'H\002R\003lte\210\001\001\022\243\007\n\002gt\030\004 \001(\021B\215\007\302H\211\007\n{\n\t" + - "sint32.gt\032n!has(rules.lt) && !has(rules." + - "lte) && this <= rules.gt? \'value must be" + - " greater than %s\'.format([rules.gt]) : \'" + - "\'\n\264\001\n\014sint32.gt_lt\032\243\001has(rules.lt) && ru" + - "les.lt >= rules.gt && (this >= rules.lt " + - "|| this <= rules.gt)? \'value must be gre" + - "ater than %s and less than %s\'.format([r" + - "ules.gt, rules.lt]) : \'\'\n\274\001\n\026sint32.gt_l" + - "t_exclusive\032\241\001has(rules.lt) && rules.lt " + - "< rules.gt && (rules.lt <= this && this " + - "<= rules.gt)? \'value must be greater tha" + - "n %s or less than %s\'.format([rules.gt, " + - "rules.lt]) : \'\'\n\304\001\n\rsint32.gt_lte\032\262\001has(" + - "rules.lte) && rules.lte >= rules.gt && (" + - "this > rules.lte || this <= rules.gt)? \'" + - "value must be greater than %s and less t" + - "han or equal to %s\'.format([rules.gt, ru" + - "les.lte]) : \'\'\n\314\001\n\027sint32.gt_lte_exclusi" + - "ve\032\260\001has(rules.lte) && rules.lte < rules" + - ".gt && (rules.lte < this && this <= rule" + - "s.gt)? \'value must be greater than %s or" + - " less than or equal to %s\'.format([rules" + - ".gt, rules.lte]) : \'\'H\003R\002gt\210\001\001\022\360\007\n\003gte\030\005" + - " \001(\021B\330\007\302H\324\007\n\211\001\n\nsint32.gte\032{!has(rules.l" + - "t) && !has(rules.lte) && this < rules.gt" + - "e? \'value must be greater than or equal " + - "to %s\'.format([rules.gte]) : \'\'\n\303\001\n\rsint" + - "32.gte_lt\032\261\001has(rules.lt) && rules.lt >=" + - " rules.gte && (this >= rules.lt || this " + - "< rules.gte)? \'value must be greater tha" + - "n or equal to %s and less than %s\'.forma" + - "t([rules.gte, rules.lt]) : \'\'\n\313\001\n\027sint32" + - ".gte_lt_exclusive\032\257\001has(rules.lt) && rul" + - "es.lt < rules.gte && (rules.lt <= this &" + - "& this < rules.gte)? \'value must be grea" + - "ter than or equal to %s or less than %s\'" + - ".format([rules.gte, rules.lt]) : \'\'\n\323\001\n\016" + - "sint32.gte_lte\032\300\001has(rules.lte) && rules" + + "gte, rules.lte]) : \'\'H\001R\003gte\022z\n\002in\030\006 \003(\022" + + "Bj\302Hg\ne\n\tsint64.in\032X!(this in dyn(rules)" + + "[\'in\']) ? \'value must be in list %s\'.for" + + "mat([dyn(rules)[\'in\']]) : \'\'R\002in\022~\n\006not_" + + "in\030\007 \003(\022Bg\302Hd\nb\n\rsint64.not_in\032Qthis in " + + "rules.not_in ? \'value must not be in lis" + + "t %s\'.format([rules.not_in]) : \'\'R\005notIn" + + "B\013\n\tless_thanB\016\n\014greater_thanB\010\n\006_const\"" + + "\202\025\n\014Fixed32Rules\022w\n\005const\030\001 \001(\007B\\\302HY\nW\n\r" + + "fixed32.const\032Fthis != rules.const ? \'va" + + "lue must equal %s\'.format([rules.const])" + + " : \'\'H\002R\005const\210\001\001\022\220\001\n\002lt\030\002 \001(\007B~\302H{\ny\n\nf" + + "ixed32.lt\032k!has(rules.gte) && !has(rules" + + ".gt) && this >= rules.lt? \'value must be" + + " less than %s\'.format([rules.lt]) : \'\'H\000" + + "R\002lt\022\243\001\n\003lte\030\003 \001(\007B\216\001\302H\212\001\n\207\001\n\013fixed32.lt" + + "e\032x!has(rules.gte) && !has(rules.gt) && " + + "this > rules.lte? \'value must be less th" + + "an or equal to %s\'.format([rules.lte]) :" + + " \'\'H\000R\003lte\022\245\007\n\002gt\030\004 \001(\007B\222\007\302H\216\007\n|\n\nfixed3" + + "2.gt\032n!has(rules.lt) && !has(rules.lte) " + + "&& this <= rules.gt? \'value must be grea" + + "ter than %s\'.format([rules.gt]) : \'\'\n\265\001\n" + + "\rfixed32.gt_lt\032\243\001has(rules.lt) && rules." + + "lt >= rules.gt && (this >= rules.lt || t" + + "his <= rules.gt)? \'value must be greater" + + " than %s and less than %s\'.format([rules" + + ".gt, rules.lt]) : \'\'\n\275\001\n\027fixed32.gt_lt_e" + + "xclusive\032\241\001has(rules.lt) && rules.lt < r" + + "ules.gt && (rules.lt <= this && this <= " + + "rules.gt)? \'value must be greater than %" + + "s or less than %s\'.format([rules.gt, rul" + + "es.lt]) : \'\'\n\305\001\n\016fixed32.gt_lte\032\262\001has(ru" + + "les.lte) && rules.lte >= rules.gt && (th" + + "is > rules.lte || this <= rules.gt)? \'va" + + "lue must be greater than %s and less tha" + + "n or equal to %s\'.format([rules.gt, rule" + + "s.lte]) : \'\'\n\315\001\n\030fixed32.gt_lte_exclusiv" + + "e\032\260\001has(rules.lte) && rules.lte < rules." + + "gt && (rules.lte < this && this <= rules" + + ".gt)? \'value must be greater than %s or " + + "less than or equal to %s\'.format([rules." + + "gt, rules.lte]) : \'\'H\001R\002gt\022\362\007\n\003gte\030\005 \001(\007" + + "B\335\007\302H\331\007\n\212\001\n\013fixed32.gte\032{!has(rules.lt) " + + "&& !has(rules.lte) && this < rules.gte? " + + "\'value must be greater than or equal to " + + "%s\'.format([rules.gte]) : \'\'\n\304\001\n\016fixed32" + + ".gte_lt\032\261\001has(rules.lt) && rules.lt >= r" + + "ules.gte && (this >= rules.lt || this < " + + "rules.gte)? \'value must be greater than " + + "or equal to %s and less than %s\'.format(" + + "[rules.gte, rules.lt]) : \'\'\n\314\001\n\030fixed32." + + "gte_lt_exclusive\032\257\001has(rules.lt) && rule" + + "s.lt < rules.gte && (rules.lt <= this &&" + + " this < rules.gte)? \'value must be great" + + "er than or equal to %s or less than %s\'." + + "format([rules.gte, rules.lt]) : \'\'\n\324\001\n\017f" + + "ixed32.gte_lte\032\300\001has(rules.lte) && rules" + ".lte >= rules.gte && (this > rules.lte |" + "| this < rules.gte)? \'value must be grea" + "ter than or equal to %s and less than or" + " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'\n\333\001\n\030sint32.gte_lte_exclusive\032\276" + - "\001has(rules.lte) && rules.lte < rules.gte" + - " && (rules.lte < this && this < rules.gt" + - "e)? \'value must be greater than or equal" + - " to %s or less than or equal to %s\'.form" + - "at([rules.gte, rules.lte]) : \'\'H\004R\003gte\210\001" + - "\001\022z\n\002in\030\006 \003(\021Bj\302Hg\ne\n\tsint32.in\032X!(this " + - "in dyn(rules)[\'in\']) ? \'value must be in" + - " list %s\'.format([dyn(rules)[\'in\']]) : \'" + - "\'R\002in\022~\n\006not_in\030\007 \003(\021Bg\302Hd\nb\n\rsint32.not" + + "te]) : \'\'\n\334\001\n\031fixed32.gte_lte_exclusive\032" + + "\276\001has(rules.lte) && rules.lte < rules.gt" + + "e && (rules.lte < this && this < rules.g" + + "te)? \'value must be greater than or equa" + + "l to %s or less than or equal to %s\'.for" + + "mat([rules.gte, rules.lte]) : \'\'H\001R\003gte\022" + + "{\n\002in\030\006 \003(\007Bk\302Hh\nf\n\nfixed32.in\032X!(this i" + + "n dyn(rules)[\'in\']) ? \'value must be in " + + "list %s\'.format([dyn(rules)[\'in\']]) : \'\'" + + "R\002in\022\177\n\006not_in\030\007 \003(\007Bh\302He\nc\n\016fixed32.not" + "_in\032Qthis in rules.not_in ? \'value must " + "not be in list %s\'.format([rules.not_in]" + - ") : \'\'R\005notInB\010\n\006_constB\005\n\003_ltB\006\n\004_lteB\005" + - "\n\003_gtB\006\n\004_gte\"\377\024\n\013SInt64Rules\022v\n\005const\030\001" + - " \001(\022B[\302HX\nV\n\014sint64.const\032Fthis != rules" + - ".const ? \'value must equal %s\'.format([r" + - "ules.const]) : \'\'H\000R\005const\210\001\001\022\222\001\n\002lt\030\002 \001" + - "(\022B}\302Hz\nx\n\tsint64.lt\032k!has(rules.gte) &&" + - " !has(rules.gt) && this >= rules.lt? \'va" + - "lue must be less than %s\'.format([rules." + - "lt]) : \'\'H\001R\002lt\210\001\001\022\245\001\n\003lte\030\003 \001(\022B\215\001\302H\211\001\n" + - "\206\001\n\nsint64.lte\032x!has(rules.gte) && !has(" + + ") : \'\'R\005notInB\013\n\tless_thanB\016\n\014greater_th" + + "anB\010\n\006_const\"\202\025\n\014Fixed64Rules\022w\n\005const\030\001" + + " \001(\006B\\\302HY\nW\n\rfixed64.const\032Fthis != rule" + + "s.const ? \'value must equal %s\'.format([" + + "rules.const]) : \'\'H\002R\005const\210\001\001\022\220\001\n\002lt\030\002 " + + "\001(\006B~\302H{\ny\n\nfixed64.lt\032k!has(rules.gte) " + + "&& !has(rules.gt) && this >= rules.lt? \'" + + "value must be less than %s\'.format([rule" + + "s.lt]) : \'\'H\000R\002lt\022\243\001\n\003lte\030\003 \001(\006B\216\001\302H\212\001\n\207" + + "\001\n\013fixed64.lte\032x!has(rules.gte) && !has(" + "rules.gt) && this > rules.lte? \'value mu" + "st be less than or equal to %s\'.format([" + - "rules.lte]) : \'\'H\002R\003lte\210\001\001\022\243\007\n\002gt\030\004 \001(\022B" + - "\215\007\302H\211\007\n{\n\tsint64.gt\032n!has(rules.lt) && !" + - "has(rules.lte) && this <= rules.gt? \'val" + - "ue must be greater than %s\'.format([rule" + - "s.gt]) : \'\'\n\264\001\n\014sint64.gt_lt\032\243\001has(rules" + - ".lt) && rules.lt >= rules.gt && (this >=" + - " rules.lt || this <= rules.gt)? \'value m" + - "ust be greater than %s and less than %s\'" + - ".format([rules.gt, rules.lt]) : \'\'\n\274\001\n\026s" + - "int64.gt_lt_exclusive\032\241\001has(rules.lt) &&" + + "rules.lte]) : \'\'H\000R\003lte\022\245\007\n\002gt\030\004 \001(\006B\222\007\302" + + "H\216\007\n|\n\nfixed64.gt\032n!has(rules.lt) && !ha" + + "s(rules.lte) && this <= rules.gt? \'value" + + " must be greater than %s\'.format([rules." + + "gt]) : \'\'\n\265\001\n\rfixed64.gt_lt\032\243\001has(rules." + + "lt) && rules.lt >= rules.gt && (this >= " + + "rules.lt || this <= rules.gt)? \'value mu" + + "st be greater than %s and less than %s\'." + + "format([rules.gt, rules.lt]) : \'\'\n\275\001\n\027fi" + + "xed64.gt_lt_exclusive\032\241\001has(rules.lt) &&" + " rules.lt < rules.gt && (rules.lt <= thi" + "s && this <= rules.gt)? \'value must be g" + "reater than %s or less than %s\'.format([" + - "rules.gt, rules.lt]) : \'\'\n\304\001\n\rsint64.gt_" + - "lte\032\262\001has(rules.lte) && rules.lte >= rul" + - "es.gt && (this > rules.lte || this <= ru" + - "les.gt)? \'value must be greater than %s " + - "and less than or equal to %s\'.format([ru" + - "les.gt, rules.lte]) : \'\'\n\314\001\n\027sint64.gt_l" + - "te_exclusive\032\260\001has(rules.lte) && rules.l" + - "te < rules.gt && (rules.lte < this && th" + - "is <= rules.gt)? \'value must be greater " + - "than %s or less than or equal to %s\'.for" + - "mat([rules.gt, rules.lte]) : \'\'H\003R\002gt\210\001\001" + - "\022\360\007\n\003gte\030\005 \001(\022B\330\007\302H\324\007\n\211\001\n\nsint64.gte\032{!h" + + "rules.gt, rules.lt]) : \'\'\n\305\001\n\016fixed64.gt" + + "_lte\032\262\001has(rules.lte) && rules.lte >= ru" + + "les.gt && (this > rules.lte || this <= r" + + "ules.gt)? \'value must be greater than %s" + + " and less than or equal to %s\'.format([r" + + "ules.gt, rules.lte]) : \'\'\n\315\001\n\030fixed64.gt" + + "_lte_exclusive\032\260\001has(rules.lte) && rules" + + ".lte < rules.gt && (rules.lte < this && " + + "this <= rules.gt)? \'value must be greate" + + "r than %s or less than or equal to %s\'.f" + + "ormat([rules.gt, rules.lte]) : \'\'H\001R\002gt\022" + + "\362\007\n\003gte\030\005 \001(\006B\335\007\302H\331\007\n\212\001\n\013fixed64.gte\032{!h" + "as(rules.lt) && !has(rules.lte) && this " + "< rules.gte? \'value must be greater than" + " or equal to %s\'.format([rules.gte]) : \'" + - "\'\n\303\001\n\rsint64.gte_lt\032\261\001has(rules.lt) && r" + - "ules.lt >= rules.gte && (this >= rules.l" + - "t || this < rules.gte)? \'value must be g" + - "reater than or equal to %s and less than" + - " %s\'.format([rules.gte, rules.lt]) : \'\'\n" + - "\313\001\n\027sint64.gte_lt_exclusive\032\257\001has(rules." + - "lt) && rules.lt < rules.gte && (rules.lt" + - " <= this && this < rules.gte)? \'value mu" + - "st be greater than or equal to %s or les" + - "s than %s\'.format([rules.gte, rules.lt])" + - " : \'\'\n\323\001\n\016sint64.gte_lte\032\300\001has(rules.lte" + - ") && rules.lte >= rules.gte && (this > r" + - "ules.lte || this < rules.gte)? \'value mu" + - "st be greater than or equal to %s and le" + - "ss than or equal to %s\'.format([rules.gt" + - "e, rules.lte]) : \'\'\n\333\001\n\030sint64.gte_lte_e" + - "xclusive\032\276\001has(rules.lte) && rules.lte <" + - " rules.gte && (rules.lte < this && this " + - "< rules.gte)? \'value must be greater tha" + - "n or equal to %s or less than or equal t" + - "o %s\'.format([rules.gte, rules.lte]) : \'" + - "\'H\004R\003gte\210\001\001\022z\n\002in\030\006 \003(\022Bj\302Hg\ne\n\tsint64.i" + - "n\032X!(this in dyn(rules)[\'in\']) ? \'value " + - "must be in list %s\'.format([dyn(rules)[\'" + - "in\']]) : \'\'R\002in\022~\n\006not_in\030\007 \003(\022Bg\302Hd\nb\n\r" + - "sint64.not_in\032Qthis in rules.not_in ? \'v" + - "alue must not be in list %s\'.format([rul" + - "es.not_in]) : \'\'R\005notInB\010\n\006_constB\005\n\003_lt" + - "B\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\217\025\n\014Fixed32Rules" + - "\022w\n\005const\030\001 \001(\007B\\\302HY\nW\n\rfixed32.const\032Ft" + - "his != rules.const ? \'value must equal %" + - "s\'.format([rules.const]) : \'\'H\000R\005const\210\001" + - "\001\022\223\001\n\002lt\030\002 \001(\007B~\302H{\ny\n\nfixed32.lt\032k!has(" + - "rules.gte) && !has(rules.gt) && this >= " + - "rules.lt? \'value must be less than %s\'.f" + - "ormat([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\246\001\n\003lte\030" + - "\003 \001(\007B\216\001\302H\212\001\n\207\001\n\013fixed32.lte\032x!has(rules" + - ".gte) && !has(rules.gt) && this > rules." + - "lte? \'value must be less than or equal t" + - "o %s\'.format([rules.lte]) : \'\'H\002R\003lte\210\001\001" + - "\022\250\007\n\002gt\030\004 \001(\007B\222\007\302H\216\007\n|\n\nfixed32.gt\032n!has" + - "(rules.lt) && !has(rules.lte) && this <=" + - " rules.gt? \'value must be greater than %" + - "s\'.format([rules.gt]) : \'\'\n\265\001\n\rfixed32.g" + - "t_lt\032\243\001has(rules.lt) && rules.lt >= rule" + - "s.gt && (this >= rules.lt || this <= rul" + - "es.gt)? \'value must be greater than %s a" + - "nd less than %s\'.format([rules.gt, rules" + - ".lt]) : \'\'\n\275\001\n\027fixed32.gt_lt_exclusive\032\241" + - "\001has(rules.lt) && rules.lt < rules.gt &&" + - " (rules.lt <= this && this <= rules.gt)?" + + "\'\n\304\001\n\016fixed64.gte_lt\032\261\001has(rules.lt) && " + + "rules.lt >= rules.gte && (this >= rules." + + "lt || this < rules.gte)? \'value must be " + + "greater than or equal to %s and less tha" + + "n %s\'.format([rules.gte, rules.lt]) : \'\'" + + "\n\314\001\n\030fixed64.gte_lt_exclusive\032\257\001has(rule" + + "s.lt) && rules.lt < rules.gte && (rules." + + "lt <= this && this < rules.gte)? \'value " + + "must be greater than or equal to %s or l" + + "ess than %s\'.format([rules.gte, rules.lt" + + "]) : \'\'\n\324\001\n\017fixed64.gte_lte\032\300\001has(rules." + + "lte) && rules.lte >= rules.gte && (this " + + "> rules.lte || this < rules.gte)? \'value" + + " must be greater than or equal to %s and" + + " less than or equal to %s\'.format([rules" + + ".gte, rules.lte]) : \'\'\n\334\001\n\031fixed64.gte_l" + + "te_exclusive\032\276\001has(rules.lte) && rules.l" + + "te < rules.gte && (rules.lte < this && t" + + "his < rules.gte)? \'value must be greater" + + " than or equal to %s or less than or equ" + + "al to %s\'.format([rules.gte, rules.lte])" + + " : \'\'H\001R\003gte\022{\n\002in\030\006 \003(\006Bk\302Hh\nf\n\nfixed64" + + ".in\032X!(this in dyn(rules)[\'in\']) ? \'valu" + + "e must be in list %s\'.format([dyn(rules)" + + "[\'in\']]) : \'\'R\002in\022\177\n\006not_in\030\007 \003(\006Bh\302He\nc" + + "\n\016fixed64.not_in\032Qthis in rules.not_in ?" + + " \'value must not be in list %s\'.format([" + + "rules.not_in]) : \'\'R\005notInB\013\n\tless_thanB" + + "\016\n\014greater_thanB\010\n\006_const\"\223\025\n\rSFixed32Ru" + + "les\022x\n\005const\030\001 \001(\017B]\302HZ\nX\n\016sfixed32.cons" + + "t\032Fthis != rules.const ? \'value must equ" + + "al %s\'.format([rules.const]) : \'\'H\002R\005con" + + "st\210\001\001\022\221\001\n\002lt\030\002 \001(\017B\177\302H|\nz\n\013sfixed32.lt\032k" + + "!has(rules.gte) && !has(rules.gt) && thi" + + "s >= rules.lt? \'value must be less than " + + "%s\'.format([rules.lt]) : \'\'H\000R\002lt\022\244\001\n\003lt" + + "e\030\003 \001(\017B\217\001\302H\213\001\n\210\001\n\014sfixed32.lte\032x!has(ru" + + "les.gte) && !has(rules.gt) && this > rul" + + "es.lte? \'value must be less than or equa" + + "l to %s\'.format([rules.lte]) : \'\'H\000R\003lte" + + "\022\252\007\n\002gt\030\004 \001(\017B\227\007\302H\223\007\n}\n\013sfixed32.gt\032n!ha" + + "s(rules.lt) && !has(rules.lte) && this <" + + "= rules.gt? \'value must be greater than " + + "%s\'.format([rules.gt]) : \'\'\n\266\001\n\016sfixed32" + + ".gt_lt\032\243\001has(rules.lt) && rules.lt >= ru" + + "les.gt && (this >= rules.lt || this <= r" + + "ules.gt)? \'value must be greater than %s" + + " and less than %s\'.format([rules.gt, rul" + + "es.lt]) : \'\'\n\276\001\n\030sfixed32.gt_lt_exclusiv" + + "e\032\241\001has(rules.lt) && rules.lt < rules.gt" + + " && (rules.lt <= this && this <= rules.g" + + "t)? \'value must be greater than %s or le" + + "ss than %s\'.format([rules.gt, rules.lt])" + + " : \'\'\n\306\001\n\017sfixed32.gt_lte\032\262\001has(rules.lt" + + "e) && rules.lte >= rules.gt && (this > r" + + "ules.lte || this <= rules.gt)? \'value mu" + + "st be greater than %s and less than or e" + + "qual to %s\'.format([rules.gt, rules.lte]" + + ") : \'\'\n\316\001\n\031sfixed32.gt_lte_exclusive\032\260\001h" + + "as(rules.lte) && rules.lte < rules.gt &&" + + " (rules.lte < this && this <= rules.gt)?" + " \'value must be greater than %s or less " + + "than or equal to %s\'.format([rules.gt, r" + + "ules.lte]) : \'\'H\001R\002gt\022\367\007\n\003gte\030\005 \001(\017B\342\007\302H" + + "\336\007\n\213\001\n\014sfixed32.gte\032{!has(rules.lt) && !" + + "has(rules.lte) && this < rules.gte? \'val" + + "ue must be greater than or equal to %s\'." + + "format([rules.gte]) : \'\'\n\305\001\n\017sfixed32.gt" + + "e_lt\032\261\001has(rules.lt) && rules.lt >= rule" + + "s.gte && (this >= rules.lt || this < rul" + + "es.gte)? \'value must be greater than or " + + "equal to %s and less than %s\'.format([ru" + + "les.gte, rules.lt]) : \'\'\n\315\001\n\031sfixed32.gt" + + "e_lt_exclusive\032\257\001has(rules.lt) && rules." + + "lt < rules.gte && (rules.lt <= this && t" + + "his < rules.gte)? \'value must be greater" + + " than or equal to %s or less than %s\'.fo" + + "rmat([rules.gte, rules.lt]) : \'\'\n\325\001\n\020sfi" + + "xed32.gte_lte\032\300\001has(rules.lte) && rules." + + "lte >= rules.gte && (this > rules.lte ||" + + " this < rules.gte)? \'value must be great" + + "er than or equal to %s and less than or " + + "equal to %s\'.format([rules.gte, rules.lt" + + "e]) : \'\'\n\335\001\n\032sfixed32.gte_lte_exclusive\032" + + "\276\001has(rules.lte) && rules.lte < rules.gt" + + "e && (rules.lte < this && this < rules.g" + + "te)? \'value must be greater than or equa" + + "l to %s or less than or equal to %s\'.for" + + "mat([rules.gte, rules.lte]) : \'\'H\001R\003gte\022" + + "|\n\002in\030\006 \003(\017Bl\302Hi\ng\n\013sfixed32.in\032X!(this " + + "in dyn(rules)[\'in\']) ? \'value must be in" + + " list %s\'.format([dyn(rules)[\'in\']]) : \'" + + "\'R\002in\022\200\001\n\006not_in\030\007 \003(\017Bi\302Hf\nd\n\017sfixed32." + + "not_in\032Qthis in rules.not_in ? \'value mu" + + "st not be in list %s\'.format([rules.not_" + + "in]) : \'\'R\005notInB\013\n\tless_thanB\016\n\014greater" + + "_thanB\010\n\006_const\"\223\025\n\rSFixed64Rules\022x\n\005con" + + "st\030\001 \001(\020B]\302HZ\nX\n\016sfixed64.const\032Fthis !=" + + " rules.const ? \'value must equal %s\'.for" + + "mat([rules.const]) : \'\'H\002R\005const\210\001\001\022\221\001\n\002" + + "lt\030\002 \001(\020B\177\302H|\nz\n\013sfixed64.lt\032k!has(rules" + + ".gte) && !has(rules.gt) && this >= rules" + + ".lt? \'value must be less than %s\'.format" + + "([rules.lt]) : \'\'H\000R\002lt\022\244\001\n\003lte\030\003 \001(\020B\217\001" + + "\302H\213\001\n\210\001\n\014sfixed64.lte\032x!has(rules.gte) &" + + "& !has(rules.gt) && this > rules.lte? \'v" + + "alue must be less than or equal to %s\'.f" + + "ormat([rules.lte]) : \'\'H\000R\003lte\022\252\007\n\002gt\030\004 " + + "\001(\020B\227\007\302H\223\007\n}\n\013sfixed64.gt\032n!has(rules.lt" + + ") && !has(rules.lte) && this <= rules.gt" + + "? \'value must be greater than %s\'.format", + "([rules.gt]) : \'\'\n\266\001\n\016sfixed64.gt_lt\032\243\001h" + + "as(rules.lt) && rules.lt >= rules.gt && " + + "(this >= rules.lt || this <= rules.gt)? " + + "\'value must be greater than %s and less " + "than %s\'.format([rules.gt, rules.lt]) : " + - "\'\'\n\305\001\n\016fixed32.gt_lte\032\262\001has(rules.lte) &" + - "& rules.lte >= rules.gt && (this > rules" + - ".lte || this <= rules.gt)? \'value must b" + - "e greater than %s and less than or equal" + - " to %s\'.format([rules.gt, rules.lte]) : " + - "\'\'\n\315\001\n\030fixed32.gt_lte_exclusive\032\260\001has(ru" + - "les.lte) && rules.lte < rules.gt && (rul" + - "es.lte < this && this <= rules.gt)? \'val" + - "ue must be greater than %s or less than " + - "or equal to %s\'.format([rules.gt, rules." + - "lte]) : \'\'H\003R\002gt\210\001\001\022\365\007\n\003gte\030\005 \001(\007B\335\007\302H\331\007" + - "\n\212\001\n\013fixed32.gte\032{!has(rules.lt) && !has" + - "(rules.lte) && this < rules.gte? \'value " + - "must be greater than or equal to %s\'.for" + - "mat([rules.gte]) : \'\'\n\304\001\n\016fixed32.gte_lt" + + "\'\'\n\276\001\n\030sfixed64.gt_lt_exclusive\032\241\001has(ru" + + "les.lt) && rules.lt < rules.gt && (rules" + + ".lt <= this && this <= rules.gt)? \'value" + + " must be greater than %s or less than %s" + + "\'.format([rules.gt, rules.lt]) : \'\'\n\306\001\n\017" + + "sfixed64.gt_lte\032\262\001has(rules.lte) && rule" + + "s.lte >= rules.gt && (this > rules.lte |" + + "| this <= rules.gt)? \'value must be grea" + + "ter than %s and less than or equal to %s" + + "\'.format([rules.gt, rules.lte]) : \'\'\n\316\001\n" + + "\031sfixed64.gt_lte_exclusive\032\260\001has(rules.l" + + "te) && rules.lte < rules.gt && (rules.lt" + + "e < this && this <= rules.gt)? \'value mu" + + "st be greater than %s or less than or eq" + + "ual to %s\'.format([rules.gt, rules.lte])" + + " : \'\'H\001R\002gt\022\367\007\n\003gte\030\005 \001(\020B\342\007\302H\336\007\n\213\001\n\014sfi" + + "xed64.gte\032{!has(rules.lt) && !has(rules." + + "lte) && this < rules.gte? \'value must be" + + " greater than or equal to %s\'.format([ru" + + "les.gte]) : \'\'\n\305\001\n\017sfixed64.gte_lt\032\261\001has" + + "(rules.lt) && rules.lt >= rules.gte && (" + + "this >= rules.lt || this < rules.gte)? \'" + + "value must be greater than or equal to %" + + "s and less than %s\'.format([rules.gte, r" + + "ules.lt]) : \'\'\n\315\001\n\031sfixed64.gte_lt_exclu" + + "sive\032\257\001has(rules.lt) && rules.lt < rules" + + ".gte && (rules.lt <= this && this < rule" + + "s.gte)? \'value must be greater than or e" + + "qual to %s or less than %s\'.format([rule" + + "s.gte, rules.lt]) : \'\'\n\325\001\n\020sfixed64.gte_" + + "lte\032\300\001has(rules.lte) && rules.lte >= rul" + + "es.gte && (this > rules.lte || this < ru" + + "les.gte)? \'value must be greater than or" + + " equal to %s and less than or equal to %" + + "s\'.format([rules.gte, rules.lte]) : \'\'\n\335" + + "\001\n\032sfixed64.gte_lte_exclusive\032\276\001has(rule" + + "s.lte) && rules.lte < rules.gte && (rule" + + "s.lte < this && this < rules.gte)? \'valu" + + "e must be greater than or equal to %s or" + + " less than or equal to %s\'.format([rules" + + ".gte, rules.lte]) : \'\'H\001R\003gte\022|\n\002in\030\006 \003(" + + "\020Bl\302Hi\ng\n\013sfixed64.in\032X!(this in dyn(rul" + + "es)[\'in\']) ? \'value must be in list %s\'." + + "format([dyn(rules)[\'in\']]) : \'\'R\002in\022\200\001\n\006" + + "not_in\030\007 \003(\020Bi\302Hf\nd\n\017sfixed64.not_in\032Qth" + + "is in rules.not_in ? \'value must not be " + + "in list %s\'.format([rules.not_in]) : \'\'R" + + "\005notInB\013\n\tless_thanB\016\n\014greater_thanB\010\n\006_" + + "const\"\213\001\n\tBoolRules\022t\n\005const\030\001 \001(\010BY\302HV\n" + + "T\n\nbool.const\032Fthis != rules.const ? \'va" + + "lue must equal %s\'.format([rules.const])" + + " : \'\'H\000R\005const\210\001\001B\010\n\006_const\"\274\036\n\013StringRu" + + "les\022x\n\005const\030\001 \001(\tB]\302HZ\nX\n\014string.const\032" + + "Hthis != rules.const ? \'value must equal" + + " `%s`\'.format([rules.const]) : \'\'H\001R\005con" + + "st\210\001\001\022\210\001\n\003len\030\023 \001(\004Bq\302Hn\nl\n\nstring.len\032^" + + "uint(this.size()) != rules.len ? \'value " + + "length must be %s characters\'.format([ru" + + "les.len]) : \'\'H\002R\003len\210\001\001\022\246\001\n\007min_len\030\002 \001" + + "(\004B\207\001\302H\203\001\n\200\001\n\016string.min_len\032nuint(this." + + "size()) < rules.min_len ? \'value length " + + "must be at least %s characters\'.format([" + + "rules.min_len]) : \'\'H\003R\006minLen\210\001\001\022\244\001\n\007ma" + + "x_len\030\003 \001(\004B\205\001\302H\201\001\n\177\n\016string.max_len\032mui" + + "nt(this.size()) > rules.max_len ? \'value" + + " length must be at most %s characters\'.f" + + "ormat([rules.max_len]) : \'\'H\004R\006maxLen\210\001\001" + + "\022\252\001\n\tlen_bytes\030\024 \001(\004B\207\001\302H\203\001\n\200\001\n\020string.l" + + "en_bytes\032luint(bytes(this).size()) != ru" + + "les.len_bytes ? \'value length must be %s" + + " bytes\'.format([rules.len_bytes]) : \'\'H\005" + + "R\010lenBytes\210\001\001\022\262\001\n\tmin_bytes\030\004 \001(\004B\217\001\302H\213\001" + + "\n\210\001\n\020string.min_bytes\032tuint(bytes(this)." + + "size()) < rules.min_bytes ? \'value lengt" + + "h must be at least %s bytes\'.format([rul" + + "es.min_bytes]) : \'\'H\006R\010minBytes\210\001\001\022\261\001\n\tm" + + "ax_bytes\030\005 \001(\004B\216\001\302H\212\001\n\207\001\n\020string.max_byt" + + "es\032suint(bytes(this).size()) > rules.max" + + "_bytes ? \'value length must be at most %" + + "s bytes\'.format([rules.max_bytes]) : \'\'H" + + "\007R\010maxBytes\210\001\001\022\233\001\n\007pattern\030\006 \001(\tB|\302Hy\nw\n" + + "\016string.pattern\032e!this.matches(rules.pat" + + "tern) ? \'value does not match regex patt" + + "ern `%s`\'.format([rules.pattern]) : \'\'H\010" + + "R\007pattern\210\001\001\022\221\001\n\006prefix\030\007 \001(\tBt\302Hq\no\n\rst" + + "ring.prefix\032^!this.startsWith(rules.pref" + + "ix) ? \'value does not have prefix `%s`\'." + + "format([rules.prefix]) : \'\'H\tR\006prefix\210\001\001" + + "\022\217\001\n\006suffix\030\010 \001(\tBr\302Ho\nm\n\rstring.suffix\032" + + "\\!this.endsWith(rules.suffix) ? \'value d" + + "oes not have suffix `%s`\'.format([rules." + + "suffix]) : \'\'H\nR\006suffix\210\001\001\022\237\001\n\010contains\030" + + "\t \001(\tB~\302H{\ny\n\017string.contains\032f!this.con" + + "tains(rules.contains) ? \'value does not " + + "contain substring `%s`\'.format([rules.co" + + "ntains]) : \'\'H\013R\010contains\210\001\001\022\252\001\n\014not_con" + + "tains\030\027 \001(\tB\201\001\302H~\n|\n\023string.not_contains" + + "\032ethis.contains(rules.not_contains) ? \'v" + + "alue contains substring `%s`\'.format([ru" + + "les.not_contains]) : \'\'H\014R\013notContains\210\001" + + "\001\022z\n\002in\030\n \003(\tBj\302Hg\ne\n\tstring.in\032X!(this " + + "in dyn(rules)[\'in\']) ? \'value must be in" + + " list %s\'.format([dyn(rules)[\'in\']]) : \'" + + "\'R\002in\022~\n\006not_in\030\013 \003(\tBg\302Hd\nb\n\rstring.not" + + "_in\032Qthis in rules.not_in ? \'value must " + + "not be in list %s\'.format([rules.not_in]" + + ") : \'\'R\005notIn\022`\n\005email\030\014 \001(\010BH\302HE\nC\n\014str" + + "ing.email\022#value must be a valid email a" + + "ddress\032\016this.isEmail()H\000R\005email\022g\n\010hostn" + + "ame\030\r \001(\010BI\302HF\nD\n\017string.hostname\022\036value" + + " must be a valid hostname\032\021this.isHostna" + + "me()H\000R\010hostname\022Q\n\002ip\030\016 \001(\010B?\302H<\n:\n\tstr" + + "ing.ip\022 value must be a valid IP address" + + "\032\013this.isIp()H\000R\002ip\022Z\n\004ipv4\030\017 \001(\010BD\302HA\n?" + + "\n\013string.ipv4\022\"value must be a valid IPv" + + "4 address\032\014this.isIp(4)H\000R\004ipv4\022Z\n\004ipv6\030" + + "\020 \001(\010BD\302HA\n?\n\013string.ipv6\022\"value must be" + + " a valid IPv6 address\032\014this.isIp(6)H\000R\004i" + + "pv6\022N\n\003uri\030\021 \001(\010B:\302H7\n5\n\nstring.uri\022\031val" + + "ue must be a valid URI\032\014this.isUri()H\000R\003" + + "uri\022\\\n\007uri_ref\030\022 \001(\010BA\302H>\n<\n\016string.uri_" + + "ref\022\031value must be a valid URI\032\017this.isU" + + "riRef()H\000R\006uriRef\022\202\001\n\007address\030\025 \001(\010Bf\302Hc" + + "\na\n\016string.address\022-value must be a vali" + + "d hostname, or ip address\032 this.isHostna" + + "me() || this.isIp()H\000R\007address\022\260\001\n\004uuid\030" + + "\026 \001(\010B\231\001\302H\225\001\n\222\001\n\013string.uuid\032\202\001!this.mat" + + "ches(\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-" + + "9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{1" + + "2}$\') ? \'value must be a valid UUID\' : \'" + + "\'H\000R\004uuid\022\254\004\n\020well_known_regex\030\030 \001(\0162\030.b" + + "uf.validate.KnownRegexB\345\003\302H\341\003\n\353\001\n#string" + + ".well_known_regex.header_name\032\303\001rules.we" + + "ll_known_regex == 1 && !this.matches(!ha" + + "s(rules.strict) || rules.strict ?\'^:?[0-" + + "9a-zA-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[^\\u00" + + "00\\u000A\\u000D]+$\') ? \'value must be a v" + + "alid HTTP header name\' : \'\'\n\360\001\n$string.w" + + "ell_known_regex.header_value\032\307\001rules.wel" + + "l_known_regex == 2 && !this.matches(!has" + + "(rules.strict) || rules.strict ?\'^[^\\u00" + + "00-\\u0008\\u000A-\\u001F\\u007F]*$\' :\'^[^\\u" + + "0000\\u000A\\u000D]*$\') ? \'value must be a" + + " valid HTTP header value\' : \'\'H\000R\016wellKn" + + "ownRegex\022\033\n\006strict\030\031 \001(\010H\rR\006strict\210\001\001B\014\n" + + "\nwell_knownB\010\n\006_constB\006\n\004_lenB\n\n\010_min_le" + + "nB\n\n\010_max_lenB\014\n\n_len_bytesB\014\n\n_min_byte" + + "sB\014\n\n_max_bytesB\n\n\010_patternB\t\n\007_prefixB\t" + + "\n\007_suffixB\013\n\t_containsB\017\n\r_not_containsB" + + "\t\n\007_strict\"\332\016\n\nBytesRules\022r\n\005const\030\001 \001(\014" + + "BW\302HT\nR\n\013bytes.const\032Cthis != rules.cons" + + "t ? \'value must be %x\'.format([rules.con" + + "st]) : \'\'H\001R\005const\210\001\001\022\202\001\n\003len\030\r \001(\004Bk\302Hh" + + "\nf\n\tbytes.len\032Yuint(this.size()) != rule" + + "s.len ? \'value length must be %s bytes\'." + + "format([rules.len]) : \'\'H\002R\003len\210\001\001\022\235\001\n\007m" + + "in_len\030\002 \001(\004B\177\302H|\nz\n\rbytes.min_len\032iuint" + + "(this.size()) < rules.min_len ? \'value l" + + "ength must be at least %s bytes\'.format(" + + "[rules.min_len]) : \'\'H\003R\006minLen\210\001\001\022\225\001\n\007m" + + "ax_len\030\003 \001(\004Bw\302Ht\nr\n\rbytes.max_len\032auint" + + "(this.size()) > rules.max_len ? \'value m" + + "ust be at most %s bytes\'.format([rules.m" + + "ax_len]) : \'\'H\004R\006maxLen\210\001\001\022\236\001\n\007pattern\030\004" + + " \001(\tB\177\302H|\nz\n\rbytes.pattern\032i!string(this" + + ").matches(rules.pattern) ? \'value must m" + + "atch regex pattern `%s`\'.format([rules.p" + + "attern]) : \'\'H\005R\007pattern\210\001\001\022\216\001\n\006prefix\030\005" + + " \001(\014Bq\302Hn\nl\n\014bytes.prefix\032\\!this.startsW" + + "ith(rules.prefix) ? \'value does not have" + + " prefix %x\'.format([rules.prefix]) : \'\'H" + + "\006R\006prefix\210\001\001\022\214\001\n\006suffix\030\006 \001(\014Bo\302Hl\nj\n\014by" + + "tes.suffix\032Z!this.endsWith(rules.suffix)" + + " ? \'value does not have suffix %x\'.forma" + + "t([rules.suffix]) : \'\'H\007R\006suffix\210\001\001\022\222\001\n\010" + + "contains\030\007 \001(\014Bq\302Hn\nl\n\016bytes.contains\032Z!" + + "this.contains(rules.contains) ? \'value d" + + "oes not contain %x\'.format([rules.contai" + + "ns]) : \'\'H\010R\010contains\210\001\001\022\233\001\n\002in\030\010 \003(\014B\212\001" + + "\302H\206\001\n\203\001\n\010bytes.in\032wdyn(rules)[\'in\'].size" + + "() > 0 && !(this in dyn(rules)[\'in\']) ? " + + "\'value must be in list %s\'.format([dyn(r" + + "ules)[\'in\']]) : \'\'R\002in\022}\n\006not_in\030\t \003(\014Bf" + + "\302Hc\na\n\014bytes.not_in\032Qthis in rules.not_i" + + "n ? \'value must not be in list %s\'.forma" + + "t([rules.not_in]) : \'\'R\005notIn\022r\n\002ip\030\n \001(" + + "\010B`\302H]\n[\n\010bytes.ip\032Othis.size() != 4 && " + + "this.size() != 16 ? \'value must be a val" + + "id IP address\' : \'\'H\000R\002ip\022e\n\004ipv4\030\013 \001(\010B" + + "O\302HL\nJ\n\nbytes.ipv4\032 rules.max_items ? \'value must co" + + "ntain no more than %s item(s)\'.format([r" + + "ules.max_items]) : \'\'H\001R\010maxItems\210\001\001\022l\n\006" + + "unique\030\003 \001(\010BO\302HL\nJ\n\017repeated.unique\022(re" + + "peated value must contain unique items\032\r" + + "this.unique()H\002R\006unique\210\001\001\0229\n\005items\030\004 \001(" + + "\0132\036.buf.validate.FieldConstraintsH\003R\005ite" + + "ms\210\001\001B\014\n\n_min_itemsB\014\n\n_max_itemsB\t\n\007_un" + + "iqueB\010\n\006_items\"\361\003\n\010MapRules\022\236\001\n\tmin_pair" + + "s\030\001 \001(\004B|\302Hy\nw\n\rmap.min_pairs\032fuint(this" + + ".size()) < rules.min_pairs ? \'map must b" + + "e at least %d entries\'.format([rules.min" + + "_pairs]) : \'\'H\000R\010minPairs\210\001\001\022\235\001\n\tmax_pai" + + "rs\030\002 \001(\004B{\302Hx\nv\n\rmap.max_pairs\032euint(thi" + + "s.size()) > rules.max_pairs ? \'map must " + + "be at most %d entries\'.format([rules.max" + + "_pairs]) : \'\'H\001R\010maxPairs\210\001\001\0227\n\004keys\030\004 \001" + + "(\0132\036.buf.validate.FieldConstraintsH\002R\004ke" + + "ys\210\001\001\022;\n\006values\030\005 \001(\0132\036.buf.validate.Fie" + + "ldConstraintsH\003R\006values\210\001\001B\014\n\n_min_pairs" + + "B\014\n\n_max_pairsB\007\n\005_keysB\t\n\007_values\"1\n\010An" + + "yRules\022\016\n\002in\030\002 \003(\tR\002in\022\025\n\006not_in\030\003 \003(\tR\005" + + "notIn\"\322\026\n\rDurationRules\022\223\001\n\005const\030\002 \001(\0132" + + "\031.google.protobuf.DurationB]\302HZ\nX\n\016durat" + + "ion.const\032Fthis != rules.const ? \'value " + + "must equal %s\'.format([rules.const]) : \'" + + "\'H\002R\005const\210\001\001\022\254\001\n\002lt\030\003 \001(\0132\031.google.prot" + + "obuf.DurationB\177\302H|\nz\n\013duration.lt\032k!has(" + + "rules.gte) && !has(rules.gt) && this >= " + + "rules.lt? \'value must be less than %s\'.f" + + "ormat([rules.lt]) : \'\'H\000R\002lt\022\277\001\n\003lte\030\004 \001" + + "(\0132\031.google.protobuf.DurationB\217\001\302H\213\001\n\210\001\n" + + "\014duration.lte\032x!has(rules.gte) && !has(r" + + "ules.gt) && this > rules.lte? \'value mus" + + "t be less than or equal to %s\'.format([r" + + "ules.lte]) : \'\'H\000R\003lte\022\305\007\n\002gt\030\005 \001(\0132\031.go" + + "ogle.protobuf.DurationB\227\007\302H\223\007\n}\n\013duratio" + + "n.gt\032n!has(rules.lt) && !has(rules.lte) " + + "&& this <= rules.gt? \'value must be grea" + + "ter than %s\'.format([rules.gt]) : \'\'\n\266\001\n" + + "\016duration.gt_lt\032\243\001has(rules.lt) && rules" + + ".lt >= rules.gt && (this >= rules.lt || " + + "this <= rules.gt)? \'value must be greate" + + "r than %s and less than %s\'.format([rule" + + "s.gt, rules.lt]) : \'\'\n\276\001\n\030duration.gt_lt" + + "_exclusive\032\241\001has(rules.lt) && rules.lt <" + + " rules.gt && (rules.lt <= this && this <" + + "= rules.gt)? \'value must be greater than" + + " %s or less than %s\'.format([rules.gt, r" + + "ules.lt]) : \'\'\n\306\001\n\017duration.gt_lte\032\262\001has" + + "(rules.lte) && rules.lte >= rules.gt && " + + "(this > rules.lte || this <= rules.gt)? " + + "\'value must be greater than %s and less " + + "than or equal to %s\'.format([rules.gt, r" + + "ules.lte]) : \'\'\n\316\001\n\031duration.gt_lte_excl" + + "usive\032\260\001has(rules.lte) && rules.lte < ru" + + "les.gt && (rules.lte < this && this <= r" + + "ules.gt)? \'value must be greater than %s" + + " or less than or equal to %s\'.format([ru" + + "les.gt, rules.lte]) : \'\'H\001R\002gt\022\222\010\n\003gte\030\006" + + " \001(\0132\031.google.protobuf.DurationB\342\007\302H\336\007\n\213" + + "\001\n\014duration.gte\032{!has(rules.lt) && !has(" + + "rules.lte) && this < rules.gte? \'value m" + + "ust be greater than or equal to %s\'.form" + + "at([rules.gte]) : \'\'\n\305\001\n\017duration.gte_lt" + "\032\261\001has(rules.lt) && rules.lt >= rules.gt" + "e && (this >= rules.lt || this < rules.g" + "te)? \'value must be greater than or equa" + "l to %s and less than %s\'.format([rules." + - "gte, rules.lt]) : \'\'\n\314\001\n\030fixed32.gte_lt_" + - "exclusive\032\257\001has(rules.lt) && rules.lt < " + - "rules.gte && (rules.lt <= this && this <" + - " rules.gte)? \'value must be greater than" + - " or equal to %s or less than %s\'.format(" + - "[rules.gte, rules.lt]) : \'\'\n\324\001\n\017fixed32." + - "gte_lte\032\300\001has(rules.lte) && rules.lte >=" + - " rules.gte && (this > rules.lte || this " + + "gte, rules.lt]) : \'\'\n\315\001\n\031duration.gte_lt" + + "_exclusive\032\257\001has(rules.lt) && rules.lt <" + + " rules.gte && (rules.lt <= this && this " + "< rules.gte)? \'value must be greater tha" + - "n or equal to %s and less than or equal " + - "to %s\'.format([rules.gte, rules.lte]) : " + - "\'\'\n\334\001\n\031fixed32.gte_lte_exclusive\032\276\001has(r" + - "ules.lte) && rules.lte < rules.gte && (r" + - "ules.lte < this && this < rules.gte)? \'v" + - "alue must be greater than or equal to %s" + - " or less than or equal to %s\'.format([ru" + - "les.gte, rules.lte]) : \'\'H\004R\003gte\210\001\001\022{\n\002i" + - "n\030\006 \003(\007Bk\302Hh\nf\n\nfixed32.in\032X!(this in dy" + - "n(rules)[\'in\']) ? \'value must be in list" + - " %s\'.format([dyn(rules)[\'in\']]) : \'\'R\002in" + - "\022\177\n\006not_in\030\007 \003(\007Bh\302He\nc\n\016fixed32.not_in\032" + - "Qthis in rules.not_in ? \'value must not " + - "be in list %s\'.format([rules.not_in]) : " + - "\'\'R\005notInB\010\n\006_constB\005\n\003_ltB\006\n\004_lteB\005\n\003_g" + - "tB\006\n\004_gte\"\217\025\n\014Fixed64Rules\022w\n\005const\030\001 \001(" + - "\006B\\\302HY\nW\n\rfixed64.const\032Fthis != rules.c" + - "onst ? \'value must equal %s\'.format([rul" + - "es.const]) : \'\'H\000R\005const\210\001\001\022\223\001\n\002lt\030\002 \001(\006" + - "B~\302H{\ny\n\nfixed64.lt\032k!has(rules.gte) && " + - "!has(rules.gt) && this >= rules.lt? \'val" + - "ue must be less than %s\'.format([rules.l" + - "t]) : \'\'H\001R\002lt\210\001\001\022\246\001\n\003lte\030\003 \001(\006B\216\001\302H\212\001\n\207" + - "\001\n\013fixed64.lte\032x!has(rules.gte) && !has(" + - "rules.gt) && this > rules.lte? \'value mu" + - "st be less than or equal to %s\'.format([" + - "rules.lte]) : \'\'H\002R\003lte\210\001\001\022\250\007\n\002gt\030\004 \001(\006B" + - "\222\007\302H\216\007\n|\n\nfixed64.gt\032n!has(rules.lt) && " + - "!has(rules.lte) && this <= rules.gt? \'va" + - "lue must be greater than %s\'.format([rul" + - "es.gt]) : \'\'\n\265\001\n\rfixed64.gt_lt\032\243\001has(rul" + - "es.lt) && rules.lt >= rules.gt && (this " + - ">= rules.lt || this <= rules.gt)? \'value" + - " must be greater than %s and less than %" + - "s\'.format([rules.gt, rules.lt]) : \'\'\n\275\001\n" + - "\027fixed64.gt_lt_exclusive\032\241\001has(rules.lt)" + - " && rules.lt < rules.gt && (rules.lt <= " + - "this && this <= rules.gt)? \'value must b" + - "e greater than %s or less than %s\'.forma" + - "t([rules.gt, rules.lt]) : \'\'\n\305\001\n\016fixed64" + + "n or equal to %s or less than %s\'.format" + + "([rules.gte, rules.lt]) : \'\'\n\325\001\n\020duratio" + + "n.gte_lte\032\300\001has(rules.lte) && rules.lte " + + ">= rules.gte && (this > rules.lte || thi" + + "s < rules.gte)? \'value must be greater t" + + "han or equal to %s and less than or equa" + + "l to %s\'.format([rules.gte, rules.lte]) " + + ": \'\'\n\335\001\n\032duration.gte_lte_exclusive\032\276\001ha" + + "s(rules.lte) && rules.lte < rules.gte &&" + + " (rules.lte < this && this < rules.gte)?" + + " \'value must be greater than or equal to" + + " %s or less than or equal to %s\'.format(" + + "[rules.gte, rules.lte]) : \'\'H\001R\003gte\022\227\001\n\002" + + "in\030\007 \003(\0132\031.google.protobuf.DurationBl\302Hi" + + "\ng\n\013duration.in\032X!(this in dyn(rules)[\'i" + + "n\']) ? \'value must be in list %s\'.format" + + "([dyn(rules)[\'in\']]) : \'\'R\002in\022\233\001\n\006not_in" + + "\030\010 \003(\0132\031.google.protobuf.DurationBi\302Hf\nd" + + "\n\017duration.not_in\032Qthis in rules.not_in " + + "? \'value must not be in list %s\'.format(" + + "[rules.not_in]) : \'\'R\005notInB\013\n\tless_than" + + "B\016\n\014greater_thanB\010\n\006_const\"\312\027\n\016Timestamp" + + "Rules\022\225\001\n\005const\030\002 \001(\0132\032.google.protobuf." + + "TimestampB^\302H[\nY\n\017timestamp.const\032Fthis " + + "!= rules.const ? \'value must equal %s\'.f" + + "ormat([rules.const]) : \'\'H\002R\005const\210\001\001\022\257\001" + + "\n\002lt\030\003 \001(\0132\032.google.protobuf.TimestampB\200" + + "\001\302H}\n{\n\014timestamp.lt\032k!has(rules.gte) &&" + + " !has(rules.gt) && this >= rules.lt? \'va" + + "lue must be less than %s\'.format([rules." + + "lt]) : \'\'H\000R\002lt\022\301\001\n\003lte\030\004 \001(\0132\032.google.p" + + "rotobuf.TimestampB\220\001\302H\214\001\n\211\001\n\rtimestamp.l" + + "te\032x!has(rules.gte) && !has(rules.gt) &&" + + " this > rules.lte? \'value must be less t" + + "han or equal to %s\'.format([rules.lte]) " + + ": \'\'H\000R\003lte\022a\n\006lt_now\030\007 \001(\010BH\302HE\nC\n\020time" + + "stamp.lt_now\032/this > now ? \'value must b" + + "e less than now\' : \'\'H\000R\005ltNow\022\313\007\n\002gt\030\005 " + + "\001(\0132\032.google.protobuf.TimestampB\234\007\302H\230\007\n~" + + "\n\014timestamp.gt\032n!has(rules.lt) && !has(r" + + "ules.lte) && this <= rules.gt? \'value mu" + + "st be greater than %s\'.format([rules.gt]" + + ") : \'\'\n\267\001\n\017timestamp.gt_lt\032\243\001has(rules.l" + + "t) && rules.lt >= rules.gt && (this >= r" + + "ules.lt || this <= rules.gt)? \'value mus" + + "t be greater than %s and less than %s\'.f" + + "ormat([rules.gt, rules.lt]) : \'\'\n\277\001\n\031tim" + + "estamp.gt_lt_exclusive\032\241\001has(rules.lt) &" + + "& rules.lt < rules.gt && (rules.lt <= th" + + "is && this <= rules.gt)? \'value must be " + + "greater than %s or less than %s\'.format(" + + "[rules.gt, rules.lt]) : \'\'\n\307\001\n\020timestamp" + ".gt_lte\032\262\001has(rules.lte) && rules.lte >=" + " rules.gt && (this > rules.lte || this <" + "= rules.gt)? \'value must be greater than" + " %s and less than or equal to %s\'.format" + - "([rules.gt, rules.lte]) : \'\'\n\315\001\n\030fixed64" + - ".gt_lte_exclusive\032\260\001has(rules.lte) && ru" + - "les.lte < rules.gt && (rules.lte < this " + - "&& this <= rules.gt)? \'value must be gre" + - "ater than %s or less than or equal to %s" + - "\'.format([rules.gt, rules.lte]) : \'\'H\003R\002" + - "gt\210\001\001\022\365\007\n\003gte\030\005 \001(\006B\335\007\302H\331\007\n\212\001\n\013fixed64.g" + - "te\032{!has(rules.lt) && !has(rules.lte) &&" + - " this < rules.gte? \'value must be greate" + - "r than or equal to %s\'.format([rules.gte" + - "]) : \'\'\n\304\001\n\016fixed64.gte_lt\032\261\001has(rules.l" + - "t) && rules.lt >= rules.gte && (this >= " + - "rules.lt || this < rules.gte)? \'value mu" + - "st be greater than or equal to %s and le" + + "([rules.gt, rules.lte]) : \'\'\n\317\001\n\032timesta" + + "mp.gt_lte_exclusive\032\260\001has(rules.lte) && " + + "rules.lte < rules.gt && (rules.lte < thi" + + "s && this <= rules.gt)? \'value must be g" + + "reater than %s or less than or equal to " + + "%s\'.format([rules.gt, rules.lte]) : \'\'H\001" + + "R\002gt\022\230\010\n\003gte\030\006 \001(\0132\032.google.protobuf.Tim" + + "estampB\347\007\302H\343\007\n\214\001\n\rtimestamp.gte\032{!has(ru" + + "les.lt) && !has(rules.lte) && this < rul" + + "es.gte? \'value must be greater than or e" + + "qual to %s\'.format([rules.gte]) : \'\'\n\306\001\n" + + "\020timestamp.gte_lt\032\261\001has(rules.lt) && rul" + + "es.lt >= rules.gte && (this >= rules.lt " + + "|| this < rules.gte)? \'value must be gre" + + "ater than or equal to %s and less than %" + + "s\'.format([rules.gte, rules.lt]) : \'\'\n\316\001" + + "\n\032timestamp.gte_lt_exclusive\032\257\001has(rules" + + ".lt) && rules.lt < rules.gte && (rules.l" + + "t <= this && this < rules.gte)? \'value m" + + "ust be greater than or equal to %s or le" + "ss than %s\'.format([rules.gte, rules.lt]" + - ") : \'\'\n\314\001\n\030fixed64.gte_lt_exclusive\032\257\001ha" + - "s(rules.lt) && rules.lt < rules.gte && (" + - "rules.lt <= this && this < rules.gte)? \'" + - "value must be greater than or equal to %" + - "s or less than %s\'.format([rules.gte, ru" + - "les.lt]) : \'\'\n\324\001\n\017fixed64.gte_lte\032\300\001has(" + - "rules.lte) && rules.lte >= rules.gte && " + - "(this > rules.lte || this < rules.gte)? " + - "\'value must be greater than or equal to " + - "%s and less than or equal to %s\'.format(" + - "[rules.gte, rules.lte]) : \'\'\n\334\001\n\031fixed64" + - ".gte_lte_exclusive\032\276\001has(rules.lte) && r" + - "ules.lte < rules.gte && (rules.lte < thi" + - "s && this < rules.gte)? \'value must be g" + - "reater than or equal to %s or less than " + - "or equal to %s\'.format([rules.gte, rules" + - ".lte]) : \'\'H\004R\003gte\210\001\001\022{\n\002in\030\006 \003(\006Bk\302Hh\nf" + - "\n\nfixed64.in\032X!(this in dyn(rules)[\'in\']" + - ") ? \'value must be in list %s\'.format([d" + - "yn(rules)[\'in\']]) : \'\'R\002in\022\177\n\006not_in\030\007 \003" + - "(\006Bh\302He\nc\n\016fixed64.not_in\032Qthis in rules" + - ".not_in ? \'value must not be in list %s\'" + - ".format([rules.not_in]) : \'\'R\005notInB\010\n\006_" + - "constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\240\025\n\r" + - "SFixed32Rules\022x\n\005const\030\001 \001(\017B]\302HZ\nX\n\016sfi" + - "xed32.const\032Fthis != rules.const ? \'valu" + - "e must equal %s\'.format([rules.const]) :" + - " \'\'H\000R\005const\210\001\001\022\224\001\n\002lt\030\002 \001(\017B\177\302H|\nz\n\013sfi" + - "xed32.lt\032k!has(rules.gte) && !has(rules." + - "gt) && this >= rules.lt? \'value must be " + - "less than %s\'.format([rules.lt]) : \'\'H\001R" + - "\002lt\210\001\001\022\247\001\n\003lte\030\003 \001(\017B\217\001\302H\213\001\n\210\001\n\014sfixed32" + - ".lte\032x!has(rules.gte) && !has(rules.gt) " + - "&& this > rules.lte? \'value must be less" + - " than or equal to %s\'.format([rules.lte]" + - ") : \'\'H\002R\003lte\210\001\001\022\255\007\n\002gt\030\004 \001(\017B\227\007\302H\223\007\n}\n\013" + - "sfixed32.gt\032n!has(rules.lt) && !has(rule" + - "s.lte) && this <= rules.gt? \'value must " + - "be greater than %s\'.format([rules.gt]) :" + - " \'\'\n\266\001\n\016sfixed32.gt_lt\032\243\001has(rules.lt) &" + - "& rules.lt >= rules.gt && (this >= rules" + - ".lt || this <= rules.gt)? \'value must be" + - " greater than %s and less than %s\'.forma" + - "t([rules.gt, rules.lt]) : \'\'\n\276\001\n\030sfixed3" + - "2.gt_lt_exclusive\032\241\001has(rules.lt) && rul" + - "es.lt < rules.gt && (rules.lt <= this &&" + - " this <= rules.gt)? \'value must be great" + - "er than %s or less than %s\'.format([rule" + - "s.gt, rules.lt]) : \'\'\n\306\001\n\017sfixed32.gt_lt" + - "e\032\262\001has(rules.lte) && rules.lte >= rules" + - ".gt && (this > rules.lte || this <= rule" + - "s.gt)? \'value must be greater than %s an" + + ") : \'\'\n\326\001\n\021timestamp.gte_lte\032\300\001has(rules" + + ".lte) && rules.lte >= rules.gte && (this" + + " > rules.lte || this < rules.gte)? \'valu" + + "e must be greater than or equal to %s an" + "d less than or equal to %s\'.format([rule" + - "s.gt, rules.lte]) : \'\'\n\316\001\n\031sfixed32.gt_l" + - "te_exclusive\032\260\001has(rules.lte) && rules.l" + - "te < rules.gt && (rules.lte < this && th" + - "is <= rules.gt)? \'value must be greater " + - "than %s or less than or equal to %s\'.for" + - "mat([rules.gt, rules.lte]) : \'\'H\003R\002gt\210\001\001" + - "\022\372\007\n\003gte\030\005 \001(\017B\342\007\302H\336\007\n\213\001\n\014sfixed32.gte\032{" + - "!has(rules.lt) && !has(rules.lte) && thi" + - "s < rules.gte? \'value must be greater th" + - "an or equal to %s\'.format([rules.gte]) :" + - " \'\'\n\305\001\n\017sfixed32.gte_lt\032\261\001has(rules.lt) " + - "&& rules.lt >= rules.gte && (this >= rul" + - "es.lt || this < rules.gte)? \'value must " + - "be greater than or equal to %s and less " + - "than %s\'.format([rules.gte, rules.lt]) :" + - " \'\'\n\315\001\n\031sfixed32.gte_lt_exclusive\032\257\001has(" + - "rules.lt) && rules.lt < rules.gte && (ru" + - "les.lt <= this && this < rules.gte)? \'va" + - "lue must be greater than or equal to %s " + - "or less than %s\'.format([rules.gte, rule" + - "s.lt]) : \'\'\n\325\001\n\020sfixed32.gte_lte\032\300\001has(r" + - "ules.lte) && rules.lte >= rules.gte && (" + - "this > rules.lte || this < rules.gte)? \'" + - "value must be greater than or equal to %" + - "s and less than or equal to %s\'.format([" + - "rules.gte, rules.lte]) : \'\'\n\335\001\n\032sfixed32" + - ".gte_lte_exclusive\032\276\001has(rules.lte) && r" + - "ules.lte < rules.gte && (rules.lte < thi" + - "s && this < rules.gte)? \'value must be g" + - "reater than or equal to %s or less than " + - "or equal to %s\'.format([rules.gte, rules" + - ".lte]) : \'\'H\004R\003gte\210\001\001\022|\n\002in\030\006 \003(\017Bl\302Hi\ng" + - "\n\013sfixed32.in\032X!(this in dyn(rules)[\'in\'" + - "]) ? \'value must be in list %s\'.format([" + - "dyn(rules)[\'in\']]) : \'\'R\002in\022\200\001\n\006not_in\030\007" + - " \003(\017Bi\302Hf\nd\n\017sfixed32.not_in\032Qthis in ru" + - "les.not_in ? \'value must not be in list " + - "%s\'.format([rules.not_in]) : \'\'R\005notInB\010" + - "\n\006_constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\240" + - "\025\n\rSFixed64Rules\022x\n\005const\030\001 \001(\020B]\302HZ\nX\n\016" + - "sfixed64.const\032Fthis != rules.const ? \'v" + - "alue must equal %s\'.format([rules.const]" + - ") : \'\'H\000R\005const\210\001\001\022\224\001\n\002lt\030\002 \001(\020B\177\302H|\nz\n\013" + - "sfixed64.lt\032k!has(rules.gte) && !has(rul" + - "es.gt) && this >= rules.lt? \'value must " + - "be less than %s\'.format([rules.lt]) : \'\'" + - "H\001R\002lt\210\001\001\022\247\001\n\003lte\030\003 \001(\020B\217\001\302H\213\001\n\210\001\n\014sfixe" + - "d64.lte\032x!has(rules.gte) && !has(rules.g" + - "t) && this > rules.lte? \'value must be l" + - "ess than or equal to %s\'.format([rules.l", - "te]) : \'\'H\002R\003lte\210\001\001\022\255\007\n\002gt\030\004 \001(\020B\227\007\302H\223\007\n" + - "}\n\013sfixed64.gt\032n!has(rules.lt) && !has(r" + - "ules.lte) && this <= rules.gt? \'value mu" + - "st be greater than %s\'.format([rules.gt]" + - ") : \'\'\n\266\001\n\016sfixed64.gt_lt\032\243\001has(rules.lt" + - ") && rules.lt >= rules.gt && (this >= ru" + - "les.lt || this <= rules.gt)? \'value must" + - " be greater than %s and less than %s\'.fo" + - "rmat([rules.gt, rules.lt]) : \'\'\n\276\001\n\030sfix" + - "ed64.gt_lt_exclusive\032\241\001has(rules.lt) && " + - "rules.lt < rules.gt && (rules.lt <= this" + - " && this <= rules.gt)? \'value must be gr" + - "eater than %s or less than %s\'.format([r" + - "ules.gt, rules.lt]) : \'\'\n\306\001\n\017sfixed64.gt" + - "_lte\032\262\001has(rules.lte) && rules.lte >= ru" + - "les.gt && (this > rules.lte || this <= r" + - "ules.gt)? \'value must be greater than %s" + - " and less than or equal to %s\'.format([r" + - "ules.gt, rules.lte]) : \'\'\n\316\001\n\031sfixed64.g" + - "t_lte_exclusive\032\260\001has(rules.lte) && rule" + - "s.lte < rules.gt && (rules.lte < this &&" + - " this <= rules.gt)? \'value must be great" + - "er than %s or less than or equal to %s\'." + - "format([rules.gt, rules.lte]) : \'\'H\003R\002gt" + - "\210\001\001\022\372\007\n\003gte\030\005 \001(\020B\342\007\302H\336\007\n\213\001\n\014sfixed64.gt" + - "e\032{!has(rules.lt) && !has(rules.lte) && " + - "this < rules.gte? \'value must be greater" + - " than or equal to %s\'.format([rules.gte]" + - ") : \'\'\n\305\001\n\017sfixed64.gte_lt\032\261\001has(rules.l" + - "t) && rules.lt >= rules.gte && (this >= " + - "rules.lt || this < rules.gte)? \'value mu" + - "st be greater than or equal to %s and le" + - "ss than %s\'.format([rules.gte, rules.lt]" + - ") : \'\'\n\315\001\n\031sfixed64.gte_lt_exclusive\032\257\001h" + - "as(rules.lt) && rules.lt < rules.gte && " + - "(rules.lt <= this && this < rules.gte)? " + - "\'value must be greater than or equal to " + - "%s or less than %s\'.format([rules.gte, r" + - "ules.lt]) : \'\'\n\325\001\n\020sfixed64.gte_lte\032\300\001ha" + - "s(rules.lte) && rules.lte >= rules.gte &" + - "& (this > rules.lte || this < rules.gte)" + - "? \'value must be greater than or equal t" + - "o %s and less than or equal to %s\'.forma" + - "t([rules.gte, rules.lte]) : \'\'\n\335\001\n\032sfixe" + - "d64.gte_lte_exclusive\032\276\001has(rules.lte) &" + - "& rules.lte < rules.gte && (rules.lte < " + - "this && this < rules.gte)? \'value must b" + - "e greater than or equal to %s or less th" + - "an or equal to %s\'.format([rules.gte, ru" + - "les.lte]) : \'\'H\004R\003gte\210\001\001\022|\n\002in\030\006 \003(\020Bl\302H" + - "i\ng\n\013sfixed64.in\032X!(this in dyn(rules)[\'" + - "in\']) ? \'value must be in list %s\'.forma" + - "t([dyn(rules)[\'in\']]) : \'\'R\002in\022\200\001\n\006not_i" + - "n\030\007 \003(\020Bi\302Hf\nd\n\017sfixed64.not_in\032Qthis in" + - " rules.not_in ? \'value must not be in li" + - "st %s\'.format([rules.not_in]) : \'\'R\005notI" + - "nB\010\n\006_constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gt" + - "e\"\213\001\n\tBoolRules\022t\n\005const\030\001 \001(\010BY\302HV\nT\n\nb" + - "ool.const\032Fthis != rules.const ? \'value " + - "must equal %s\'.format([rules.const]) : \'" + - "\'H\000R\005const\210\001\001B\010\n\006_const\"\274\036\n\013StringRules\022" + - "x\n\005const\030\001 \001(\tB]\302HZ\nX\n\014string.const\032Hthi" + - "s != rules.const ? \'value must equal `%s" + - "`\'.format([rules.const]) : \'\'H\001R\005const\210\001" + - "\001\022\210\001\n\003len\030\023 \001(\004Bq\302Hn\nl\n\nstring.len\032^uint" + - "(this.size()) != rules.len ? \'value leng" + - "th must be %s characters\'.format([rules." + - "len]) : \'\'H\002R\003len\210\001\001\022\246\001\n\007min_len\030\002 \001(\004B\207" + - "\001\302H\203\001\n\200\001\n\016string.min_len\032nuint(this.size" + - "()) < rules.min_len ? \'value length must" + - " be at least %s characters\'.format([rule" + - "s.min_len]) : \'\'H\003R\006minLen\210\001\001\022\244\001\n\007max_le" + - "n\030\003 \001(\004B\205\001\302H\201\001\n\177\n\016string.max_len\032muint(t" + - "his.size()) > rules.max_len ? \'value len" + - "gth must be at most %s characters\'.forma" + - "t([rules.max_len]) : \'\'H\004R\006maxLen\210\001\001\022\252\001\n" + - "\tlen_bytes\030\024 \001(\004B\207\001\302H\203\001\n\200\001\n\020string.len_b" + - "ytes\032luint(bytes(this).size()) != rules." + - "len_bytes ? \'value length must be %s byt" + - "es\'.format([rules.len_bytes]) : \'\'H\005R\010le" + - "nBytes\210\001\001\022\262\001\n\tmin_bytes\030\004 \001(\004B\217\001\302H\213\001\n\210\001\n" + - "\020string.min_bytes\032tuint(bytes(this).size" + - "()) < rules.min_bytes ? \'value length mu" + - "st be at least %s bytes\'.format([rules.m" + - "in_bytes]) : \'\'H\006R\010minBytes\210\001\001\022\261\001\n\tmax_b" + - "ytes\030\005 \001(\004B\216\001\302H\212\001\n\207\001\n\020string.max_bytes\032s" + - "uint(bytes(this).size()) > rules.max_byt" + - "es ? \'value length must be at most %s by" + - "tes\'.format([rules.max_bytes]) : \'\'H\007R\010m" + - "axBytes\210\001\001\022\233\001\n\007pattern\030\006 \001(\tB|\302Hy\nw\n\016str" + - "ing.pattern\032e!this.matches(rules.pattern" + - ") ? \'value does not match regex pattern " + - "`%s`\'.format([rules.pattern]) : \'\'H\010R\007pa" + - "ttern\210\001\001\022\221\001\n\006prefix\030\007 \001(\tBt\302Hq\no\n\rstring" + - ".prefix\032^!this.startsWith(rules.prefix) " + - "? \'value does not have prefix `%s`\'.form" + - "at([rules.prefix]) : \'\'H\tR\006prefix\210\001\001\022\217\001\n" + - "\006suffix\030\010 \001(\tBr\302Ho\nm\n\rstring.suffix\032\\!th" + - "is.endsWith(rules.suffix) ? \'value does " + - "not have suffix `%s`\'.format([rules.suff" + - "ix]) : \'\'H\nR\006suffix\210\001\001\022\237\001\n\010contains\030\t \001(" + - "\tB~\302H{\ny\n\017string.contains\032f!this.contain" + - "s(rules.contains) ? \'value does not cont" + - "ain substring `%s`\'.format([rules.contai" + - "ns]) : \'\'H\013R\010contains\210\001\001\022\252\001\n\014not_contain" + - "s\030\027 \001(\tB\201\001\302H~\n|\n\023string.not_contains\032eth" + - "is.contains(rules.not_contains) ? \'value" + - " contains substring `%s`\'.format([rules." + - "not_contains]) : \'\'H\014R\013notContains\210\001\001\022z\n" + - "\002in\030\n \003(\tBj\302Hg\ne\n\tstring.in\032X!(this in d" + - "yn(rules)[\'in\']) ? \'value must be in lis" + - "t %s\'.format([dyn(rules)[\'in\']]) : \'\'R\002i" + - "n\022~\n\006not_in\030\013 \003(\tBg\302Hd\nb\n\rstring.not_in\032" + - "Qthis in rules.not_in ? \'value must not " + - "be in list %s\'.format([rules.not_in]) : " + - "\'\'R\005notIn\022`\n\005email\030\014 \001(\010BH\302HE\nC\n\014string." + - "email\022#value must be a valid email addre" + - "ss\032\016this.isEmail()H\000R\005email\022g\n\010hostname\030" + - "\r \001(\010BI\302HF\nD\n\017string.hostname\022\036value mus" + - "t be a valid hostname\032\021this.isHostname()" + - "H\000R\010hostname\022Q\n\002ip\030\016 \001(\010B?\302H<\n:\n\tstring." + - "ip\022 value must be a valid IP address\032\013th" + - "is.isIp()H\000R\002ip\022Z\n\004ipv4\030\017 \001(\010BD\302HA\n?\n\013st" + - "ring.ipv4\022\"value must be a valid IPv4 ad" + - "dress\032\014this.isIp(4)H\000R\004ipv4\022Z\n\004ipv6\030\020 \001(" + - "\010BD\302HA\n?\n\013string.ipv6\022\"value must be a v" + - "alid IPv6 address\032\014this.isIp(6)H\000R\004ipv6\022" + - "N\n\003uri\030\021 \001(\010B:\302H7\n5\n\nstring.uri\022\031value m" + - "ust be a valid URI\032\014this.isUri()H\000R\003uri\022" + - "\\\n\007uri_ref\030\022 \001(\010BA\302H>\n<\n\016string.uri_ref\022" + - "\031value must be a valid URI\032\017this.isUriRe" + - "f()H\000R\006uriRef\022\202\001\n\007address\030\025 \001(\010Bf\302Hc\na\n\016" + - "string.address\022-value must be a valid ho" + - "stname, or ip address\032 this.isHostname()" + - " || this.isIp()H\000R\007address\022\260\001\n\004uuid\030\026 \001(" + - "\010B\231\001\302H\225\001\n\222\001\n\013string.uuid\032\202\001!this.matches" + - "(\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-f" + - "A-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\'" + - ") ? \'value must be a valid UUID\' : \'\'H\000R" + - "\004uuid\022\254\004\n\020well_known_regex\030\030 \001(\0162\030.buf.v" + - "alidate.KnownRegexB\345\003\302H\341\003\n\353\001\n#string.wel" + - "l_known_regex.header_name\032\303\001rules.well_k" + - "nown_regex == 1 && !this.matches(!has(ru" + - "les.strict) || rules.strict ?\'^:?[0-9a-z" + - "A-Z!#$%&\\\'*+-.^_|~\\x60]+$\' :\'^[^\\u0000\\u" + - "000A\\u000D]+$\') ? \'value must be a valid" + - " HTTP header name\' : \'\'\n\360\001\n$string.well_" + - "known_regex.header_value\032\307\001rules.well_kn" + - "own_regex == 2 && !this.matches(!has(rul" + - "es.strict) || rules.strict ?\'^[^\\u0000-\\" + - "u0008\\u000A-\\u001F\\u007F]*$\' :\'^[^\\u0000" + - "\\u000A\\u000D]*$\') ? \'value must be a val" + - "id HTTP header value\' : \'\'H\000R\016wellKnownR" + - "egex\022\033\n\006strict\030\031 \001(\010H\rR\006strict\210\001\001B\014\n\nwel" + - "l_knownB\010\n\006_constB\006\n\004_lenB\n\n\010_min_lenB\n\n" + - "\010_max_lenB\014\n\n_len_bytesB\014\n\n_min_bytesB\014\n" + - "\n_max_bytesB\n\n\010_patternB\t\n\007_prefixB\t\n\007_s" + - "uffixB\013\n\t_containsB\017\n\r_not_containsB\t\n\007_" + - "strict\"\332\016\n\nBytesRules\022r\n\005const\030\001 \001(\014BW\302H" + - "T\nR\n\013bytes.const\032Cthis != rules.const ? " + - "\'value must be %x\'.format([rules.const])" + - " : \'\'H\001R\005const\210\001\001\022\202\001\n\003len\030\r \001(\004Bk\302Hh\nf\n\t" + - "bytes.len\032Yuint(this.size()) != rules.le" + - "n ? \'value length must be %s bytes\'.form" + - "at([rules.len]) : \'\'H\002R\003len\210\001\001\022\235\001\n\007min_l" + - "en\030\002 \001(\004B\177\302H|\nz\n\rbytes.min_len\032iuint(thi" + - "s.size()) < rules.min_len ? \'value lengt" + - "h must be at least %s bytes\'.format([rul" + - "es.min_len]) : \'\'H\003R\006minLen\210\001\001\022\225\001\n\007max_l" + - "en\030\003 \001(\004Bw\302Ht\nr\n\rbytes.max_len\032auint(thi" + - "s.size()) > rules.max_len ? \'value must " + - "be at most %s bytes\'.format([rules.max_l" + - "en]) : \'\'H\004R\006maxLen\210\001\001\022\236\001\n\007pattern\030\004 \001(\t" + - "B\177\302H|\nz\n\rbytes.pattern\032i!string(this).ma" + - "tches(rules.pattern) ? \'value must match" + - " regex pattern `%s`\'.format([rules.patte" + - "rn]) : \'\'H\005R\007pattern\210\001\001\022\216\001\n\006prefix\030\005 \001(\014" + - "Bq\302Hn\nl\n\014bytes.prefix\032\\!this.startsWith(" + - "rules.prefix) ? \'value does not have pre" + - "fix %x\'.format([rules.prefix]) : \'\'H\006R\006p" + - "refix\210\001\001\022\214\001\n\006suffix\030\006 \001(\014Bo\302Hl\nj\n\014bytes." + - "suffix\032Z!this.endsWith(rules.suffix) ? \'" + - "value does not have suffix %x\'.format([r" + - "ules.suffix]) : \'\'H\007R\006suffix\210\001\001\022\222\001\n\010cont" + - "ains\030\007 \001(\014Bq\302Hn\nl\n\016bytes.contains\032Z!this" + - ".contains(rules.contains) ? \'value does " + - "not contain %x\'.format([rules.contains])" + - " : \'\'H\010R\010contains\210\001\001\022\233\001\n\002in\030\010 \003(\014B\212\001\302H\206\001" + - "\n\203\001\n\010bytes.in\032wdyn(rules)[\'in\'].size() >" + - " 0 && !(this in dyn(rules)[\'in\']) ? \'val" + - "ue must be in list %s\'.format([dyn(rules" + - ")[\'in\']]) : \'\'R\002in\022}\n\006not_in\030\t \003(\014Bf\302Hc\n" + - "a\n\014bytes.not_in\032Qthis in rules.not_in ? " + - "\'value must not be in list %s\'.format([r" + - "ules.not_in]) : \'\'R\005notIn\022r\n\002ip\030\n \001(\010B`\302" + - "H]\n[\n\010bytes.ip\032Othis.size() != 4 && this" + - ".size() != 16 ? \'value must be a valid I" + - "P address\' : \'\'H\000R\002ip\022e\n\004ipv4\030\013 \001(\010BO\302HL" + - "\nJ\n\nbytes.ipv4\032 rules.max_items ? \'value must contai" + - "n no more than %s item(s)\'.format([rules" + - ".max_items]) : \'\'H\001R\010maxItems\210\001\001\022l\n\006uniq" + - "ue\030\003 \001(\010BO\302HL\nJ\n\017repeated.unique\022(repeat" + - "ed value must contain unique items\032\rthis" + - ".unique()H\002R\006unique\210\001\001\0229\n\005items\030\004 \001(\0132\036." + - "buf.validate.FieldConstraintsH\003R\005items\210\001" + - "\001B\014\n\n_min_itemsB\014\n\n_max_itemsB\t\n\007_unique" + - "B\010\n\006_items\"\361\003\n\010MapRules\022\236\001\n\tmin_pairs\030\001 " + - "\001(\004B|\302Hy\nw\n\rmap.min_pairs\032fuint(this.siz" + - "e()) < rules.min_pairs ? \'map must be at" + - " least %d entries\'.format([rules.min_pai" + - "rs]) : \'\'H\000R\010minPairs\210\001\001\022\235\001\n\tmax_pairs\030\002" + - " \001(\004B{\302Hx\nv\n\rmap.max_pairs\032euint(this.si" + - "ze()) > rules.max_pairs ? \'map must be a" + - "t most %d entries\'.format([rules.max_pai" + - "rs]) : \'\'H\001R\010maxPairs\210\001\001\0227\n\004keys\030\004 \001(\0132\036" + - ".buf.validate.FieldConstraintsH\002R\004keys\210\001" + - "\001\022;\n\006values\030\005 \001(\0132\036.buf.validate.FieldCo" + - "nstraintsH\003R\006values\210\001\001B\014\n\n_min_pairsB\014\n\n" + - "_max_pairsB\007\n\005_keysB\t\n\007_values\"1\n\010AnyRul" + - "es\022\016\n\002in\030\002 \003(\tR\002in\022\025\n\006not_in\030\003 \003(\tR\005notI" + - "n\"\337\026\n\rDurationRules\022\223\001\n\005const\030\002 \001(\0132\031.go" + - "ogle.protobuf.DurationB]\302HZ\nX\n\016duration." + - "const\032Fthis != rules.const ? \'value must" + - " equal %s\'.format([rules.const]) : \'\'H\000R" + - "\005const\210\001\001\022\257\001\n\002lt\030\003 \001(\0132\031.google.protobuf" + - ".DurationB\177\302H|\nz\n\013duration.lt\032k!has(rule" + - "s.gte) && !has(rules.gt) && this >= rule" + - "s.lt? \'value must be less than %s\'.forma" + - "t([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\302\001\n\003lte\030\004 \001(" + - "\0132\031.google.protobuf.DurationB\217\001\302H\213\001\n\210\001\n\014" + - "duration.lte\032x!has(rules.gte) && !has(ru" + - "les.gt) && this > rules.lte? \'value must" + - " be less than or equal to %s\'.format([ru" + - "les.lte]) : \'\'H\002R\003lte\210\001\001\022\310\007\n\002gt\030\005 \001(\0132\031." + - "google.protobuf.DurationB\227\007\302H\223\007\n}\n\013durat" + - "ion.gt\032n!has(rules.lt) && !has(rules.lte" + - ") && this <= rules.gt? \'value must be gr" + - "eater than %s\'.format([rules.gt]) : \'\'\n\266" + - "\001\n\016duration.gt_lt\032\243\001has(rules.lt) && rul" + - "es.lt >= rules.gt && (this >= rules.lt |" + - "| this <= rules.gt)? \'value must be grea" + - "ter than %s and less than %s\'.format([ru" + - "les.gt, rules.lt]) : \'\'\n\276\001\n\030duration.gt_" + - "lt_exclusive\032\241\001has(rules.lt) && rules.lt" + - " < rules.gt && (rules.lt <= this && this" + - " <= rules.gt)? \'value must be greater th" + - "an %s or less than %s\'.format([rules.gt," + - " rules.lt]) : \'\'\n\306\001\n\017duration.gt_lte\032\262\001h" + - "as(rules.lte) && rules.lte >= rules.gt &" + - "& (this > rules.lte || this <= rules.gt)" + - "? \'value must be greater than %s and les" + - "s than or equal to %s\'.format([rules.gt," + - " rules.lte]) : \'\'\n\316\001\n\031duration.gt_lte_ex" + - "clusive\032\260\001has(rules.lte) && rules.lte < " + - "rules.gt && (rules.lte < this && this <=" + - " rules.gt)? \'value must be greater than " + - "%s or less than or equal to %s\'.format([" + - "rules.gt, rules.lte]) : \'\'H\003R\002gt\210\001\001\022\225\010\n\003" + - "gte\030\006 \001(\0132\031.google.protobuf.DurationB\342\007\302" + - "H\336\007\n\213\001\n\014duration.gte\032{!has(rules.lt) && " + - "!has(rules.lte) && this < rules.gte? \'va" + - "lue must be greater than or equal to %s\'" + - ".format([rules.gte]) : \'\'\n\305\001\n\017duration.g" + - "te_lt\032\261\001has(rules.lt) && rules.lt >= rul" + - "es.gte && (this >= rules.lt || this < ru" + - "les.gte)? \'value must be greater than or" + - " equal to %s and less than %s\'.format([r" + - "ules.gte, rules.lt]) : \'\'\n\315\001\n\031duration.g" + - "te_lt_exclusive\032\257\001has(rules.lt) && rules" + - ".lt < rules.gte && (rules.lt <= this && " + - "this < rules.gte)? \'value must be greate" + - "r than or equal to %s or less than %s\'.f" + - "ormat([rules.gte, rules.lt]) : \'\'\n\325\001\n\020du" + - "ration.gte_lte\032\300\001has(rules.lte) && rules" + - ".lte >= rules.gte && (this > rules.lte |" + - "| this < rules.gte)? \'value must be grea" + - "ter than or equal to %s and less than or" + - " equal to %s\'.format([rules.gte, rules.l" + - "te]) : \'\'\n\335\001\n\032duration.gte_lte_exclusive" + - "\032\276\001has(rules.lte) && rules.lte < rules.g" + - "te && (rules.lte < this && this < rules." + - "gte)? \'value must be greater than or equ" + - "al to %s or less than or equal to %s\'.fo" + - "rmat([rules.gte, rules.lte]) : \'\'H\004R\003gte" + - "\210\001\001\022\227\001\n\002in\030\007 \003(\0132\031.google.protobuf.Durat" + - "ionBl\302Hi\ng\n\013duration.in\032X!(this in dyn(r" + - "ules)[\'in\']) ? \'value must be in list %s" + - "\'.format([dyn(rules)[\'in\']]) : \'\'R\002in\022\233\001" + - "\n\006not_in\030\010 \003(\0132\031.google.protobuf.Duratio" + - "nBi\302Hf\nd\n\017duration.not_in\032Qthis in rules" + - ".not_in ? \'value must not be in list %s\'" + - ".format([rules.not_in]) : \'\'R\005notInB\010\n\006_" + - "constB\005\n\003_ltB\006\n\004_lteB\005\n\003_gtB\006\n\004_gte\"\363\027\n\016" + - "TimestampRules\022\225\001\n\005const\030\002 \001(\0132\032.google." + - "protobuf.TimestampB^\302H[\nY\n\017timestamp.con" + - "st\032Fthis != rules.const ? \'value must eq" + - "ual %s\'.format([rules.const]) : \'\'H\000R\005co" + - "nst\210\001\001\022\262\001\n\002lt\030\003 \001(\0132\032.google.protobuf.Ti" + - "mestampB\200\001\302H}\n{\n\014timestamp.lt\032k!has(rule" + - "s.gte) && !has(rules.gt) && this >= rule" + - "s.lt? \'value must be less than %s\'.forma" + - "t([rules.lt]) : \'\'H\001R\002lt\210\001\001\022\304\001\n\003lte\030\004 \001(" + - "\0132\032.google.protobuf.TimestampB\220\001\302H\214\001\n\211\001\n" + - "\rtimestamp.lte\032x!has(rules.gte) && !has(" + - "rules.gt) && this > rules.lte? \'value mu" + - "st be less than or equal to %s\'.format([" + - "rules.lte]) : \'\'H\002R\003lte\210\001\001\022\316\007\n\002gt\030\005 \001(\0132" + - "\032.google.protobuf.TimestampB\234\007\302H\230\007\n~\n\014ti" + - "mestamp.gt\032n!has(rules.lt) && !has(rules" + - ".lte) && this <= rules.gt? \'value must b" + - "e greater than %s\'.format([rules.gt]) : " + - "\'\'\n\267\001\n\017timestamp.gt_lt\032\243\001has(rules.lt) &" + - "& rules.lt >= rules.gt && (this >= rules" + - ".lt || this <= rules.gt)? \'value must be" + - " greater than %s and less than %s\'.forma" + - "t([rules.gt, rules.lt]) : \'\'\n\277\001\n\031timesta" + - "mp.gt_lt_exclusive\032\241\001has(rules.lt) && ru" + - "les.lt < rules.gt && (rules.lt <= this &" + - "& this <= rules.gt)? \'value must be grea" + - "ter than %s or less than %s\'.format([rul" + - "es.gt, rules.lt]) : \'\'\n\307\001\n\020timestamp.gt_" + - "lte\032\262\001has(rules.lte) && rules.lte >= rul" + - "es.gt && (this > rules.lte || this <= ru" + - "les.gt)? \'value must be greater than %s " + - "and less than or equal to %s\'.format([ru" + - "les.gt, rules.lte]) : \'\'\n\317\001\n\032timestamp.g" + - "t_lte_exclusive\032\260\001has(rules.lte) && rule" + - "s.lte < rules.gt && (rules.lte < this &&" + - " this <= rules.gt)? \'value must be great" + - "er than %s or less than or equal to %s\'." + - "format([rules.gt, rules.lte]) : \'\'H\003R\002gt" + - "\210\001\001\022\233\010\n\003gte\030\006 \001(\0132\032.google.protobuf.Time" + - "stampB\347\007\302H\343\007\n\214\001\n\rtimestamp.gte\032{!has(rul" + - "es.lt) && !has(rules.lte) && this < rule" + - "s.gte? \'value must be greater than or eq" + - "ual to %s\'.format([rules.gte]) : \'\'\n\306\001\n\020" + - "timestamp.gte_lt\032\261\001has(rules.lt) && rule" + - "s.lt >= rules.gte && (this >= rules.lt |" + - "| this < rules.gte)? \'value must be grea" + - "ter than or equal to %s and less than %s" + - "\'.format([rules.gte, rules.lt]) : \'\'\n\316\001\n" + - "\032timestamp.gte_lt_exclusive\032\257\001has(rules." + - "lt) && rules.lt < rules.gte && (rules.lt" + - " <= this && this < rules.gte)? \'value mu" + - "st be greater than or equal to %s or les" + - "s than %s\'.format([rules.gte, rules.lt])" + - " : \'\'\n\326\001\n\021timestamp.gte_lte\032\300\001has(rules." + - "lte) && rules.lte >= rules.gte && (this " + - "> rules.lte || this < rules.gte)? \'value" + - " must be greater than or equal to %s and" + - " less than or equal to %s\'.format([rules" + - ".gte, rules.lte]) : \'\'\n\336\001\n\033timestamp.gte" + - "_lte_exclusive\032\276\001has(rules.lte) && rules" + - ".lte < rules.gte && (rules.lte < this &&" + - " this < rules.gte)? \'value must be great" + - "er than or equal to %s or less than or e" + - "qual to %s\'.format([rules.gte, rules.lte" + - "]) : \'\'H\004R\003gte\210\001\001\022d\n\006lt_now\030\007 \001(\010BH\302HE\nC" + - "\n\020timestamp.lt_now\032/this > now ? \'value " + - "must be less than now\' : \'\'H\005R\005ltNow\210\001\001\022" + - "g\n\006gt_now\030\010 \001(\010BK\302HH\nF\n\020timestamp.gt_now" + - "\0322this < now ? \'value must be greater th" + - "an now\' : \'\'H\006R\005gtNow\210\001\001\022\305\001\n\006within\030\t \001(" + - "\0132\031.google.protobuf.DurationB\214\001\302H\210\001\n\205\001\n\020" + - "timestamp.within\032qthis < now-rules.withi" + - "n || this > now+rules.within ? \'value mu" + - "st be within %s of now\'.format([rules.wi" + - "thin]) : \'\'H\007R\006within\210\001\001B\010\n\006_constB\005\n\003_l" + - "tB\006\n\004_lteB\005\n\003_gtB\006\n\004_gteB\t\n\007_lt_nowB\t\n\007_" + - "gt_nowB\t\n\007_within*n\n\nKnownRegex\022\033\n\027KNOWN" + - "_REGEX_UNSPECIFIED\020\000\022 \n\034KNOWN_REGEX_HTTP" + - "_HEADER_NAME\020\001\022!\n\035KNOWN_REGEX_HTTP_HEADE" + - "R_VALUE\020\002:_\n\007message\022\037.google.protobuf.M" + - "essageOptions\030\207\t \001(\0132 .buf.validate.Mess" + - "ageConstraintsR\007message\210\001\001:W\n\005oneof\022\035.go", - "ogle.protobuf.OneofOptions\030\207\t \001(\0132\036.buf." + - "validate.OneofConstraintsR\005oneof\210\001\001:W\n\005f" + - "ield\022\035.google.protobuf.FieldOptions\030\207\t \001" + - "(\0132\036.buf.validate.FieldConstraintsR\005fiel" + - "d\210\001\001Bn\n\022build.buf.validateB\rValidateProt" + - "oP\001ZGbuf.build/gen/go/bufbuild/protovali" + - "date/protocolbuffers/go/buf/validateb\006pr" + - "oto3" + "s.gte, rules.lte]) : \'\'\n\336\001\n\033timestamp.gt" + + "e_lte_exclusive\032\276\001has(rules.lte) && rule" + + "s.lte < rules.gte && (rules.lte < this &" + + "& this < rules.gte)? \'value must be grea" + + "ter than or equal to %s or less than or " + + "equal to %s\'.format([rules.gte, rules.lt" + + "e]) : \'\'H\001R\003gte\022d\n\006gt_now\030\010 \001(\010BK\302HH\nF\n\020" + + "timestamp.gt_now\0322this < now ? \'value mu" + + "st be greater than now\' : \'\'H\001R\005gtNow\022\305\001" + + "\n\006within\030\t \001(\0132\031.google.protobuf.Duratio" + + "nB\214\001\302H\210\001\n\205\001\n\020timestamp.within\032qthis < no" + + "w-rules.within || this > now+rules.withi" + + "n ? \'value must be within %s of now\'.for" + + "mat([rules.within]) : \'\'H\003R\006within\210\001\001B\013\n" + + "\tless_thanB\016\n\014greater_thanB\010\n\006_constB\t\n\007" + + "_within*n\n\nKnownRegex\022\033\n\027KNOWN_REGEX_UNS" + + "PECIFIED\020\000\022 \n\034KNOWN_REGEX_HTTP_HEADER_NA" + + "ME\020\001\022!\n\035KNOWN_REGEX_HTTP_HEADER_VALUE\020\002:" + + "_\n\007message\022\037.google.protobuf.MessageOpti" + + "ons\030\207\t \001(\0132 .buf.validate.MessageConstra" + + "intsR\007message\210\001\001:W\n\005oneof\022\035.google.proto" + + "buf.OneofOptions\030\207\t \001(\0132\036.buf.validate.O" + + "neofConstraintsR\005oneof\210\001\001:W\n\005field\022\035.goo" + + "gle.protobuf.FieldOptions\030\207\t \001(\0132\036.buf.v" + + "alidate.FieldConstraintsR\005field\210\001\001Bn\n\022bu" + + "ild.buf.validateB\rValidateProtoP\001ZGbuf.b", + "uild/gen/go/bufbuild/protovalidate/proto" + + "colbuffers/go/buf/validateb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -1435,73 +1429,73 @@ public static void registerAllExtensions( internal_static_buf_validate_FloatRules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_FloatRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Finite", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Finite", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_DoubleRules_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_buf_validate_DoubleRules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_DoubleRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Finite", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Finite", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_Int32Rules_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_buf_validate_Int32Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_Int32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_Int64Rules_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_buf_validate_Int64Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_Int64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_UInt32Rules_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_buf_validate_UInt32Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_UInt32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_UInt64Rules_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_buf_validate_UInt64Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_UInt64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_SInt32Rules_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_buf_validate_SInt32Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_SInt32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_SInt64Rules_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_buf_validate_SInt64Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_SInt64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_Fixed32Rules_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_buf_validate_Fixed32Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_Fixed32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_Fixed64Rules_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_buf_validate_Fixed64Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_Fixed64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_SFixed32Rules_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_buf_validate_SFixed32Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_SFixed32Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_SFixed64Rules_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_buf_validate_SFixed64Rules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_SFixed64Rules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_BoolRules_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_buf_validate_BoolRules_fieldAccessorTable = new @@ -1549,13 +1543,13 @@ public static void registerAllExtensions( internal_static_buf_validate_DurationRules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_DurationRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "Const", "Lt", "Lte", "Gt", "Gte", }); + new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "In", "NotIn", "LessThan", "GreaterThan", "Const", }); internal_static_buf_validate_TimestampRules_descriptor = getDescriptor().getMessageTypes().get(23); internal_static_buf_validate_TimestampRules_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_buf_validate_TimestampRules_descriptor, - new java.lang.String[] { "Const", "Lt", "Lte", "Gt", "Gte", "LtNow", "GtNow", "Within", "Const", "Lt", "Lte", "Gt", "Gte", "LtNow", "GtNow", "Within", }); + new java.lang.String[] { "Const", "Lt", "Lte", "LtNow", "Gt", "Gte", "GtNow", "Within", "LessThan", "GreaterThan", "Const", "Within", }); message.internalInit(descriptor.getExtensions().get(0)); oneof.internalInit(descriptor.getExtensions().get(1)); field.internalInit(descriptor.getExtensions().get(2));