Class HttpRoute.HeaderMatch.Builder (0.15.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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.HeaderMatch.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder
Overrides

build()

public HttpRoute.HeaderMatch build()
Returns
TypeDescription
HttpRoute.HeaderMatch

buildPartial()

public HttpRoute.HeaderMatch buildPartial()
Returns
TypeDescription
HttpRoute.HeaderMatch

clear()

public HttpRoute.HeaderMatch.Builder clear()
Returns
TypeDescription
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
TypeDescription
HttpRoute.HeaderMatch.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public HttpRoute.HeaderMatch.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder
Overrides

clearHeader()

public HttpRoute.HeaderMatch.Builder clearHeader()

The name of the HTTP header to match against.

string header = 1;

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

This builder for chaining.

clearMatchType()

public HttpRoute.HeaderMatch.Builder clearMatchType()
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public HttpRoute.HeaderMatch.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

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

This builder for chaining.

clone()

public HttpRoute.HeaderMatch.Builder clone()
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder
Overrides

getDefaultInstanceForType()

public HttpRoute.HeaderMatch getDefaultInstanceForType()
Returns
TypeDescription
HttpRoute.HeaderMatch

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExactMatch()

public String getExactMatch()

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

string exact_match = 2;

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for exactMatch.

getHeader()

public String getHeader()

The name of the HTTP header to match against.

string header = 1;

Returns
TypeDescription
String

The header.

getHeaderBytes()

public ByteString getHeaderBytes()

The name of the HTTP header to match against.

string header = 1;

Returns
TypeDescription
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
TypeDescription
boolean

The invertMatch.

getMatchTypeCase()

public HttpRoute.HeaderMatch.MatchTypeCase getMatchTypeCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the suffixMatch field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(HttpRoute.HeaderMatch other)

public HttpRoute.HeaderMatch.Builder mergeFrom(HttpRoute.HeaderMatch other)
Parameter
NameDescription
otherHttpRoute.HeaderMatch
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HttpRoute.HeaderMatch.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public HttpRoute.HeaderMatch.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Parameter
NameDescription
valueHttpRoute.HeaderMatch.IntegerRange
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.HeaderMatch.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The exactMatch to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for exactMatch to set.

Returns
TypeDescription
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public HttpRoute.HeaderMatch.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The header to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for header to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The invertMatch to set.

Returns
TypeDescription
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
NameDescription
valueString

The prefixMatch to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for prefixMatch to set.

Returns
TypeDescription
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
NameDescription
valueboolean

The presentMatch to set.

Returns
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Parameter
NameDescription
valueHttpRoute.HeaderMatch.IntegerRange
Returns
TypeDescription
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.events.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7;

Parameter
NameDescription
builderForValueHttpRoute.HeaderMatch.IntegerRange.Builder
Returns
TypeDescription
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
NameDescription
valueString

The regexMatch to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for regexMatch to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The suffixMatch to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for suffixMatch to set.

Returns
TypeDescription
HttpRoute.HeaderMatch.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final HttpRoute.HeaderMatch.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
HttpRoute.HeaderMatch.Builder
Overrides