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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • 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 [(.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 [(.buf.validate.priv.field) = { ... }
        Returns:
        The const.