Class HttpRoute.HeaderMatch (0.1.0)

public static final class HttpRoute.HeaderMatch extends GeneratedMessageV3 implements HttpRoute.HeaderMatchOrBuilder

Specifies how to select a route rule based on HTTP request headers.

Protobuf type google.cloud.networkservices.v1.HttpRoute.HeaderMatch

Static Fields

EXACT_MATCH_FIELD_NUMBER

public static final int EXACT_MATCH_FIELD_NUMBER
Field Value
Type Description
int

HEADER_FIELD_NUMBER

public static final int HEADER_FIELD_NUMBER
Field Value
Type Description
int

INVERT_MATCH_FIELD_NUMBER

public static final int INVERT_MATCH_FIELD_NUMBER
Field Value
Type Description
int

PREFIX_MATCH_FIELD_NUMBER

public static final int PREFIX_MATCH_FIELD_NUMBER
Field Value
Type Description
int

PRESENT_MATCH_FIELD_NUMBER

public static final int PRESENT_MATCH_FIELD_NUMBER
Field Value
Type Description
int

RANGE_MATCH_FIELD_NUMBER

public static final int RANGE_MATCH_FIELD_NUMBER
Field Value
Type Description
int

REGEX_MATCH_FIELD_NUMBER

public static final int REGEX_MATCH_FIELD_NUMBER
Field Value
Type Description
int

SUFFIX_MATCH_FIELD_NUMBER

public static final int SUFFIX_MATCH_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static HttpRoute.HeaderMatch getDefaultInstance()
Returns
Type Description
HttpRoute.HeaderMatch

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static HttpRoute.HeaderMatch.Builder newBuilder()
Returns
Type Description
HttpRoute.HeaderMatch.Builder

newBuilder(HttpRoute.HeaderMatch prototype)

public static HttpRoute.HeaderMatch.Builder newBuilder(HttpRoute.HeaderMatch prototype)
Parameter
Name Description
prototype HttpRoute.HeaderMatch
Returns
Type Description
HttpRoute.HeaderMatch.Builder

parseDelimitedFrom(InputStream input)

public static HttpRoute.HeaderMatch parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.HeaderMatch parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static HttpRoute.HeaderMatch parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.HeaderMatch parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HttpRoute.HeaderMatch parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.HeaderMatch parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HttpRoute.HeaderMatch parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.HeaderMatch parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static HttpRoute.HeaderMatch parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.HeaderMatch parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static HttpRoute.HeaderMatch parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HttpRoute.HeaderMatch parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<HttpRoute.HeaderMatch> parser()
Returns
Type Description
Parser<HeaderMatch>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public HttpRoute.HeaderMatch getDefaultInstanceForType()
Returns
Type Description
HttpRoute.HeaderMatch

getExactMatch()

public String getExactMatch()

The value of the header should match exactly the content of exact_match.

string exact_match = 2;

Returns
Type Description
String

The exactMatch.

getExactMatchBytes()

public ByteString getExactMatchBytes()

The value of the header should match exactly the content of exact_match.

string exact_match = 2;

Returns
Type Description
ByteString

The bytes for exactMatch.

getHeader()

public String getHeader()

The name of the HTTP header to match against.

string header = 1;

Returns
Type Description
String

The header.

getHeaderBytes()

public ByteString getHeaderBytes()

The name of the HTTP header to match against.

string header = 1;

Returns
Type Description
ByteString

The bytes for header.

getInvertMatch()

public boolean getInvertMatch()

If specified, the match result will be inverted before checking. Default value is set to false.

bool invert_match = 8;

Returns
Type Description
boolean

The invertMatch.

getMatchTypeCase()

public HttpRoute.HeaderMatch.MatchTypeCase getMatchTypeCase()
Returns
Type Description
HttpRoute.HeaderMatch.MatchTypeCase

getParserForType()

public Parser<HttpRoute.HeaderMatch> getParserForType()
Returns
Type Description
Parser<HeaderMatch>
Overrides

getPrefixMatch()

public String getPrefixMatch()

The value of the header must start with the contents of prefix_match.

string prefix_match = 4;

Returns
Type Description
String

The prefixMatch.

getPrefixMatchBytes()

public ByteString getPrefixMatchBytes()

The value of the header must start with the contents of prefix_match.

string prefix_match = 4;

Returns
Type Description
ByteString

The bytes for prefixMatch.

getPresentMatch()

public boolean getPresentMatch()

A header with header_name must exist. The match takes place whether or not the header has a value.

bool present_match = 5;

Returns
Type Description
boolean

The presentMatch.

getRangeMatch()

public HttpRoute.HeaderMatch.IntegerRange getRangeMatch()

If specified, the rule will match if the request header value is within the range.

.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
Type Description
HttpRoute.HeaderMatch.IntegerRange

The rangeMatch.

getRangeMatchOrBuilder()

public HttpRoute.HeaderMatch.IntegerRangeOrBuilder getRangeMatchOrBuilder()

If specified, the rule will match if the request header value is within the range.

.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
Type Description
HttpRoute.HeaderMatch.IntegerRangeOrBuilder

getRegexMatch()

public String getRegexMatch()

The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax

string regex_match = 3;

Returns
Type Description
String

The regexMatch.

getRegexMatchBytes()

public ByteString getRegexMatchBytes()

The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax

string regex_match = 3;

Returns
Type Description
ByteString

The bytes for regexMatch.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSuffixMatch()

public String getSuffixMatch()

The value of the header must end with the contents of suffix_match.

string suffix_match = 6;

Returns
Type Description
String

The suffixMatch.

getSuffixMatchBytes()

public ByteString getSuffixMatchBytes()

The value of the header must end with the contents of suffix_match.

string suffix_match = 6;

Returns
Type Description
ByteString

The bytes for suffixMatch.

hasExactMatch()

public boolean hasExactMatch()

The value of the header should match exactly the content of exact_match.

string exact_match = 2;

Returns
Type Description
boolean

Whether the exactMatch field is set.

hasPrefixMatch()

public boolean hasPrefixMatch()

The value of the header must start with the contents of prefix_match.

string prefix_match = 4;

Returns
Type Description
boolean

Whether the prefixMatch field is set.

hasPresentMatch()

public boolean hasPresentMatch()

A header with header_name must exist. The match takes place whether or not the header has a value.

bool present_match = 5;

Returns
Type Description
boolean

Whether the presentMatch field is set.

hasRangeMatch()

public boolean hasRangeMatch()

If specified, the rule will match if the request header value is within the range.

.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
Type Description
boolean

Whether the rangeMatch field is set.

hasRegexMatch()

public boolean hasRegexMatch()

The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax

string regex_match = 3;

Returns
Type Description
boolean

Whether the regexMatch field is set.

hasSuffixMatch()

public boolean hasSuffixMatch()

The value of the header must end with the contents of suffix_match.

string suffix_match = 6;

Returns
Type Description
boolean

Whether the suffixMatch field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public HttpRoute.HeaderMatch.Builder newBuilderForType()
Returns
Type Description
HttpRoute.HeaderMatch.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HttpRoute.HeaderMatch.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public HttpRoute.HeaderMatch.Builder toBuilder()
Returns
Type Description
HttpRoute.HeaderMatch.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException