Package build.buf.validate
Interface BoolRulesOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
BoolRules,BoolRules.Builder
public interface BoolRulesOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
hasConst
boolean 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) = { ... }- Returns:
- Whether the const field is set.
-
getConst
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) = { ... }- Returns:
- The const.
-