Package io.envoyproxy.envoy.type.matcher
Class StringMatcher.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
io.envoyproxy.envoy.type.matcher.StringMatcher.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,StringMatcherOrBuilder,Cloneable
- Enclosing class:
- StringMatcher
public static final class StringMatcher.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
implements StringMatcherOrBuilder
Specifies the way to match a string. [#next-free-field: 7]Protobuf type
envoy.type.matcher.StringMatcher-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()The input string must match exactly the string specified here.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) If true, indicates the exact/prefix/suffix matching should be case insensitive.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The input string must have the prefix specified here.Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated.The input string must match the regular expression specified here.The input string must have the suffix specified here.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetExact()The input string must match exactly the string specified here.com.google.protobuf.ByteStringThe input string must match exactly the string specified here.booleanIf true, indicates the exact/prefix/suffix matching should be case insensitive.The input string must have the prefix specified here.com.google.protobuf.ByteStringThe input string must have the prefix specified here.getRegex()Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated.com.google.protobuf.ByteStringDeprecated.envoy.type.matcher.StringMatcher.regex is deprecated.The input string must match the regular expression specified here.The input string must match the regular expression specified here.The input string must match the regular expression specified here.The input string must have the suffix specified here.com.google.protobuf.ByteStringThe input string must have the suffix specified here.booleanhasExact()The input string must match exactly the string specified here.booleanThe input string must have the prefix specified here.booleanhasRegex()Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated.booleanThe input string must match the regular expression specified here.booleanThe input string must have the suffix specified here.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(StringMatcher other) mergeSafeRegex(RegexMatcher value) The input string must match the regular expression specified here.final StringMatcher.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) The input string must match exactly the string specified here.setExactBytes(com.google.protobuf.ByteString value) The input string must match exactly the string specified here.setIgnoreCase(boolean value) If true, indicates the exact/prefix/suffix matching should be case insensitive.The input string must have the prefix specified here.setPrefixBytes(com.google.protobuf.ByteString value) The input string must have the prefix specified here.Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated.setRegexBytes(com.google.protobuf.ByteString value) Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSafeRegex(RegexMatcher value) The input string must match the regular expression specified here.setSafeRegex(RegexMatcher.Builder builderForValue) The input string must match the regular expression specified here.The input string must have the suffix specified here.setSuffixBytes(com.google.protobuf.ByteString value) The input string must have the suffix specified here.final StringMatcher.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
setField
public StringMatcher.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
setRepeatedField
public StringMatcher.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
addRepeatedField
public StringMatcher.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StringMatcher.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
mergeFrom
public StringMatcher.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<StringMatcher.Builder>- Throws:
IOException
-
getMatchPatternCase
- Specified by:
getMatchPatternCasein interfaceStringMatcherOrBuilder
-
clearMatchPattern
-
hasExact
public boolean hasExact()The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.
string exact = 1;- Specified by:
hasExactin interfaceStringMatcherOrBuilder- Returns:
- Whether the exact field is set.
-
getExact
The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.
string exact = 1;- Specified by:
getExactin interfaceStringMatcherOrBuilder- Returns:
- The exact.
-
getExactBytes
public com.google.protobuf.ByteString getExactBytes()The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.
string exact = 1;- Specified by:
getExactBytesin interfaceStringMatcherOrBuilder- Returns:
- The bytes for exact.
-
setExact
The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.
string exact = 1;- Parameters:
value- The exact to set.- Returns:
- This builder for chaining.
-
clearExact
The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.
string exact = 1;- Returns:
- This builder for chaining.
-
setExactBytes
The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.
string exact = 1;- Parameters:
value- The bytes for exact to set.- Returns:
- This builder for chaining.
-
hasPrefix
public boolean hasPrefix()The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*
string prefix = 2 [(.validate.rules) = { ... }- Specified by:
hasPrefixin interfaceStringMatcherOrBuilder- Returns:
- Whether the prefix field is set.
-
getPrefix
The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*
string prefix = 2 [(.validate.rules) = { ... }- Specified by:
getPrefixin interfaceStringMatcherOrBuilder- Returns:
- The prefix.
-
getPrefixBytes
public com.google.protobuf.ByteString getPrefixBytes()The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*
string prefix = 2 [(.validate.rules) = { ... }- Specified by:
getPrefixBytesin interfaceStringMatcherOrBuilder- Returns:
- The bytes for prefix.
-
setPrefix
The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*
string prefix = 2 [(.validate.rules) = { ... }- Parameters:
value- The prefix to set.- Returns:
- This builder for chaining.
-
clearPrefix
The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*
string prefix = 2 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setPrefixBytes
The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*
string prefix = 2 [(.validate.rules) = { ... }- Parameters:
value- The bytes for prefix to set.- Returns:
- This builder for chaining.
-
hasSuffix
public boolean hasSuffix()The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*
string suffix = 3 [(.validate.rules) = { ... }- Specified by:
hasSuffixin interfaceStringMatcherOrBuilder- Returns:
- Whether the suffix field is set.
-
getSuffix
The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*
string suffix = 3 [(.validate.rules) = { ... }- Specified by:
getSuffixin interfaceStringMatcherOrBuilder- Returns:
- The suffix.
-
getSuffixBytes
public com.google.protobuf.ByteString getSuffixBytes()The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*
string suffix = 3 [(.validate.rules) = { ... }- Specified by:
getSuffixBytesin interfaceStringMatcherOrBuilder- Returns:
- The bytes for suffix.
-
setSuffix
The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*
string suffix = 3 [(.validate.rules) = { ... }- Parameters:
value- The suffix to set.- Returns:
- This builder for chaining.
-
clearSuffix
The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*
string suffix = 3 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setSuffixBytes
The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*
string suffix = 3 [(.validate.rules) = { ... }- Parameters:
value- The bytes for suffix to set.- Returns:
- This builder for chaining.
-
hasRegex
Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60The input string must match the regular expression specified here. The regex grammar is defined `here <https://en.cppreference.com/w/cpp/regex/ecmascript>`_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.string regex = 4 [deprecated = true, (.validate.rules) = { ... }- Specified by:
hasRegexin interfaceStringMatcherOrBuilder- Returns:
- Whether the regex field is set.
-
getRegex
Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60The input string must match the regular expression specified here. The regex grammar is defined `here <https://en.cppreference.com/w/cpp/regex/ecmascript>`_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.string regex = 4 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getRegexin interfaceStringMatcherOrBuilder- Returns:
- The regex.
-
getRegexBytes
Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60The input string must match the regular expression specified here. The regex grammar is defined `here <https://en.cppreference.com/w/cpp/regex/ecmascript>`_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.string regex = 4 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getRegexBytesin interfaceStringMatcherOrBuilder- Returns:
- The bytes for regex.
-
setRegex
Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60The input string must match the regular expression specified here. The regex grammar is defined `here <https://en.cppreference.com/w/cpp/regex/ecmascript>`_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.string regex = 4 [deprecated = true, (.validate.rules) = { ... }- Parameters:
value- The regex to set.- Returns:
- This builder for chaining.
-
clearRegex
Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60The input string must match the regular expression specified here. The regex grammar is defined `here <https://en.cppreference.com/w/cpp/regex/ecmascript>`_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.string regex = 4 [deprecated = true, (.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setRegexBytes
Deprecated.envoy.type.matcher.StringMatcher.regex is deprecated. See envoy/type/matcher/string.proto;l=60The input string must match the regular expression specified here. The regex grammar is defined `here <https://en.cppreference.com/w/cpp/regex/ecmascript>`_. Examples: * The regex ``\d{3}`` matches the value *123* * The regex ``\d{3}`` does not match the value *1234* * The regex ``\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.string regex = 4 [deprecated = true, (.validate.rules) = { ... }- Parameters:
value- The bytes for regex to set.- Returns:
- This builder for chaining.
-
hasSafeRegex
public boolean hasSafeRegex()The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }- Specified by:
hasSafeRegexin interfaceStringMatcherOrBuilder- Returns:
- Whether the safeRegex field is set.
-
getSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }- Specified by:
getSafeRegexin interfaceStringMatcherOrBuilder- Returns:
- The safeRegex.
-
setSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... } -
setSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... } -
mergeSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... } -
clearSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... } -
getSafeRegexBuilder
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... } -
getSafeRegexOrBuilder
The input string must match the regular expression specified here.
.envoy.type.matcher.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }- Specified by:
getSafeRegexOrBuilderin interfaceStringMatcherOrBuilder
-
getIgnoreCase
public boolean getIgnoreCase()If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher *data* will match both input string *Data* and *data* if set to true.
bool ignore_case = 6;- Specified by:
getIgnoreCasein interfaceStringMatcherOrBuilder- Returns:
- The ignoreCase.
-
setIgnoreCase
If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher *data* will match both input string *Data* and *data* if set to true.
bool ignore_case = 6;- Parameters:
value- The ignoreCase to set.- Returns:
- This builder for chaining.
-
clearIgnoreCase
If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher *data* will match both input string *Data* and *data* if set to true.
bool ignore_case = 6;- Returns:
- This builder for chaining.
-
setUnknownFields
public final StringMatcher.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-
mergeUnknownFields
public final StringMatcher.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<StringMatcher.Builder>
-