build.buf.validate.DurationRules Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protovalidate Show documentation
Show all versions of protovalidate Show documentation
Protocol Buffer Validation
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: buf/validate/validate.proto
// Protobuf Java Version: 4.28.1
package build.buf.validate;
/**
*
* DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
*
*
* Protobuf type {@code buf.validate.DurationRules}
*/
public final class DurationRules extends
com.google.protobuf.GeneratedMessage.ExtendableMessage<
DurationRules> implements
// @@protoc_insertion_point(message_implements:buf.validate.DurationRules)
DurationRulesOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 1,
/* suffix= */ "",
DurationRules.class.getName());
}
// Use DurationRules.newBuilder() to construct.
private DurationRules(com.google.protobuf.GeneratedMessage.ExtendableBuilder builder) {
super(builder);
}
private DurationRules() {
in_ = java.util.Collections.emptyList();
notIn_ = java.util.Collections.emptyList();
example_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
build.buf.validate.DurationRules.class, build.buf.validate.DurationRules.Builder.class);
}
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_;
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
* @return Whether the const field is set.
*/
@java.lang.Override
public boolean hasConst() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
* @return The const.
*/
@java.lang.Override
public com.google.protobuf.Duration getConst() {
return const_ == null ? com.google.protobuf.Duration.getDefaultInstance() : const_;
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getConstOrBuilder() {
return const_ == null ? com.google.protobuf.Duration.getDefaultInstance() : const_;
}
public static final int LT_FIELD_NUMBER = 3;
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
* @return Whether the lt field is set.
*/
@java.lang.Override
public boolean hasLt() {
return lessThanCase_ == 3;
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
* @return The lt.
*/
@java.lang.Override
public com.google.protobuf.Duration getLt() {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getLtOrBuilder() {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
public static final int LTE_FIELD_NUMBER = 4;
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
* @return Whether the lte field is set.
*/
@java.lang.Override
public boolean hasLte() {
return lessThanCase_ == 4;
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
* @return The lte.
*/
@java.lang.Override
public com.google.protobuf.Duration getLte() {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getLteOrBuilder() {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
public static final int GT_FIELD_NUMBER = 5;
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
* @return Whether the gt field is set.
*/
@java.lang.Override
public boolean hasGt() {
return greaterThanCase_ == 5;
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
* @return The gt.
*/
@java.lang.Override
public com.google.protobuf.Duration getGt() {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGtOrBuilder() {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
public static final int GTE_FIELD_NUMBER = 6;
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
* @return Whether the gte field is set.
*/
@java.lang.Override
public boolean hasGte() {
return greaterThanCase_ == 6;
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
* @return The gte.
*/
@java.lang.Override
public com.google.protobuf.Duration getGte() {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGteOrBuilder() {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
public static final int IN_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List in_;
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public java.util.List getInList() {
return in_;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public java.util.List
getInOrBuilderList() {
return in_;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public int getInCount() {
return in_.size();
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.Duration getIn(int index) {
return in_.get(index);
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getInOrBuilder(
int index) {
return in_.get(index);
}
public static final int NOT_IN_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private java.util.List notIn_;
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public java.util.List getNotInList() {
return notIn_;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public java.util.List
getNotInOrBuilderList() {
return notIn_;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public int getNotInCount() {
return notIn_.size();
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.Duration getNotIn(int index) {
return notIn_.get(index);
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getNotInOrBuilder(
int index) {
return notIn_.get(index);
}
public static final int EXAMPLE_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private java.util.List example_;
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public java.util.List getExampleList() {
return example_;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public java.util.List
getExampleOrBuilderList() {
return example_;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public int getExampleCount() {
return example_.size();
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.Duration getExample(int index) {
return example_.get(index);
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getExampleOrBuilder(
int index) {
return example_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessage
.ExtendableMessage.ExtensionSerializer
extensionWriter = newExtensionSerializer();
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getConst());
}
if (lessThanCase_ == 3) {
output.writeMessage(3, (com.google.protobuf.Duration) lessThan_);
}
if (lessThanCase_ == 4) {
output.writeMessage(4, (com.google.protobuf.Duration) lessThan_);
}
if (greaterThanCase_ == 5) {
output.writeMessage(5, (com.google.protobuf.Duration) greaterThan_);
}
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));
}
for (int i = 0; i < notIn_.size(); i++) {
output.writeMessage(8, notIn_.get(i));
}
for (int i = 0; i < example_.size(); i++) {
output.writeMessage(9, example_.get(i));
}
extensionWriter.writeUntil(536870912, output);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getConst());
}
if (lessThanCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.protobuf.Duration) lessThan_);
}
if (lessThanCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.google.protobuf.Duration) lessThan_);
}
if (greaterThanCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (com.google.protobuf.Duration) greaterThan_);
}
if (greaterThanCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (com.google.protobuf.Duration) greaterThan_);
}
for (int i = 0; i < in_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, in_.get(i));
}
for (int i = 0; i < notIn_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, notIn_.get(i));
}
for (int i = 0; i < example_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, example_.get(i));
}
size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof build.buf.validate.DurationRules)) {
return super.equals(obj);
}
build.buf.validate.DurationRules other = (build.buf.validate.DurationRules) obj;
if (hasConst() != other.hasConst()) return false;
if (hasConst()) {
if (!getConst()
.equals(other.getConst())) return false;
}
if (!getInList()
.equals(other.getInList())) return false;
if (!getNotInList()
.equals(other.getNotInList())) return false;
if (!getExampleList()
.equals(other.getExampleList())) 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;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasConst()) {
hash = (37 * hash) + CONST_FIELD_NUMBER;
hash = (53 * hash) + getConst().hashCode();
}
if (getInCount() > 0) {
hash = (37 * hash) + IN_FIELD_NUMBER;
hash = (53 * hash) + getInList().hashCode();
}
if (getNotInCount() > 0) {
hash = (37 * hash) + NOT_IN_FIELD_NUMBER;
hash = (53 * hash) + getNotInList().hashCode();
}
if (getExampleCount() > 0) {
hash = (37 * hash) + EXAMPLE_FIELD_NUMBER;
hash = (53 * hash) + getExampleList().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 = hashFields(hash, getExtensionFields());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static build.buf.validate.DurationRules parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static build.buf.validate.DurationRules parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static build.buf.validate.DurationRules parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static build.buf.validate.DurationRules parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static build.buf.validate.DurationRules parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static build.buf.validate.DurationRules parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static build.buf.validate.DurationRules parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static build.buf.validate.DurationRules parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static build.buf.validate.DurationRules parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static build.buf.validate.DurationRules parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static build.buf.validate.DurationRules parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static build.buf.validate.DurationRules parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(build.buf.validate.DurationRules prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
*
*
* Protobuf type {@code buf.validate.DurationRules}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.ExtendableBuilder<
build.buf.validate.DurationRules, Builder> implements
// @@protoc_insertion_point(builder_implements:buf.validate.DurationRules)
build.buf.validate.DurationRulesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
build.buf.validate.DurationRules.class, build.buf.validate.DurationRules.Builder.class);
}
// Construct using build.buf.validate.DurationRules.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage
.alwaysUseFieldBuilders) {
getConstFieldBuilder();
getInFieldBuilder();
getNotInFieldBuilder();
getExampleFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
const_ = null;
if (constBuilder_ != null) {
constBuilder_.dispose();
constBuilder_ = null;
}
if (ltBuilder_ != null) {
ltBuilder_.clear();
}
if (lteBuilder_ != null) {
lteBuilder_.clear();
}
if (gtBuilder_ != null) {
gtBuilder_.clear();
}
if (gteBuilder_ != null) {
gteBuilder_.clear();
}
if (inBuilder_ == null) {
in_ = java.util.Collections.emptyList();
} else {
in_ = null;
inBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
if (notInBuilder_ == null) {
notIn_ = java.util.Collections.emptyList();
} else {
notIn_ = null;
notInBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
if (exampleBuilder_ == null) {
example_ = java.util.Collections.emptyList();
} else {
example_ = null;
exampleBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000080);
lessThanCase_ = 0;
lessThan_ = null;
greaterThanCase_ = 0;
greaterThan_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_DurationRules_descriptor;
}
@java.lang.Override
public build.buf.validate.DurationRules getDefaultInstanceForType() {
return build.buf.validate.DurationRules.getDefaultInstance();
}
@java.lang.Override
public build.buf.validate.DurationRules build() {
build.buf.validate.DurationRules result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
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;
}
private void buildPartialRepeatedFields(build.buf.validate.DurationRules result) {
if (inBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)) {
in_ = java.util.Collections.unmodifiableList(in_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.in_ = in_;
} else {
result.in_ = inBuilder_.build();
}
if (notInBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
notIn_ = java.util.Collections.unmodifiableList(notIn_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.notIn_ = notIn_;
} else {
result.notIn_ = notInBuilder_.build();
}
if (exampleBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)) {
example_ = java.util.Collections.unmodifiableList(example_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.example_ = example_;
} else {
result.example_ = exampleBuilder_.build();
}
}
private void buildPartial0(build.buf.validate.DurationRules result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.const_ = constBuilder_ == null
? const_
: constBuilder_.build();
to_bitField0_ |= 0x00000001;
}
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 mergeFrom(com.google.protobuf.Message other) {
if (other instanceof build.buf.validate.DurationRules) {
return mergeFrom((build.buf.validate.DurationRules)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(build.buf.validate.DurationRules other) {
if (other == build.buf.validate.DurationRules.getDefaultInstance()) return this;
if (other.hasConst()) {
mergeConst(other.getConst());
}
if (inBuilder_ == null) {
if (!other.in_.isEmpty()) {
if (in_.isEmpty()) {
in_ = other.in_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureInIsMutable();
in_.addAll(other.in_);
}
onChanged();
}
} else {
if (!other.in_.isEmpty()) {
if (inBuilder_.isEmpty()) {
inBuilder_.dispose();
inBuilder_ = null;
in_ = other.in_;
bitField0_ = (bitField0_ & ~0x00000020);
inBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getInFieldBuilder() : null;
} else {
inBuilder_.addAllMessages(other.in_);
}
}
}
if (notInBuilder_ == null) {
if (!other.notIn_.isEmpty()) {
if (notIn_.isEmpty()) {
notIn_ = other.notIn_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureNotInIsMutable();
notIn_.addAll(other.notIn_);
}
onChanged();
}
} else {
if (!other.notIn_.isEmpty()) {
if (notInBuilder_.isEmpty()) {
notInBuilder_.dispose();
notInBuilder_ = null;
notIn_ = other.notIn_;
bitField0_ = (bitField0_ & ~0x00000040);
notInBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getNotInFieldBuilder() : null;
} else {
notInBuilder_.addAllMessages(other.notIn_);
}
}
}
if (exampleBuilder_ == null) {
if (!other.example_.isEmpty()) {
if (example_.isEmpty()) {
example_ = other.example_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureExampleIsMutable();
example_.addAll(other.example_);
}
onChanged();
}
} else {
if (!other.example_.isEmpty()) {
if (exampleBuilder_.isEmpty()) {
exampleBuilder_.dispose();
exampleBuilder_ = null;
example_ = other.example_;
bitField0_ = (bitField0_ & ~0x00000080);
exampleBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getExampleFieldBuilder() : null;
} else {
exampleBuilder_.addAllMessages(other.example_);
}
}
}
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.mergeExtensionFields(other);
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
if (!extensionsAreInitialized()) {
return false;
}
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
input.readMessage(
getConstFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 18
case 26: {
input.readMessage(
getLtFieldBuilder().getBuilder(),
extensionRegistry);
lessThanCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getLteFieldBuilder().getBuilder(),
extensionRegistry);
lessThanCase_ = 4;
break;
} // case 34
case 42: {
input.readMessage(
getGtFieldBuilder().getBuilder(),
extensionRegistry);
greaterThanCase_ = 5;
break;
} // case 42
case 50: {
input.readMessage(
getGteFieldBuilder().getBuilder(),
extensionRegistry);
greaterThanCase_ = 6;
break;
} // case 50
case 58: {
com.google.protobuf.Duration m =
input.readMessage(
com.google.protobuf.Duration.parser(),
extensionRegistry);
if (inBuilder_ == null) {
ensureInIsMutable();
in_.add(m);
} else {
inBuilder_.addMessage(m);
}
break;
} // case 58
case 66: {
com.google.protobuf.Duration m =
input.readMessage(
com.google.protobuf.Duration.parser(),
extensionRegistry);
if (notInBuilder_ == null) {
ensureNotInIsMutable();
notIn_.add(m);
} else {
notInBuilder_.addMessage(m);
}
break;
} // case 66
case 74: {
com.google.protobuf.Duration m =
input.readMessage(
com.google.protobuf.Duration.parser(),
extensionRegistry);
if (exampleBuilder_ == null) {
ensureExampleIsMutable();
example_.add(m);
} else {
exampleBuilder_.addMessage(m);
}
break;
} // case 74
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // 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_;
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> constBuilder_;
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
* @return Whether the const field is set.
*/
public boolean hasConst() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
* @return The const.
*/
public com.google.protobuf.Duration getConst() {
if (constBuilder_ == null) {
return const_ == null ? com.google.protobuf.Duration.getDefaultInstance() : const_;
} else {
return constBuilder_.getMessage();
}
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
public Builder setConst(com.google.protobuf.Duration value) {
if (constBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
const_ = value;
} else {
constBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
public Builder setConst(
com.google.protobuf.Duration.Builder builderForValue) {
if (constBuilder_ == null) {
const_ = builderForValue.build();
} else {
constBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
public Builder mergeConst(com.google.protobuf.Duration value) {
if (constBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
const_ != null &&
const_ != com.google.protobuf.Duration.getDefaultInstance()) {
getConstBuilder().mergeFrom(value);
} else {
const_ = value;
}
} else {
constBuilder_.mergeFrom(value);
}
if (const_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
public Builder clearConst() {
bitField0_ = (bitField0_ & ~0x00000001);
const_ = null;
if (constBuilder_ != null) {
constBuilder_.dispose();
constBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getConstBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getConstFieldBuilder().getBuilder();
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.DurationOrBuilder getConstOrBuilder() {
if (constBuilder_ != null) {
return constBuilder_.getMessageOrBuilder();
} else {
return const_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : const_;
}
}
/**
*
* `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
* If the field's value deviates from the specified value, an error message
* will be generated.
*
* ```proto
* message MyDuration {
* // value must equal 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
* }
* ```
*
*
* optional .google.protobuf.Duration const = 2 [json_name = "const", (.buf.validate.predefined) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getConstFieldBuilder() {
if (constBuilder_ == null) {
constBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getConst(),
getParentForChildren(),
isClean());
const_ = null;
}
return constBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ltBuilder_;
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
* @return Whether the lt field is set.
*/
@java.lang.Override
public boolean hasLt() {
return lessThanCase_ == 3;
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
* @return The lt.
*/
@java.lang.Override
public com.google.protobuf.Duration getLt() {
if (ltBuilder_ == null) {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
} else {
if (lessThanCase_ == 3) {
return ltBuilder_.getMessage();
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
public Builder setLt(com.google.protobuf.Duration value) {
if (ltBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lessThan_ = value;
onChanged();
} else {
ltBuilder_.setMessage(value);
}
lessThanCase_ = 3;
return this;
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
public Builder setLt(
com.google.protobuf.Duration.Builder builderForValue) {
if (ltBuilder_ == null) {
lessThan_ = builderForValue.build();
onChanged();
} else {
ltBuilder_.setMessage(builderForValue.build());
}
lessThanCase_ = 3;
return this;
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
public Builder mergeLt(com.google.protobuf.Duration value) {
if (ltBuilder_ == null) {
if (lessThanCase_ == 3 &&
lessThan_ != com.google.protobuf.Duration.getDefaultInstance()) {
lessThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) lessThan_)
.mergeFrom(value).buildPartial();
} else {
lessThan_ = value;
}
onChanged();
} else {
if (lessThanCase_ == 3) {
ltBuilder_.mergeFrom(value);
} else {
ltBuilder_.setMessage(value);
}
}
lessThanCase_ = 3;
return this;
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
public Builder clearLt() {
if (ltBuilder_ == null) {
if (lessThanCase_ == 3) {
lessThanCase_ = 0;
lessThan_ = null;
onChanged();
}
} else {
if (lessThanCase_ == 3) {
lessThanCase_ = 0;
lessThan_ = null;
}
ltBuilder_.clear();
}
return this;
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getLtBuilder() {
return getLtFieldBuilder().getBuilder();
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getLtOrBuilder() {
if ((lessThanCase_ == 3) && (ltBuilder_ != null)) {
return ltBuilder_.getMessageOrBuilder();
} else {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
* exclusive. If the field's value is greater than or equal to the specified
* value, an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than 5s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
* }
* ```
*
*
* .google.protobuf.Duration lt = 3 [json_name = "lt", (.buf.validate.predefined) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
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.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
(com.google.protobuf.Duration) lessThan_,
getParentForChildren(),
isClean());
lessThan_ = null;
}
lessThanCase_ = 3;
onChanged();
return ltBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> lteBuilder_;
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
* @return Whether the lte field is set.
*/
@java.lang.Override
public boolean hasLte() {
return lessThanCase_ == 4;
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
* @return The lte.
*/
@java.lang.Override
public com.google.protobuf.Duration getLte() {
if (lteBuilder_ == null) {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
} else {
if (lessThanCase_ == 4) {
return lteBuilder_.getMessage();
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
public Builder setLte(com.google.protobuf.Duration value) {
if (lteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lessThan_ = value;
onChanged();
} else {
lteBuilder_.setMessage(value);
}
lessThanCase_ = 4;
return this;
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
public Builder setLte(
com.google.protobuf.Duration.Builder builderForValue) {
if (lteBuilder_ == null) {
lessThan_ = builderForValue.build();
onChanged();
} else {
lteBuilder_.setMessage(builderForValue.build());
}
lessThanCase_ = 4;
return this;
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
public Builder mergeLte(com.google.protobuf.Duration value) {
if (lteBuilder_ == null) {
if (lessThanCase_ == 4 &&
lessThan_ != com.google.protobuf.Duration.getDefaultInstance()) {
lessThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) lessThan_)
.mergeFrom(value).buildPartial();
} else {
lessThan_ = value;
}
onChanged();
} else {
if (lessThanCase_ == 4) {
lteBuilder_.mergeFrom(value);
} else {
lteBuilder_.setMessage(value);
}
}
lessThanCase_ = 4;
return this;
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
public Builder clearLte() {
if (lteBuilder_ == null) {
if (lessThanCase_ == 4) {
lessThanCase_ = 0;
lessThan_ = null;
onChanged();
}
} else {
if (lessThanCase_ == 4) {
lessThanCase_ = 0;
lessThan_ = null;
}
lteBuilder_.clear();
}
return this;
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getLteBuilder() {
return getLteFieldBuilder().getBuilder();
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getLteOrBuilder() {
if ((lessThanCase_ == 4) && (lteBuilder_ != null)) {
return lteBuilder_.getMessageOrBuilder();
} else {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Duration) lessThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `lte` indicates that the field must be less than or equal to the specified
* value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be less than or equal to 10s
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
* }
* ```
*
*
* .google.protobuf.Duration lte = 4 [json_name = "lte", (.buf.validate.predefined) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
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.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
(com.google.protobuf.Duration) lessThan_,
getParentForChildren(),
isClean());
lessThan_ = null;
}
lessThanCase_ = 4;
onChanged();
return lteBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> gtBuilder_;
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
* @return Whether the gt field is set.
*/
@java.lang.Override
public boolean hasGt() {
return greaterThanCase_ == 5;
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
* @return The gt.
*/
@java.lang.Override
public com.google.protobuf.Duration getGt() {
if (gtBuilder_ == null) {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
} else {
if (greaterThanCase_ == 5) {
return gtBuilder_.getMessage();
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
public Builder setGt(com.google.protobuf.Duration value) {
if (gtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
greaterThan_ = value;
onChanged();
} else {
gtBuilder_.setMessage(value);
}
greaterThanCase_ = 5;
return this;
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
public Builder setGt(
com.google.protobuf.Duration.Builder builderForValue) {
if (gtBuilder_ == null) {
greaterThan_ = builderForValue.build();
onChanged();
} else {
gtBuilder_.setMessage(builderForValue.build());
}
greaterThanCase_ = 5;
return this;
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
public Builder mergeGt(com.google.protobuf.Duration value) {
if (gtBuilder_ == null) {
if (greaterThanCase_ == 5 &&
greaterThan_ != com.google.protobuf.Duration.getDefaultInstance()) {
greaterThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) greaterThan_)
.mergeFrom(value).buildPartial();
} else {
greaterThan_ = value;
}
onChanged();
} else {
if (greaterThanCase_ == 5) {
gtBuilder_.mergeFrom(value);
} else {
gtBuilder_.setMessage(value);
}
}
greaterThanCase_ = 5;
return this;
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
public Builder clearGt() {
if (gtBuilder_ == null) {
if (greaterThanCase_ == 5) {
greaterThanCase_ = 0;
greaterThan_ = null;
onChanged();
}
} else {
if (greaterThanCase_ == 5) {
greaterThanCase_ = 0;
greaterThan_ = null;
}
gtBuilder_.clear();
}
return this;
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getGtBuilder() {
return getGtFieldBuilder().getBuilder();
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGtOrBuilder() {
if ((greaterThanCase_ == 5) && (gtBuilder_ != null)) {
return gtBuilder_.getMessageOrBuilder();
} else {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `gt` requires the duration field value to be greater than the specified
* value (exclusive). If the value of `gt` is larger than a specified `lt`
* or `lte`, the range is reversed, and the field value must be outside the
* specified range. If the field value doesn't meet the required conditions,
* an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than 5s [duration.gt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
*
* // duration must be greater than 5s and less than 10s [duration.gt_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gt = 5 [json_name = "gt", (.buf.validate.predefined) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
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.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
(com.google.protobuf.Duration) greaterThan_,
getParentForChildren(),
isClean());
greaterThan_ = null;
}
greaterThanCase_ = 5;
onChanged();
return gtBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> gteBuilder_;
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
* @return Whether the gte field is set.
*/
@java.lang.Override
public boolean hasGte() {
return greaterThanCase_ == 6;
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
* @return The gte.
*/
@java.lang.Override
public com.google.protobuf.Duration getGte() {
if (gteBuilder_ == null) {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
} else {
if (greaterThanCase_ == 6) {
return gteBuilder_.getMessage();
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
public Builder setGte(com.google.protobuf.Duration value) {
if (gteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
greaterThan_ = value;
onChanged();
} else {
gteBuilder_.setMessage(value);
}
greaterThanCase_ = 6;
return this;
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
public Builder setGte(
com.google.protobuf.Duration.Builder builderForValue) {
if (gteBuilder_ == null) {
greaterThan_ = builderForValue.build();
onChanged();
} else {
gteBuilder_.setMessage(builderForValue.build());
}
greaterThanCase_ = 6;
return this;
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
public Builder mergeGte(com.google.protobuf.Duration value) {
if (gteBuilder_ == null) {
if (greaterThanCase_ == 6 &&
greaterThan_ != com.google.protobuf.Duration.getDefaultInstance()) {
greaterThan_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) greaterThan_)
.mergeFrom(value).buildPartial();
} else {
greaterThan_ = value;
}
onChanged();
} else {
if (greaterThanCase_ == 6) {
gteBuilder_.mergeFrom(value);
} else {
gteBuilder_.setMessage(value);
}
}
greaterThanCase_ = 6;
return this;
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
public Builder clearGte() {
if (gteBuilder_ == null) {
if (greaterThanCase_ == 6) {
greaterThanCase_ = 0;
greaterThan_ = null;
onChanged();
}
} else {
if (greaterThanCase_ == 6) {
greaterThanCase_ = 0;
greaterThan_ = null;
}
gteBuilder_.clear();
}
return this;
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getGteBuilder() {
return getGteFieldBuilder().getBuilder();
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getGteOrBuilder() {
if ((greaterThanCase_ == 6) && (gteBuilder_ != null)) {
return gteBuilder_.getMessageOrBuilder();
} else {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Duration) greaterThan_;
}
return com.google.protobuf.Duration.getDefaultInstance();
}
}
/**
*
* `gte` requires the duration field value to be greater than or equal to the
* specified value (exclusive). If the value of `gte` is larger than a
* specified `lt` or `lte`, the range is reversed, and the field value must
* be outside the specified range. If the field value doesn't meet the
* required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be greater than or equal to 5s [duration.gte]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
*
* // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
* google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
*
* // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
* google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
* }
* ```
*
*
* .google.protobuf.Duration gte = 6 [json_name = "gte", (.buf.validate.predefined) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
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.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
(com.google.protobuf.Duration) greaterThan_,
getParentForChildren(),
isClean());
greaterThan_ = null;
}
greaterThanCase_ = 6;
onChanged();
return gteBuilder_;
}
private java.util.List in_ =
java.util.Collections.emptyList();
private void ensureInIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
in_ = new java.util.ArrayList(in_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> inBuilder_;
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public java.util.List getInList() {
if (inBuilder_ == null) {
return java.util.Collections.unmodifiableList(in_);
} else {
return inBuilder_.getMessageList();
}
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public int getInCount() {
if (inBuilder_ == null) {
return in_.size();
} else {
return inBuilder_.getCount();
}
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration getIn(int index) {
if (inBuilder_ == null) {
return in_.get(index);
} else {
return inBuilder_.getMessage(index);
}
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder setIn(
int index, com.google.protobuf.Duration value) {
if (inBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInIsMutable();
in_.set(index, value);
onChanged();
} else {
inBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder setIn(
int index, com.google.protobuf.Duration.Builder builderForValue) {
if (inBuilder_ == null) {
ensureInIsMutable();
in_.set(index, builderForValue.build());
onChanged();
} else {
inBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder addIn(com.google.protobuf.Duration value) {
if (inBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInIsMutable();
in_.add(value);
onChanged();
} else {
inBuilder_.addMessage(value);
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder addIn(
int index, com.google.protobuf.Duration value) {
if (inBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInIsMutable();
in_.add(index, value);
onChanged();
} else {
inBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder addIn(
com.google.protobuf.Duration.Builder builderForValue) {
if (inBuilder_ == null) {
ensureInIsMutable();
in_.add(builderForValue.build());
onChanged();
} else {
inBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder addIn(
int index, com.google.protobuf.Duration.Builder builderForValue) {
if (inBuilder_ == null) {
ensureInIsMutable();
in_.add(index, builderForValue.build());
onChanged();
} else {
inBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder addAllIn(
java.lang.Iterable values) {
if (inBuilder_ == null) {
ensureInIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, in_);
onChanged();
} else {
inBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder clearIn() {
if (inBuilder_ == null) {
in_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
inBuilder_.clear();
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public Builder removeIn(int index) {
if (inBuilder_ == null) {
ensureInIsMutable();
in_.remove(index);
onChanged();
} else {
inBuilder_.remove(index);
}
return this;
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getInBuilder(
int index) {
return getInFieldBuilder().getBuilder(index);
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.DurationOrBuilder getInOrBuilder(
int index) {
if (inBuilder_ == null) {
return in_.get(index); } else {
return inBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public java.util.List
getInOrBuilderList() {
if (inBuilder_ != null) {
return inBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(in_);
}
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder addInBuilder() {
return getInFieldBuilder().addBuilder(
com.google.protobuf.Duration.getDefaultInstance());
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder addInBuilder(
int index) {
return getInFieldBuilder().addBuilder(
index, com.google.protobuf.Duration.getDefaultInstance());
}
/**
*
* `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
* If the field's value doesn't correspond to any of the specified values,
* an error message will be generated.
*
* ```proto
* message MyDuration {
* // value must be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration in = 7 [json_name = "in", (.buf.validate.predefined) = { ... }
*/
public java.util.List
getInBuilderList() {
return getInFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getInFieldBuilder() {
if (inBuilder_ == null) {
inBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
in_,
((bitField0_ & 0x00000020) != 0),
getParentForChildren(),
isClean());
in_ = null;
}
return inBuilder_;
}
private java.util.List notIn_ =
java.util.Collections.emptyList();
private void ensureNotInIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
notIn_ = new java.util.ArrayList(notIn_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> notInBuilder_;
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public java.util.List getNotInList() {
if (notInBuilder_ == null) {
return java.util.Collections.unmodifiableList(notIn_);
} else {
return notInBuilder_.getMessageList();
}
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public int getNotInCount() {
if (notInBuilder_ == null) {
return notIn_.size();
} else {
return notInBuilder_.getCount();
}
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration getNotIn(int index) {
if (notInBuilder_ == null) {
return notIn_.get(index);
} else {
return notInBuilder_.getMessage(index);
}
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder setNotIn(
int index, com.google.protobuf.Duration value) {
if (notInBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNotInIsMutable();
notIn_.set(index, value);
onChanged();
} else {
notInBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder setNotIn(
int index, com.google.protobuf.Duration.Builder builderForValue) {
if (notInBuilder_ == null) {
ensureNotInIsMutable();
notIn_.set(index, builderForValue.build());
onChanged();
} else {
notInBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder addNotIn(com.google.protobuf.Duration value) {
if (notInBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNotInIsMutable();
notIn_.add(value);
onChanged();
} else {
notInBuilder_.addMessage(value);
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder addNotIn(
int index, com.google.protobuf.Duration value) {
if (notInBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNotInIsMutable();
notIn_.add(index, value);
onChanged();
} else {
notInBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder addNotIn(
com.google.protobuf.Duration.Builder builderForValue) {
if (notInBuilder_ == null) {
ensureNotInIsMutable();
notIn_.add(builderForValue.build());
onChanged();
} else {
notInBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder addNotIn(
int index, com.google.protobuf.Duration.Builder builderForValue) {
if (notInBuilder_ == null) {
ensureNotInIsMutable();
notIn_.add(index, builderForValue.build());
onChanged();
} else {
notInBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder addAllNotIn(
java.lang.Iterable values) {
if (notInBuilder_ == null) {
ensureNotInIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, notIn_);
onChanged();
} else {
notInBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder clearNotIn() {
if (notInBuilder_ == null) {
notIn_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
notInBuilder_.clear();
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public Builder removeNotIn(int index) {
if (notInBuilder_ == null) {
ensureNotInIsMutable();
notIn_.remove(index);
onChanged();
} else {
notInBuilder_.remove(index);
}
return this;
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getNotInBuilder(
int index) {
return getNotInFieldBuilder().getBuilder(index);
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.DurationOrBuilder getNotInOrBuilder(
int index) {
if (notInBuilder_ == null) {
return notIn_.get(index); } else {
return notInBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public java.util.List
getNotInOrBuilderList() {
if (notInBuilder_ != null) {
return notInBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(notIn_);
}
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder addNotInBuilder() {
return getNotInFieldBuilder().addBuilder(
com.google.protobuf.Duration.getDefaultInstance());
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder addNotInBuilder(
int index) {
return getNotInFieldBuilder().addBuilder(
index, com.google.protobuf.Duration.getDefaultInstance());
}
/**
*
* `not_in` denotes that the field must not be equal to
* any of the specified values of the `google.protobuf.Duration` type.
* If the field's value matches any of these values, an error message will be
* generated.
*
* ```proto
* message MyDuration {
* // value must not be in list [1s, 2s, 3s]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
* }
* ```
*
*
* repeated .google.protobuf.Duration not_in = 8 [json_name = "notIn", (.buf.validate.predefined) = { ... }
*/
public java.util.List
getNotInBuilderList() {
return getNotInFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getNotInFieldBuilder() {
if (notInBuilder_ == null) {
notInBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
notIn_,
((bitField0_ & 0x00000040) != 0),
getParentForChildren(),
isClean());
notIn_ = null;
}
return notInBuilder_;
}
private java.util.List example_ =
java.util.Collections.emptyList();
private void ensureExampleIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
example_ = new java.util.ArrayList(example_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> exampleBuilder_;
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public java.util.List getExampleList() {
if (exampleBuilder_ == null) {
return java.util.Collections.unmodifiableList(example_);
} else {
return exampleBuilder_.getMessageList();
}
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public int getExampleCount() {
if (exampleBuilder_ == null) {
return example_.size();
} else {
return exampleBuilder_.getCount();
}
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration getExample(int index) {
if (exampleBuilder_ == null) {
return example_.get(index);
} else {
return exampleBuilder_.getMessage(index);
}
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder setExample(
int index, com.google.protobuf.Duration value) {
if (exampleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExampleIsMutable();
example_.set(index, value);
onChanged();
} else {
exampleBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder setExample(
int index, com.google.protobuf.Duration.Builder builderForValue) {
if (exampleBuilder_ == null) {
ensureExampleIsMutable();
example_.set(index, builderForValue.build());
onChanged();
} else {
exampleBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder addExample(com.google.protobuf.Duration value) {
if (exampleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExampleIsMutable();
example_.add(value);
onChanged();
} else {
exampleBuilder_.addMessage(value);
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder addExample(
int index, com.google.protobuf.Duration value) {
if (exampleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExampleIsMutable();
example_.add(index, value);
onChanged();
} else {
exampleBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder addExample(
com.google.protobuf.Duration.Builder builderForValue) {
if (exampleBuilder_ == null) {
ensureExampleIsMutable();
example_.add(builderForValue.build());
onChanged();
} else {
exampleBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder addExample(
int index, com.google.protobuf.Duration.Builder builderForValue) {
if (exampleBuilder_ == null) {
ensureExampleIsMutable();
example_.add(index, builderForValue.build());
onChanged();
} else {
exampleBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder addAllExample(
java.lang.Iterable values) {
if (exampleBuilder_ == null) {
ensureExampleIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, example_);
onChanged();
} else {
exampleBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder clearExample() {
if (exampleBuilder_ == null) {
example_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
exampleBuilder_.clear();
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public Builder removeExample(int index) {
if (exampleBuilder_ == null) {
ensureExampleIsMutable();
example_.remove(index);
onChanged();
} else {
exampleBuilder_.remove(index);
}
return this;
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder getExampleBuilder(
int index) {
return getExampleFieldBuilder().getBuilder(index);
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.DurationOrBuilder getExampleOrBuilder(
int index) {
if (exampleBuilder_ == null) {
return example_.get(index); } else {
return exampleBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public java.util.List
getExampleOrBuilderList() {
if (exampleBuilder_ != null) {
return exampleBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(example_);
}
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder addExampleBuilder() {
return getExampleFieldBuilder().addBuilder(
com.google.protobuf.Duration.getDefaultInstance());
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public com.google.protobuf.Duration.Builder addExampleBuilder(
int index) {
return getExampleFieldBuilder().addBuilder(
index, com.google.protobuf.Duration.getDefaultInstance());
}
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyDuration {
* google.protobuf.Duration value = 1 [
* (buf.validate.field).duration.example = { seconds: 1 },
* (buf.validate.field).duration.example = { seconds: 2 },
* ];
* }
* ```
*
*
* repeated .google.protobuf.Duration example = 9 [json_name = "example", (.buf.validate.predefined) = { ... }
*/
public java.util.List
getExampleBuilderList() {
return getExampleFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getExampleFieldBuilder() {
if (exampleBuilder_ == null) {
exampleBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
example_,
((bitField0_ & 0x00000080) != 0),
getParentForChildren(),
isClean());
example_ = null;
}
return exampleBuilder_;
}
// @@protoc_insertion_point(builder_scope:buf.validate.DurationRules)
}
// @@protoc_insertion_point(class_scope:buf.validate.DurationRules)
private static final build.buf.validate.DurationRules DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new build.buf.validate.DurationRules();
}
public static build.buf.validate.DurationRules getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DurationRules parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public build.buf.validate.DurationRules getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}