Class HttpRoute.HeaderMatch.Builder (0.8.0)

public static final class HttpRoute.HeaderMatch.Builder extends GeneratedMessageV3.Builder<HttpRoute.HeaderMatch.Builder> implements HttpRoute.HeaderMatchOrBuilder

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

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.HeaderMatch.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

build()

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

buildPartial()

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

clear()

public HttpRoute.HeaderMatch.Builder clear()
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

clearExactMatch()

public HttpRoute.HeaderMatch.Builder clearExactMatch()

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

string exact_match = 2;

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public HttpRoute.HeaderMatch.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

clearHeader()

public HttpRoute.HeaderMatch.Builder clearHeader()

The name of the HTTP header to match against.

string header = 1;

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearInvertMatch()

public HttpRoute.HeaderMatch.Builder clearInvertMatch()

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

bool invert_match = 8;

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearMatchType()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public HttpRoute.HeaderMatch.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

clearPrefixMatch()

public HttpRoute.HeaderMatch.Builder clearPrefixMatch()

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

string prefix_match = 4;

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearPresentMatch()

public HttpRoute.HeaderMatch.Builder clearPresentMatch()

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
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearRangeMatch()

public HttpRoute.HeaderMatch.Builder clearRangeMatch()

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.Builder

clearRegexMatch()

public HttpRoute.HeaderMatch.Builder clearRegexMatch()

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
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearSuffixMatch()

public HttpRoute.HeaderMatch.Builder clearSuffixMatch()

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

string suffix_match = 6;

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clone()

public HttpRoute.HeaderMatch.Builder clone()
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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

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.

getRangeMatchBuilder()

public HttpRoute.HeaderMatch.IntegerRange.Builder getRangeMatchBuilder()

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.Builder

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HttpRoute.HeaderMatch other)

public HttpRoute.HeaderMatch.Builder mergeFrom(HttpRoute.HeaderMatch other)
Parameter
Name Description
other HttpRoute.HeaderMatch
Returns
Type Description
HttpRoute.HeaderMatch.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HttpRoute.HeaderMatch.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public HttpRoute.HeaderMatch.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

mergeRangeMatch(HttpRoute.HeaderMatch.IntegerRange value)

public HttpRoute.HeaderMatch.Builder mergeRangeMatch(HttpRoute.HeaderMatch.IntegerRange value)

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;

Parameter
Name Description
value HttpRoute.HeaderMatch.IntegerRange
Returns
Type Description
HttpRoute.HeaderMatch.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.HeaderMatch.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

setExactMatch(String value)

public HttpRoute.HeaderMatch.Builder setExactMatch(String value)

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

string exact_match = 2;

Parameter
Name Description
value String

The exactMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setExactMatchBytes(ByteString value)

public HttpRoute.HeaderMatch.Builder setExactMatchBytes(ByteString value)

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

string exact_match = 2;

Parameter
Name Description
value ByteString

The bytes for exactMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.HeaderMatch.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

setHeader(String value)

public HttpRoute.HeaderMatch.Builder setHeader(String value)

The name of the HTTP header to match against.

string header = 1;

Parameter
Name Description
value String

The header to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setHeaderBytes(ByteString value)

public HttpRoute.HeaderMatch.Builder setHeaderBytes(ByteString value)

The name of the HTTP header to match against.

string header = 1;

Parameter
Name Description
value ByteString

The bytes for header to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setInvertMatch(boolean value)

public HttpRoute.HeaderMatch.Builder setInvertMatch(boolean value)

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

bool invert_match = 8;

Parameter
Name Description
value boolean

The invertMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setPrefixMatch(String value)

public HttpRoute.HeaderMatch.Builder setPrefixMatch(String value)

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

string prefix_match = 4;

Parameter
Name Description
value String

The prefixMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setPrefixMatchBytes(ByteString value)

public HttpRoute.HeaderMatch.Builder setPrefixMatchBytes(ByteString value)

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

string prefix_match = 4;

Parameter
Name Description
value ByteString

The bytes for prefixMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setPresentMatch(boolean value)

public HttpRoute.HeaderMatch.Builder setPresentMatch(boolean value)

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

bool present_match = 5;

Parameter
Name Description
value boolean

The presentMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setRangeMatch(HttpRoute.HeaderMatch.IntegerRange value)

public HttpRoute.HeaderMatch.Builder setRangeMatch(HttpRoute.HeaderMatch.IntegerRange value)

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;

Parameter
Name Description
value HttpRoute.HeaderMatch.IntegerRange
Returns
Type Description
HttpRoute.HeaderMatch.Builder

setRangeMatch(HttpRoute.HeaderMatch.IntegerRange.Builder builderForValue)

public HttpRoute.HeaderMatch.Builder setRangeMatch(HttpRoute.HeaderMatch.IntegerRange.Builder builderForValue)

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;

Parameter
Name Description
builderForValue HttpRoute.HeaderMatch.IntegerRange.Builder
Returns
Type Description
HttpRoute.HeaderMatch.Builder

setRegexMatch(String value)

public HttpRoute.HeaderMatch.Builder setRegexMatch(String value)

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;

Parameter
Name Description
value String

The regexMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setRegexMatchBytes(ByteString value)

public HttpRoute.HeaderMatch.Builder setRegexMatchBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for regexMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public HttpRoute.HeaderMatch.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides

setSuffixMatch(String value)

public HttpRoute.HeaderMatch.Builder setSuffixMatch(String value)

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

string suffix_match = 6;

Parameter
Name Description
value String

The suffixMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setSuffixMatchBytes(ByteString value)

public HttpRoute.HeaderMatch.Builder setSuffixMatchBytes(ByteString value)

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

string suffix_match = 6;

Parameter
Name Description
value ByteString

The bytes for suffixMatch to set.

Returns
Type Description
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.HeaderMatch.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpRoute.HeaderMatch.Builder
Overrides