Class StringMatcher.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<StringMatcher.Builder>
com.google.protobuf.GeneratedMessage.Builder<StringMatcher.Builder>
io.envoyproxy.envoy.type.matcher.v3.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.GeneratedMessage.Builder<StringMatcher.Builder>
implements StringMatcherOrBuilder
Specifies the way to match a string. [#next-free-field: 9]Protobuf type
envoy.type.matcher.v3.StringMatcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private com.google.protobuf.SingleFieldBuilder
<TypedExtensionConfig, TypedExtensionConfig.Builder, TypedExtensionConfigOrBuilder> private boolean
private Object
private int
private com.google.protobuf.SingleFieldBuilder
<RegexMatcher, RegexMatcher.Builder, RegexMatcherOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
private void
buildPartial0
(StringMatcher result) private void
buildPartialOneofs
(StringMatcher result) clear()
The input string must have the substring specified here.Use an extension as the matcher type.The input string must match exactly the string specified here.If true, indicates the exact/prefix/suffix/contains matching should be case insensitive.The input string must have the prefix specified here.The input string must match the regular expression specified here.The input string must have the suffix specified here.The input string must have the substring specified here.com.google.protobuf.ByteString
The input string must have the substring specified here.Use an extension as the matcher type.Use an extension as the matcher type.private com.google.protobuf.SingleFieldBuilder
<TypedExtensionConfig, TypedExtensionConfig.Builder, TypedExtensionConfigOrBuilder> Use an extension as the matcher type.Use an extension as the matcher type.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getExact()
The input string must match exactly the string specified here.com.google.protobuf.ByteString
The input string must match exactly the string specified here.boolean
If true, indicates the exact/prefix/suffix/contains matching should be case insensitive.The input string must have the prefix specified here.com.google.protobuf.ByteString
The input string must have the prefix specified here.The input string must match the regular expression specified here.The input string must match the regular expression specified here.private com.google.protobuf.SingleFieldBuilder
<RegexMatcher, RegexMatcher.Builder, RegexMatcherOrBuilder> 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.ByteString
The input string must have the suffix specified here.boolean
The input string must have the substring specified here.boolean
Use an extension as the matcher type.boolean
hasExact()
The input string must match exactly the string specified here.boolean
The input string must have the prefix specified here.boolean
The input string must match the regular expression specified here.boolean
The input string must have the suffix specified here.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
mergeCustom
(TypedExtensionConfig value) Use an extension as the matcher type.mergeFrom
(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.setContains
(String value) The input string must have the substring specified here.setContainsBytes
(com.google.protobuf.ByteString value) The input string must have the substring specified here.setCustom
(TypedExtensionConfig value) Use an extension as the matcher type.setCustom
(TypedExtensionConfig.Builder builderForValue) Use an extension as the matcher type.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/contains 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.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.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
-
Field Details
-
matchPatternCase_
private int matchPatternCase_ -
matchPattern_
-
bitField0_
private int bitField0_ -
safeRegexBuilder_
private com.google.protobuf.SingleFieldBuilder<RegexMatcher,RegexMatcher.Builder, safeRegexBuilder_RegexMatcherOrBuilder> -
customBuilder_
private com.google.protobuf.SingleFieldBuilder<TypedExtensionConfig,TypedExtensionConfig.Builder, customBuilder_TypedExtensionConfigOrBuilder> -
ignoreCase_
private boolean ignoreCase_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
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<StringMatcher.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<StringMatcher.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<StringMatcher.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
-
buildPartial0
-
buildPartialOneofs
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<StringMatcher.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<StringMatcher.Builder>
-
mergeFrom
public StringMatcher.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<StringMatcher.Builder>
- Throws:
IOException
-
getMatchPatternCase
- Specified by:
getMatchPatternCase
in 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:
hasExact
in 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:
getExact
in 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:
getExactBytes
in 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:
hasPrefix
in 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:
getPrefix
in 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:
getPrefixBytes
in 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:
hasSuffix
in 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:
getSuffix
in 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:
getSuffixBytes
in 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.
-
hasSafeRegex
public boolean hasSafeRegex()The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
- Specified by:
hasSafeRegex
in interfaceStringMatcherOrBuilder
- Returns:
- Whether the safeRegex field is set.
-
getSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
- Specified by:
getSafeRegex
in interfaceStringMatcherOrBuilder
- Returns:
- The safeRegex.
-
setSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
-
setSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
-
mergeSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
-
clearSafeRegex
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
-
getSafeRegexBuilder
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
-
getSafeRegexOrBuilder
The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
- Specified by:
getSafeRegexOrBuilder
in interfaceStringMatcherOrBuilder
-
getSafeRegexFieldBuilder
private com.google.protobuf.SingleFieldBuilder<RegexMatcher,RegexMatcher.Builder, getSafeRegexFieldBuilder()RegexMatcherOrBuilder> The input string must match the regular expression specified here.
.envoy.type.matcher.v3.RegexMatcher safe_regex = 5 [(.validate.rules) = { ... }
-
hasContains
public boolean hasContains()The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
string contains = 7 [(.validate.rules) = { ... }
- Specified by:
hasContains
in interfaceStringMatcherOrBuilder
- Returns:
- Whether the contains field is set.
-
getContains
The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
string contains = 7 [(.validate.rules) = { ... }
- Specified by:
getContains
in interfaceStringMatcherOrBuilder
- Returns:
- The contains.
-
getContainsBytes
public com.google.protobuf.ByteString getContainsBytes()The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
string contains = 7 [(.validate.rules) = { ... }
- Specified by:
getContainsBytes
in interfaceStringMatcherOrBuilder
- Returns:
- The bytes for contains.
-
setContains
The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
string contains = 7 [(.validate.rules) = { ... }
- Parameters:
value
- The contains to set.- Returns:
- This builder for chaining.
-
clearContains
The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
string contains = 7 [(.validate.rules) = { ... }
- Returns:
- This builder for chaining.
-
setContainsBytes
The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``
string contains = 7 [(.validate.rules) = { ... }
- Parameters:
value
- The bytes for contains to set.- Returns:
- This builder for chaining.
-
hasCustom
public boolean hasCustom()Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
- Specified by:
hasCustom
in interfaceStringMatcherOrBuilder
- Returns:
- Whether the custom field is set.
-
getCustom
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
- Specified by:
getCustom
in interfaceStringMatcherOrBuilder
- Returns:
- The custom.
-
setCustom
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
-
setCustom
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
-
mergeCustom
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
-
clearCustom
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
-
getCustomBuilder
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
-
getCustomOrBuilder
Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
- Specified by:
getCustomOrBuilder
in interfaceStringMatcherOrBuilder
-
getCustomFieldBuilder
private com.google.protobuf.SingleFieldBuilder<TypedExtensionConfig,TypedExtensionConfig.Builder, getCustomFieldBuilder()TypedExtensionConfigOrBuilder> Use an extension as the matcher type. [#extension-category: envoy.string_matcher]
.xds.core.v3.TypedExtensionConfig custom = 8;
-
getIgnoreCase
public boolean getIgnoreCase()If true, indicates the exact/prefix/suffix/contains 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:
getIgnoreCase
in interfaceStringMatcherOrBuilder
- Returns:
- The ignoreCase.
-
setIgnoreCase
If true, indicates the exact/prefix/suffix/contains 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/contains 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.
-