public interface BoolRulesOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and Description |
|---|---|
boolean |
getConst()
`const` requires the field value to exactly match the specified boolean value.
|
boolean |
hasConst()
`const` requires the field value to exactly match the specified boolean value.
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofboolean hasConst()
`const` requires the field value to exactly match the specified boolean value.
If the field value doesn't match, an error message is generated.
```proto
message MyBool {
// value must equal true
bool value = 1 [(buf.validate.field).bool.const = true];
}
```
optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }boolean getConst()
`const` requires the field value to exactly match the specified boolean value.
If the field value doesn't match, an error message is generated.
```proto
message MyBool {
// value must equal true
bool value = 1 [(buf.validate.field).bool.const = true];
}
```
optional bool const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }Copyright © 2023. All rights reserved.