Class StringRules

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

public final class StringRules extends com.google.protobuf.GeneratedMessageV3 implements StringRulesOrBuilder
 StringRules describes the constraints applied to `string` values These
 rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
 
Protobuf type buf.validate.StringRules
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    StringRules describes the constraints applied to `string` values These rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
    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
     
    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
     
    boolean
    `address` specifies that the field value must be either a valid hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) (which doesn't support internationalized domain names or IDNs) or a valid IP (v4 or v6).
    `const` requires the field value to exactly match the specified value.
    com.google.protobuf.ByteString
    `const` requires the field value to exactly match the specified value.
    `contains` specifies that the field value must have the specified substring anywhere in the string.
    com.google.protobuf.ByteString
    `contains` specifies that the field value must have the specified substring anywhere in the string.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    boolean
    `email` specifies that the field value must be a valid email address (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
    boolean
    `hostname` specifies that the field value must be a valid hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5).
    getIn(int index)
    `in` specifies that the field value must be equal to one of the specified values.
    com.google.protobuf.ByteString
    getInBytes(int index)
    `in` specifies that the field value must be equal to one of the specified values.
    int
    `in` specifies that the field value must be equal to one of the specified values.
    com.google.protobuf.ProtocolStringList
    `in` specifies that the field value must be equal to one of the specified values.
    boolean
    `ip` specifies that the field value must be a valid IP (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
    boolean
    `ipv4` specifies that the field value must be a valid IPv4 address.
    boolean
    `ipv6` specifies that the field value must be a valid IPv6 address, without surrounding square brackets.
    long
    `len` dictates that the field value must have the specified number of characters (Unicode code points), which may differ from the number of bytes in the string.
    long
    `len_bytes` dictates that the field value must have the specified number of bytes.
    long
    `max_bytes` specifies that the field value must have no more than the specified number of bytes.
    long
    `max_len` specifies that the field value must have no more than the specified number of characters (Unicode code points), which may differ from the number of bytes in the string.
    long
    `min_bytes` specifies that the field value must have at least the specified number of bytes.
    long
    `min_len` specifies that the field value must have at least the specified number of characters (Unicode code points), which may differ from the number of bytes in the string.
    `not_contains` specifies that the field value must not have the specified substring anywhere in the string.
    com.google.protobuf.ByteString
    `not_contains` specifies that the field value must not have the specified substring anywhere in the string.
    getNotIn(int index)
    `not_in` specifies that the field value cannot be equal to any of the specified values.
    com.google.protobuf.ByteString
    getNotInBytes(int index)
    `not_in` specifies that the field value cannot be equal to any of the specified values.
    int
    `not_in` specifies that the field value cannot be equal to any of the specified values.
    com.google.protobuf.ProtocolStringList
    `not_in` specifies that the field value cannot be equal to any of the specified values.
    com.google.protobuf.Parser<StringRules>
     
    `pattern` specifies that the field value must match the specified regular expression (RE2 syntax), with the expression provided without any delimiters.
    com.google.protobuf.ByteString
    `pattern` specifies that the field value must match the specified regular expression (RE2 syntax), with the expression provided without any delimiters.
    `prefix` specifies that the field value must have the specified substring at the beginning of the string.
    com.google.protobuf.ByteString
    `prefix` specifies that the field value must have the specified substring at the beginning of the string.
    int
     
    boolean
    This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to enable strict header validation.
    `suffix` specifies that the field value must have the specified substring at the end of the string.
    com.google.protobuf.ByteString
    `suffix` specifies that the field value must have the specified substring at the end of the string.
    boolean
    `uri` specifies that the field value must be a valid, absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3).
    boolean
    `uri_ref` specifies that the field value must be a valid URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute.
    boolean
    `uuid` specifies that the field value must be a valid UUID as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2).
     
    `well_known_regex` specifies a common well-known pattern defined as a regex.
    int
    `well_known_regex` specifies a common well-known pattern defined as a regex.
    boolean
    `address` specifies that the field value must be either a valid hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) (which doesn't support internationalized domain names or IDNs) or a valid IP (v4 or v6).
    boolean
    `const` requires the field value to exactly match the specified value.
    boolean
    `contains` specifies that the field value must have the specified substring anywhere in the string.
    boolean
    `email` specifies that the field value must be a valid email address (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
    int
     
    boolean
    `hostname` specifies that the field value must be a valid hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5).
    boolean
    `ip` specifies that the field value must be a valid IP (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
    boolean
    `ipv4` specifies that the field value must be a valid IPv4 address.
    boolean
    `ipv6` specifies that the field value must be a valid IPv6 address, without surrounding square brackets.
    boolean
    `len` dictates that the field value must have the specified number of characters (Unicode code points), which may differ from the number of bytes in the string.
    boolean
    `len_bytes` dictates that the field value must have the specified number of bytes.
    boolean
    `max_bytes` specifies that the field value must have no more than the specified number of bytes.
    boolean
    `max_len` specifies that the field value must have no more than the specified number of characters (Unicode code points), which may differ from the number of bytes in the string.
    boolean
    `min_bytes` specifies that the field value must have at least the specified number of bytes.
    boolean
    `min_len` specifies that the field value must have at least the specified number of characters (Unicode code points), which may differ from the number of bytes in the string.
    boolean
    `not_contains` specifies that the field value must not have the specified substring anywhere in the string.
    boolean
    `pattern` specifies that the field value must match the specified regular expression (RE2 syntax), with the expression provided without any delimiters.
    boolean
    `prefix` specifies that the field value must have the specified substring at the beginning of the string.
    boolean
    This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to enable strict header validation.
    boolean
    `suffix` specifies that the field value must have the specified substring at the end of the string.
    boolean
    `uri` specifies that the field value must be a valid, absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3).
    boolean
    `uri_ref` specifies that the field value must be a valid URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute.
    boolean
    `uuid` specifies that the field value must be a valid UUID as defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2).
    boolean
    `well_known_regex` specifies a common well-known pattern defined as a regex.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<StringRules>
     
     
    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, 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 StringRules.WellKnownCase getWellKnownCase()
      Specified by:
      getWellKnownCase in interface StringRulesOrBuilder
    • hasConst

      public boolean hasConst()
      `const` requires the field value to exactly match the specified value. If
      the field value doesn't match, an error message is generated.
      
      ```proto
      message MyString {
        // value must equal `hello`
         string value = 1 [(buf.validate.field).string.const = "hello"];
      }
      ```
       
      optional string const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasConst in interface StringRulesOrBuilder
      Returns:
      Whether the const field is set.
    • getConst

      public String getConst()
      `const` requires the field value to exactly match the specified value. If
      the field value doesn't match, an error message is generated.
      
      ```proto
      message MyString {
        // value must equal `hello`
         string value = 1 [(buf.validate.field).string.const = "hello"];
      }
      ```
       
      optional string const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Specified by:
      getConst in interface StringRulesOrBuilder
      Returns:
      The const.
    • getConstBytes

      public com.google.protobuf.ByteString getConstBytes()
      `const` requires the field value to exactly match the specified value. If
      the field value doesn't match, an error message is generated.
      
      ```proto
      message MyString {
        // value must equal `hello`
         string value = 1 [(buf.validate.field).string.const = "hello"];
      }
      ```
       
      optional string const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Specified by:
      getConstBytes in interface StringRulesOrBuilder
      Returns:
      The bytes for const.
    • hasLen

      public boolean hasLen()
      `len` dictates that the field value must have the specified
      number of characters (Unicode code points), which may differ from the number
      of bytes in the string. If the field value does not meet the specified
      length, an error message will be generated.
      
      ```proto
      message MyString {
        // value length must be 5 characters
         string value = 1 [(buf.validate.field).string.len = 5];
      }
      ```
       
      optional uint64 len = 19 [json_name = "len", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasLen in interface StringRulesOrBuilder
      Returns:
      Whether the len field is set.
    • getLen

      public long getLen()
      `len` dictates that the field value must have the specified
      number of characters (Unicode code points), which may differ from the number
      of bytes in the string. If the field value does not meet the specified
      length, an error message will be generated.
      
      ```proto
      message MyString {
        // value length must be 5 characters
         string value = 1 [(buf.validate.field).string.len = 5];
      }
      ```
       
      optional uint64 len = 19 [json_name = "len", (.buf.validate.priv.field) = { ... }
      Specified by:
      getLen in interface StringRulesOrBuilder
      Returns:
      The len.
    • hasMinLen

      public boolean hasMinLen()
      `min_len` specifies that the field value must have at least the specified
      number of characters (Unicode code points), which may differ from the number
      of bytes in the string. If the field value contains fewer characters, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value length must be at least 3 characters
         string value = 1 [(buf.validate.field).string.min_len = 3];
      }
      ```
       
      optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasMinLen in interface StringRulesOrBuilder
      Returns:
      Whether the minLen field is set.
    • getMinLen

      public long getMinLen()
      `min_len` specifies that the field value must have at least the specified
      number of characters (Unicode code points), which may differ from the number
      of bytes in the string. If the field value contains fewer characters, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value length must be at least 3 characters
         string value = 1 [(buf.validate.field).string.min_len = 3];
      }
      ```
       
      optional uint64 min_len = 2 [json_name = "minLen", (.buf.validate.priv.field) = { ... }
      Specified by:
      getMinLen in interface StringRulesOrBuilder
      Returns:
      The minLen.
    • hasMaxLen

      public boolean hasMaxLen()
      `max_len` specifies that the field value must have no more than the specified
      number of characters (Unicode code points), which may differ from the
      number of bytes in the string. If the field value contains more characters,
      an error message will be generated.
      
      ```proto
      message MyString {
        // value length must be at most 10 characters
         string value = 1 [(buf.validate.field).string.max_len = 10];
      }
      ```
       
      optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasMaxLen in interface StringRulesOrBuilder
      Returns:
      Whether the maxLen field is set.
    • getMaxLen

      public long getMaxLen()
      `max_len` specifies that the field value must have no more than the specified
      number of characters (Unicode code points), which may differ from the
      number of bytes in the string. If the field value contains more characters,
      an error message will be generated.
      
      ```proto
      message MyString {
        // value length must be at most 10 characters
         string value = 1 [(buf.validate.field).string.max_len = 10];
      }
      ```
       
      optional uint64 max_len = 3 [json_name = "maxLen", (.buf.validate.priv.field) = { ... }
      Specified by:
      getMaxLen in interface StringRulesOrBuilder
      Returns:
      The maxLen.
    • hasLenBytes

      public boolean hasLenBytes()
      `len_bytes` dictates that the field value must have the specified number of
      bytes. If the field value does not match the specified length in bytes,
      an error message will be generated.
      
      ```proto
      message MyString {
        // value length must be 6 bytes
         string value = 1 [(buf.validate.field).string.len_bytes = 6];
      }
      ```
       
      optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasLenBytes in interface StringRulesOrBuilder
      Returns:
      Whether the lenBytes field is set.
    • getLenBytes

      public long getLenBytes()
      `len_bytes` dictates that the field value must have the specified number of
      bytes. If the field value does not match the specified length in bytes,
      an error message will be generated.
      
      ```proto
      message MyString {
        // value length must be 6 bytes
         string value = 1 [(buf.validate.field).string.len_bytes = 6];
      }
      ```
       
      optional uint64 len_bytes = 20 [json_name = "lenBytes", (.buf.validate.priv.field) = { ... }
      Specified by:
      getLenBytes in interface StringRulesOrBuilder
      Returns:
      The lenBytes.
    • hasMinBytes

      public boolean hasMinBytes()
      `min_bytes` specifies that the field value must have at least the specified
      number of bytes. If the field value contains fewer bytes, an error message
      will be generated.
      
      ```proto
      message MyString {
        // value length must be at least 4 bytes
         string value = 1 [(buf.validate.field).string.min_bytes = 4];
      }
      
      ```
       
      optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasMinBytes in interface StringRulesOrBuilder
      Returns:
      Whether the minBytes field is set.
    • getMinBytes

      public long getMinBytes()
      `min_bytes` specifies that the field value must have at least the specified
      number of bytes. If the field value contains fewer bytes, an error message
      will be generated.
      
      ```proto
      message MyString {
        // value length must be at least 4 bytes
         string value = 1 [(buf.validate.field).string.min_bytes = 4];
      }
      
      ```
       
      optional uint64 min_bytes = 4 [json_name = "minBytes", (.buf.validate.priv.field) = { ... }
      Specified by:
      getMinBytes in interface StringRulesOrBuilder
      Returns:
      The minBytes.
    • hasMaxBytes

      public boolean hasMaxBytes()
      `max_bytes` specifies that the field value must have no more than the
      specified number of bytes. If the field value contains more bytes, an
      error message will be generated.
      
      ```proto
      message MyString {
        // value length must be at most 8 bytes
         string value = 1 [(buf.validate.field).string.max_bytes = 8];
      }
      ```
       
      optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasMaxBytes in interface StringRulesOrBuilder
      Returns:
      Whether the maxBytes field is set.
    • getMaxBytes

      public long getMaxBytes()
      `max_bytes` specifies that the field value must have no more than the
      specified number of bytes. If the field value contains more bytes, an
      error message will be generated.
      
      ```proto
      message MyString {
        // value length must be at most 8 bytes
         string value = 1 [(buf.validate.field).string.max_bytes = 8];
      }
      ```
       
      optional uint64 max_bytes = 5 [json_name = "maxBytes", (.buf.validate.priv.field) = { ... }
      Specified by:
      getMaxBytes in interface StringRulesOrBuilder
      Returns:
      The maxBytes.
    • hasPattern

      public boolean hasPattern()
      `pattern` specifies that the field value must match the specified
      regular expression (RE2 syntax), with the expression provided without any
      delimiters. If the field value doesn't match the regular expression, an
      error message will be generated.
      
      ```proto
      message MyString {
        // value does not match regex pattern `^[a-zA-Z]//$`
         string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
      }
      ```
       
      optional string pattern = 6 [json_name = "pattern", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasPattern in interface StringRulesOrBuilder
      Returns:
      Whether the pattern field is set.
    • getPattern

      public String getPattern()
      `pattern` specifies that the field value must match the specified
      regular expression (RE2 syntax), with the expression provided without any
      delimiters. If the field value doesn't match the regular expression, an
      error message will be generated.
      
      ```proto
      message MyString {
        // value does not match regex pattern `^[a-zA-Z]//$`
         string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
      }
      ```
       
      optional string pattern = 6 [json_name = "pattern", (.buf.validate.priv.field) = { ... }
      Specified by:
      getPattern in interface StringRulesOrBuilder
      Returns:
      The pattern.
    • getPatternBytes

      public com.google.protobuf.ByteString getPatternBytes()
      `pattern` specifies that the field value must match the specified
      regular expression (RE2 syntax), with the expression provided without any
      delimiters. If the field value doesn't match the regular expression, an
      error message will be generated.
      
      ```proto
      message MyString {
        // value does not match regex pattern `^[a-zA-Z]//$`
         string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
      }
      ```
       
      optional string pattern = 6 [json_name = "pattern", (.buf.validate.priv.field) = { ... }
      Specified by:
      getPatternBytes in interface StringRulesOrBuilder
      Returns:
      The bytes for pattern.
    • hasPrefix

      public boolean hasPrefix()
      `prefix` specifies that the field value must have the
      specified substring at the beginning of the string. If the field value
      doesn't start with the specified prefix, an error message will be
      generated.
      
      ```proto
      message MyString {
        // value does not have prefix `pre`
         string value = 1 [(buf.validate.field).string.prefix = "pre"];
      }
      ```
       
      optional string prefix = 7 [json_name = "prefix", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasPrefix in interface StringRulesOrBuilder
      Returns:
      Whether the prefix field is set.
    • getPrefix

      public String getPrefix()
      `prefix` specifies that the field value must have the
      specified substring at the beginning of the string. If the field value
      doesn't start with the specified prefix, an error message will be
      generated.
      
      ```proto
      message MyString {
        // value does not have prefix `pre`
         string value = 1 [(buf.validate.field).string.prefix = "pre"];
      }
      ```
       
      optional string prefix = 7 [json_name = "prefix", (.buf.validate.priv.field) = { ... }
      Specified by:
      getPrefix in interface StringRulesOrBuilder
      Returns:
      The prefix.
    • getPrefixBytes

      public com.google.protobuf.ByteString getPrefixBytes()
      `prefix` specifies that the field value must have the
      specified substring at the beginning of the string. If the field value
      doesn't start with the specified prefix, an error message will be
      generated.
      
      ```proto
      message MyString {
        // value does not have prefix `pre`
         string value = 1 [(buf.validate.field).string.prefix = "pre"];
      }
      ```
       
      optional string prefix = 7 [json_name = "prefix", (.buf.validate.priv.field) = { ... }
      Specified by:
      getPrefixBytes in interface StringRulesOrBuilder
      Returns:
      The bytes for prefix.
    • hasSuffix

      public boolean hasSuffix()
      `suffix` specifies that the field value must have the
      specified substring at the end of the string. If the field value doesn't
      end with the specified suffix, an error message will be generated.
      
      ```proto
      message MyString {
        // value does not have suffix `post`
         string value = 1 [(buf.validate.field).string.suffix = "post"];
      }
      ```
       
      optional string suffix = 8 [json_name = "suffix", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasSuffix in interface StringRulesOrBuilder
      Returns:
      Whether the suffix field is set.
    • getSuffix

      public String getSuffix()
      `suffix` specifies that the field value must have the
      specified substring at the end of the string. If the field value doesn't
      end with the specified suffix, an error message will be generated.
      
      ```proto
      message MyString {
        // value does not have suffix `post`
         string value = 1 [(buf.validate.field).string.suffix = "post"];
      }
      ```
       
      optional string suffix = 8 [json_name = "suffix", (.buf.validate.priv.field) = { ... }
      Specified by:
      getSuffix in interface StringRulesOrBuilder
      Returns:
      The suffix.
    • getSuffixBytes

      public com.google.protobuf.ByteString getSuffixBytes()
      `suffix` specifies that the field value must have the
      specified substring at the end of the string. If the field value doesn't
      end with the specified suffix, an error message will be generated.
      
      ```proto
      message MyString {
        // value does not have suffix `post`
         string value = 1 [(buf.validate.field).string.suffix = "post"];
      }
      ```
       
      optional string suffix = 8 [json_name = "suffix", (.buf.validate.priv.field) = { ... }
      Specified by:
      getSuffixBytes in interface StringRulesOrBuilder
      Returns:
      The bytes for suffix.
    • hasContains

      public boolean hasContains()
      `contains` specifies that the field value must have the
      specified substring anywhere in the string. If the field value doesn't
      contain the specified substring, an error message will be generated.
      
      ```proto
      message MyString {
        // value does not contain substring `inside`.
         string value = 1 [(buf.validate.field).string.contains = "inside"];
      }
      ```
       
      optional string contains = 9 [json_name = "contains", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasContains in interface StringRulesOrBuilder
      Returns:
      Whether the contains field is set.
    • getContains

      public String getContains()
      `contains` specifies that the field value must have the
      specified substring anywhere in the string. If the field value doesn't
      contain the specified substring, an error message will be generated.
      
      ```proto
      message MyString {
        // value does not contain substring `inside`.
         string value = 1 [(buf.validate.field).string.contains = "inside"];
      }
      ```
       
      optional string contains = 9 [json_name = "contains", (.buf.validate.priv.field) = { ... }
      Specified by:
      getContains in interface StringRulesOrBuilder
      Returns:
      The contains.
    • getContainsBytes

      public com.google.protobuf.ByteString getContainsBytes()
      `contains` specifies that the field value must have the
      specified substring anywhere in the string. If the field value doesn't
      contain the specified substring, an error message will be generated.
      
      ```proto
      message MyString {
        // value does not contain substring `inside`.
         string value = 1 [(buf.validate.field).string.contains = "inside"];
      }
      ```
       
      optional string contains = 9 [json_name = "contains", (.buf.validate.priv.field) = { ... }
      Specified by:
      getContainsBytes in interface StringRulesOrBuilder
      Returns:
      The bytes for contains.
    • hasNotContains

      public boolean hasNotContains()
      `not_contains` specifies that the field value must not have the
      specified substring anywhere in the string. If the field value contains
      the specified substring, an error message will be generated.
      
      ```proto
      message MyString {
        // value contains substring `inside`.
         string value = 1 [(buf.validate.field).string.not_contains = "inside"];
      }
      ```
       
      optional string not_contains = 23 [json_name = "notContains", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasNotContains in interface StringRulesOrBuilder
      Returns:
      Whether the notContains field is set.
    • getNotContains

      public String getNotContains()
      `not_contains` specifies that the field value must not have the
      specified substring anywhere in the string. If the field value contains
      the specified substring, an error message will be generated.
      
      ```proto
      message MyString {
        // value contains substring `inside`.
         string value = 1 [(buf.validate.field).string.not_contains = "inside"];
      }
      ```
       
      optional string not_contains = 23 [json_name = "notContains", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotContains in interface StringRulesOrBuilder
      Returns:
      The notContains.
    • getNotContainsBytes

      public com.google.protobuf.ByteString getNotContainsBytes()
      `not_contains` specifies that the field value must not have the
      specified substring anywhere in the string. If the field value contains
      the specified substring, an error message will be generated.
      
      ```proto
      message MyString {
        // value contains substring `inside`.
         string value = 1 [(buf.validate.field).string.not_contains = "inside"];
      }
      ```
       
      optional string not_contains = 23 [json_name = "notContains", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotContainsBytes in interface StringRulesOrBuilder
      Returns:
      The bytes for notContains.
    • getInList

      public com.google.protobuf.ProtocolStringList getInList()
      `in` specifies that the field value must be equal to one of the specified
      values. If the field value isn't one of the specified values, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value must be in list ["apple", "banana"]
        repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
      }
      ```
       
      repeated string in = 10 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getInList in interface StringRulesOrBuilder
      Returns:
      A list containing the in.
    • getInCount

      public int getInCount()
      `in` specifies that the field value must be equal to one of the specified
      values. If the field value isn't one of the specified values, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value must be in list ["apple", "banana"]
        repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
      }
      ```
       
      repeated string in = 10 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getInCount in interface StringRulesOrBuilder
      Returns:
      The count of in.
    • getIn

      public String getIn(int index)
      `in` specifies that the field value must be equal to one of the specified
      values. If the field value isn't one of the specified values, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value must be in list ["apple", "banana"]
        repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
      }
      ```
       
      repeated string in = 10 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getIn in interface StringRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The in at the given index.
    • getInBytes

      public com.google.protobuf.ByteString getInBytes(int index)
      `in` specifies that the field value must be equal to one of the specified
      values. If the field value isn't one of the specified values, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value must be in list ["apple", "banana"]
        repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
      }
      ```
       
      repeated string in = 10 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getInBytes in interface StringRulesOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the in at the given index.
    • getNotInList

      public com.google.protobuf.ProtocolStringList getNotInList()
      `not_in` specifies that the field value cannot be equal to any
      of the specified values. If the field value is one of the specified values,
      an error message will be generated.
      ```proto
      message MyString {
        // value must not be in list ["orange", "grape"]
        repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
      }
      ```
       
      repeated string not_in = 11 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotInList in interface StringRulesOrBuilder
      Returns:
      A list containing the notIn.
    • getNotInCount

      public int getNotInCount()
      `not_in` specifies that the field value cannot be equal to any
      of the specified values. If the field value is one of the specified values,
      an error message will be generated.
      ```proto
      message MyString {
        // value must not be in list ["orange", "grape"]
        repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
      }
      ```
       
      repeated string not_in = 11 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotInCount in interface StringRulesOrBuilder
      Returns:
      The count of notIn.
    • getNotIn

      public String getNotIn(int index)
      `not_in` specifies that the field value cannot be equal to any
      of the specified values. If the field value is one of the specified values,
      an error message will be generated.
      ```proto
      message MyString {
        // value must not be in list ["orange", "grape"]
        repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
      }
      ```
       
      repeated string not_in = 11 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotIn in interface StringRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The notIn at the given index.
    • getNotInBytes

      public com.google.protobuf.ByteString getNotInBytes(int index)
      `not_in` specifies that the field value cannot be equal to any
      of the specified values. If the field value is one of the specified values,
      an error message will be generated.
      ```proto
      message MyString {
        // value must not be in list ["orange", "grape"]
        repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
      }
      ```
       
      repeated string not_in = 11 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotInBytes in interface StringRulesOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the notIn at the given index.
    • hasEmail

      public boolean hasEmail()
      `email` specifies that the field value must be a valid email address
      (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
      If the field value isn't a valid email address, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid email address
         string value = 1 [(buf.validate.field).string.email = true];
      }
      ```
       
      bool email = 12 [json_name = "email", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasEmail in interface StringRulesOrBuilder
      Returns:
      Whether the email field is set.
    • getEmail

      public boolean getEmail()
      `email` specifies that the field value must be a valid email address
      (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
      If the field value isn't a valid email address, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid email address
         string value = 1 [(buf.validate.field).string.email = true];
      }
      ```
       
      bool email = 12 [json_name = "email", (.buf.validate.priv.field) = { ... }
      Specified by:
      getEmail in interface StringRulesOrBuilder
      Returns:
      The email.
    • hasHostname

      public boolean hasHostname()
      `hostname` specifies that the field value must be a valid
      hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
      internationalized domain names (IDNs). If the field value isn't a
      valid hostname, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid hostname
         string value = 1 [(buf.validate.field).string.hostname = true];
      }
      ```
       
      bool hostname = 13 [json_name = "hostname", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasHostname in interface StringRulesOrBuilder
      Returns:
      Whether the hostname field is set.
    • getHostname

      public boolean getHostname()
      `hostname` specifies that the field value must be a valid
      hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
      internationalized domain names (IDNs). If the field value isn't a
      valid hostname, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid hostname
         string value = 1 [(buf.validate.field).string.hostname = true];
      }
      ```
       
      bool hostname = 13 [json_name = "hostname", (.buf.validate.priv.field) = { ... }
      Specified by:
      getHostname in interface StringRulesOrBuilder
      Returns:
      The hostname.
    • hasIp

      public boolean hasIp()
      `ip` specifies that the field value must be a valid IP
      (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
      If the field value isn't a valid IP address, an error message will be
      generated.
      
      ```proto
      message MyString {
        // value must be a valid IP address
         string value = 1 [(buf.validate.field).string.ip = true];
      }
      ```
       
      bool ip = 14 [json_name = "ip", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasIp in interface StringRulesOrBuilder
      Returns:
      Whether the ip field is set.
    • getIp

      public boolean getIp()
      `ip` specifies that the field value must be a valid IP
      (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
      If the field value isn't a valid IP address, an error message will be
      generated.
      
      ```proto
      message MyString {
        // value must be a valid IP address
         string value = 1 [(buf.validate.field).string.ip = true];
      }
      ```
       
      bool ip = 14 [json_name = "ip", (.buf.validate.priv.field) = { ... }
      Specified by:
      getIp in interface StringRulesOrBuilder
      Returns:
      The ip.
    • hasIpv4

      public boolean hasIpv4()
      `ipv4` specifies that the field value must be a valid IPv4
      address. If the field value isn't a valid IPv4 address, an error message
      will be generated.
      
      ```proto
      message MyString {
        // value must be a valid IPv4 address
         string value = 1 [(buf.validate.field).string.ipv4 = true];
      }
      ```
       
      bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasIpv4 in interface StringRulesOrBuilder
      Returns:
      Whether the ipv4 field is set.
    • getIpv4

      public boolean getIpv4()
      `ipv4` specifies that the field value must be a valid IPv4
      address. If the field value isn't a valid IPv4 address, an error message
      will be generated.
      
      ```proto
      message MyString {
        // value must be a valid IPv4 address
         string value = 1 [(buf.validate.field).string.ipv4 = true];
      }
      ```
       
      bool ipv4 = 15 [json_name = "ipv4", (.buf.validate.priv.field) = { ... }
      Specified by:
      getIpv4 in interface StringRulesOrBuilder
      Returns:
      The ipv4.
    • hasIpv6

      public boolean hasIpv6()
      `ipv6` specifies that the field value must be a valid
      IPv6 address, without surrounding square brackets. If the field value is
      not a valid IPv6 address, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid IPv6 address
         string value = 1 [(buf.validate.field).string.ipv6 = true];
      }
      ```
       
      bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasIpv6 in interface StringRulesOrBuilder
      Returns:
      Whether the ipv6 field is set.
    • getIpv6

      public boolean getIpv6()
      `ipv6` specifies that the field value must be a valid
      IPv6 address, without surrounding square brackets. If the field value is
      not a valid IPv6 address, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid IPv6 address
         string value = 1 [(buf.validate.field).string.ipv6 = true];
      }
      ```
       
      bool ipv6 = 16 [json_name = "ipv6", (.buf.validate.priv.field) = { ... }
      Specified by:
      getIpv6 in interface StringRulesOrBuilder
      Returns:
      The ipv6.
    • hasUri

      public boolean hasUri()
      `uri` specifies that the field value must be a valid,
      absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
      absolute URI, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid URI
         string value = 1 [(buf.validate.field).string.uri = true];
      }
      ```
       
      bool uri = 17 [json_name = "uri", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasUri in interface StringRulesOrBuilder
      Returns:
      Whether the uri field is set.
    • getUri

      public boolean getUri()
      `uri` specifies that the field value must be a valid,
      absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
      absolute URI, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid URI
         string value = 1 [(buf.validate.field).string.uri = true];
      }
      ```
       
      bool uri = 17 [json_name = "uri", (.buf.validate.priv.field) = { ... }
      Specified by:
      getUri in interface StringRulesOrBuilder
      Returns:
      The uri.
    • hasUriRef

      public boolean hasUriRef()
      `uri_ref` specifies that the field value must be a valid URI
      as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
      field value isn't a valid URI, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid URI
         string value = 1 [(buf.validate.field).string.uri_ref = true];
      }
      ```
       
      bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasUriRef in interface StringRulesOrBuilder
      Returns:
      Whether the uriRef field is set.
    • getUriRef

      public boolean getUriRef()
      `uri_ref` specifies that the field value must be a valid URI
      as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
      field value isn't a valid URI, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid URI
         string value = 1 [(buf.validate.field).string.uri_ref = true];
      }
      ```
       
      bool uri_ref = 18 [json_name = "uriRef", (.buf.validate.priv.field) = { ... }
      Specified by:
      getUriRef in interface StringRulesOrBuilder
      Returns:
      The uriRef.
    • hasAddress

      public boolean hasAddress()
      `address` specifies that the field value must be either a valid hostname
      as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
      (which doesn't support internationalized domain names or IDNs) or a valid
      IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid hostname, or ip address
         string value = 1 [(buf.validate.field).string.address = true];
      }
      ```
       
      bool address = 21 [json_name = "address", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasAddress in interface StringRulesOrBuilder
      Returns:
      Whether the address field is set.
    • getAddress

      public boolean getAddress()
      `address` specifies that the field value must be either a valid hostname
      as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
      (which doesn't support internationalized domain names or IDNs) or a valid
      IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
      message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid hostname, or ip address
         string value = 1 [(buf.validate.field).string.address = true];
      }
      ```
       
      bool address = 21 [json_name = "address", (.buf.validate.priv.field) = { ... }
      Specified by:
      getAddress in interface StringRulesOrBuilder
      Returns:
      The address.
    • hasUuid

      public boolean hasUuid()
      `uuid` specifies that the field value must be a valid UUID as defined by
      [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
      field value isn't a valid UUID, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid UUID
         string value = 1 [(buf.validate.field).string.uuid = true];
      }
      ```
       
      bool uuid = 22 [json_name = "uuid", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasUuid in interface StringRulesOrBuilder
      Returns:
      Whether the uuid field is set.
    • getUuid

      public boolean getUuid()
      `uuid` specifies that the field value must be a valid UUID as defined by
      [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
      field value isn't a valid UUID, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid UUID
         string value = 1 [(buf.validate.field).string.uuid = true];
      }
      ```
       
      bool uuid = 22 [json_name = "uuid", (.buf.validate.priv.field) = { ... }
      Specified by:
      getUuid in interface StringRulesOrBuilder
      Returns:
      The uuid.
    • hasWellKnownRegex

      public boolean hasWellKnownRegex()
      `well_known_regex` specifies a common well-known pattern
      defined as a regex. If the field value doesn't match the well-known
      regex, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid HTTP header value
         string value = 1 [(buf.validate.field).string.well_known_regex = 2];
      }
      ```
      
      #### KnownRegex
      
      `well_known_regex` contains some well-known patterns.
      
      | Name                          | Number | Description                               |
      |-------------------------------|--------|-------------------------------------------|
      | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
      | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
      | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
       
      .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasWellKnownRegex in interface StringRulesOrBuilder
      Returns:
      Whether the wellKnownRegex field is set.
    • getWellKnownRegexValue

      public int getWellKnownRegexValue()
      `well_known_regex` specifies a common well-known pattern
      defined as a regex. If the field value doesn't match the well-known
      regex, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid HTTP header value
         string value = 1 [(buf.validate.field).string.well_known_regex = 2];
      }
      ```
      
      #### KnownRegex
      
      `well_known_regex` contains some well-known patterns.
      
      | Name                          | Number | Description                               |
      |-------------------------------|--------|-------------------------------------------|
      | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
      | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
      | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
       
      .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.priv.field) = { ... }
      Specified by:
      getWellKnownRegexValue in interface StringRulesOrBuilder
      Returns:
      The enum numeric value on the wire for wellKnownRegex.
    • getWellKnownRegex

      public KnownRegex getWellKnownRegex()
      `well_known_regex` specifies a common well-known pattern
      defined as a regex. If the field value doesn't match the well-known
      regex, an error message will be generated.
      
      ```proto
      message MyString {
        // value must be a valid HTTP header value
         string value = 1 [(buf.validate.field).string.well_known_regex = 2];
      }
      ```
      
      #### KnownRegex
      
      `well_known_regex` contains some well-known patterns.
      
      | Name                          | Number | Description                               |
      |-------------------------------|--------|-------------------------------------------|
      | KNOWN_REGEX_UNSPECIFIED       | 0      |                                           |
      | KNOWN_REGEX_HTTP_HEADER_NAME  | 1      | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2)  |
      | KNOWN_REGEX_HTTP_HEADER_VALUE | 2      | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
       
      .buf.validate.KnownRegex well_known_regex = 24 [json_name = "wellKnownRegex", (.buf.validate.priv.field) = { ... }
      Specified by:
      getWellKnownRegex in interface StringRulesOrBuilder
      Returns:
      The wellKnownRegex.
    • hasStrict

      public boolean hasStrict()
      This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
      enable strict header validation. By default, this is true, and HTTP header
      validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
      validations that only disallow `\r\n\0` characters, which can be used to
      bypass header matching rules.
      
      ```proto
      message MyString {
         // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
         string value = 1 [(buf.validate.field).string.strict = false];
      }
      ```
       
      optional bool strict = 25 [json_name = "strict"];
      Specified by:
      hasStrict in interface StringRulesOrBuilder
      Returns:
      Whether the strict field is set.
    • getStrict

      public boolean getStrict()
      This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
      enable strict header validation. By default, this is true, and HTTP header
      validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
      validations that only disallow `\r\n\0` characters, which can be used to
      bypass header matching rules.
      
      ```proto
      message MyString {
         // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
         string value = 1 [(buf.validate.field).string.strict = false];
      }
      ```
       
      optional bool strict = 25 [json_name = "strict"];
      Specified by:
      getStrict in interface StringRulesOrBuilder
      Returns:
      The strict.
    • 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 StringRules parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static StringRules parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

      public static StringRules parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

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

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

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

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

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

      public static StringRules.Builder newBuilder()
    • newBuilder

      public static StringRules.Builder newBuilder(StringRules prototype)
    • toBuilder

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

      protected StringRules.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static StringRules getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<StringRules> 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 StringRules getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder