Class BytesRules

  • All Implemented Interfaces:
    BytesRulesOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.io.Serializable

    public final class BytesRules
    extends com.google.protobuf.GeneratedMessage
    implements BytesRulesOrBuilder
     BytesRules describe the constraints applied to `bytes` values. These rules
     may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
     
    Protobuf type buf.validate.BytesRules
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BytesRules.Builder
      BytesRules describe the constraints applied to `bytes` values.
      static class  BytesRules.WellKnownCase  
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

        com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,​T extends java.lang.Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

        com.google.protobuf.AbstractMessage.BuilderParent
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      com.google.protobuf.ByteString getConst()
      `const` requires the field value to exactly match the specified bytes value.
      com.google.protobuf.ByteString getContains()
      `contains` requires the field value to have the specified bytes anywhere in the string.
      static BytesRules getDefaultInstance()  
      BytesRules getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.ByteString getIn​(int index)
      `in` requires the field value to be equal to one of the specified values.
      int getInCount()
      `in` requires the field value to be equal to one of the specified values.
      java.util.List<com.google.protobuf.ByteString> getInList()
      `in` requires the field value to be equal to one of the specified values.
      boolean getIp()
      `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
      boolean getIpv4()
      `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
      boolean getIpv6()
      `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
      long getLen()
      `len` requires the field value to have the specified length in bytes.
      long getMaxLen()
      `max_len` requires the field value to have at most the specified maximum length in bytes.
      long getMinLen()
      `min_len` requires the field value to have at least the specified minimum length in bytes.
      com.google.protobuf.ByteString getNotIn​(int index)
      `not_in` requires the field value to be not equal to any of the specified values.
      int getNotInCount()
      `not_in` requires the field value to be not equal to any of the specified values.
      java.util.List<com.google.protobuf.ByteString> getNotInList()
      `not_in` requires the field value to be not equal to any of the specified values.
      com.google.protobuf.Parser<BytesRules> getParserForType()  
      java.lang.String getPattern()
      `pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
      com.google.protobuf.ByteString getPatternBytes()
      `pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
      com.google.protobuf.ByteString getPrefix()
      `prefix` requires the field value to have the specified bytes at the beginning of the string.
      int getSerializedSize()  
      com.google.protobuf.ByteString getSuffix()
      `suffix` requires the field value to have the specified bytes at the end of the string.
      BytesRules.WellKnownCase getWellKnownCase()  
      boolean hasConst()
      `const` requires the field value to exactly match the specified bytes value.
      boolean hasContains()
      `contains` requires the field value to have the specified bytes anywhere in the string.
      int hashCode()  
      boolean hasIp()
      `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
      boolean hasIpv4()
      `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
      boolean hasIpv6()
      `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
      boolean hasLen()
      `len` requires the field value to have the specified length in bytes.
      boolean hasMaxLen()
      `max_len` requires the field value to have at most the specified maximum length in bytes.
      boolean hasMinLen()
      `min_len` requires the field value to have at least the specified minimum length in bytes.
      boolean hasPattern()
      `pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
      boolean hasPrefix()
      `prefix` requires the field value to have the specified bytes at the beginning of the string.
      boolean hasSuffix()
      `suffix` requires the field value to have the specified bytes at the end of the string.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static BytesRules.Builder newBuilder()  
      static BytesRules.Builder newBuilder​(BytesRules prototype)  
      BytesRules.Builder newBuilderForType()  
      protected BytesRules.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)  
      static BytesRules parseDelimitedFrom​(java.io.InputStream input)  
      static BytesRules parseDelimitedFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static BytesRules parseFrom​(byte[] data)  
      static BytesRules parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static BytesRules parseFrom​(com.google.protobuf.ByteString data)  
      static BytesRules parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static BytesRules parseFrom​(com.google.protobuf.CodedInputStream input)  
      static BytesRules parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static BytesRules parseFrom​(java.io.InputStream input)  
      static BytesRules parseFrom​(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static BytesRules parseFrom​(java.nio.ByteBuffer data)  
      static BytesRules parseFrom​(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<BytesRules> parser()  
      BytesRules.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessage

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
      • Methods inherited from class com.google.protobuf.AbstractMessage

        findInitializationErrors, getInitializationErrorString, hashFields, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, 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
      • hasConst

        public boolean hasConst()
         `const` requires the field value to exactly match the specified bytes
         value. If the field value doesn't match, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be "\x01\x02\x03\x04"
         bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
         }
         ```
         
        optional bytes const = 1 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasConst in interface BytesRulesOrBuilder
        Returns:
        Whether the const field is set.
      • getConst

        public com.google.protobuf.ByteString getConst()
         `const` requires the field value to exactly match the specified bytes
         value. If the field value doesn't match, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be "\x01\x02\x03\x04"
         bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
         }
         ```
         
        optional bytes const = 1 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getConst in interface BytesRulesOrBuilder
        Returns:
        The const.
      • hasLen

        public boolean hasLen()
         `len` requires the field value to have the specified length in bytes.
         If the field value doesn't match, an error message is generated.
        
         ```proto
         message MyBytes {
         // value length must be 4 bytes.
         optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
         }
         ```
         
        optional uint64 len = 13 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasLen in interface BytesRulesOrBuilder
        Returns:
        Whether the len field is set.
      • getLen

        public long getLen()
         `len` requires the field value to have the specified length in bytes.
         If the field value doesn't match, an error message is generated.
        
         ```proto
         message MyBytes {
         // value length must be 4 bytes.
         optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
         }
         ```
         
        optional uint64 len = 13 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getLen in interface BytesRulesOrBuilder
        Returns:
        The len.
      • hasMinLen

        public boolean hasMinLen()
         `min_len` requires the field value to have at least the specified minimum
         length in bytes.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value length must be at least 2 bytes.
         optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
         }
         ```
         
        optional uint64 min_len = 2 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasMinLen in interface BytesRulesOrBuilder
        Returns:
        Whether the minLen field is set.
      • getMinLen

        public long getMinLen()
         `min_len` requires the field value to have at least the specified minimum
         length in bytes.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value length must be at least 2 bytes.
         optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
         }
         ```
         
        optional uint64 min_len = 2 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getMinLen in interface BytesRulesOrBuilder
        Returns:
        The minLen.
      • hasMaxLen

        public boolean hasMaxLen()
         `max_len` requires the field value to have at most the specified maximum
         length in bytes.
         If the field value exceeds the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be at most 6 bytes.
         optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
         }
         ```
         
        optional uint64 max_len = 3 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasMaxLen in interface BytesRulesOrBuilder
        Returns:
        Whether the maxLen field is set.
      • getMaxLen

        public long getMaxLen()
         `max_len` requires the field value to have at most the specified maximum
         length in bytes.
         If the field value exceeds the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be at most 6 bytes.
         optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
         }
         ```
         
        optional uint64 max_len = 3 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getMaxLen in interface BytesRulesOrBuilder
        Returns:
        The maxLen.
      • hasPattern

        public boolean hasPattern()
         `pattern` requires the field value to match the specified regular
         expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
         The value of the field must be valid UTF-8 or validation will fail with a
         runtime error.
         If the field value doesn't match the pattern, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must match regex pattern "^[a-zA-Z0-9]+$".
         optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
         }
         ```
         
        optional string pattern = 4 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasPattern in interface BytesRulesOrBuilder
        Returns:
        Whether the pattern field is set.
      • getPattern

        public java.lang.String getPattern()
         `pattern` requires the field value to match the specified regular
         expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
         The value of the field must be valid UTF-8 or validation will fail with a
         runtime error.
         If the field value doesn't match the pattern, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must match regex pattern "^[a-zA-Z0-9]+$".
         optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
         }
         ```
         
        optional string pattern = 4 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getPattern in interface BytesRulesOrBuilder
        Returns:
        The pattern.
      • getPatternBytes

        public com.google.protobuf.ByteString getPatternBytes()
         `pattern` requires the field value to match the specified regular
         expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
         The value of the field must be valid UTF-8 or validation will fail with a
         runtime error.
         If the field value doesn't match the pattern, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must match regex pattern "^[a-zA-Z0-9]+$".
         optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
         }
         ```
         
        optional string pattern = 4 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getPatternBytes in interface BytesRulesOrBuilder
        Returns:
        The bytes for pattern.
      • hasPrefix

        public boolean hasPrefix()
         `prefix` requires the field value to have the specified bytes at the
         beginning of the string.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value does not have prefix \x01\x02
         optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
         }
         ```
         
        optional bytes prefix = 5 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasPrefix in interface BytesRulesOrBuilder
        Returns:
        Whether the prefix field is set.
      • getPrefix

        public com.google.protobuf.ByteString getPrefix()
         `prefix` requires the field value to have the specified bytes at the
         beginning of the string.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value does not have prefix \x01\x02
         optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
         }
         ```
         
        optional bytes prefix = 5 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getPrefix in interface BytesRulesOrBuilder
        Returns:
        The prefix.
      • hasSuffix

        public boolean hasSuffix()
         `suffix` requires the field value to have the specified bytes at the end
         of the string.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value does not have suffix \x03\x04
         optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
         }
         ```
         
        optional bytes suffix = 6 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasSuffix in interface BytesRulesOrBuilder
        Returns:
        Whether the suffix field is set.
      • getSuffix

        public com.google.protobuf.ByteString getSuffix()
         `suffix` requires the field value to have the specified bytes at the end
         of the string.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```proto
         message MyBytes {
         // value does not have suffix \x03\x04
         optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
         }
         ```
         
        optional bytes suffix = 6 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getSuffix in interface BytesRulesOrBuilder
        Returns:
        The suffix.
      • hasContains

        public boolean hasContains()
         `contains` requires the field value to have the specified bytes anywhere in
         the string.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```protobuf
         message MyBytes {
         // value does not contain \x02\x03
         optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
         }
         ```
         
        optional bytes contains = 7 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasContains in interface BytesRulesOrBuilder
        Returns:
        Whether the contains field is set.
      • getContains

        public com.google.protobuf.ByteString getContains()
         `contains` requires the field value to have the specified bytes anywhere in
         the string.
         If the field value doesn't meet the requirement, an error message is generated.
        
         ```protobuf
         message MyBytes {
         // value does not contain \x02\x03
         optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
         }
         ```
         
        optional bytes contains = 7 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getContains in interface BytesRulesOrBuilder
        Returns:
        The contains.
      • getInList

        public java.util.List<com.google.protobuf.ByteString> getInList()
         `in` requires the field value to be equal to one of the specified
         values. If the field value doesn't match any of the specified values, an
         error message is generated.
        
         ```protobuf
         message MyBytes {
         // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
         optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
         }
         ```
         
        repeated bytes in = 8 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getInList in interface BytesRulesOrBuilder
        Returns:
        A list containing the in.
      • getInCount

        public int getInCount()
         `in` requires the field value to be equal to one of the specified
         values. If the field value doesn't match any of the specified values, an
         error message is generated.
        
         ```protobuf
         message MyBytes {
         // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
         optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
         }
         ```
         
        repeated bytes in = 8 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getInCount in interface BytesRulesOrBuilder
        Returns:
        The count of in.
      • getIn

        public com.google.protobuf.ByteString getIn​(int index)
         `in` requires the field value to be equal to one of the specified
         values. If the field value doesn't match any of the specified values, an
         error message is generated.
        
         ```protobuf
         message MyBytes {
         // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
         optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
         }
         ```
         
        repeated bytes in = 8 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getIn in interface BytesRulesOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The in at the given index.
      • getNotInList

        public java.util.List<com.google.protobuf.ByteString> getNotInList()
         `not_in` requires the field value to be not equal to any of the specified
         values.
         If the field value matches any of the specified values, an error message is
         generated.
        
         ```proto
         message MyBytes {
         // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
         optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
         }
         ```
         
        repeated bytes not_in = 9 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getNotInList in interface BytesRulesOrBuilder
        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
         values.
         If the field value matches any of the specified values, an error message is
         generated.
        
         ```proto
         message MyBytes {
         // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
         optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
         }
         ```
         
        repeated bytes not_in = 9 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getNotInCount in interface BytesRulesOrBuilder
        Returns:
        The count of notIn.
      • getNotIn

        public com.google.protobuf.ByteString getNotIn​(int index)
         `not_in` requires the field value to be not equal to any of the specified
         values.
         If the field value matches any of the specified values, an error message is
         generated.
        
         ```proto
         message MyBytes {
         // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
         optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
         }
         ```
         
        repeated bytes not_in = 9 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getNotIn in interface BytesRulesOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The notIn at the given index.
      • hasIp

        public boolean hasIp()
         `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
         If the field value doesn't meet this constraint, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be a valid IP address
         optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
         }
         ```
         
        bool ip = 10 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasIp in interface BytesRulesOrBuilder
        Returns:
        Whether the ip field is set.
      • getIp

        public boolean getIp()
         `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
         If the field value doesn't meet this constraint, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be a valid IP address
         optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
         }
         ```
         
        bool ip = 10 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getIp in interface BytesRulesOrBuilder
        Returns:
        The ip.
      • hasIpv4

        public boolean hasIpv4()
         `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
         If the field value doesn't meet this constraint, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be a valid IPv4 address
         optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
         }
         ```
         
        bool ipv4 = 11 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasIpv4 in interface BytesRulesOrBuilder
        Returns:
        Whether the ipv4 field is set.
      • getIpv4

        public boolean getIpv4()
         `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
         If the field value doesn't meet this constraint, an error message is generated.
        
         ```proto
         message MyBytes {
         // value must be a valid IPv4 address
         optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
         }
         ```
         
        bool ipv4 = 11 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getIpv4 in interface BytesRulesOrBuilder
        Returns:
        The ipv4.
      • hasIpv6

        public boolean hasIpv6()
         `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
         If the field value doesn't meet this constraint, an error message is generated.
         ```proto
         message MyBytes {
         // value must be a valid IPv6 address
         optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
         }
         ```
         
        bool ipv6 = 12 [(.buf.validate.priv.field) = { ... }
        Specified by:
        hasIpv6 in interface BytesRulesOrBuilder
        Returns:
        Whether the ipv6 field is set.
      • getIpv6

        public boolean getIpv6()
         `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
         If the field value doesn't meet this constraint, an error message is generated.
         ```proto
         message MyBytes {
         // value must be a valid IPv6 address
         optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
         }
         ```
         
        bool ipv6 = 12 [(.buf.validate.priv.field) = { ... }
        Specified by:
        getIpv6 in interface BytesRulesOrBuilder
        Returns:
        The ipv6.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static BytesRules parseFrom​(java.nio.ByteBuffer data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BytesRules parseFrom​(java.nio.ByteBuffer data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BytesRules parseFrom​(com.google.protobuf.ByteString data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BytesRules parseFrom​(com.google.protobuf.ByteString data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BytesRules parseFrom​(byte[] data)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BytesRules parseFrom​(byte[] data,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static BytesRules parseFrom​(java.io.InputStream input)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static BytesRules parseFrom​(java.io.InputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static BytesRules parseDelimitedFrom​(java.io.InputStream input)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static BytesRules parseDelimitedFrom​(java.io.InputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static BytesRules parseFrom​(com.google.protobuf.CodedInputStream input)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static BytesRules parseFrom​(com.google.protobuf.CodedInputStream input,
                                           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public BytesRules.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public BytesRules.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected BytesRules.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.google.protobuf.AbstractMessage
      • getDefaultInstance

        public static BytesRules getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<BytesRules> parser()
      • getParserForType

        public com.google.protobuf.Parser<BytesRules> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public BytesRules getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder