Class HttpRoute.HeaderMatch.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
com.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.Builder
- All Implemented Interfaces:
HttpRoute.HeaderMatchOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- HttpRoute.HeaderMatch
public static final class HttpRoute.HeaderMatch.Builder
extends com.google.protobuf.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The value of the header should match exactly the content of exact_match.The name of the HTTP header to match against.If specified, the match result will be inverted before checking.The value of the header must start with the contents of prefix_match.A header with header_name must exist.If specified, the rule will match if the request header value is within the range.The value of the header must match the regular expression specified in regex_match.The value of the header must end with the contents of suffix_match.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe value of the header should match exactly the content of exact_match.com.google.protobuf.ByteStringThe value of the header should match exactly the content of exact_match.The name of the HTTP header to match against.com.google.protobuf.ByteStringThe name of the HTTP header to match against.booleanIf specified, the match result will be inverted before checking.The value of the header must start with the contents of prefix_match.com.google.protobuf.ByteStringThe value of the header must start with the contents of prefix_match.booleanA header with header_name must exist.If specified, the rule will match if the request header value is within the range.If specified, the rule will match if the request header value is within the range.If specified, the rule will match if the request header value is within the range.The value of the header must match the regular expression specified in regex_match.com.google.protobuf.ByteStringThe value of the header must match the regular expression specified in regex_match.The value of the header must end with the contents of suffix_match.com.google.protobuf.ByteStringThe value of the header must end with the contents of suffix_match.booleanThe value of the header should match exactly the content of exact_match.booleanThe value of the header must start with the contents of prefix_match.booleanA header with header_name must exist.booleanIf specified, the rule will match if the request header value is within the range.booleanThe value of the header must match the regular expression specified in regex_match.booleanThe value of the header must end with the contents of suffix_match.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(HttpRoute.HeaderMatch other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) If specified, the rule will match if the request header value is within the range.setExactMatch(String value) The value of the header should match exactly the content of exact_match.setExactMatchBytes(com.google.protobuf.ByteString value) The value of the header should match exactly the content of exact_match.The name of the HTTP header to match against.setHeaderBytes(com.google.protobuf.ByteString value) The name of the HTTP header to match against.setInvertMatch(boolean value) If specified, the match result will be inverted before checking.setPrefixMatch(String value) The value of the header must start with the contents of prefix_match.setPrefixMatchBytes(com.google.protobuf.ByteString value) The value of the header must start with the contents of prefix_match.setPresentMatch(boolean value) A header with header_name must exist.If specified, the rule will match if the request header value is within the range.setRangeMatch(HttpRoute.HeaderMatch.IntegerRange.Builder builderForValue) If specified, the rule will match if the request header value is within the range.setRegexMatch(String value) The value of the header must match the regular expression specified in regex_match.setRegexMatchBytes(com.google.protobuf.ByteString value) The value of the header must match the regular expression specified in regex_match.setSuffixMatch(String value) The value of the header must end with the contents of suffix_match.setSuffixMatchBytes(com.google.protobuf.ByteString value) The value of the header must end with the contents of suffix_match.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpRoute.HeaderMatch.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
-
mergeFrom
public HttpRoute.HeaderMatch.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<HttpRoute.HeaderMatch.Builder>- Throws:
IOException
-
getMatchTypeCase
- Specified by:
getMatchTypeCasein interfaceHttpRoute.HeaderMatchOrBuilder
-
clearMatchType
-
hasExactMatch
public boolean hasExactMatch()The value of the header should match exactly the content of exact_match.
string exact_match = 2;- Specified by:
hasExactMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- Whether the exactMatch field is set.
-
getExactMatch
The value of the header should match exactly the content of exact_match.
string exact_match = 2;- Specified by:
getExactMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The exactMatch.
-
getExactMatchBytes
public com.google.protobuf.ByteString getExactMatchBytes()The value of the header should match exactly the content of exact_match.
string exact_match = 2;- Specified by:
getExactMatchBytesin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The bytes for exactMatch.
-
setExactMatch
The value of the header should match exactly the content of exact_match.
string exact_match = 2;- Parameters:
value- The exactMatch to set.- Returns:
- This builder for chaining.
-
clearExactMatch
The value of the header should match exactly the content of exact_match.
string exact_match = 2;- Returns:
- This builder for chaining.
-
setExactMatchBytes
The value of the header should match exactly the content of exact_match.
string exact_match = 2;- Parameters:
value- The bytes for exactMatch to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
hasRegexMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- Whether the regexMatch field is set.
-
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;- Specified by:
getRegexMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The regexMatch.
-
getRegexMatchBytes
public com.google.protobuf.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;- Specified by:
getRegexMatchBytesin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The bytes for regexMatch.
-
setRegexMatch
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;- Parameters:
value- The regexMatch to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setRegexMatchBytes
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;- Parameters:
value- The bytes for regexMatch to set.- Returns:
- This builder for chaining.
-
hasPrefixMatch
public boolean hasPrefixMatch()The value of the header must start with the contents of prefix_match.
string prefix_match = 4;- Specified by:
hasPrefixMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- Whether the prefixMatch field is set.
-
getPrefixMatch
The value of the header must start with the contents of prefix_match.
string prefix_match = 4;- Specified by:
getPrefixMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The prefixMatch.
-
getPrefixMatchBytes
public com.google.protobuf.ByteString getPrefixMatchBytes()The value of the header must start with the contents of prefix_match.
string prefix_match = 4;- Specified by:
getPrefixMatchBytesin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The bytes for prefixMatch.
-
setPrefixMatch
The value of the header must start with the contents of prefix_match.
string prefix_match = 4;- Parameters:
value- The prefixMatch to set.- Returns:
- This builder for chaining.
-
clearPrefixMatch
The value of the header must start with the contents of prefix_match.
string prefix_match = 4;- Returns:
- This builder for chaining.
-
setPrefixMatchBytes
The value of the header must start with the contents of prefix_match.
string prefix_match = 4;- Parameters:
value- The bytes for prefixMatch to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
hasPresentMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- Whether the presentMatch field is set.
-
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;- Specified by:
getPresentMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The presentMatch.
-
setPresentMatch
A header with header_name must exist. The match takes place whether or not the header has a value.
bool present_match = 5;- Parameters:
value- The presentMatch to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
hasSuffixMatch
public boolean hasSuffixMatch()The value of the header must end with the contents of suffix_match.
string suffix_match = 6;- Specified by:
hasSuffixMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- Whether the suffixMatch field is set.
-
getSuffixMatch
The value of the header must end with the contents of suffix_match.
string suffix_match = 6;- Specified by:
getSuffixMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The suffixMatch.
-
getSuffixMatchBytes
public com.google.protobuf.ByteString getSuffixMatchBytes()The value of the header must end with the contents of suffix_match.
string suffix_match = 6;- Specified by:
getSuffixMatchBytesin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The bytes for suffixMatch.
-
setSuffixMatch
The value of the header must end with the contents of suffix_match.
string suffix_match = 6;- Parameters:
value- The suffixMatch to set.- Returns:
- This builder for chaining.
-
clearSuffixMatch
The value of the header must end with the contents of suffix_match.
string suffix_match = 6;- Returns:
- This builder for chaining.
-
setSuffixMatchBytes
The value of the header must end with the contents of suffix_match.
string suffix_match = 6;- Parameters:
value- The bytes for suffixMatch to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
hasRangeMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- Whether the rangeMatch field is set.
-
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;- Specified by:
getRangeMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The rangeMatch.
-
setRangeMatch
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; -
setRangeMatch
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; -
mergeRangeMatch
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; -
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; -
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; -
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;- Specified by:
getRangeMatchOrBuilderin interfaceHttpRoute.HeaderMatchOrBuilder
-
getHeader
The name of the HTTP header to match against.
string header = 1;- Specified by:
getHeaderin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The header.
-
getHeaderBytes
public com.google.protobuf.ByteString getHeaderBytes()The name of the HTTP header to match against.
string header = 1;- Specified by:
getHeaderBytesin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The bytes for header.
-
setHeader
The name of the HTTP header to match against.
string header = 1;- Parameters:
value- The header to set.- Returns:
- This builder for chaining.
-
clearHeader
The name of the HTTP header to match against.
string header = 1;- Returns:
- This builder for chaining.
-
setHeaderBytes
The name of the HTTP header to match against.
string header = 1;- Parameters:
value- The bytes for header to set.- Returns:
- This builder for chaining.
-
getInvertMatch
public boolean getInvertMatch()If specified, the match result will be inverted before checking. Default value is set to false.
bool invert_match = 8;- Specified by:
getInvertMatchin interfaceHttpRoute.HeaderMatchOrBuilder- Returns:
- The invertMatch.
-
setInvertMatch
If specified, the match result will be inverted before checking. Default value is set to false.
bool invert_match = 8;- Parameters:
value- The invertMatch to set.- Returns:
- This builder for chaining.
-
clearInvertMatch
If specified, the match result will be inverted before checking. Default value is set to false.
bool invert_match = 8;- Returns:
- This builder for chaining.
-