Class EnumRules.Builder

  • All Implemented Interfaces:
    EnumRulesOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    EnumRules

    public static final class EnumRules.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<EnumRules.Builder>
    implements EnumRulesOrBuilder
     EnumRules describe the constraints applied to `enum` values.
     
    Protobuf type buf.validate.EnumRules
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EnumRules.Builder addAllIn​(java.lang.Iterable<? extends java.lang.Integer> values)
      `in` requires the field value to be equal to one of the specified enum values.
      EnumRules.Builder addAllNotIn​(java.lang.Iterable<? extends java.lang.Integer> values)
      `not_in` requires the field value to be not equal to any of the specified enum values.
      EnumRules.Builder addIn​(int value)
      `in` requires the field value to be equal to one of the specified enum values.
      EnumRules.Builder addNotIn​(int value)
      `not_in` requires the field value to be not equal to any of the specified enum values.
      EnumRules build()  
      EnumRules buildPartial()  
      EnumRules.Builder clear()  
      EnumRules.Builder clearConst()
      `const` requires the field value to exactly match the specified enum value.
      EnumRules.Builder clearDefinedOnly()
      `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
      EnumRules.Builder clearIn()
      `in` requires the field value to be equal to one of the specified enum values.
      EnumRules.Builder clearNotIn()
      `not_in` requires the field value to be not equal to any of the specified enum values.
      int getConst()
      `const` requires the field value to exactly match the specified enum value.
      EnumRules getDefaultInstanceForType()  
      boolean getDefinedOnly()
      `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      int getIn​(int index)
      `in` requires the field value to be equal to one of the specified enum values.
      int getInCount()
      `in` requires the field value to be equal to one of the specified enum values.
      java.util.List<java.lang.Integer> getInList()
      `in` requires the field value to be equal to one of the specified enum values.
      int getNotIn​(int index)
      `not_in` requires the field value to be not equal to any of the specified enum values.
      int getNotInCount()
      `not_in` requires the field value to be not equal to any of the specified enum values.
      java.util.List<java.lang.Integer> getNotInList()
      `not_in` requires the field value to be not equal to any of the specified enum values.
      boolean hasConst()
      `const` requires the field value to exactly match the specified enum value.
      boolean hasDefinedOnly()
      `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      EnumRules.Builder mergeFrom​(EnumRules other)  
      EnumRules.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      EnumRules.Builder mergeFrom​(com.google.protobuf.Message other)  
      EnumRules.Builder setConst​(int value)
      `const` requires the field value to exactly match the specified enum value.
      EnumRules.Builder setDefinedOnly​(boolean value)
      `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
      EnumRules.Builder setIn​(int index, int value)
      `in` requires the field value to be equal to one of the specified enum values.
      EnumRules.Builder setNotIn​(int index, int value)
      `not_in` requires the field value to be not equal to any of the specified enum values.
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

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

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

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<EnumRules.Builder>
      • clear

        public EnumRules.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessage.Builder<EnumRules.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<EnumRules.Builder>
      • getDefaultInstanceForType

        public EnumRules getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public EnumRules build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public EnumRules buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • mergeFrom

        public EnumRules.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EnumRules.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.Builder<EnumRules.Builder>
      • mergeFrom

        public EnumRules.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EnumRules.Builder>
        Throws:
        java.io.IOException
      • hasConst

        public boolean hasConst()
         `const` requires the field value to exactly match the specified enum value.
         If the field value doesn't match, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
         }
         ```
         
        optional int32 const = 1 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasConst in interface EnumRulesOrBuilder
        Returns:
        Whether the const field is set.
      • getConst

        public int getConst()
         `const` requires the field value to exactly match the specified enum value.
         If the field value doesn't match, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
         }
         ```
         
        optional int32 const = 1 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getConst in interface EnumRulesOrBuilder
        Returns:
        The const.
      • setConst

        public EnumRules.Builder setConst​(int value)
         `const` requires the field value to exactly match the specified enum value.
         If the field value doesn't match, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
         }
         ```
         
        optional int32 const = 1 [(.buf.validate.priv.field) = { ... }
        Parameters:
        value - The const to set.
        Returns:
        This builder for chaining.
      • clearConst

        public EnumRules.Builder clearConst()
         `const` requires the field value to exactly match the specified enum value.
         If the field value doesn't match, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
         }
         ```
         
        optional int32 const = 1 [(.buf.validate.priv.field) = { ... }
        Returns:
        This builder for chaining.
      • hasDefinedOnly

        public boolean hasDefinedOnly()
         `defined_only` requires the field value to be one of the defined values for
         this enum, failing on any undefined value.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
         }
         ```
         
        optional bool defined_only = 2;
        Specified by:
        hasDefinedOnly in interface EnumRulesOrBuilder
        Returns:
        Whether the definedOnly field is set.
      • getDefinedOnly

        public boolean getDefinedOnly()
         `defined_only` requires the field value to be one of the defined values for
         this enum, failing on any undefined value.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
         }
         ```
         
        optional bool defined_only = 2;
        Specified by:
        getDefinedOnly in interface EnumRulesOrBuilder
        Returns:
        The definedOnly.
      • setDefinedOnly

        public EnumRules.Builder setDefinedOnly​(boolean value)
         `defined_only` requires the field value to be one of the defined values for
         this enum, failing on any undefined value.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
         }
         ```
         
        optional bool defined_only = 2;
        Parameters:
        value - The definedOnly to set.
        Returns:
        This builder for chaining.
      • clearDefinedOnly

        public EnumRules.Builder clearDefinedOnly()
         `defined_only` requires the field value to be one of the defined values for
         this enum, failing on any undefined value.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
         }
         ```
         
        optional bool defined_only = 2;
        Returns:
        This builder for chaining.
      • getInList

        public java.util.List<java.lang.Integer> getInList()
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getInList in interface EnumRulesOrBuilder
        Returns:
        A list containing the in.
      • getInCount

        public int getInCount()
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getInCount in interface EnumRulesOrBuilder
        Returns:
        The count of in.
      • getIn

        public int getIn​(int index)
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getIn in interface EnumRulesOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The in at the given index.
      • setIn

        public EnumRules.Builder setIn​(int index,
                                       int value)
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Parameters:
        index - The index to set the value at.
        value - The in to set.
        Returns:
        This builder for chaining.
      • addIn

        public EnumRules.Builder addIn​(int value)
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Parameters:
        value - The in to add.
        Returns:
        This builder for chaining.
      • addAllIn

        public EnumRules.Builder addAllIn​(java.lang.Iterable<? extends java.lang.Integer> values)
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Parameters:
        values - The in to add.
        Returns:
        This builder for chaining.
      • clearIn

        public EnumRules.Builder clearIn()
         `in` requires the field value to be equal to one of the
         specified enum values. If the field value doesn't match any of the
         specified values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
         }
         ```
         
        repeated int32 in = 3 [(.buf.validate.priv.field) = { ... }
        Returns:
        This builder for chaining.
      • getNotInList

        public java.util.List<java.lang.Integer> getNotInList()
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getNotInList in interface EnumRulesOrBuilder
        Returns:
        A list containing the notIn.
      • getNotInCount

        public int getNotInCount()
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getNotInCount in interface EnumRulesOrBuilder
        Returns:
        The count of notIn.
      • getNotIn

        public int getNotIn​(int index)
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getNotIn in interface EnumRulesOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The notIn at the given index.
      • setNotIn

        public EnumRules.Builder setNotIn​(int index,
                                          int value)
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Parameters:
        index - The index to set the value at.
        value - The notIn to set.
        Returns:
        This builder for chaining.
      • addNotIn

        public EnumRules.Builder addNotIn​(int value)
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Parameters:
        value - The notIn to add.
        Returns:
        This builder for chaining.
      • addAllNotIn

        public EnumRules.Builder addAllNotIn​(java.lang.Iterable<? extends java.lang.Integer> values)
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Parameters:
        values - The notIn to add.
        Returns:
        This builder for chaining.
      • clearNotIn

        public EnumRules.Builder clearNotIn()
         `not_in` requires the field value to be not equal to any of the
         specified enum values. If the field value matches one of the specified
         values, an error message is generated.
        
         ```proto
         enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
         }
        
         message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
         }
         ```
         
        repeated int32 not_in = 4 [(.buf.validate.priv.field) = { ... }
        Returns:
        This builder for chaining.