build.buf.validate.TimestampRules 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
The newest version!
// 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;
/**
*
* TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
*
*
* Protobuf type {@code buf.validate.TimestampRules}
*/
public final class TimestampRules extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:buf.validate.TimestampRules)
TimestampRulesOrBuilder {
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= */ "",
TimestampRules.class.getName());
}
// Use TimestampRules.newBuilder() to construct.
private TimestampRules(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private TimestampRules() {
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
build.buf.validate.TimestampRules.class, build.buf.validate.TimestampRules.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),
LT_NOW(7),
LESSTHAN_NOT_SET(0);
private final int value;
private LessThanCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LessThanCase valueOf(int value) {
return forNumber(value);
}
public static LessThanCase forNumber(int value) {
switch (value) {
case 3: return LT;
case 4: return LTE;
case 7: return LT_NOW;
case 0: return LESSTHAN_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public LessThanCase
getLessThanCase() {
return LessThanCase.forNumber(
lessThanCase_);
}
private int greaterThanCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object greaterThan_;
public enum GreaterThanCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
GT(5),
GTE(6),
GT_NOW(8),
GREATERTHAN_NOT_SET(0);
private final int value;
private GreaterThanCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static GreaterThanCase valueOf(int value) {
return forNumber(value);
}
public static GreaterThanCase forNumber(int value) {
switch (value) {
case 5: return GT;
case 6: return GTE;
case 8: return GT_NOW;
case 0: return GREATERTHAN_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public GreaterThanCase
getGreaterThanCase() {
return GreaterThanCase.forNumber(
greaterThanCase_);
}
public static final int CONST_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp const_;
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
* @return Whether the const field is set.
*/
@java.lang.Override
public boolean hasConst() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
* @return The const.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getConst() {
return const_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : const_;
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() {
return const_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : const_;
}
public static final int LT_FIELD_NUMBER = 3;
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
* @return Whether the lt field is set.
*/
@java.lang.Override
public boolean hasLt() {
return lessThanCase_ == 3;
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
* @return The lt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getLt() {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
public static final int LTE_FIELD_NUMBER = 4;
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
* @return Whether the lte field is set.
*/
@java.lang.Override
public boolean hasLte() {
return lessThanCase_ == 4;
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
* @return The lte.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getLte() {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
public static final int LT_NOW_FIELD_NUMBER = 7;
/**
*
* `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be less than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
* }
* ```
*
*
* bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... }
* @return Whether the ltNow field is set.
*/
@java.lang.Override
public boolean hasLtNow() {
return lessThanCase_ == 7;
}
/**
*
* `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be less than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
* }
* ```
*
*
* bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... }
* @return The ltNow.
*/
@java.lang.Override
public boolean getLtNow() {
if (lessThanCase_ == 7) {
return (java.lang.Boolean) lessThan_;
}
return false;
}
public static final int GT_FIELD_NUMBER = 5;
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
* @return Whether the gt field is set.
*/
@java.lang.Override
public boolean hasGt() {
return greaterThanCase_ == 5;
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
* @return The gt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getGt() {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
public static final int GTE_FIELD_NUMBER = 6;
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
* @return Whether the gte field is set.
*/
@java.lang.Override
public boolean hasGte() {
return greaterThanCase_ == 6;
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
* @return The gte.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getGte() {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
public static final int GT_NOW_FIELD_NUMBER = 8;
/**
*
* `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be greater than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
* }
* ```
*
*
* bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... }
* @return Whether the gtNow field is set.
*/
@java.lang.Override
public boolean hasGtNow() {
return greaterThanCase_ == 8;
}
/**
*
* `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be greater than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
* }
* ```
*
*
* bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... }
* @return The gtNow.
*/
@java.lang.Override
public boolean getGtNow() {
if (greaterThanCase_ == 8) {
return (java.lang.Boolean) greaterThan_;
}
return false;
}
public static final int WITHIN_FIELD_NUMBER = 9;
private com.google.protobuf.Duration within_;
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
* @return Whether the within field is set.
*/
@java.lang.Override
public boolean hasWithin() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
* @return The within.
*/
@java.lang.Override
public com.google.protobuf.Duration getWithin() {
return within_ == null ? com.google.protobuf.Duration.getDefaultInstance() : within_;
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getWithinOrBuilder() {
return within_ == null ? com.google.protobuf.Duration.getDefaultInstance() : within_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getConst());
}
if (lessThanCase_ == 3) {
output.writeMessage(3, (com.google.protobuf.Timestamp) lessThan_);
}
if (lessThanCase_ == 4) {
output.writeMessage(4, (com.google.protobuf.Timestamp) lessThan_);
}
if (greaterThanCase_ == 5) {
output.writeMessage(5, (com.google.protobuf.Timestamp) greaterThan_);
}
if (greaterThanCase_ == 6) {
output.writeMessage(6, (com.google.protobuf.Timestamp) greaterThan_);
}
if (lessThanCase_ == 7) {
output.writeBool(
7, (boolean)((java.lang.Boolean) lessThan_));
}
if (greaterThanCase_ == 8) {
output.writeBool(
8, (boolean)((java.lang.Boolean) greaterThan_));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(9, getWithin());
}
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.Timestamp) lessThan_);
}
if (lessThanCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.google.protobuf.Timestamp) lessThan_);
}
if (greaterThanCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (com.google.protobuf.Timestamp) greaterThan_);
}
if (greaterThanCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (com.google.protobuf.Timestamp) greaterThan_);
}
if (lessThanCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
7, (boolean)((java.lang.Boolean) lessThan_));
}
if (greaterThanCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
8, (boolean)((java.lang.Boolean) greaterThan_));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getWithin());
}
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.TimestampRules)) {
return super.equals(obj);
}
build.buf.validate.TimestampRules other = (build.buf.validate.TimestampRules) obj;
if (hasConst() != other.hasConst()) return false;
if (hasConst()) {
if (!getConst()
.equals(other.getConst())) return false;
}
if (hasWithin() != other.hasWithin()) return false;
if (hasWithin()) {
if (!getWithin()
.equals(other.getWithin())) return false;
}
if (!getLessThanCase().equals(other.getLessThanCase())) return false;
switch (lessThanCase_) {
case 3:
if (!getLt()
.equals(other.getLt())) return false;
break;
case 4:
if (!getLte()
.equals(other.getLte())) return false;
break;
case 7:
if (getLtNow()
!= other.getLtNow()) return false;
break;
case 0:
default:
}
if (!getGreaterThanCase().equals(other.getGreaterThanCase())) return false;
switch (greaterThanCase_) {
case 5:
if (!getGt()
.equals(other.getGt())) return false;
break;
case 6:
if (!getGte()
.equals(other.getGte())) return false;
break;
case 8:
if (getGtNow()
!= other.getGtNow()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@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 (hasWithin()) {
hash = (37 * hash) + WITHIN_FIELD_NUMBER;
hash = (53 * hash) + getWithin().hashCode();
}
switch (lessThanCase_) {
case 3:
hash = (37 * hash) + LT_FIELD_NUMBER;
hash = (53 * hash) + getLt().hashCode();
break;
case 4:
hash = (37 * hash) + LTE_FIELD_NUMBER;
hash = (53 * hash) + getLte().hashCode();
break;
case 7:
hash = (37 * hash) + LT_NOW_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getLtNow());
break;
case 0:
default:
}
switch (greaterThanCase_) {
case 5:
hash = (37 * hash) + GT_FIELD_NUMBER;
hash = (53 * hash) + getGt().hashCode();
break;
case 6:
hash = (37 * hash) + GTE_FIELD_NUMBER;
hash = (53 * hash) + getGte().hashCode();
break;
case 8:
hash = (37 * hash) + GT_NOW_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getGtNow());
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static build.buf.validate.TimestampRules parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static build.buf.validate.TimestampRules 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.TimestampRules parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static build.buf.validate.TimestampRules 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.TimestampRules parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static build.buf.validate.TimestampRules parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static build.buf.validate.TimestampRules parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static build.buf.validate.TimestampRules 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.TimestampRules parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static build.buf.validate.TimestampRules 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.TimestampRules parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static build.buf.validate.TimestampRules 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.TimestampRules 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;
}
/**
*
* TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
*
*
* Protobuf type {@code buf.validate.TimestampRules}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:buf.validate.TimestampRules)
build.buf.validate.TimestampRulesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return build.buf.validate.ValidateProto.internal_static_buf_validate_TimestampRules_fieldAccessorTable
.ensureFieldAccessorsInitialized(
build.buf.validate.TimestampRules.class, build.buf.validate.TimestampRules.Builder.class);
}
// Construct using build.buf.validate.TimestampRules.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();
getWithinFieldBuilder();
}
}
@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();
}
within_ = null;
if (withinBuilder_ != null) {
withinBuilder_.dispose();
withinBuilder_ = null;
}
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_TimestampRules_descriptor;
}
@java.lang.Override
public build.buf.validate.TimestampRules getDefaultInstanceForType() {
return build.buf.validate.TimestampRules.getDefaultInstance();
}
@java.lang.Override
public build.buf.validate.TimestampRules build() {
build.buf.validate.TimestampRules result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public build.buf.validate.TimestampRules buildPartial() {
build.buf.validate.TimestampRules result = new build.buf.validate.TimestampRules(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(build.buf.validate.TimestampRules result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.const_ = constBuilder_ == null
? const_
: constBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.within_ = withinBuilder_ == null
? within_
: withinBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(build.buf.validate.TimestampRules result) {
result.lessThanCase_ = lessThanCase_;
result.lessThan_ = this.lessThan_;
if (lessThanCase_ == 3 &&
ltBuilder_ != null) {
result.lessThan_ = ltBuilder_.build();
}
if (lessThanCase_ == 4 &&
lteBuilder_ != null) {
result.lessThan_ = lteBuilder_.build();
}
result.greaterThanCase_ = greaterThanCase_;
result.greaterThan_ = this.greaterThan_;
if (greaterThanCase_ == 5 &&
gtBuilder_ != null) {
result.greaterThan_ = gtBuilder_.build();
}
if (greaterThanCase_ == 6 &&
gteBuilder_ != null) {
result.greaterThan_ = gteBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof build.buf.validate.TimestampRules) {
return mergeFrom((build.buf.validate.TimestampRules)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(build.buf.validate.TimestampRules other) {
if (other == build.buf.validate.TimestampRules.getDefaultInstance()) return this;
if (other.hasConst()) {
mergeConst(other.getConst());
}
if (other.hasWithin()) {
mergeWithin(other.getWithin());
}
switch (other.getLessThanCase()) {
case LT: {
mergeLt(other.getLt());
break;
}
case LTE: {
mergeLte(other.getLte());
break;
}
case LT_NOW: {
setLtNow(other.getLtNow());
break;
}
case LESSTHAN_NOT_SET: {
break;
}
}
switch (other.getGreaterThanCase()) {
case GT: {
mergeGt(other.getGt());
break;
}
case GTE: {
mergeGte(other.getGte());
break;
}
case GT_NOW: {
setGtNow(other.getGtNow());
break;
}
case GREATERTHAN_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
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 56: {
lessThan_ = input.readBool();
lessThanCase_ = 7;
break;
} // case 56
case 64: {
greaterThan_ = input.readBool();
greaterThanCase_ = 8;
break;
} // case 64
case 74: {
input.readMessage(
getWithinFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
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.Timestamp const_;
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> constBuilder_;
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
* @return Whether the const field is set.
*/
public boolean hasConst() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
* @return The const.
*/
public com.google.protobuf.Timestamp getConst() {
if (constBuilder_ == null) {
return const_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : const_;
} else {
return constBuilder_.getMessage();
}
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
public Builder setConst(com.google.protobuf.Timestamp value) {
if (constBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
const_ = value;
} else {
constBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
public Builder setConst(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (constBuilder_ == null) {
const_ = builderForValue.build();
} else {
constBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
public Builder mergeConst(com.google.protobuf.Timestamp value) {
if (constBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
const_ != null &&
const_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getConstBuilder().mergeFrom(value);
} else {
const_ = value;
}
} else {
constBuilder_.mergeFrom(value);
}
if (const_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
public Builder clearConst() {
bitField0_ = (bitField0_ & ~0x00000001);
const_ = null;
if (constBuilder_ != null) {
constBuilder_.dispose();
constBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.Timestamp.Builder getConstBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getConstFieldBuilder().getBuilder();
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.TimestampOrBuilder getConstOrBuilder() {
if (constBuilder_ != null) {
return constBuilder_.getMessageOrBuilder();
} else {
return const_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : const_;
}
}
/**
*
* `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
*
* ```proto
* message MyTimestamp {
* // value must equal 2023-05-03T10:00:00Z
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
* }
* ```
*
*
* optional .google.protobuf.Timestamp const = 2 [json_name = "const", (.buf.validate.priv.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getConstFieldBuilder() {
if (constBuilder_ == null) {
constBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getConst(),
getParentForChildren(),
isClean());
const_ = null;
}
return constBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> ltBuilder_;
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
* @return Whether the lt field is set.
*/
@java.lang.Override
public boolean hasLt() {
return lessThanCase_ == 3;
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
* @return The lt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getLt() {
if (ltBuilder_ == null) {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
} else {
if (lessThanCase_ == 3) {
return ltBuilder_.getMessage();
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
public Builder setLt(com.google.protobuf.Timestamp value) {
if (ltBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lessThan_ = value;
onChanged();
} else {
ltBuilder_.setMessage(value);
}
lessThanCase_ = 3;
return this;
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
public Builder setLt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (ltBuilder_ == null) {
lessThan_ = builderForValue.build();
onChanged();
} else {
ltBuilder_.setMessage(builderForValue.build());
}
lessThanCase_ = 3;
return this;
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
public Builder mergeLt(com.google.protobuf.Timestamp value) {
if (ltBuilder_ == null) {
if (lessThanCase_ == 3 &&
lessThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
lessThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) lessThan_)
.mergeFrom(value).buildPartial();
} else {
lessThan_ = value;
}
onChanged();
} else {
if (lessThanCase_ == 3) {
ltBuilder_.mergeFrom(value);
} else {
ltBuilder_.setMessage(value);
}
}
lessThanCase_ = 3;
return this;
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
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;
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.Timestamp.Builder getLtBuilder() {
return getLtFieldBuilder().getBuilder();
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getLtOrBuilder() {
if ((lessThanCase_ == 3) && (ltBuilder_ != null)) {
return ltBuilder_.getMessageOrBuilder();
} else {
if (lessThanCase_ == 3) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyDuration {
* // duration must be less than 'P3D' [duration.lt]
* google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lt = 3 [json_name = "lt", (.buf.validate.priv.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getLtFieldBuilder() {
if (ltBuilder_ == null) {
if (!(lessThanCase_ == 3)) {
lessThan_ = com.google.protobuf.Timestamp.getDefaultInstance();
}
ltBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
(com.google.protobuf.Timestamp) lessThan_,
getParentForChildren(),
isClean());
lessThan_ = null;
}
lessThanCase_ = 3;
onChanged();
return ltBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lteBuilder_;
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
* @return Whether the lte field is set.
*/
@java.lang.Override
public boolean hasLte() {
return lessThanCase_ == 4;
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
* @return The lte.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getLte() {
if (lteBuilder_ == null) {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
} else {
if (lessThanCase_ == 4) {
return lteBuilder_.getMessage();
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
public Builder setLte(com.google.protobuf.Timestamp value) {
if (lteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lessThan_ = value;
onChanged();
} else {
lteBuilder_.setMessage(value);
}
lessThanCase_ = 4;
return this;
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
public Builder setLte(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (lteBuilder_ == null) {
lessThan_ = builderForValue.build();
onChanged();
} else {
lteBuilder_.setMessage(builderForValue.build());
}
lessThanCase_ = 4;
return this;
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
public Builder mergeLte(com.google.protobuf.Timestamp value) {
if (lteBuilder_ == null) {
if (lessThanCase_ == 4 &&
lessThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
lessThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) lessThan_)
.mergeFrom(value).buildPartial();
} else {
lessThan_ = value;
}
onChanged();
} else {
if (lessThanCase_ == 4) {
lteBuilder_.mergeFrom(value);
} else {
lteBuilder_.setMessage(value);
}
}
lessThanCase_ = 4;
return this;
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
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;
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.Timestamp.Builder getLteBuilder() {
return getLteFieldBuilder().getBuilder();
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getLteOrBuilder() {
if ((lessThanCase_ == 4) && (lteBuilder_ != null)) {
return lteBuilder_.getMessageOrBuilder();
} else {
if (lessThanCase_ == 4) {
return (com.google.protobuf.Timestamp) lessThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
* }
* ```
*
*
* .google.protobuf.Timestamp lte = 4 [json_name = "lte", (.buf.validate.priv.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getLteFieldBuilder() {
if (lteBuilder_ == null) {
if (!(lessThanCase_ == 4)) {
lessThan_ = com.google.protobuf.Timestamp.getDefaultInstance();
}
lteBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
(com.google.protobuf.Timestamp) lessThan_,
getParentForChildren(),
isClean());
lessThan_ = null;
}
lessThanCase_ = 4;
onChanged();
return lteBuilder_;
}
/**
*
* `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be less than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
* }
* ```
*
*
* bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... }
* @return Whether the ltNow field is set.
*/
public boolean hasLtNow() {
return lessThanCase_ == 7;
}
/**
*
* `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be less than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
* }
* ```
*
*
* bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... }
* @return The ltNow.
*/
public boolean getLtNow() {
if (lessThanCase_ == 7) {
return (java.lang.Boolean) lessThan_;
}
return false;
}
/**
*
* `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be less than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
* }
* ```
*
*
* bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... }
* @param value The ltNow to set.
* @return This builder for chaining.
*/
public Builder setLtNow(boolean value) {
lessThanCase_ = 7;
lessThan_ = value;
onChanged();
return this;
}
/**
*
* `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be less than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
* }
* ```
*
*
* bool lt_now = 7 [json_name = "ltNow", (.buf.validate.priv.field) = { ... }
* @return This builder for chaining.
*/
public Builder clearLtNow() {
if (lessThanCase_ == 7) {
lessThanCase_ = 0;
lessThan_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> gtBuilder_;
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
* @return Whether the gt field is set.
*/
@java.lang.Override
public boolean hasGt() {
return greaterThanCase_ == 5;
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
* @return The gt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getGt() {
if (gtBuilder_ == null) {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
} else {
if (greaterThanCase_ == 5) {
return gtBuilder_.getMessage();
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
public Builder setGt(com.google.protobuf.Timestamp value) {
if (gtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
greaterThan_ = value;
onChanged();
} else {
gtBuilder_.setMessage(value);
}
greaterThanCase_ = 5;
return this;
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
public Builder setGt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (gtBuilder_ == null) {
greaterThan_ = builderForValue.build();
onChanged();
} else {
gtBuilder_.setMessage(builderForValue.build());
}
greaterThanCase_ = 5;
return this;
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
public Builder mergeGt(com.google.protobuf.Timestamp value) {
if (gtBuilder_ == null) {
if (greaterThanCase_ == 5 &&
greaterThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
greaterThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) 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 timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
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 timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.Timestamp.Builder getGtBuilder() {
return getGtFieldBuilder().getBuilder();
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getGtOrBuilder() {
if ((greaterThanCase_ == 5) && (gtBuilder_ != null)) {
return gtBuilder_.getMessageOrBuilder();
} else {
if (greaterThanCase_ == 5) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* `gt` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
*
* // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gt = 5 [json_name = "gt", (.buf.validate.priv.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getGtFieldBuilder() {
if (gtBuilder_ == null) {
if (!(greaterThanCase_ == 5)) {
greaterThan_ = com.google.protobuf.Timestamp.getDefaultInstance();
}
gtBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
(com.google.protobuf.Timestamp) greaterThan_,
getParentForChildren(),
isClean());
greaterThan_ = null;
}
greaterThanCase_ = 5;
onChanged();
return gtBuilder_;
}
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> gteBuilder_;
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
* @return Whether the gte field is set.
*/
@java.lang.Override
public boolean hasGte() {
return greaterThanCase_ == 6;
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
* @return The gte.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getGte() {
if (gteBuilder_ == null) {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
} else {
if (greaterThanCase_ == 6) {
return gteBuilder_.getMessage();
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
public Builder setGte(com.google.protobuf.Timestamp value) {
if (gteBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
greaterThan_ = value;
onChanged();
} else {
gteBuilder_.setMessage(value);
}
greaterThanCase_ = 6;
return this;
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
public Builder setGte(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (gteBuilder_ == null) {
greaterThan_ = builderForValue.build();
onChanged();
} else {
gteBuilder_.setMessage(builderForValue.build());
}
greaterThanCase_ = 6;
return this;
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
public Builder mergeGte(com.google.protobuf.Timestamp value) {
if (gteBuilder_ == null) {
if (greaterThanCase_ == 6 &&
greaterThan_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
greaterThan_ = com.google.protobuf.Timestamp.newBuilder((com.google.protobuf.Timestamp) 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 timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
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 timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.Timestamp.Builder getGteBuilder() {
return getGteFieldBuilder().getBuilder();
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getGteOrBuilder() {
if ((greaterThanCase_ == 6) && (gteBuilder_ != null)) {
return gteBuilder_.getMessageOrBuilder();
} else {
if (greaterThanCase_ == 6) {
return (com.google.protobuf.Timestamp) greaterThan_;
}
return com.google.protobuf.Timestamp.getDefaultInstance();
}
}
/**
*
* `gte` requires the timestamp 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 MyTimestamp {
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
* google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
*
* // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
* google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
*
* // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
* google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
* }
* ```
*
*
* .google.protobuf.Timestamp gte = 6 [json_name = "gte", (.buf.validate.priv.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getGteFieldBuilder() {
if (gteBuilder_ == null) {
if (!(greaterThanCase_ == 6)) {
greaterThan_ = com.google.protobuf.Timestamp.getDefaultInstance();
}
gteBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
(com.google.protobuf.Timestamp) greaterThan_,
getParentForChildren(),
isClean());
greaterThan_ = null;
}
greaterThanCase_ = 6;
onChanged();
return gteBuilder_;
}
/**
*
* `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be greater than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
* }
* ```
*
*
* bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... }
* @return Whether the gtNow field is set.
*/
public boolean hasGtNow() {
return greaterThanCase_ == 8;
}
/**
*
* `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be greater than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
* }
* ```
*
*
* bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... }
* @return The gtNow.
*/
public boolean getGtNow() {
if (greaterThanCase_ == 8) {
return (java.lang.Boolean) greaterThan_;
}
return false;
}
/**
*
* `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be greater than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
* }
* ```
*
*
* bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... }
* @param value The gtNow to set.
* @return This builder for chaining.
*/
public Builder setGtNow(boolean value) {
greaterThanCase_ = 8;
greaterThan_ = value;
onChanged();
return this;
}
/**
*
* `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
*
* ```proto
* message MyTimestamp {
* // value must be greater than now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
* }
* ```
*
*
* bool gt_now = 8 [json_name = "gtNow", (.buf.validate.priv.field) = { ... }
* @return This builder for chaining.
*/
public Builder clearGtNow() {
if (greaterThanCase_ == 8) {
greaterThanCase_ = 0;
greaterThan_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.Duration within_;
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> withinBuilder_;
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
* @return Whether the within field is set.
*/
public boolean hasWithin() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
* @return The within.
*/
public com.google.protobuf.Duration getWithin() {
if (withinBuilder_ == null) {
return within_ == null ? com.google.protobuf.Duration.getDefaultInstance() : within_;
} else {
return withinBuilder_.getMessage();
}
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
public Builder setWithin(com.google.protobuf.Duration value) {
if (withinBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
within_ = value;
} else {
withinBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
public Builder setWithin(
com.google.protobuf.Duration.Builder builderForValue) {
if (withinBuilder_ == null) {
within_ = builderForValue.build();
} else {
withinBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
public Builder mergeWithin(com.google.protobuf.Duration value) {
if (withinBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
within_ != null &&
within_ != com.google.protobuf.Duration.getDefaultInstance()) {
getWithinBuilder().mergeFrom(value);
} else {
within_ = value;
}
} else {
withinBuilder_.mergeFrom(value);
}
if (within_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
public Builder clearWithin() {
bitField0_ = (bitField0_ & ~0x00000080);
within_ = null;
if (withinBuilder_ != null) {
withinBuilder_.dispose();
withinBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.Duration.Builder getWithinBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getWithinFieldBuilder().getBuilder();
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
public com.google.protobuf.DurationOrBuilder getWithinOrBuilder() {
if (withinBuilder_ != null) {
return withinBuilder_.getMessageOrBuilder();
} else {
return within_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : within_;
}
}
/**
*
* `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
*
* ```proto
* message MyTimestamp {
* // value must be within 1 hour of now
* google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
* }
* ```
*
*
* optional .google.protobuf.Duration within = 9 [json_name = "within", (.buf.validate.priv.field) = { ... }
*/
private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getWithinFieldBuilder() {
if (withinBuilder_ == null) {
withinBuilder_ = new com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getWithin(),
getParentForChildren(),
isClean());
within_ = null;
}
return withinBuilder_;
}
// @@protoc_insertion_point(builder_scope:buf.validate.TimestampRules)
}
// @@protoc_insertion_point(class_scope:buf.validate.TimestampRules)
private static final build.buf.validate.TimestampRules DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new build.buf.validate.TimestampRules();
}
public static build.buf.validate.TimestampRules getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TimestampRules 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.TimestampRules getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}