Package io.envoyproxy.pgv.validate
Class Validate.StringRules.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Validate.StringRules.Builder>
io.envoyproxy.pgv.validate.Validate.StringRules.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Validate.StringRulesOrBuilder
,Cloneable
- Enclosing class:
- Validate.StringRules
public static final class Validate.StringRules.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Validate.StringRules.Builder>
implements Validate.StringRulesOrBuilder
StringRules describe the constraints applied to `string` valuesProtobuf type
validate.StringRules
-
Method Summary
Modifier and TypeMethodDescriptionIn specifies that this field must be equal to one of the specified valuesaddAllNotIn
(Iterable<String> values) NotIn specifies that this field cannot be equal to one of the specified valuesIn specifies that this field must be equal to one of the specified valuesaddInBytes
(com.google.protobuf.ByteString value) In specifies that this field must be equal to one of the specified valuesNotIn specifies that this field cannot be equal to one of the specified valuesaddNotInBytes
(com.google.protobuf.ByteString value) NotIn specifies that this field cannot be equal to one of the specified valuesbuild()
clear()
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).Const specifies that this field must be exactly the specified valueContains specifies that this field must have the specified substring anywhere in the string.Email specifies that the field must be a valid email address as defined by RFC 5322Hostname specifies that the field must be a valid hostname as defined by RFC 1034.IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not emptyclearIn()
In specifies that this field must be equal to one of the specified valuesclearIp()
Ip specifies that the field must be a valid IP (v4 or v6) address.Ipv4 specifies that the field must be a valid IPv4 address.Ipv6 specifies that the field must be a valid IPv6 address.clearLen()
Len specifies that this field must be the specified number of characters (Unicode code points).LenBytes specifies that this field must be the specified number of bytesMaxBytes specifies that this field must be the specified number of bytes at a maximumMaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum.MinBytes specifies that this field must be the specified number of bytes at a minimumMinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum.NotContains specifies that this field cannot have the specified substring anywhere in the string.NotIn specifies that this field cannot be equal to one of the specified valuesPattern specifies that this field must match against the specified regular expression (RE2 syntax).Prefix specifies that this field must have the specified substring at the beginning of the string.This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation.Suffix specifies that this field must have the specified substring at the end of the string.clearUri()
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.Uuid specifies that the field must be a valid UUID as defined by RFC 4122WellKnownRegex specifies a common well known pattern defined as a regex.boolean
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).getConst()
Const specifies that this field must be exactly the specified valuecom.google.protobuf.ByteString
Const specifies that this field must be exactly the specified valueContains specifies that this field must have the specified substring anywhere in the string.com.google.protobuf.ByteString
Contains specifies that this field must have the specified substring anywhere in the string.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
boolean
getEmail()
Email specifies that the field must be a valid email address as defined by RFC 5322boolean
Hostname specifies that the field must be a valid hostname as defined by RFC 1034.boolean
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not emptygetIn
(int index) In specifies that this field must be equal to one of the specified valuescom.google.protobuf.ByteString
getInBytes
(int index) In specifies that this field must be equal to one of the specified valuesint
In specifies that this field must be equal to one of the specified valuescom.google.protobuf.ProtocolStringList
In specifies that this field must be equal to one of the specified valuesboolean
getIp()
Ip specifies that the field must be a valid IP (v4 or v6) address.boolean
getIpv4()
Ipv4 specifies that the field must be a valid IPv4 address.boolean
getIpv6()
Ipv6 specifies that the field must be a valid IPv6 address.long
getLen()
Len specifies that this field must be the specified number of characters (Unicode code points).long
LenBytes specifies that this field must be the specified number of byteslong
MaxBytes specifies that this field must be the specified number of bytes at a maximumlong
MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum.long
MinBytes specifies that this field must be the specified number of bytes at a minimumlong
MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum.NotContains specifies that this field cannot have the specified substring anywhere in the string.com.google.protobuf.ByteString
NotContains specifies that this field cannot have the specified substring anywhere in the string.getNotIn
(int index) NotIn specifies that this field cannot be equal to one of the specified valuescom.google.protobuf.ByteString
getNotInBytes
(int index) NotIn specifies that this field cannot be equal to one of the specified valuesint
NotIn specifies that this field cannot be equal to one of the specified valuescom.google.protobuf.ProtocolStringList
NotIn specifies that this field cannot be equal to one of the specified valuesPattern specifies that this field must match against the specified regular expression (RE2 syntax).com.google.protobuf.ByteString
Pattern specifies that this field must match against the specified regular expression (RE2 syntax).Prefix specifies that this field must have the specified substring at the beginning of the string.com.google.protobuf.ByteString
Prefix specifies that this field must have the specified substring at the beginning of the string.boolean
This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation.Suffix specifies that this field must have the specified substring at the end of the string.com.google.protobuf.ByteString
Suffix specifies that this field must have the specified substring at the end of the string.boolean
getUri()
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986boolean
UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.boolean
getUuid()
Uuid specifies that the field must be a valid UUID as defined by RFC 4122WellKnownRegex specifies a common well known pattern defined as a regex.boolean
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).boolean
hasConst()
Const specifies that this field must be exactly the specified valueboolean
Contains specifies that this field must have the specified substring anywhere in the string.boolean
hasEmail()
Email specifies that the field must be a valid email address as defined by RFC 5322boolean
Hostname specifies that the field must be a valid hostname as defined by RFC 1034.boolean
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not emptyboolean
hasIp()
Ip specifies that the field must be a valid IP (v4 or v6) address.boolean
hasIpv4()
Ipv4 specifies that the field must be a valid IPv4 address.boolean
hasIpv6()
Ipv6 specifies that the field must be a valid IPv6 address.boolean
hasLen()
Len specifies that this field must be the specified number of characters (Unicode code points).boolean
LenBytes specifies that this field must be the specified number of bytesboolean
MaxBytes specifies that this field must be the specified number of bytes at a maximumboolean
MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum.boolean
MinBytes specifies that this field must be the specified number of bytes at a minimumboolean
MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum.boolean
NotContains specifies that this field cannot have the specified substring anywhere in the string.boolean
Pattern specifies that this field must match against the specified regular expression (RE2 syntax).boolean
Prefix specifies that this field must have the specified substring at the beginning of the string.boolean
This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation.boolean
Suffix specifies that this field must have the specified substring at the end of the string.boolean
hasUri()
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986boolean
UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.boolean
hasUuid()
Uuid specifies that the field must be a valid UUID as defined by RFC 4122boolean
WellKnownRegex specifies a common well known pattern defined as a regex.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(Validate.StringRules other) setAddress
(boolean value) Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).Const specifies that this field must be exactly the specified valuesetConstBytes
(com.google.protobuf.ByteString value) Const specifies that this field must be exactly the specified valuesetContains
(String value) Contains specifies that this field must have the specified substring anywhere in the string.setContainsBytes
(com.google.protobuf.ByteString value) Contains specifies that this field must have the specified substring anywhere in the string.setEmail
(boolean value) Email specifies that the field must be a valid email address as defined by RFC 5322setHostname
(boolean value) Hostname specifies that the field must be a valid hostname as defined by RFC 1034.setIgnoreEmpty
(boolean value) IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not emptyIn specifies that this field must be equal to one of the specified valuessetIp
(boolean value) Ip specifies that the field must be a valid IP (v4 or v6) address.setIpv4
(boolean value) Ipv4 specifies that the field must be a valid IPv4 address.setIpv6
(boolean value) Ipv6 specifies that the field must be a valid IPv6 address.setLen
(long value) Len specifies that this field must be the specified number of characters (Unicode code points).setLenBytes
(long value) LenBytes specifies that this field must be the specified number of bytessetMaxBytes
(long value) MaxBytes specifies that this field must be the specified number of bytes at a maximumsetMaxLen
(long value) MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum.setMinBytes
(long value) MinBytes specifies that this field must be the specified number of bytes at a minimumsetMinLen
(long value) MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum.setNotContains
(String value) NotContains specifies that this field cannot have the specified substring anywhere in the string.setNotContainsBytes
(com.google.protobuf.ByteString value) NotContains specifies that this field cannot have the specified substring anywhere in the string.NotIn specifies that this field cannot be equal to one of the specified valuessetPattern
(String value) Pattern specifies that this field must match against the specified regular expression (RE2 syntax).setPatternBytes
(com.google.protobuf.ByteString value) Pattern specifies that this field must match against the specified regular expression (RE2 syntax).Prefix specifies that this field must have the specified substring at the beginning of the string.setPrefixBytes
(com.google.protobuf.ByteString value) Prefix specifies that this field must have the specified substring at the beginning of the string.setStrict
(boolean value) This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation.Suffix specifies that this field must have the specified substring at the end of the string.setSuffixBytes
(com.google.protobuf.ByteString value) Suffix specifies that this field must have the specified substring at the end of the string.setUri
(boolean value) Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986setUriRef
(boolean value) UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.setUuid
(boolean value) Uuid specifies that the field must be a valid UUID as defined by RFC 4122WellKnownRegex specifies a common well known pattern defined as a regex.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<Validate.StringRules.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<Validate.StringRules.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<Validate.StringRules.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Validate.StringRules.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<Validate.StringRules.Builder>
-
mergeFrom
public Validate.StringRules.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Validate.StringRules.Builder>
- Throws:
IOException
-
getWellKnownCase
- Specified by:
getWellKnownCase
in interfaceValidate.StringRulesOrBuilder
-
clearWellKnown
-
hasConst
public boolean hasConst()Const specifies that this field must be exactly the specified value
optional string const = 1;
- Specified by:
hasConst
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the const field is set.
-
getConst
Const specifies that this field must be exactly the specified value
optional string const = 1;
- Specified by:
getConst
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The const.
-
getConstBytes
public com.google.protobuf.ByteString getConstBytes()Const specifies that this field must be exactly the specified value
optional string const = 1;
- Specified by:
getConstBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The bytes for const.
-
setConst
Const specifies that this field must be exactly the specified value
optional string const = 1;
- Parameters:
value
- The const to set.- Returns:
- This builder for chaining.
-
clearConst
Const specifies that this field must be exactly the specified value
optional string const = 1;
- Returns:
- This builder for chaining.
-
setConstBytes
Const specifies that this field must be exactly the specified value
optional string const = 1;
- Parameters:
value
- The bytes for const to set.- Returns:
- This builder for chaining.
-
hasLen
public boolean hasLen()Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string.
optional uint64 len = 19;
- Specified by:
hasLen
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the len field is set.
-
getLen
public long getLen()Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string.
optional uint64 len = 19;
- Specified by:
getLen
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The len.
-
setLen
Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string.
optional uint64 len = 19;
- Parameters:
value
- The len to set.- Returns:
- This builder for chaining.
-
clearLen
Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string.
optional uint64 len = 19;
- Returns:
- This builder for chaining.
-
hasMinLen
public boolean hasMinLen()MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 min_len = 2;
- Specified by:
hasMinLen
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the minLen field is set.
-
getMinLen
public long getMinLen()MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 min_len = 2;
- Specified by:
getMinLen
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The minLen.
-
setMinLen
MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 min_len = 2;
- Parameters:
value
- The minLen to set.- Returns:
- This builder for chaining.
-
clearMinLen
MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 min_len = 2;
- Returns:
- This builder for chaining.
-
hasMaxLen
public boolean hasMaxLen()MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 max_len = 3;
- Specified by:
hasMaxLen
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the maxLen field is set.
-
getMaxLen
public long getMaxLen()MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 max_len = 3;
- Specified by:
getMaxLen
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The maxLen.
-
setMaxLen
MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 max_len = 3;
- Parameters:
value
- The maxLen to set.- Returns:
- This builder for chaining.
-
clearMaxLen
MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string.
optional uint64 max_len = 3;
- Returns:
- This builder for chaining.
-
hasLenBytes
public boolean hasLenBytes()LenBytes specifies that this field must be the specified number of bytes
optional uint64 len_bytes = 20;
- Specified by:
hasLenBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the lenBytes field is set.
-
getLenBytes
public long getLenBytes()LenBytes specifies that this field must be the specified number of bytes
optional uint64 len_bytes = 20;
- Specified by:
getLenBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The lenBytes.
-
setLenBytes
LenBytes specifies that this field must be the specified number of bytes
optional uint64 len_bytes = 20;
- Parameters:
value
- The lenBytes to set.- Returns:
- This builder for chaining.
-
clearLenBytes
LenBytes specifies that this field must be the specified number of bytes
optional uint64 len_bytes = 20;
- Returns:
- This builder for chaining.
-
hasMinBytes
public boolean hasMinBytes()MinBytes specifies that this field must be the specified number of bytes at a minimum
optional uint64 min_bytes = 4;
- Specified by:
hasMinBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the minBytes field is set.
-
getMinBytes
public long getMinBytes()MinBytes specifies that this field must be the specified number of bytes at a minimum
optional uint64 min_bytes = 4;
- Specified by:
getMinBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The minBytes.
-
setMinBytes
MinBytes specifies that this field must be the specified number of bytes at a minimum
optional uint64 min_bytes = 4;
- Parameters:
value
- The minBytes to set.- Returns:
- This builder for chaining.
-
clearMinBytes
MinBytes specifies that this field must be the specified number of bytes at a minimum
optional uint64 min_bytes = 4;
- Returns:
- This builder for chaining.
-
hasMaxBytes
public boolean hasMaxBytes()MaxBytes specifies that this field must be the specified number of bytes at a maximum
optional uint64 max_bytes = 5;
- Specified by:
hasMaxBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the maxBytes field is set.
-
getMaxBytes
public long getMaxBytes()MaxBytes specifies that this field must be the specified number of bytes at a maximum
optional uint64 max_bytes = 5;
- Specified by:
getMaxBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The maxBytes.
-
setMaxBytes
MaxBytes specifies that this field must be the specified number of bytes at a maximum
optional uint64 max_bytes = 5;
- Parameters:
value
- The maxBytes to set.- Returns:
- This builder for chaining.
-
clearMaxBytes
MaxBytes specifies that this field must be the specified number of bytes at a maximum
optional uint64 max_bytes = 5;
- Returns:
- This builder for chaining.
-
hasPattern
public boolean hasPattern()Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
optional string pattern = 6;
- Specified by:
hasPattern
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the pattern field is set.
-
getPattern
Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
optional string pattern = 6;
- Specified by:
getPattern
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The pattern.
-
getPatternBytes
public com.google.protobuf.ByteString getPatternBytes()Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
optional string pattern = 6;
- Specified by:
getPatternBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The bytes for pattern.
-
setPattern
Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
optional string pattern = 6;
- Parameters:
value
- The pattern to set.- Returns:
- This builder for chaining.
-
clearPattern
Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
optional string pattern = 6;
- Returns:
- This builder for chaining.
-
setPatternBytes
Pattern specifies that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
optional string pattern = 6;
- Parameters:
value
- The bytes for pattern to set.- Returns:
- This builder for chaining.
-
hasPrefix
public boolean hasPrefix()Prefix specifies that this field must have the specified substring at the beginning of the string.
optional string prefix = 7;
- Specified by:
hasPrefix
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the prefix field is set.
-
getPrefix
Prefix specifies that this field must have the specified substring at the beginning of the string.
optional string prefix = 7;
- Specified by:
getPrefix
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The prefix.
-
getPrefixBytes
public com.google.protobuf.ByteString getPrefixBytes()Prefix specifies that this field must have the specified substring at the beginning of the string.
optional string prefix = 7;
- Specified by:
getPrefixBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The bytes for prefix.
-
setPrefix
Prefix specifies that this field must have the specified substring at the beginning of the string.
optional string prefix = 7;
- Parameters:
value
- The prefix to set.- Returns:
- This builder for chaining.
-
clearPrefix
Prefix specifies that this field must have the specified substring at the beginning of the string.
optional string prefix = 7;
- Returns:
- This builder for chaining.
-
setPrefixBytes
Prefix specifies that this field must have the specified substring at the beginning of the string.
optional string prefix = 7;
- Parameters:
value
- The bytes for prefix to set.- Returns:
- This builder for chaining.
-
hasSuffix
public boolean hasSuffix()Suffix specifies that this field must have the specified substring at the end of the string.
optional string suffix = 8;
- Specified by:
hasSuffix
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the suffix field is set.
-
getSuffix
Suffix specifies that this field must have the specified substring at the end of the string.
optional string suffix = 8;
- Specified by:
getSuffix
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The suffix.
-
getSuffixBytes
public com.google.protobuf.ByteString getSuffixBytes()Suffix specifies that this field must have the specified substring at the end of the string.
optional string suffix = 8;
- Specified by:
getSuffixBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The bytes for suffix.
-
setSuffix
Suffix specifies that this field must have the specified substring at the end of the string.
optional string suffix = 8;
- Parameters:
value
- The suffix to set.- Returns:
- This builder for chaining.
-
clearSuffix
Suffix specifies that this field must have the specified substring at the end of the string.
optional string suffix = 8;
- Returns:
- This builder for chaining.
-
setSuffixBytes
Suffix specifies that this field must have the specified substring at the end of the string.
optional string suffix = 8;
- Parameters:
value
- The bytes for suffix to set.- Returns:
- This builder for chaining.
-
hasContains
public boolean hasContains()Contains specifies that this field must have the specified substring anywhere in the string.
optional string contains = 9;
- Specified by:
hasContains
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the contains field is set.
-
getContains
Contains specifies that this field must have the specified substring anywhere in the string.
optional string contains = 9;
- Specified by:
getContains
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The contains.
-
getContainsBytes
public com.google.protobuf.ByteString getContainsBytes()Contains specifies that this field must have the specified substring anywhere in the string.
optional string contains = 9;
- Specified by:
getContainsBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The bytes for contains.
-
setContains
Contains specifies that this field must have the specified substring anywhere in the string.
optional string contains = 9;
- Parameters:
value
- The contains to set.- Returns:
- This builder for chaining.
-
clearContains
Contains specifies that this field must have the specified substring anywhere in the string.
optional string contains = 9;
- Returns:
- This builder for chaining.
-
setContainsBytes
Contains specifies that this field must have the specified substring anywhere in the string.
optional string contains = 9;
- Parameters:
value
- The bytes for contains to set.- Returns:
- This builder for chaining.
-
hasNotContains
public boolean hasNotContains()NotContains specifies that this field cannot have the specified substring anywhere in the string.
optional string not_contains = 23;
- Specified by:
hasNotContains
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the notContains field is set.
-
getNotContains
NotContains specifies that this field cannot have the specified substring anywhere in the string.
optional string not_contains = 23;
- Specified by:
getNotContains
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The notContains.
-
getNotContainsBytes
public com.google.protobuf.ByteString getNotContainsBytes()NotContains specifies that this field cannot have the specified substring anywhere in the string.
optional string not_contains = 23;
- Specified by:
getNotContainsBytes
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The bytes for notContains.
-
setNotContains
NotContains specifies that this field cannot have the specified substring anywhere in the string.
optional string not_contains = 23;
- Parameters:
value
- The notContains to set.- Returns:
- This builder for chaining.
-
clearNotContains
NotContains specifies that this field cannot have the specified substring anywhere in the string.
optional string not_contains = 23;
- Returns:
- This builder for chaining.
-
setNotContainsBytes
NotContains specifies that this field cannot have the specified substring anywhere in the string.
optional string not_contains = 23;
- Parameters:
value
- The bytes for notContains to set.- Returns:
- This builder for chaining.
-
getInList
public com.google.protobuf.ProtocolStringList getInList()In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Specified by:
getInList
in interfaceValidate.StringRulesOrBuilder
- Returns:
- A list containing the in.
-
getInCount
public int getInCount()In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Specified by:
getInCount
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The count of in.
-
getIn
In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Specified by:
getIn
in interfaceValidate.StringRulesOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The in at the given index.
-
getInBytes
public com.google.protobuf.ByteString getInBytes(int index) In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Specified by:
getInBytes
in interfaceValidate.StringRulesOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the in at the given index.
-
setIn
In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Parameters:
index
- The index to set the value at.value
- The in to set.- Returns:
- This builder for chaining.
-
addIn
In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Parameters:
value
- The in to add.- Returns:
- This builder for chaining.
-
addAllIn
In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Parameters:
values
- The in to add.- Returns:
- This builder for chaining.
-
clearIn
In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Returns:
- This builder for chaining.
-
addInBytes
In specifies that this field must be equal to one of the specified values
repeated string in = 10;
- Parameters:
value
- The bytes of the in to add.- Returns:
- This builder for chaining.
-
getNotInList
public com.google.protobuf.ProtocolStringList getNotInList()NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Specified by:
getNotInList
in interfaceValidate.StringRulesOrBuilder
- Returns:
- A list containing the notIn.
-
getNotInCount
public int getNotInCount()NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Specified by:
getNotInCount
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The count of notIn.
-
getNotIn
NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Specified by:
getNotIn
in interfaceValidate.StringRulesOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The notIn at the given index.
-
getNotInBytes
public com.google.protobuf.ByteString getNotInBytes(int index) NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Specified by:
getNotInBytes
in interfaceValidate.StringRulesOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the notIn at the given index.
-
setNotIn
NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Parameters:
index
- The index to set the value at.value
- The notIn to set.- Returns:
- This builder for chaining.
-
addNotIn
NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Parameters:
value
- The notIn to add.- Returns:
- This builder for chaining.
-
addAllNotIn
NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Parameters:
values
- The notIn to add.- Returns:
- This builder for chaining.
-
clearNotIn
NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Returns:
- This builder for chaining.
-
addNotInBytes
NotIn specifies that this field cannot be equal to one of the specified values
repeated string not_in = 11;
- Parameters:
value
- The bytes of the notIn to add.- Returns:
- This builder for chaining.
-
hasEmail
public boolean hasEmail()Email specifies that the field must be a valid email address as defined by RFC 5322
bool email = 12;
- Specified by:
hasEmail
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the email field is set.
-
getEmail
public boolean getEmail()Email specifies that the field must be a valid email address as defined by RFC 5322
bool email = 12;
- Specified by:
getEmail
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The email.
-
setEmail
Email specifies that the field must be a valid email address as defined by RFC 5322
bool email = 12;
- Parameters:
value
- The email to set.- Returns:
- This builder for chaining.
-
clearEmail
Email specifies that the field must be a valid email address as defined by RFC 5322
bool email = 12;
- Returns:
- This builder for chaining.
-
hasHostname
public boolean hasHostname()Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
bool hostname = 13;
- Specified by:
hasHostname
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the hostname field is set.
-
getHostname
public boolean getHostname()Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
bool hostname = 13;
- Specified by:
getHostname
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The hostname.
-
setHostname
Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
bool hostname = 13;
- Parameters:
value
- The hostname to set.- Returns:
- This builder for chaining.
-
clearHostname
Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
bool hostname = 13;
- Returns:
- This builder for chaining.
-
hasIp
public boolean hasIp()Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
bool ip = 14;
- Specified by:
hasIp
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the ip field is set.
-
getIp
public boolean getIp()Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
bool ip = 14;
- Specified by:
getIp
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The ip.
-
setIp
Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
bool ip = 14;
- Parameters:
value
- The ip to set.- Returns:
- This builder for chaining.
-
clearIp
Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
bool ip = 14;
- Returns:
- This builder for chaining.
-
hasIpv4
public boolean hasIpv4()Ipv4 specifies that the field must be a valid IPv4 address.
bool ipv4 = 15;
- Specified by:
hasIpv4
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the ipv4 field is set.
-
getIpv4
public boolean getIpv4()Ipv4 specifies that the field must be a valid IPv4 address.
bool ipv4 = 15;
- Specified by:
getIpv4
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The ipv4.
-
setIpv4
Ipv4 specifies that the field must be a valid IPv4 address.
bool ipv4 = 15;
- Parameters:
value
- The ipv4 to set.- Returns:
- This builder for chaining.
-
clearIpv4
Ipv4 specifies that the field must be a valid IPv4 address.
bool ipv4 = 15;
- Returns:
- This builder for chaining.
-
hasIpv6
public boolean hasIpv6()Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
bool ipv6 = 16;
- Specified by:
hasIpv6
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the ipv6 field is set.
-
getIpv6
public boolean getIpv6()Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
bool ipv6 = 16;
- Specified by:
getIpv6
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The ipv6.
-
setIpv6
Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
bool ipv6 = 16;
- Parameters:
value
- The ipv6 to set.- Returns:
- This builder for chaining.
-
clearIpv6
Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
bool ipv6 = 16;
- Returns:
- This builder for chaining.
-
hasUri
public boolean hasUri()Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
bool uri = 17;
- Specified by:
hasUri
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the uri field is set.
-
getUri
public boolean getUri()Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
bool uri = 17;
- Specified by:
getUri
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The uri.
-
setUri
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
bool uri = 17;
- Parameters:
value
- The uri to set.- Returns:
- This builder for chaining.
-
clearUri
Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
bool uri = 17;
- Returns:
- This builder for chaining.
-
hasUriRef
public boolean hasUriRef()UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.
bool uri_ref = 18;
- Specified by:
hasUriRef
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the uriRef field is set.
-
getUriRef
public boolean getUriRef()UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.
bool uri_ref = 18;
- Specified by:
getUriRef
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The uriRef.
-
setUriRef
UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.
bool uri_ref = 18;
- Parameters:
value
- The uriRef to set.- Returns:
- This builder for chaining.
-
clearUriRef
UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.
bool uri_ref = 18;
- Returns:
- This builder for chaining.
-
hasAddress
public boolean hasAddress()Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).
bool address = 21;
- Specified by:
hasAddress
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the address field is set.
-
getAddress
public boolean getAddress()Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).
bool address = 21;
- Specified by:
getAddress
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The address.
-
setAddress
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).
bool address = 21;
- Parameters:
value
- The address to set.- Returns:
- This builder for chaining.
-
clearAddress
Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6).
bool address = 21;
- Returns:
- This builder for chaining.
-
hasUuid
public boolean hasUuid()Uuid specifies that the field must be a valid UUID as defined by RFC 4122
bool uuid = 22;
- Specified by:
hasUuid
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the uuid field is set.
-
getUuid
public boolean getUuid()Uuid specifies that the field must be a valid UUID as defined by RFC 4122
bool uuid = 22;
- Specified by:
getUuid
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The uuid.
-
setUuid
Uuid specifies that the field must be a valid UUID as defined by RFC 4122
bool uuid = 22;
- Parameters:
value
- The uuid to set.- Returns:
- This builder for chaining.
-
clearUuid
Uuid specifies that the field must be a valid UUID as defined by RFC 4122
bool uuid = 22;
- Returns:
- This builder for chaining.
-
hasWellKnownRegex
public boolean hasWellKnownRegex()WellKnownRegex specifies a common well known pattern defined as a regex.
.validate.KnownRegex well_known_regex = 24;
- Specified by:
hasWellKnownRegex
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the wellKnownRegex field is set.
-
getWellKnownRegex
WellKnownRegex specifies a common well known pattern defined as a regex.
.validate.KnownRegex well_known_regex = 24;
- Specified by:
getWellKnownRegex
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The wellKnownRegex.
-
setWellKnownRegex
WellKnownRegex specifies a common well known pattern defined as a regex.
.validate.KnownRegex well_known_regex = 24;
- Parameters:
value
- The wellKnownRegex to set.- Returns:
- This builder for chaining.
-
clearWellKnownRegex
WellKnownRegex specifies a common well known pattern defined as a regex.
.validate.KnownRegex well_known_regex = 24;
- Returns:
- This builder for chaining.
-
hasStrict
public boolean hasStrict()This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules.
optional bool strict = 25 [default = true];
- Specified by:
hasStrict
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the strict field is set.
-
getStrict
public boolean getStrict()This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules.
optional bool strict = 25 [default = true];
- Specified by:
getStrict
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The strict.
-
setStrict
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. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules.
optional bool strict = 25 [default = true];
- Parameters:
value
- The strict to set.- Returns:
- This builder for chaining.
-
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. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules.
optional bool strict = 25 [default = true];
- Returns:
- This builder for chaining.
-
hasIgnoreEmpty
public boolean hasIgnoreEmpty()IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
optional bool ignore_empty = 26;
- Specified by:
hasIgnoreEmpty
in interfaceValidate.StringRulesOrBuilder
- Returns:
- Whether the ignoreEmpty field is set.
-
getIgnoreEmpty
public boolean getIgnoreEmpty()IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
optional bool ignore_empty = 26;
- Specified by:
getIgnoreEmpty
in interfaceValidate.StringRulesOrBuilder
- Returns:
- The ignoreEmpty.
-
setIgnoreEmpty
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
optional bool ignore_empty = 26;
- Parameters:
value
- The ignoreEmpty to set.- Returns:
- This builder for chaining.
-
clearIgnoreEmpty
IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty
optional bool ignore_empty = 26;
- Returns:
- This builder for chaining.
-