Class BytesRules

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
build.buf.validate.BytesRules
All Implemented Interfaces:
BytesRulesOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class BytesRules extends com.google.protobuf.GeneratedMessageV3 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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    BytesRules describe the constraints applied to `bytes` values.
    static enum 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

    com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageV3

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    com.google.protobuf.ByteString
    `const` requires the field value to exactly match the specified bytes value.
    com.google.protobuf.ByteString
    `contains` requires the field value to have the specified bytes anywhere in the string.
    static BytesRules
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.ByteString
    getIn(int index)
    `in` requires the field value to be equal to one of the specified values.
    int
    `in` requires the field value to be equal to one of the specified values.
    List<com.google.protobuf.ByteString>
    `in` requires the field value to be equal to one of the specified values.
    boolean
    `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
    boolean
    `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
    boolean
    `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
    long
    `len` requires the field value to have the specified length in bytes.
    long
    `max_len` requires the field value to have at most the specified maximum length in bytes.
    long
    `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
    `not_in` requires the field value to be not equal to any of the specified values.
    List<com.google.protobuf.ByteString>
    `not_in` requires the field value to be not equal to any of the specified values.
    com.google.protobuf.Parser<BytesRules>
     
    `pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
    com.google.protobuf.ByteString
    `pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
    com.google.protobuf.ByteString
    `prefix` requires the field value to have the specified bytes at the beginning of the string.
    int
     
    com.google.protobuf.ByteString
    `suffix` requires the field value to have the specified bytes at the end of the string.
     
    boolean
    `const` requires the field value to exactly match the specified bytes value.
    boolean
    `contains` requires the field value to have the specified bytes anywhere in the string.
    int
     
    boolean
    `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
    boolean
    `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
    boolean
    `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
    boolean
    `len` requires the field value to have the specified length in bytes.
    boolean
    `max_len` requires the field value to have at most the specified maximum length in bytes.
    boolean
    `min_len` requires the field value to have at least the specified minimum length in bytes.
    boolean
    `pattern` requires the field value to match the specified regular expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
    boolean
    `prefix` requires the field value to have the specified bytes at the beginning of the string.
    boolean
    `suffix` requires the field value to have the specified bytes at the end of the string.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
    static BytesRules
     
    static BytesRules
    parseDelimitedFrom(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
     
    static BytesRules
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static BytesRules
     
    static BytesRules
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<BytesRules>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, 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, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, 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
  • Field Details

  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getWellKnownCase

      public BytesRules.WellKnownCase getWellKnownCase()
      Specified by:
      getWellKnownCase in interface BytesRulesOrBuilder
    • 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 [json_name = "const", (.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 [json_name = "const", (.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 [json_name = "len", (.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 [json_name = "len", (.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 [json_name = "minLen", (.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 [json_name = "minLen", (.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 [json_name = "maxLen", (.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 [json_name = "maxLen", (.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 [json_name = "pattern", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasPattern in interface BytesRulesOrBuilder
      Returns:
      Whether the pattern field is set.
    • getPattern

      public 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 [json_name = "pattern", (.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 [json_name = "pattern", (.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 [json_name = "prefix", (.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 [json_name = "prefix", (.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 [json_name = "suffix", (.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 [json_name = "suffix", (.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 [json_name = "contains", (.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 [json_name = "contains", (.buf.validate.priv.field) = { ... }
      Specified by:
      getContains in interface BytesRulesOrBuilder
      Returns:
      The contains.
    • getInList

      public 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 [json_name = "in", (.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 [json_name = "in", (.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 [json_name = "in", (.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 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 [json_name = "notIn", (.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 [json_name = "notIn", (.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 [json_name = "notIn", (.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 [json_name = "ip", (.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 [json_name = "ip", (.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 [json_name = "ipv4", (.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 [json_name = "ipv4", (.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 [json_name = "ipv6", (.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 [json_name = "ipv6", (.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.GeneratedMessageV3
    • writeTo

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

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

      public boolean equals(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(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static BytesRules parseFrom(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(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static BytesRules parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

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

      public static BytesRules.Builder newBuilder()
    • newBuilder

      public static BytesRules.Builder newBuilder(BytesRules prototype)
    • 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.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • 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.GeneratedMessageV3
    • getDefaultInstanceForType

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