Class HeaderMatcher
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
io.envoyproxy.envoy.config.route.v3.HeaderMatcher
- All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, HeaderMatcherOrBuilder, Serializable
@Generated
public final class HeaderMatcher
extends com.google.protobuf.GeneratedMessage
implements HeaderMatcherOrBuilder
.. attention::
Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host``
header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
.. attention::
To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both
HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g.,
.. code-block:: json
{
"name": ":method",
"string_match": {
"exact": "POST"
}
}
.. attention::
In the absence of any header match specifier, match will default to :ref:`present_match
<envoy_v3_api_field_config.route.v3.HeaderMatcher.present_match>`. i.e, a request that has the :ref:`name
<envoy_v3_api_field_config.route.v3.HeaderMatcher.name>` header will match, regardless of the header's
value.
[#next-major-version: HeaderMatcher should be refactored to use StringMatcher.]
[#next-free-field: 15]
Protobuf type envoy.config.route.v3.HeaderMatcher- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class..static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate static final HeaderMatcherstatic final intprivate Objectprivate intstatic final intprivate booleanprivate byteprivate Objectstatic final intprivate static final com.google.protobuf.Parser<HeaderMatcher> static final intstatic final intstatic final intstatic final intprivate static final longstatic final intstatic final intstatic final intprivate booleanFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprivateHeaderMatcher(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.envoy.config.route.v3.HeaderMatcher.contains_match is deprecated.com.google.protobuf.ByteStringDeprecated.envoy.config.route.v3.HeaderMatcher.contains_match is deprecated.static HeaderMatcherstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.envoy.config.route.v3.HeaderMatcher.exact_match is deprecated.com.google.protobuf.ByteStringDeprecated.envoy.config.route.v3.HeaderMatcher.exact_match is deprecated.booleanIf specified, the match result will be inverted before checking.getName()Specifies the name of the header in the request.com.google.protobuf.ByteStringSpecifies the name of the header in the request.com.google.protobuf.Parser<HeaderMatcher> Deprecated.envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated.com.google.protobuf.ByteStringDeprecated.envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated.booleanIf specified as true, header match will be performed based on whether the header is in the request.If specified, header match will be performed based on range.If specified, header match will be performed based on range.Deprecated.envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated.Deprecated.intIf specified, header match will be performed based on the string match of the header value.If specified, header match will be performed based on the string match of the header value.Deprecated.envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated.com.google.protobuf.ByteStringDeprecated.envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated.booleanIf specified, for any header match rule, if the header match rule specified header does not exist, this header value will be treated as empty.booleanDeprecated.envoy.config.route.v3.HeaderMatcher.contains_match is deprecated.booleanDeprecated.envoy.config.route.v3.HeaderMatcher.exact_match is deprecated.inthashCode()booleanDeprecated.envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated.booleanIf specified as true, header match will be performed based on whether the header is in the request.booleanIf specified, header match will be performed based on range.booleanDeprecated.envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated.booleanIf specified, header match will be performed based on the string match of the header value.booleanDeprecated.envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic HeaderMatcher.Builderstatic HeaderMatcher.BuildernewBuilder(HeaderMatcher prototype) protected HeaderMatcher.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static HeaderMatcherparseDelimitedFrom(InputStream input) static HeaderMatcherparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMatcherparseFrom(byte[] data) static HeaderMatcherparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMatcherparseFrom(com.google.protobuf.ByteString data) static HeaderMatcherparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMatcherparseFrom(com.google.protobuf.CodedInputStream input) static HeaderMatcherparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMatcherparseFrom(InputStream input) static HeaderMatcherparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static HeaderMatcherparseFrom(ByteBuffer data) static HeaderMatcherparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<HeaderMatcher> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
headerMatchSpecifierCase_
private int headerMatchSpecifierCase_ -
headerMatchSpecifier_
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
name_
-
EXACT_MATCH_FIELD_NUMBER
public static final int EXACT_MATCH_FIELD_NUMBER- See Also:
-
SAFE_REGEX_MATCH_FIELD_NUMBER
public static final int SAFE_REGEX_MATCH_FIELD_NUMBER- See Also:
-
RANGE_MATCH_FIELD_NUMBER
public static final int RANGE_MATCH_FIELD_NUMBER- See Also:
-
PRESENT_MATCH_FIELD_NUMBER
public static final int PRESENT_MATCH_FIELD_NUMBER- See Also:
-
PREFIX_MATCH_FIELD_NUMBER
public static final int PREFIX_MATCH_FIELD_NUMBER- See Also:
-
SUFFIX_MATCH_FIELD_NUMBER
public static final int SUFFIX_MATCH_FIELD_NUMBER- See Also:
-
CONTAINS_MATCH_FIELD_NUMBER
public static final int CONTAINS_MATCH_FIELD_NUMBER- See Also:
-
STRING_MATCH_FIELD_NUMBER
public static final int STRING_MATCH_FIELD_NUMBER- See Also:
-
INVERT_MATCH_FIELD_NUMBER
public static final int INVERT_MATCH_FIELD_NUMBER- See Also:
-
invertMatch_
private boolean invertMatch_ -
TREAT_MISSING_HEADER_AS_EMPTY_FIELD_NUMBER
public static final int TREAT_MISSING_HEADER_AS_EMPTY_FIELD_NUMBER- See Also:
-
treatMissingHeaderAsEmpty_
private boolean treatMissingHeaderAsEmpty_ -
memoizedIsInitialized
private byte memoizedIsInitialized -
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
HeaderMatcher
private HeaderMatcher(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
HeaderMatcher
private HeaderMatcher()
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getHeaderMatchSpecifierCase
- Specified by:
getHeaderMatchSpecifierCasein interfaceHeaderMatcherOrBuilder
-
getName
Specifies the name of the header in the request.
string name = 1 [(.validate.rules) = { ... }- Specified by:
getNamein interfaceHeaderMatcherOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Specifies the name of the header in the request.
string name = 1 [(.validate.rules) = { ... }- Specified by:
getNameBytesin interfaceHeaderMatcherOrBuilder- Returns:
- The bytes for name.
-
hasExactMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2241If specified, header match will be performed based on the value of the header. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Specified by:
hasExactMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the exactMatch field is set.
-
getExactMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2241If specified, header match will be performed based on the value of the header. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Specified by:
getExactMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The exactMatch.
-
getExactMatchBytes
Deprecated.envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2241If specified, header match will be performed based on the value of the header. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Specified by:
getExactMatchBytesin interfaceHeaderMatcherOrBuilder- Returns:
- The bytes for exactMatch.
-
hasSafeRegexMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2248If specified, this regex string is a regular expression rule which implies the entire request header value must match the regex. The rule will not match if only a subsequence of the request header value matches the regex. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
.envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Specified by:
hasSafeRegexMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the safeRegexMatch field is set.
-
getSafeRegexMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2248If specified, this regex string is a regular expression rule which implies the entire request header value must match the regex. The rule will not match if only a subsequence of the request header value matches the regex. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
.envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Specified by:
getSafeRegexMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The safeRegexMatch.
-
getSafeRegexMatchOrBuilder
Deprecated.If specified, this regex string is a regular expression rule which implies the entire request header value must match the regex. The rule will not match if only a subsequence of the request header value matches the regex. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
.envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Specified by:
getSafeRegexMatchOrBuilderin interfaceHeaderMatcherOrBuilder
-
hasRangeMatch
public boolean hasRangeMatch()If specified, header match will be performed based on range. The rule will match if the request header value is within this range. The entire request header value must represent an integer in base 10 notation: consisting of an optional plus or minus sign followed by a sequence of digits. The rule will not match if the header value does not represent an integer. Match will fail for empty values, floating point numbers or if only a subsequence of the header value is an integer. Examples: * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9, ``-1somestring``
.envoy.type.v3.Int64Range range_match = 6;- Specified by:
hasRangeMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the rangeMatch field is set.
-
getRangeMatch
If specified, header match will be performed based on range. The rule will match if the request header value is within this range. The entire request header value must represent an integer in base 10 notation: consisting of an optional plus or minus sign followed by a sequence of digits. The rule will not match if the header value does not represent an integer. Match will fail for empty values, floating point numbers or if only a subsequence of the header value is an integer. Examples: * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9, ``-1somestring``
.envoy.type.v3.Int64Range range_match = 6;- Specified by:
getRangeMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The rangeMatch.
-
getRangeMatchOrBuilder
If specified, header match will be performed based on range. The rule will match if the request header value is within this range. The entire request header value must represent an integer in base 10 notation: consisting of an optional plus or minus sign followed by a sequence of digits. The rule will not match if the header value does not represent an integer. Match will fail for empty values, floating point numbers or if only a subsequence of the header value is an integer. Examples: * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9, ``-1somestring``
.envoy.type.v3.Int64Range range_match = 6;- Specified by:
getRangeMatchOrBuilderin interfaceHeaderMatcherOrBuilder
-
hasPresentMatch
public boolean hasPresentMatch()If specified as true, header match will be performed based on whether the header is in the request. If specified as false, header match will be performed based on whether the header is absent.
bool present_match = 7;- Specified by:
hasPresentMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the presentMatch field is set.
-
getPresentMatch
public boolean getPresentMatch()If specified as true, header match will be performed based on whether the header is in the request. If specified as false, header match will be performed based on whether the header is absent.
bool present_match = 7;- Specified by:
getPresentMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The presentMatch.
-
hasPrefixMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2275If specified, header match will be performed based on the prefix of the header value. Note: empty prefix is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... }- Specified by:
hasPrefixMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the prefixMatch field is set.
-
getPrefixMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2275If specified, header match will be performed based on the prefix of the header value. Note: empty prefix is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getPrefixMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The prefixMatch.
-
getPrefixMatchBytes
Deprecated.envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2275If specified, header match will be performed based on the prefix of the header value. Note: empty prefix is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getPrefixMatchBytesin interfaceHeaderMatcherOrBuilder- Returns:
- The bytes for prefixMatch.
-
hasSuffixMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2288If specified, header match will be performed based on the suffix of the header value. Note: empty suffix is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... }- Specified by:
hasSuffixMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the suffixMatch field is set.
-
getSuffixMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2288If specified, header match will be performed based on the suffix of the header value. Note: empty suffix is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getSuffixMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The suffixMatch.
-
getSuffixMatchBytes
Deprecated.envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2288If specified, header match will be performed based on the suffix of the header value. Note: empty suffix is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getSuffixMatchBytesin interfaceHeaderMatcherOrBuilder- Returns:
- The bytes for suffixMatch.
-
hasContainsMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2302If specified, header match will be performed based on whether the header value contains the given value or not. Note: empty contains match is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
string contains_match = 12 [deprecated = true, (.validate.rules) = { ... }- Specified by:
hasContainsMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the containsMatch field is set.
-
getContainsMatch
Deprecated.envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2302If specified, header match will be performed based on whether the header value contains the given value or not. Note: empty contains match is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
string contains_match = 12 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getContainsMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The containsMatch.
-
getContainsMatchBytes
Deprecated.envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. See envoy/config/route/v3/route_components.proto;l=2302If specified, header match will be performed based on whether the header value contains the given value or not. Note: empty contains match is not allowed, please use present_match instead. This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`. Examples: * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
string contains_match = 12 [deprecated = true, (.validate.rules) = { ... }- Specified by:
getContainsMatchBytesin interfaceHeaderMatcherOrBuilder- Returns:
- The bytes for containsMatch.
-
hasStringMatch
public boolean hasStringMatch()If specified, header match will be performed based on the string match of the header value.
.envoy.type.matcher.v3.StringMatcher string_match = 13;- Specified by:
hasStringMatchin interfaceHeaderMatcherOrBuilder- Returns:
- Whether the stringMatch field is set.
-
getStringMatch
If specified, header match will be performed based on the string match of the header value.
.envoy.type.matcher.v3.StringMatcher string_match = 13;- Specified by:
getStringMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The stringMatch.
-
getStringMatchOrBuilder
If specified, header match will be performed based on the string match of the header value.
.envoy.type.matcher.v3.StringMatcher string_match = 13;- Specified by:
getStringMatchOrBuilderin interfaceHeaderMatcherOrBuilder
-
getInvertMatch
public boolean getInvertMatch()If specified, the match result will be inverted before checking. Defaults to false. Examples: * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted. * The range [-10,0) will match the value -1, so it will not match when inverted.bool invert_match = 8;- Specified by:
getInvertMatchin interfaceHeaderMatcherOrBuilder- Returns:
- The invertMatch.
-
getTreatMissingHeaderAsEmpty
public boolean getTreatMissingHeaderAsEmpty()If specified, for any header match rule, if the header match rule specified header does not exist, this header value will be treated as empty. Defaults to false. Examples: * The header match rule specified header "header1" to range match of [0, 10], :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>` is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>` is set to true; The "header1" header is not present. The match rule will treat the "header1" as an empty header. The empty header does not match the range, so it will match when inverted. * The header match rule specified header "header2" to range match of [0, 10], :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>` is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>` is set to false; The "header2" header is not present and the header matcher rule for "header2" will be ignored so it will not match. * The header match rule specified header "header3" to a string regex match ``^$`` which means an empty string, and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>` is set to true; The "header3" header is not present. The match rule will treat the "header3" header as an empty header so it will match. * The header match rule specified header "header4" to a string regex match ``^$`` which means an empty string, and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>` is set to false; The "header4" header is not present. The match rule for "header4" will be ignored so it will not match.
bool treat_missing_header_as_empty = 14;- Specified by:
getTreatMissingHeaderAsEmptyin interfaceHeaderMatcherOrBuilder- Returns:
- The treatMissingHeaderAsEmpty.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static HeaderMatcher parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMatcher parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMatcher parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMatcher parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMatcher parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static HeaderMatcher parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static HeaderMatcher parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static HeaderMatcher parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static HeaderMatcher parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static HeaderMatcher parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected HeaderMatcher.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-