build.buf.validate.StringRulesOrBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protovalidate Show documentation
Show all versions of protovalidate Show documentation
Protocol Buffer Validation
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: buf/validate/validate.proto
// Protobuf Java Version: 4.28.1
package build.buf.validate;
public interface StringRulesOrBuilder extends
// @@protoc_insertion_point(interface_extends:buf.validate.StringRules)
com.google.protobuf.GeneratedMessage.
ExtendableMessageOrBuilder {
/**
*
* `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.predefined) = { ... }
* @return Whether the const field is set.
*/
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.predefined) = { ... }
* @return The const.
*/
java.lang.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.predefined) = { ... }
* @return The bytes for const.
*/
com.google.protobuf.ByteString
getConstBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the len field is set.
*/
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.predefined) = { ... }
* @return The len.
*/
long getLen();
/**
*
* `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.predefined) = { ... }
* @return Whether the minLen field is set.
*/
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.predefined) = { ... }
* @return The minLen.
*/
long getMinLen();
/**
*
* `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.predefined) = { ... }
* @return Whether the maxLen field is set.
*/
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.predefined) = { ... }
* @return The maxLen.
*/
long getMaxLen();
/**
*
* `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.predefined) = { ... }
* @return Whether the lenBytes field is set.
*/
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.predefined) = { ... }
* @return The lenBytes.
*/
long getLenBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the minBytes field is set.
*/
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.predefined) = { ... }
* @return The minBytes.
*/
long getMinBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the maxBytes field is set.
*/
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.predefined) = { ... }
* @return The maxBytes.
*/
long getMaxBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the pattern field is set.
*/
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.predefined) = { ... }
* @return The pattern.
*/
java.lang.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.predefined) = { ... }
* @return The bytes for pattern.
*/
com.google.protobuf.ByteString
getPatternBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the prefix field is set.
*/
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.predefined) = { ... }
* @return The prefix.
*/
java.lang.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.predefined) = { ... }
* @return The bytes for prefix.
*/
com.google.protobuf.ByteString
getPrefixBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the suffix field is set.
*/
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.predefined) = { ... }
* @return The suffix.
*/
java.lang.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.predefined) = { ... }
* @return The bytes for suffix.
*/
com.google.protobuf.ByteString
getSuffixBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the contains field is set.
*/
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.predefined) = { ... }
* @return The contains.
*/
java.lang.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.predefined) = { ... }
* @return The bytes for contains.
*/
com.google.protobuf.ByteString
getContainsBytes();
/**
*
* `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.predefined) = { ... }
* @return Whether the notContains field is set.
*/
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.predefined) = { ... }
* @return The notContains.
*/
java.lang.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.predefined) = { ... }
* @return The bytes for notContains.
*/
com.google.protobuf.ByteString
getNotContainsBytes();
/**
*
* `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.predefined) = { ... }
* @return A list containing the in.
*/
java.util.List
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.predefined) = { ... }
* @return The count of in.
*/
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.predefined) = { ... }
* @param index The index of the element to return.
* @return The in at the given index.
*/
java.lang.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.predefined) = { ... }
* @param index The index of the value to return.
* @return The bytes of the in at the given index.
*/
com.google.protobuf.ByteString
getInBytes(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.predefined) = { ... }
* @return A list containing the notIn.
*/
java.util.List
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.predefined) = { ... }
* @return The count of notIn.
*/
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.predefined) = { ... }
* @param index The index of the element to return.
* @return The notIn at the given index.
*/
java.lang.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.predefined) = { ... }
* @param index The index of the value to return.
* @return The bytes of the notIn at the given index.
*/
com.google.protobuf.ByteString
getNotInBytes(int index);
/**
*
* `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.predefined) = { ... }
* @return Whether the email field is set.
*/
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.predefined) = { ... }
* @return The email.
*/
boolean getEmail();
/**
*
* `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.predefined) = { ... }
* @return Whether the hostname field is set.
*/
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.predefined) = { ... }
* @return The hostname.
*/
boolean getHostname();
/**
*
* `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.predefined) = { ... }
* @return Whether the ip field is set.
*/
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.predefined) = { ... }
* @return The ip.
*/
boolean getIp();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipv4 field is set.
*/
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.predefined) = { ... }
* @return The ipv4.
*/
boolean getIpv4();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipv6 field is set.
*/
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.predefined) = { ... }
* @return The ipv6.
*/
boolean getIpv6();
/**
*
* `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.predefined) = { ... }
* @return Whether the uri field is set.
*/
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.predefined) = { ... }
* @return The uri.
*/
boolean getUri();
/**
*
* `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.predefined) = { ... }
* @return Whether the uriRef field is set.
*/
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.predefined) = { ... }
* @return The uriRef.
*/
boolean getUriRef();
/**
*
* `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.predefined) = { ... }
* @return Whether the address field is set.
*/
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.predefined) = { ... }
* @return The address.
*/
boolean getAddress();
/**
*
* `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.predefined) = { ... }
* @return Whether the uuid field is set.
*/
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.predefined) = { ... }
* @return The uuid.
*/
boolean getUuid();
/**
*
* `tuuid` (trimmed 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) with all dashes
* omitted. If the field value isn't a valid UUID without dashes, an error message
* will be generated.
*
* ```proto
* message MyString {
* // value must be a valid trimmed UUID
* string value = 1 [(buf.validate.field).string.tuuid = true];
* }
* ```
*
*
* bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... }
* @return Whether the tuuid field is set.
*/
boolean hasTuuid();
/**
*
* `tuuid` (trimmed 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) with all dashes
* omitted. If the field value isn't a valid UUID without dashes, an error message
* will be generated.
*
* ```proto
* message MyString {
* // value must be a valid trimmed UUID
* string value = 1 [(buf.validate.field).string.tuuid = true];
* }
* ```
*
*
* bool tuuid = 33 [json_name = "tuuid", (.buf.validate.predefined) = { ... }
* @return The tuuid.
*/
boolean getTuuid();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipWithPrefixlen field is set.
*/
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.predefined) = { ... }
* @return The ipWithPrefixlen.
*/
boolean getIpWithPrefixlen();
/**
*
* `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 length
* string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
* }
* ```
*
*
* bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... }
* @return Whether the ipv4WithPrefixlen field is set.
*/
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 length
* string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
* }
* ```
*
*
* bool ipv4_with_prefixlen = 27 [json_name = "ipv4WithPrefixlen", (.buf.validate.predefined) = { ... }
* @return The ipv4WithPrefixlen.
*/
boolean getIpv4WithPrefixlen();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipv6WithPrefixlen field is set.
*/
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.predefined) = { ... }
* @return The ipv6WithPrefixlen.
*/
boolean getIpv6WithPrefixlen();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipPrefix field is set.
*/
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.predefined) = { ... }
* @return The ipPrefix.
*/
boolean getIpPrefix();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipv4Prefix field is set.
*/
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.predefined) = { ... }
* @return The ipv4Prefix.
*/
boolean getIpv4Prefix();
/**
*
* `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.predefined) = { ... }
* @return Whether the ipv6Prefix field is set.
*/
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.predefined) = { ... }
* @return The ipv6Prefix.
*/
boolean getIpv6Prefix();
/**
*
* `host_and_port` specifies the field value must be a valid host and port
* pair. The host must be a valid hostname or IP address while the port
* must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
* with square brackets (e.g., `[::1]:1234`).
*
*
* bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... }
* @return Whether the hostAndPort field is set.
*/
boolean hasHostAndPort();
/**
*
* `host_and_port` specifies the field value must be a valid host and port
* pair. The host must be a valid hostname or IP address while the port
* must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
* with square brackets (e.g., `[::1]:1234`).
*
*
* bool host_and_port = 32 [json_name = "hostAndPort", (.buf.validate.predefined) = { ... }
* @return The hostAndPort.
*/
boolean getHostAndPort();
/**
*
* `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 = KNOWN_REGEX_HTTP_HEADER_VALUE];
* }
* ```
*
* #### 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.predefined) = { ... }
* @return Whether the wellKnownRegex field is set.
*/
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 = KNOWN_REGEX_HTTP_HEADER_VALUE];
* }
* ```
*
* #### 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.predefined) = { ... }
* @return The wellKnownRegex.
*/
build.buf.validate.KnownRegex getWellKnownRegex();
/**
*
* 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"];
* @return Whether the strict field is set.
*/
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"];
* @return The strict.
*/
boolean getStrict();
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyString {
* string value = 1 [
* (buf.validate.field).string.example = 1,
* (buf.validate.field).string.example = 2
* ];
* }
* ```
*
*
* repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... }
* @return A list containing the example.
*/
java.util.List
getExampleList();
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyString {
* string value = 1 [
* (buf.validate.field).string.example = 1,
* (buf.validate.field).string.example = 2
* ];
* }
* ```
*
*
* repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... }
* @return The count of example.
*/
int getExampleCount();
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyString {
* string value = 1 [
* (buf.validate.field).string.example = 1,
* (buf.validate.field).string.example = 2
* ];
* }
* ```
*
*
* repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... }
* @param index The index of the element to return.
* @return The example at the given index.
*/
java.lang.String getExample(int index);
/**
*
* `example` specifies values that the field may have. These values SHOULD
* conform to other constraints. `example` values will not impact validation
* but may be used as helpful guidance on how to populate the given field.
*
* ```proto
* message MyString {
* string value = 1 [
* (buf.validate.field).string.example = 1,
* (buf.validate.field).string.example = 2
* ];
* }
* ```
*
*
* repeated string example = 34 [json_name = "example", (.buf.validate.predefined) = { ... }
* @param index The index of the value to return.
* @return The bytes of the example at the given index.
*/
com.google.protobuf.ByteString
getExampleBytes(int index);
build.buf.validate.StringRules.WellKnownCase getWellKnownCase();
}