public static final class StringRules.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder> 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| Modifier and Type | Method and Description |
|---|---|
StringRules.Builder |
addAllIn(Iterable<String> values)
`in` specifies that the field value must be equal to one of the specified
values.
|
StringRules.Builder |
addAllNotIn(Iterable<String> values)
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
StringRules.Builder |
addIn(String value)
`in` specifies that the field value must be equal to one of the specified
values.
|
StringRules.Builder |
addInBytes(com.google.protobuf.ByteString value)
`in` specifies that the field value must be equal to one of the specified
values.
|
StringRules.Builder |
addNotIn(String value)
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
StringRules.Builder |
addNotInBytes(com.google.protobuf.ByteString value)
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
StringRules.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
StringRules |
build() |
StringRules |
buildPartial() |
StringRules.Builder |
clear() |
StringRules.Builder |
clearAddress()
`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).
|
StringRules.Builder |
clearConst()
`const` requires the field value to exactly match the specified value.
|
StringRules.Builder |
clearContains()
`contains` specifies that the field value must have the
specified substring anywhere in the string.
|
StringRules.Builder |
clearEmail()
`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).
|
StringRules.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
StringRules.Builder |
clearHostname()
`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).
|
StringRules.Builder |
clearIn()
`in` specifies that the field value must be equal to one of the specified
values.
|
StringRules.Builder |
clearIp()
`ip` specifies that the field value must be a valid IP
(v4 or v6) address, without surrounding square brackets for IPv6 addresses.
|
StringRules.Builder |
clearIpPrefix()
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
|
StringRules.Builder |
clearIpv4()
`ipv4` specifies that the field value must be a valid IPv4
address.
|
StringRules.Builder |
clearIpv4Prefix()
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix.
|
StringRules.Builder |
clearIpv4WithPrefixlen()
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
|
StringRules.Builder |
clearIpv6()
`ipv6` specifies that the field value must be a valid
IPv6 address, without surrounding square brackets.
|
StringRules.Builder |
clearIpv6Prefix()
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
|
StringRules.Builder |
clearIpv6WithPrefixlen()
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
|
StringRules.Builder |
clearIpWithPrefixlen()
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length.
|
StringRules.Builder |
clearLen()
`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.
|
StringRules.Builder |
clearLenBytes()
`len_bytes` dictates that the field value must have the specified number of
bytes.
|
StringRules.Builder |
clearMaxBytes()
`max_bytes` specifies that the field value must have no more than the
specified number of bytes.
|
StringRules.Builder |
clearMaxLen()
`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.
|
StringRules.Builder |
clearMinBytes()
`min_bytes` specifies that the field value must have at least the specified
number of bytes.
|
StringRules.Builder |
clearMinLen()
`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.
|
StringRules.Builder |
clearNotContains()
`not_contains` specifies that the field value must not have the
specified substring anywhere in the string.
|
StringRules.Builder |
clearNotIn()
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
StringRules.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
StringRules.Builder |
clearPattern()
`pattern` specifies that the field value must match the specified
regular expression (RE2 syntax), with the expression provided without any
delimiters.
|
StringRules.Builder |
clearPrefix()
`prefix` specifies that the field value must have the
specified substring at the beginning of the string.
|
StringRules.Builder |
clearStrict()
This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
enable strict header validation.
|
StringRules.Builder |
clearSuffix()
`suffix` specifies that the field value must have the
specified substring at the end of the string.
|
StringRules.Builder |
clearUri()
`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).
|
StringRules.Builder |
clearUriRef()
`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.
|
StringRules.Builder |
clearUuid()
`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).
|
StringRules.Builder |
clearWellKnown() |
StringRules.Builder |
clearWellKnownRegex()
`well_known_regex` specifies a common well-known pattern
defined as a regex.
|
StringRules.Builder |
clone() |
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).
|
String |
getConst()
`const` requires the field value to exactly match the specified value.
|
com.google.protobuf.ByteString |
getConstBytes()
`const` requires the field value to exactly match the specified value.
|
String |
getContains()
`contains` specifies that the field value must have the
specified substring anywhere in the string.
|
com.google.protobuf.ByteString |
getContainsBytes()
`contains` specifies that the field value must have the
specified substring anywhere in the string.
|
StringRules |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
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).
|
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).
|
String |
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 |
getInCount()
`in` specifies that the field value must be equal to one of the specified
values.
|
com.google.protobuf.ProtocolStringList |
getInList()
`in` specifies that the field value must be equal to one of the specified
values.
|
boolean |
getIp()
`ip` specifies that the field value must be a valid IP
(v4 or v6) address, without surrounding square brackets for IPv6 addresses.
|
boolean |
getIpPrefix()
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
|
boolean |
getIpv4()
`ipv4` specifies that the field value must be a valid IPv4
address.
|
boolean |
getIpv4Prefix()
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix.
|
boolean |
getIpv4WithPrefixlen()
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
|
boolean |
getIpv6()
`ipv6` specifies that the field value must be a valid
IPv6 address, without surrounding square brackets.
|
boolean |
getIpv6Prefix()
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
|
boolean |
getIpv6WithPrefixlen()
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
|
boolean |
getIpWithPrefixlen()
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length.
|
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.
|
long |
getLenBytes()
`len_bytes` dictates that the field value must have the specified number of
bytes.
|
long |
getMaxBytes()
`max_bytes` specifies that the field value must have no more than the
specified number of bytes.
|
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.
|
long |
getMinBytes()
`min_bytes` specifies that the field value must have at least the specified
number of bytes.
|
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.
|
String |
getNotContains()
`not_contains` specifies that the field value must not have the
specified substring anywhere in the string.
|
com.google.protobuf.ByteString |
getNotContainsBytes()
`not_contains` specifies that the field value must not have the
specified substring anywhere in the string.
|
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 |
getNotInCount()
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
com.google.protobuf.ProtocolStringList |
getNotInList()
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
String |
getPattern()
`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 |
getPatternBytes()
`pattern` specifies that the field value must match the specified
regular expression (RE2 syntax), with the expression provided without any
delimiters.
|
String |
getPrefix()
`prefix` specifies that the field value must have the
specified substring at the beginning of the string.
|
com.google.protobuf.ByteString |
getPrefixBytes()
`prefix` specifies that the field value must have the
specified substring at the beginning of the string.
|
boolean |
getStrict()
This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
enable strict header validation.
|
String |
getSuffix()
`suffix` specifies that the field value must have the
specified substring at the end of the string.
|
com.google.protobuf.ByteString |
getSuffixBytes()
`suffix` specifies that the field value must have the
specified substring at the end of the string.
|
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).
|
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.
|
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).
|
StringRules.WellKnownCase |
getWellKnownCase() |
KnownRegex |
getWellKnownRegex()
`well_known_regex` specifies a common well-known pattern
defined as a regex.
|
int |
getWellKnownRegexValue()
`well_known_regex` specifies a common well-known pattern
defined as a regex.
|
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).
|
boolean |
hasConst()
`const` requires the field value to exactly match the specified value.
|
boolean |
hasContains()
`contains` specifies that the field value must have the
specified substring anywhere in the string.
|
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).
|
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).
|
boolean |
hasIp()
`ip` specifies that the field value must be a valid IP
(v4 or v6) address, without surrounding square brackets for IPv6 addresses.
|
boolean |
hasIpPrefix()
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
|
boolean |
hasIpv4()
`ipv4` specifies that the field value must be a valid IPv4
address.
|
boolean |
hasIpv4Prefix()
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix.
|
boolean |
hasIpv4WithPrefixlen()
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
|
boolean |
hasIpv6()
`ipv6` specifies that the field value must be a valid
IPv6 address, without surrounding square brackets.
|
boolean |
hasIpv6Prefix()
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
|
boolean |
hasIpv6WithPrefixlen()
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
|
boolean |
hasIpWithPrefixlen()
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length.
|
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.
|
boolean |
hasLenBytes()
`len_bytes` dictates that the field value must have the specified number of
bytes.
|
boolean |
hasMaxBytes()
`max_bytes` specifies that the field value must have no more than the
specified number of bytes.
|
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.
|
boolean |
hasMinBytes()
`min_bytes` specifies that the field value must have at least the specified
number of bytes.
|
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.
|
boolean |
hasNotContains()
`not_contains` specifies that the field value must not have the
specified substring anywhere in the string.
|
boolean |
hasPattern()
`pattern` specifies that the field value must match the specified
regular expression (RE2 syntax), with the expression provided without any
delimiters.
|
boolean |
hasPrefix()
`prefix` specifies that the field value must have the
specified substring at the beginning of the string.
|
boolean |
hasStrict()
This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
enable strict header validation.
|
boolean |
hasSuffix()
`suffix` specifies that the field value must have the
specified substring at the end of the string.
|
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).
|
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.
|
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).
|
boolean |
hasWellKnownRegex()
`well_known_regex` specifies a common well-known pattern
defined as a regex.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
StringRules.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
StringRules.Builder |
setAddress(boolean value)
`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).
|
StringRules.Builder |
setConst(String value)
`const` requires the field value to exactly match the specified value.
|
StringRules.Builder |
setConstBytes(com.google.protobuf.ByteString value)
`const` requires the field value to exactly match the specified value.
|
StringRules.Builder |
setContains(String value)
`contains` specifies that the field value must have the
specified substring anywhere in the string.
|
StringRules.Builder |
setContainsBytes(com.google.protobuf.ByteString value)
`contains` specifies that the field value must have the
specified substring anywhere in the string.
|
StringRules.Builder |
setEmail(boolean value)
`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).
|
StringRules.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
StringRules.Builder |
setHostname(boolean value)
`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).
|
StringRules.Builder |
setIn(int index,
String value)
`in` specifies that the field value must be equal to one of the specified
values.
|
StringRules.Builder |
setIp(boolean value)
`ip` specifies that the field value must be a valid IP
(v4 or v6) address, without surrounding square brackets for IPv6 addresses.
|
StringRules.Builder |
setIpPrefix(boolean value)
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
|
StringRules.Builder |
setIpv4(boolean value)
`ipv4` specifies that the field value must be a valid IPv4
address.
|
StringRules.Builder |
setIpv4Prefix(boolean value)
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix.
|
StringRules.Builder |
setIpv4WithPrefixlen(boolean value)
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
|
StringRules.Builder |
setIpv6(boolean value)
`ipv6` specifies that the field value must be a valid
IPv6 address, without surrounding square brackets.
|
StringRules.Builder |
setIpv6Prefix(boolean value)
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
|
StringRules.Builder |
setIpv6WithPrefixlen(boolean value)
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
|
StringRules.Builder |
setIpWithPrefixlen(boolean value)
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length.
|
StringRules.Builder |
setLen(long value)
`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.
|
StringRules.Builder |
setLenBytes(long value)
`len_bytes` dictates that the field value must have the specified number of
bytes.
|
StringRules.Builder |
setMaxBytes(long value)
`max_bytes` specifies that the field value must have no more than the
specified number of bytes.
|
StringRules.Builder |
setMaxLen(long value)
`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.
|
StringRules.Builder |
setMinBytes(long value)
`min_bytes` specifies that the field value must have at least the specified
number of bytes.
|
StringRules.Builder |
setMinLen(long value)
`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.
|
StringRules.Builder |
setNotContains(String value)
`not_contains` specifies that the field value must not have the
specified substring anywhere in the string.
|
StringRules.Builder |
setNotContainsBytes(com.google.protobuf.ByteString value)
`not_contains` specifies that the field value must not have the
specified substring anywhere in the string.
|
StringRules.Builder |
setNotIn(int index,
String value)
`not_in` specifies that the field value cannot be equal to any
of the specified values.
|
StringRules.Builder |
setPattern(String value)
`pattern` specifies that the field value must match the specified
regular expression (RE2 syntax), with the expression provided without any
delimiters.
|
StringRules.Builder |
setPatternBytes(com.google.protobuf.ByteString value)
`pattern` specifies that the field value must match the specified
regular expression (RE2 syntax), with the expression provided without any
delimiters.
|
StringRules.Builder |
setPrefix(String value)
`prefix` specifies that the field value must have the
specified substring at the beginning of the string.
|
StringRules.Builder |
setPrefixBytes(com.google.protobuf.ByteString value)
`prefix` specifies that the field value must have the
specified substring at the beginning of the string.
|
StringRules.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
StringRules.Builder |
setStrict(boolean value)
This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
enable strict header validation.
|
StringRules.Builder |
setSuffix(String value)
`suffix` specifies that the field value must have the
specified substring at the end of the string.
|
StringRules.Builder |
setSuffixBytes(com.google.protobuf.ByteString value)
`suffix` specifies that the field value must have the
specified substring at the end of the string.
|
StringRules.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
StringRules.Builder |
setUri(boolean value)
`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).
|
StringRules.Builder |
setUriRef(boolean value)
`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.
|
StringRules.Builder |
setUuid(boolean value)
`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).
|
StringRules.Builder |
setWellKnownRegex(KnownRegex value)
`well_known_regex` specifies a common well-known pattern
defined as a regex.
|
StringRules.Builder |
setWellKnownRegexValue(int value)
`well_known_regex` specifies a common well-known pattern
defined as a regex.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, isInitialized, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic StringRules build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic StringRules buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic StringRules.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public StringRules.WellKnownCase getWellKnownCase()
getWellKnownCase in interface StringRulesOrBuilderpublic StringRules.Builder clearWellKnown()
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) = { ... }hasConst in interface StringRulesOrBuilderpublic 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) = { ... }getConst in interface StringRulesOrBuilderpublic 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) = { ... }getConstBytes in interface StringRulesOrBuilderpublic StringRules.Builder setConst(String value)
`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) = { ... }value - The const to set.public StringRules.Builder clearConst()
`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) = { ... }public StringRules.Builder setConstBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes for const to set.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) = { ... }hasLen in interface StringRulesOrBuilderpublic 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) = { ... }getLen in interface StringRulesOrBuilderpublic StringRules.Builder setLen(long value)
`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) = { ... }value - The len to set.public StringRules.Builder clearLen()
`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) = { ... }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) = { ... }hasMinLen in interface StringRulesOrBuilderpublic 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) = { ... }getMinLen in interface StringRulesOrBuilderpublic StringRules.Builder setMinLen(long value)
`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) = { ... }value - The minLen to set.public StringRules.Builder clearMinLen()
`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) = { ... }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) = { ... }hasMaxLen in interface StringRulesOrBuilderpublic 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) = { ... }getMaxLen in interface StringRulesOrBuilderpublic StringRules.Builder setMaxLen(long value)
`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) = { ... }value - The maxLen to set.public StringRules.Builder clearMaxLen()
`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) = { ... }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) = { ... }hasLenBytes in interface StringRulesOrBuilderpublic 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) = { ... }getLenBytes in interface StringRulesOrBuilderpublic StringRules.Builder setLenBytes(long value)
`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) = { ... }value - The lenBytes to set.public StringRules.Builder clearLenBytes()
`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) = { ... }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) = { ... }hasMinBytes in interface StringRulesOrBuilderpublic 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) = { ... }getMinBytes in interface StringRulesOrBuilderpublic StringRules.Builder setMinBytes(long value)
`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) = { ... }value - The minBytes to set.public StringRules.Builder clearMinBytes()
`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) = { ... }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) = { ... }hasMaxBytes in interface StringRulesOrBuilderpublic 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) = { ... }getMaxBytes in interface StringRulesOrBuilderpublic StringRules.Builder setMaxBytes(long value)
`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) = { ... }value - The maxBytes to set.public StringRules.Builder clearMaxBytes()
`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) = { ... }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) = { ... }hasPattern in interface StringRulesOrBuilderpublic 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) = { ... }getPattern in interface StringRulesOrBuilderpublic 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) = { ... }getPatternBytes in interface StringRulesOrBuilderpublic StringRules.Builder setPattern(String value)
`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) = { ... }value - The pattern to set.public StringRules.Builder clearPattern()
`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) = { ... }public StringRules.Builder setPatternBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes for pattern to set.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) = { ... }hasPrefix in interface StringRulesOrBuilderpublic 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) = { ... }getPrefix in interface StringRulesOrBuilderpublic 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) = { ... }getPrefixBytes in interface StringRulesOrBuilderpublic StringRules.Builder setPrefix(String value)
`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) = { ... }value - The prefix to set.public StringRules.Builder clearPrefix()
`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) = { ... }public StringRules.Builder setPrefixBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes for prefix to set.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) = { ... }hasSuffix in interface StringRulesOrBuilderpublic 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) = { ... }getSuffix in interface StringRulesOrBuilderpublic 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) = { ... }getSuffixBytes in interface StringRulesOrBuilderpublic StringRules.Builder setSuffix(String value)
`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) = { ... }value - The suffix to set.public StringRules.Builder clearSuffix()
`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) = { ... }public StringRules.Builder setSuffixBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes for suffix to set.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) = { ... }hasContains in interface StringRulesOrBuilderpublic 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) = { ... }getContains in interface StringRulesOrBuilderpublic 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) = { ... }getContainsBytes in interface StringRulesOrBuilderpublic StringRules.Builder setContains(String value)
`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) = { ... }value - The contains to set.public StringRules.Builder clearContains()
`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) = { ... }public StringRules.Builder setContainsBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes for contains to set.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) = { ... }hasNotContains in interface StringRulesOrBuilderpublic 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) = { ... }getNotContains in interface StringRulesOrBuilderpublic 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) = { ... }getNotContainsBytes in interface StringRulesOrBuilderpublic StringRules.Builder setNotContains(String value)
`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) = { ... }value - The notContains to set.public StringRules.Builder clearNotContains()
`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) = { ... }public StringRules.Builder setNotContainsBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes for notContains to set.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) = { ... }getInList in interface StringRulesOrBuilderpublic 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) = { ... }getInCount in interface StringRulesOrBuilderpublic 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) = { ... }getIn in interface StringRulesOrBuilderindex - The index of the element to return.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) = { ... }getInBytes in interface StringRulesOrBuilderindex - The index of the value to return.public StringRules.Builder setIn(int index, String value)
`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) = { ... }index - The index to set the value at.value - The in to set.public StringRules.Builder addIn(String value)
`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) = { ... }value - The in to add.public StringRules.Builder addAllIn(Iterable<String> values)
`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) = { ... }values - The in to add.public StringRules.Builder clearIn()
`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) = { ... }public StringRules.Builder addInBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes of the in to add.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) = { ... }getNotInList in interface StringRulesOrBuilderpublic 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) = { ... }getNotInCount in interface StringRulesOrBuilderpublic 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) = { ... }getNotIn in interface StringRulesOrBuilderindex - The index of the element to return.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) = { ... }getNotInBytes in interface StringRulesOrBuilderindex - The index of the value to return.public StringRules.Builder setNotIn(int index, String value)
`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) = { ... }index - The index to set the value at.value - The notIn to set.public StringRules.Builder addNotIn(String value)
`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) = { ... }value - The notIn to add.public StringRules.Builder addAllNotIn(Iterable<String> values)
`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) = { ... }values - The notIn to add.public StringRules.Builder clearNotIn()
`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) = { ... }public StringRules.Builder addNotInBytes(com.google.protobuf.ByteString value)
`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) = { ... }value - The bytes of the notIn to add.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) = { ... }hasEmail in interface StringRulesOrBuilderpublic 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) = { ... }getEmail in interface StringRulesOrBuilderpublic StringRules.Builder setEmail(boolean value)
`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) = { ... }value - The email to set.public StringRules.Builder clearEmail()
`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) = { ... }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) = { ... }hasHostname in interface StringRulesOrBuilderpublic 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) = { ... }getHostname in interface StringRulesOrBuilderpublic StringRules.Builder setHostname(boolean value)
`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) = { ... }value - The hostname to set.public StringRules.Builder clearHostname()
`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) = { ... }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) = { ... }hasIp in interface StringRulesOrBuilderpublic 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) = { ... }getIp in interface StringRulesOrBuilderpublic StringRules.Builder setIp(boolean value)
`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) = { ... }value - The ip to set.public StringRules.Builder clearIp()
`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) = { ... }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) = { ... }hasIpv4 in interface StringRulesOrBuilderpublic 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) = { ... }getIpv4 in interface StringRulesOrBuilderpublic StringRules.Builder setIpv4(boolean value)
`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) = { ... }value - The ipv4 to set.public StringRules.Builder clearIpv4()
`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) = { ... }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) = { ... }hasIpv6 in interface StringRulesOrBuilderpublic 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) = { ... }getIpv6 in interface StringRulesOrBuilderpublic StringRules.Builder setIpv6(boolean value)
`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) = { ... }value - The ipv6 to set.public StringRules.Builder clearIpv6()
`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) = { ... }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) = { ... }hasUri in interface StringRulesOrBuilderpublic 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) = { ... }getUri in interface StringRulesOrBuilderpublic StringRules.Builder setUri(boolean value)
`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) = { ... }value - The uri to set.public StringRules.Builder clearUri()
`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) = { ... }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) = { ... }hasUriRef in interface StringRulesOrBuilderpublic 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) = { ... }getUriRef in interface StringRulesOrBuilderpublic StringRules.Builder setUriRef(boolean value)
`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) = { ... }value - The uriRef to set.public StringRules.Builder clearUriRef()
`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) = { ... }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) = { ... }hasAddress in interface StringRulesOrBuilderpublic 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) = { ... }getAddress in interface StringRulesOrBuilderpublic StringRules.Builder setAddress(boolean value)
`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) = { ... }value - The address to set.public StringRules.Builder clearAddress()
`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) = { ... }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) = { ... }hasUuid in interface StringRulesOrBuilderpublic 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) = { ... }getUuid in interface StringRulesOrBuilderpublic StringRules.Builder setUuid(boolean value)
`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) = { ... }value - The uuid to set.public StringRules.Builder clearUuid()
`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) = { ... }public boolean hasIpWithPrefixlen()
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length. If the field value isn't a valid IP with prefix
length, an error message will be generated.
```proto
message MyString {
// value must be a valid IP with prefix length
string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
}
```
bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.priv.field) = { ... }hasIpWithPrefixlen in interface StringRulesOrBuilderpublic boolean getIpWithPrefixlen()
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length. If the field value isn't a valid IP with prefix
length, an error message will be generated.
```proto
message MyString {
// value must be a valid IP with prefix length
string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
}
```
bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.priv.field) = { ... }getIpWithPrefixlen in interface StringRulesOrBuilderpublic StringRules.Builder setIpWithPrefixlen(boolean value)
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length. If the field value isn't a valid IP with prefix
length, an error message will be generated.
```proto
message MyString {
// value must be a valid IP with prefix length
string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
}
```
bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.priv.field) = { ... }value - The ipWithPrefixlen to set.public StringRules.Builder clearIpWithPrefixlen()
`ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length. If the field value isn't a valid IP with prefix
length, an error message will be generated.
```proto
message MyString {
// value must be a valid IP with prefix length
string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
}
```
bool ip_with_prefixlen = 26 [json_name = "ipWithPrefixlen", (.buf.validate.priv.field) = { ... }public boolean hasIpv4WithPrefixlen()
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
If the field value isn't a valid IPv4 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv4 address with prefix lentgh
string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
}
```
bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.priv.field) = { ... }hasIpv4WithPrefixlen in interface StringRulesOrBuilderpublic boolean getIpv4WithPrefixlen()
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
If the field value isn't a valid IPv4 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv4 address with prefix lentgh
string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
}
```
bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.priv.field) = { ... }getIpv4WithPrefixlen in interface StringRulesOrBuilderpublic StringRules.Builder setIpv4WithPrefixlen(boolean value)
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
If the field value isn't a valid IPv4 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv4 address with prefix lentgh
string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
}
```
bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.priv.field) = { ... }value - The ipv4WithPrefixlen to set.public StringRules.Builder clearIpv4WithPrefixlen()
`ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
If the field value isn't a valid IPv4 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv4 address with prefix lentgh
string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
}
```
bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.priv.field) = { ... }public boolean hasIpv6WithPrefixlen()
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
If the field value is not a valid IPv6 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv6 address prefix length
string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
}
```
bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.priv.field) = { ... }hasIpv6WithPrefixlen in interface StringRulesOrBuilderpublic boolean getIpv6WithPrefixlen()
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
If the field value is not a valid IPv6 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv6 address prefix length
string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
}
```
bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.priv.field) = { ... }getIpv6WithPrefixlen in interface StringRulesOrBuilderpublic StringRules.Builder setIpv6WithPrefixlen(boolean value)
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
If the field value is not a valid IPv6 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv6 address prefix length
string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
}
```
bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.priv.field) = { ... }value - The ipv6WithPrefixlen to set.public StringRules.Builder clearIpv6WithPrefixlen()
`ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
If the field value is not a valid IPv6 address with prefix length,
an error message will be generated.
```proto
message MyString {
// value must be a valid IPv6 address prefix length
string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
}
```
bool ipv6_with_prefixlen = 28 [json_name = "ipv6WithPrefixlen", (.buf.validate.priv.field) = { ... }public boolean hasIpPrefix()
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
If the field value isn't a valid IP prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
`127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IP prefix
string value = 1 [(buf.validate.field).string.ip_prefix = true];
}
```
bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.priv.field) = { ... }hasIpPrefix in interface StringRulesOrBuilderpublic boolean getIpPrefix()
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
If the field value isn't a valid IP prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
`127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IP prefix
string value = 1 [(buf.validate.field).string.ip_prefix = true];
}
```
bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.priv.field) = { ... }getIpPrefix in interface StringRulesOrBuilderpublic StringRules.Builder setIpPrefix(boolean value)
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
If the field value isn't a valid IP prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
`127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IP prefix
string value = 1 [(buf.validate.field).string.ip_prefix = true];
}
```
bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.priv.field) = { ... }value - The ipPrefix to set.public StringRules.Builder clearIpPrefix()
`ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
If the field value isn't a valid IP prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
`127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IP prefix
string value = 1 [(buf.validate.field).string.ip_prefix = true];
}
```
bool ip_prefix = 29 [json_name = "ipPrefix", (.buf.validate.priv.field) = { ... }public boolean hasIpv4Prefix()
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix. If the field value isn't a valid IPv4 prefix, an error message
will be generated. The prefix must have all zeros for the masked bits of
the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IPv4 prefix
string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
}
```
bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.priv.field) = { ... }hasIpv4Prefix in interface StringRulesOrBuilderpublic boolean getIpv4Prefix()
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix. If the field value isn't a valid IPv4 prefix, an error message
will be generated. The prefix must have all zeros for the masked bits of
the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IPv4 prefix
string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
}
```
bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.priv.field) = { ... }getIpv4Prefix in interface StringRulesOrBuilderpublic StringRules.Builder setIpv4Prefix(boolean value)
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix. If the field value isn't a valid IPv4 prefix, an error message
will be generated. The prefix must have all zeros for the masked bits of
the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IPv4 prefix
string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
}
```
bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.priv.field) = { ... }value - The ipv4Prefix to set.public StringRules.Builder clearIpv4Prefix()
`ipv4_prefix` specifies that the field value must be a valid IPv4
prefix. If the field value isn't a valid IPv4 prefix, an error message
will be generated. The prefix must have all zeros for the masked bits of
the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
```proto
message MyString {
// value must be a valid IPv4 prefix
string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
}
```
bool ipv4_prefix = 30 [json_name = "ipv4Prefix", (.buf.validate.priv.field) = { ... }public boolean hasIpv6Prefix()
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
If the field value is not a valid IPv6 prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix
(e.g., `2001:db8::/48`, not `2001:db8::1/48`).
```proto
message MyString {
// value must be a valid IPv6 prefix
string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
}
```
bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.priv.field) = { ... }hasIpv6Prefix in interface StringRulesOrBuilderpublic boolean getIpv6Prefix()
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
If the field value is not a valid IPv6 prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix
(e.g., `2001:db8::/48`, not `2001:db8::1/48`).
```proto
message MyString {
// value must be a valid IPv6 prefix
string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
}
```
bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.priv.field) = { ... }getIpv6Prefix in interface StringRulesOrBuilderpublic StringRules.Builder setIpv6Prefix(boolean value)
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
If the field value is not a valid IPv6 prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix
(e.g., `2001:db8::/48`, not `2001:db8::1/48`).
```proto
message MyString {
// value must be a valid IPv6 prefix
string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
}
```
bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.priv.field) = { ... }value - The ipv6Prefix to set.public StringRules.Builder clearIpv6Prefix()
`ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
If the field value is not a valid IPv6 prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix
(e.g., `2001:db8::/48`, not `2001:db8::1/48`).
```proto
message MyString {
// value must be a valid IPv6 prefix
string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
}
```
bool ipv6_prefix = 31 [json_name = "ipv6Prefix", (.buf.validate.priv.field) = { ... }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) = { ... }hasWellKnownRegex in interface StringRulesOrBuilderpublic 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) = { ... }getWellKnownRegexValue in interface StringRulesOrBuilderpublic StringRules.Builder setWellKnownRegexValue(int value)
`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) = { ... }value - The enum numeric value on the wire for wellKnownRegex to set.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) = { ... }getWellKnownRegex in interface StringRulesOrBuilderpublic StringRules.Builder setWellKnownRegex(KnownRegex value)
`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) = { ... }value - The wellKnownRegex to set.public StringRules.Builder clearWellKnownRegex()
`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) = { ... }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"];hasStrict in interface StringRulesOrBuilderpublic 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"];getStrict in interface StringRulesOrBuilderpublic StringRules.Builder setStrict(boolean value)
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"];value - The strict to set.public StringRules.Builder clearStrict()
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"];public final StringRules.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>public final StringRules.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<StringRules.Builder>Copyright © 2023. All rights reserved.