public final class HttpHeaderMatch extends GeneratedMessageV3 implements HttpHeaderMatchOrBuilder
matchRule criteria for request header matches.
Protobuf type google.cloud.compute.v1.HttpHeaderMatch
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
public static final int EXACT_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int HEADER_NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int INVERT_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int PREFIX_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int PRESENT_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int RANGE_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int REGEX_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
public static final int SUFFIX_MATCH_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
public static HttpHeaderMatch getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static HttpHeaderMatch.Builder newBuilder()
public static HttpHeaderMatch.Builder newBuilder(HttpHeaderMatch prototype)
public static HttpHeaderMatch parseDelimitedFrom(InputStream input)
public static HttpHeaderMatch parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static HttpHeaderMatch parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
public static HttpHeaderMatch parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static HttpHeaderMatch parseFrom(ByteString data)
public static HttpHeaderMatch parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static HttpHeaderMatch parseFrom(CodedInputStream input)
public static HttpHeaderMatch parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static HttpHeaderMatch parseFrom(InputStream input)
public static HttpHeaderMatch parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static HttpHeaderMatch parseFrom(ByteBuffer data)
public static HttpHeaderMatch parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<HttpHeaderMatch> parser()
Methods
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
public HttpHeaderMatch getDefaultInstanceForType()
public String getExactMatch()
The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string exact_match = 457641093;
Returns |
---|
Type | Description |
String | The exactMatch.
|
public ByteString getExactMatchBytes()
The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string exact_match = 457641093;
Returns |
---|
Type | Description |
ByteString | The bytes for exactMatch.
|
public String getHeaderName()
The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the content-type
header are supported. The following transport-level headers cannot be used in header matching rules: :authority
, :method
, :path
, :scheme
, user-agent
, accept-encoding
, content-encoding
, grpc-accept-encoding
, grpc-encoding
, grpc-previous-rpc-attempts
, grpc-tags-bin
, grpc-timeout
and grpc-trace-bin
.
optional string header_name = 110223613;
Returns |
---|
Type | Description |
String | The headerName.
|
public ByteString getHeaderNameBytes()
The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the content-type
header are supported. The following transport-level headers cannot be used in header matching rules: :authority
, :method
, :path
, :scheme
, user-agent
, accept-encoding
, content-encoding
, grpc-accept-encoding
, grpc-encoding
, grpc-previous-rpc-attempts
, grpc-tags-bin
, grpc-timeout
and grpc-trace-bin
.
optional string header_name = 110223613;
Returns |
---|
Type | Description |
ByteString | The bytes for headerName.
|
public boolean getInvertMatch()
If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false.
optional bool invert_match = 501130268;
Returns |
---|
Type | Description |
boolean | The invertMatch.
|
public Parser<HttpHeaderMatch> getParserForType()
Overrides
public String getPrefixMatch()
The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string prefix_match = 257898968;
Returns |
---|
Type | Description |
String | The prefixMatch.
|
public ByteString getPrefixMatchBytes()
The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string prefix_match = 257898968;
Returns |
---|
Type | Description |
ByteString | The bytes for prefixMatch.
|
public boolean getPresentMatch()
A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional bool present_match = 67435841;
Returns |
---|
Type | Description |
boolean | The presentMatch.
|
public Int64RangeMatch getRangeMatch()
The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL.
optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;
public Int64RangeMatchOrBuilder getRangeMatchOrBuilder()
The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL.
optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;
public String getRegexMatch()
The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
optional string regex_match = 107387853;
Returns |
---|
Type | Description |
String | The regexMatch.
|
public ByteString getRegexMatchBytes()
The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
optional string regex_match = 107387853;
Returns |
---|
Type | Description |
ByteString | The bytes for regexMatch.
|
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
public String getSuffixMatch()
The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string suffix_match = 426488663;
Returns |
---|
Type | Description |
String | The suffixMatch.
|
public ByteString getSuffixMatchBytes()
The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string suffix_match = 426488663;
Returns |
---|
Type | Description |
ByteString | The bytes for suffixMatch.
|
public boolean hasExactMatch()
The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string exact_match = 457641093;
Returns |
---|
Type | Description |
boolean | Whether the exactMatch field is set.
|
public boolean hasHeaderName()
The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". When the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true, only non-binary user-specified custom metadata and the content-type
header are supported. The following transport-level headers cannot be used in header matching rules: :authority
, :method
, :path
, :scheme
, user-agent
, accept-encoding
, content-encoding
, grpc-accept-encoding
, grpc-encoding
, grpc-previous-rpc-attempts
, grpc-tags-bin
, grpc-timeout
and grpc-trace-bin
.
optional string header_name = 110223613;
Returns |
---|
Type | Description |
boolean | Whether the headerName field is set.
|
public boolean hasInvertMatch()
If set to false, the headerMatch is considered a match if the preceding match criteria are met. If set to true, the headerMatch is considered a match if the preceding match criteria are NOT met. The default setting is false.
optional bool invert_match = 501130268;
Returns |
---|
Type | Description |
boolean | Whether the invertMatch field is set.
|
public boolean hasPrefixMatch()
The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string prefix_match = 257898968;
Returns |
---|
Type | Description |
boolean | Whether the prefixMatch field is set.
|
public boolean hasPresentMatch()
A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional bool present_match = 67435841;
Returns |
---|
Type | Description |
boolean | Whether the presentMatch field is set.
|
public boolean hasRangeMatch()
The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. rangeMatch is not supported for load balancers that have loadBalancingScheme set to EXTERNAL.
optional .google.cloud.compute.v1.Int64RangeMatch range_match = 97244227;
Returns |
---|
Type | Description |
boolean | Whether the rangeMatch field is set.
|
public boolean hasRegexMatch()
The value of the header must match the regular expression specified in regexMatch. For more information about regular expression syntax, see Syntax. For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.
optional string regex_match = 107387853;
Returns |
---|
Type | Description |
boolean | Whether the regexMatch field is set.
|
public boolean hasSuffixMatch()
The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set.
optional string suffix_match = 426488663;
Returns |
---|
Type | Description |
boolean | Whether the suffixMatch field is set.
|
Returns |
---|
Type | Description |
int | |
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public HttpHeaderMatch.Builder newBuilderForType()
protected HttpHeaderMatch.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
public HttpHeaderMatch.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides