public static final class RouteOuterClass.HeaderMatcher extends com.google.protobuf.GeneratedMessageV3 implements RouteOuterClass.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",
"exact_match": "POST"
}
.. attention::
In the absence of any header match specifier, match will default to :ref:`present_match
<envoy_api_field_route.HeaderMatcher.present_match>`. i.e, a request that has the :ref:`name
<envoy_api_field_route.HeaderMatcher.name>` header will match, regardless of the header's
value.
Protobuf type envoy.api.v2.route.HeaderMatcher| Modifier and Type | Class and Description |
|---|---|
static class |
RouteOuterClass.HeaderMatcher.Builder
.. attention::
Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host*
header.
|
static class |
RouteOuterClass.HeaderMatcher.HeaderMatchSpecifierCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
EXACT_MATCH_FIELD_NUMBER |
static int |
INVERT_MATCH_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PREFIX_MATCH_FIELD_NUMBER |
static int |
PRESENT_MATCH_FIELD_NUMBER |
static int |
RANGE_MATCH_FIELD_NUMBER |
static int |
REGEX_MATCH_FIELD_NUMBER |
static int |
SUFFIX_MATCH_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RouteOuterClass.HeaderMatcher |
getDefaultInstance() |
RouteOuterClass.HeaderMatcher |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getExactMatch()
If specified, header match will be performed based on the value of the header.
|
com.google.protobuf.ByteString |
getExactMatchBytes()
If specified, header match will be performed based on the value of the header.
|
RouteOuterClass.HeaderMatcher.HeaderMatchSpecifierCase |
getHeaderMatchSpecifierCase() |
boolean |
getInvertMatch()
If specified, the match result will be inverted before checking.
|
String |
getName()
Specifies the name of the header in the request.
|
com.google.protobuf.ByteString |
getNameBytes()
Specifies the name of the header in the request.
|
com.google.protobuf.Parser<RouteOuterClass.HeaderMatcher> |
getParserForType() |
String |
getPrefixMatch()
If specified, header match will be performed based on the prefix of the header value.
|
com.google.protobuf.ByteString |
getPrefixMatchBytes()
If specified, header match will be performed based on the prefix of the header value.
|
boolean |
getPresentMatch()
If specified, header match will be be performed based on whether the header is in the
request.
|
Range.Int64Range |
getRangeMatch()
If specified, header match will be performed based on range.
|
Range.Int64RangeOrBuilder |
getRangeMatchOrBuilder()
If specified, header match will be performed based on range.
|
String |
getRegexMatch()
If specified, this regex string is a regular expression rule which implies the entire request
header value must match the regex.
|
com.google.protobuf.ByteString |
getRegexMatchBytes()
If specified, this regex string is a regular expression rule which implies the entire request
header value must match the regex.
|
int |
getSerializedSize() |
String |
getSuffixMatch()
If specified, header match will be performed based on the suffix of the header value.
|
com.google.protobuf.ByteString |
getSuffixMatchBytes()
If specified, header match will be performed based on the suffix of the header value.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasRangeMatch()
If specified, header match will be performed based on range.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RouteOuterClass.HeaderMatcher.Builder |
newBuilder() |
static RouteOuterClass.HeaderMatcher.Builder |
newBuilder(RouteOuterClass.HeaderMatcher prototype) |
RouteOuterClass.HeaderMatcher.Builder |
newBuilderForType() |
protected RouteOuterClass.HeaderMatcher.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static RouteOuterClass.HeaderMatcher |
parseDelimitedFrom(InputStream input) |
static RouteOuterClass.HeaderMatcher |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteOuterClass.HeaderMatcher |
parseFrom(byte[] data) |
static RouteOuterClass.HeaderMatcher |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteOuterClass.HeaderMatcher |
parseFrom(ByteBuffer data) |
static RouteOuterClass.HeaderMatcher |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteOuterClass.HeaderMatcher |
parseFrom(com.google.protobuf.ByteString data) |
static RouteOuterClass.HeaderMatcher |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteOuterClass.HeaderMatcher |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RouteOuterClass.HeaderMatcher |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteOuterClass.HeaderMatcher |
parseFrom(InputStream input) |
static RouteOuterClass.HeaderMatcher |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RouteOuterClass.HeaderMatcher> |
parser() |
RouteOuterClass.HeaderMatcher.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int EXACT_MATCH_FIELD_NUMBER
public static final int REGEX_MATCH_FIELD_NUMBER
public static final int RANGE_MATCH_FIELD_NUMBER
public static final int PRESENT_MATCH_FIELD_NUMBER
public static final int PREFIX_MATCH_FIELD_NUMBER
public static final int SUFFIX_MATCH_FIELD_NUMBER
public static final int INVERT_MATCH_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public RouteOuterClass.HeaderMatcher.HeaderMatchSpecifierCase getHeaderMatchSpecifierCase()
getHeaderMatchSpecifierCase in interface RouteOuterClass.HeaderMatcherOrBuilderpublic String getName()
Specifies the name of the header in the request.
string name = 1 [(.validate.rules) = { ... }getName in interface RouteOuterClass.HeaderMatcherOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Specifies the name of the header in the request.
string name = 1 [(.validate.rules) = { ... }getNameBytes in interface RouteOuterClass.HeaderMatcherOrBuilderpublic String getExactMatch()
If specified, header match will be performed based on the value of the header.
string exact_match = 4;getExactMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic com.google.protobuf.ByteString getExactMatchBytes()
If specified, header match will be performed based on the value of the header.
string exact_match = 4;getExactMatchBytes in interface RouteOuterClass.HeaderMatcherOrBuilderpublic String getRegexMatch()
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. The regex grammar used in the value field is defined
`here <http://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*
string regex_match = 5 [(.validate.rules) = { ... }getRegexMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic com.google.protobuf.ByteString getRegexMatchBytes()
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. The regex grammar used in the value field is defined
`here <http://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*
string regex_match = 5 [(.validate.rules) = { ... }getRegexMatchBytes in interface RouteOuterClass.HeaderMatcherOrBuilderpublic 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.Int64Range range_match = 6;hasRangeMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic Range.Int64Range 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.Int64Range range_match = 6;getRangeMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic Range.Int64RangeOrBuilder 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.Int64Range range_match = 6;getRangeMatchOrBuilder in interface RouteOuterClass.HeaderMatcherOrBuilderpublic boolean getPresentMatch()
If specified, header match will be be performed based on whether the header is in the request.
bool present_match = 7;getPresentMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic String getPrefixMatch()
If 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. Examples: * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*.
string prefix_match = 9 [(.validate.rules) = { ... }getPrefixMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic com.google.protobuf.ByteString getPrefixMatchBytes()
If 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. Examples: * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*.
string prefix_match = 9 [(.validate.rules) = { ... }getPrefixMatchBytes in interface RouteOuterClass.HeaderMatcherOrBuilderpublic String getSuffixMatch()
If 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. Examples: * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*.
string suffix_match = 10 [(.validate.rules) = { ... }getSuffixMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic com.google.protobuf.ByteString getSuffixMatchBytes()
If 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. Examples: * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*.
string suffix_match = 10 [(.validate.rules) = { ... }getSuffixMatchBytes in interface RouteOuterClass.HeaderMatcherOrBuilderpublic 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;getInvertMatch in interface RouteOuterClass.HeaderMatcherOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RouteOuterClass.HeaderMatcher parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(InputStream input) throws IOException
IOExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RouteOuterClass.HeaderMatcher parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RouteOuterClass.HeaderMatcher parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RouteOuterClass.HeaderMatcher parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RouteOuterClass.HeaderMatcher.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RouteOuterClass.HeaderMatcher.Builder newBuilder()
public static RouteOuterClass.HeaderMatcher.Builder newBuilder(RouteOuterClass.HeaderMatcher prototype)
public RouteOuterClass.HeaderMatcher.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RouteOuterClass.HeaderMatcher.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RouteOuterClass.HeaderMatcher getDefaultInstance()
public static com.google.protobuf.Parser<RouteOuterClass.HeaderMatcher> parser()
public com.google.protobuf.Parser<RouteOuterClass.HeaderMatcher> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RouteOuterClass.HeaderMatcher getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018 The Envoy Project. All rights reserved.