Class Validate.MapRules.Builder

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

    public static final class Validate.MapRules.Builder
    extends com.google.protobuf.GeneratedMessage.Builder<Validate.MapRules.Builder>
    implements Validate.MapRulesOrBuilder
     MapRules describe the constraints applied to `map` values
     
    Protobuf type validate.MapRules
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.AbstractMessage.BuilderParent parent)
    • 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<Validate.MapRules.Builder>
      • maybeForceBuilderInitialization

        private void maybeForceBuilderInitialization()
      • clear

        public Validate.MapRules.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<Validate.MapRules.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<Validate.MapRules.Builder>
      • getDefaultInstanceForType

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

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

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

        public Validate.MapRules.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<Validate.MapRules.Builder>
      • isInitialized

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

        public Validate.MapRules.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<Validate.MapRules.Builder>
        Throws:
        java.io.IOException
      • hasMinPairs

        public boolean hasMinPairs()
         MinPairs specifies that this field must have the specified number of
         KVs at a minimum
         
        optional uint64 min_pairs = 1;
        Specified by:
        hasMinPairs in interface Validate.MapRulesOrBuilder
        Returns:
        Whether the minPairs field is set.
      • getMinPairs

        public long getMinPairs()
         MinPairs specifies that this field must have the specified number of
         KVs at a minimum
         
        optional uint64 min_pairs = 1;
        Specified by:
        getMinPairs in interface Validate.MapRulesOrBuilder
        Returns:
        The minPairs.
      • setMinPairs

        public Validate.MapRules.Builder setMinPairs​(long value)
         MinPairs specifies that this field must have the specified number of
         KVs at a minimum
         
        optional uint64 min_pairs = 1;
        Parameters:
        value - The minPairs to set.
        Returns:
        This builder for chaining.
      • clearMinPairs

        public Validate.MapRules.Builder clearMinPairs()
         MinPairs specifies that this field must have the specified number of
         KVs at a minimum
         
        optional uint64 min_pairs = 1;
        Returns:
        This builder for chaining.
      • hasMaxPairs

        public boolean hasMaxPairs()
         MaxPairs specifies that this field must have the specified number of
         KVs at a maximum
         
        optional uint64 max_pairs = 2;
        Specified by:
        hasMaxPairs in interface Validate.MapRulesOrBuilder
        Returns:
        Whether the maxPairs field is set.
      • getMaxPairs

        public long getMaxPairs()
         MaxPairs specifies that this field must have the specified number of
         KVs at a maximum
         
        optional uint64 max_pairs = 2;
        Specified by:
        getMaxPairs in interface Validate.MapRulesOrBuilder
        Returns:
        The maxPairs.
      • setMaxPairs

        public Validate.MapRules.Builder setMaxPairs​(long value)
         MaxPairs specifies that this field must have the specified number of
         KVs at a maximum
         
        optional uint64 max_pairs = 2;
        Parameters:
        value - The maxPairs to set.
        Returns:
        This builder for chaining.
      • clearMaxPairs

        public Validate.MapRules.Builder clearMaxPairs()
         MaxPairs specifies that this field must have the specified number of
         KVs at a maximum
         
        optional uint64 max_pairs = 2;
        Returns:
        This builder for chaining.
      • hasNoSparse

        public boolean hasNoSparse()
         NoSparse specifies values in this field cannot be unset. This only
         applies to map's with message value types.
         
        optional bool no_sparse = 3;
        Specified by:
        hasNoSparse in interface Validate.MapRulesOrBuilder
        Returns:
        Whether the noSparse field is set.
      • getNoSparse

        public boolean getNoSparse()
         NoSparse specifies values in this field cannot be unset. This only
         applies to map's with message value types.
         
        optional bool no_sparse = 3;
        Specified by:
        getNoSparse in interface Validate.MapRulesOrBuilder
        Returns:
        The noSparse.
      • setNoSparse

        public Validate.MapRules.Builder setNoSparse​(boolean value)
         NoSparse specifies values in this field cannot be unset. This only
         applies to map's with message value types.
         
        optional bool no_sparse = 3;
        Parameters:
        value - The noSparse to set.
        Returns:
        This builder for chaining.
      • clearNoSparse

        public Validate.MapRules.Builder clearNoSparse()
         NoSparse specifies values in this field cannot be unset. This only
         applies to map's with message value types.
         
        optional bool no_sparse = 3;
        Returns:
        This builder for chaining.
      • hasKeys

        public boolean hasKeys()
         Keys specifies the constraints to be applied to each key in the field.
         
        optional .validate.FieldRules keys = 4;
        Specified by:
        hasKeys in interface Validate.MapRulesOrBuilder
        Returns:
        Whether the keys field is set.
      • clearKeys

        public Validate.MapRules.Builder clearKeys()
         Keys specifies the constraints to be applied to each key in the field.
         
        optional .validate.FieldRules keys = 4;
      • getKeysBuilder

        public Validate.FieldRules.Builder getKeysBuilder()
         Keys specifies the constraints to be applied to each key in the field.
         
        optional .validate.FieldRules keys = 4;
      • hasValues

        public boolean hasValues()
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
        Specified by:
        hasValues in interface Validate.MapRulesOrBuilder
        Returns:
        Whether the values field is set.
      • getValues

        public Validate.FieldRules getValues()
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
        Specified by:
        getValues in interface Validate.MapRulesOrBuilder
        Returns:
        The values.
      • setValues

        public Validate.MapRules.Builder setValues​(Validate.FieldRules value)
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
      • setValues

        public Validate.MapRules.Builder setValues​(Validate.FieldRules.Builder builderForValue)
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
      • mergeValues

        public Validate.MapRules.Builder mergeValues​(Validate.FieldRules value)
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
      • clearValues

        public Validate.MapRules.Builder clearValues()
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
      • getValuesBuilder

        public Validate.FieldRules.Builder getValuesBuilder()
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
      • getValuesOrBuilder

        public Validate.FieldRulesOrBuilder getValuesOrBuilder()
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
        Specified by:
        getValuesOrBuilder in interface Validate.MapRulesOrBuilder
      • getValuesFieldBuilder

        private com.google.protobuf.SingleFieldBuilder<Validate.FieldRules,​Validate.FieldRules.Builder,​Validate.FieldRulesOrBuilder> getValuesFieldBuilder()
         Values specifies the constraints to be applied to the value of each key
         in the field. Message values will still have their validations evaluated
         unless skip is specified here.
         
        optional .validate.FieldRules values = 5;
      • hasIgnoreEmpty

        public boolean hasIgnoreEmpty()
         IgnoreEmpty specifies that the validation rules of this field should be
         evaluated only if the field is not empty
         
        optional bool ignore_empty = 6;
        Specified by:
        hasIgnoreEmpty in interface Validate.MapRulesOrBuilder
        Returns:
        Whether the ignoreEmpty field is set.
      • getIgnoreEmpty

        public boolean getIgnoreEmpty()
         IgnoreEmpty specifies that the validation rules of this field should be
         evaluated only if the field is not empty
         
        optional bool ignore_empty = 6;
        Specified by:
        getIgnoreEmpty in interface Validate.MapRulesOrBuilder
        Returns:
        The ignoreEmpty.
      • setIgnoreEmpty

        public Validate.MapRules.Builder setIgnoreEmpty​(boolean value)
         IgnoreEmpty specifies that the validation rules of this field should be
         evaluated only if the field is not empty
         
        optional bool ignore_empty = 6;
        Parameters:
        value - The ignoreEmpty to set.
        Returns:
        This builder for chaining.
      • clearIgnoreEmpty

        public Validate.MapRules.Builder clearIgnoreEmpty()
         IgnoreEmpty specifies that the validation rules of this field should be
         evaluated only if the field is not empty
         
        optional bool ignore_empty = 6;
        Returns:
        This builder for chaining.