Class HttpHeaderMatch

  • All Implemented Interfaces:
    HttpHeaderMatchOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class HttpHeaderMatch
    extends com.google.protobuf.GeneratedMessageV3
    implements HttpHeaderMatchOrBuilder
     matchRule criteria for request header matches.
     
    Protobuf type google.cloud.compute.v1.HttpHeaderMatch
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HttpHeaderMatch.Builder
      matchRule criteria for request header matches.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasExactMatch

        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;
        Specified by:
        hasExactMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the exactMatch field is set.
      • getExactMatch

        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;
        Specified by:
        getExactMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The exactMatch.
      • getExactMatchBytes

        public com.google.protobuf.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;
        Specified by:
        getExactMatchBytes in interface HttpHeaderMatchOrBuilder
        Returns:
        The bytes for exactMatch.
      • hasHeaderName

        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;
        Specified by:
        hasHeaderName in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the headerName field is set.
      • getHeaderName

        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;
        Specified by:
        getHeaderName in interface HttpHeaderMatchOrBuilder
        Returns:
        The headerName.
      • getHeaderNameBytes

        public com.google.protobuf.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;
        Specified by:
        getHeaderNameBytes in interface HttpHeaderMatchOrBuilder
        Returns:
        The bytes for headerName.
      • hasInvertMatch

        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;
        Specified by:
        hasInvertMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the invertMatch field is set.
      • getInvertMatch

        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;
        Specified by:
        getInvertMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The invertMatch.
      • hasPrefixMatch

        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;
        Specified by:
        hasPrefixMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the prefixMatch field is set.
      • getPrefixMatch

        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;
        Specified by:
        getPrefixMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The prefixMatch.
      • getPrefixMatchBytes

        public com.google.protobuf.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;
        Specified by:
        getPrefixMatchBytes in interface HttpHeaderMatchOrBuilder
        Returns:
        The bytes for prefixMatch.
      • hasPresentMatch

        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;
        Specified by:
        hasPresentMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the presentMatch field is set.
      • getPresentMatch

        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;
        Specified by:
        getPresentMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The presentMatch.
      • hasRangeMatch

        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;
        Specified by:
        hasRangeMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the rangeMatch field is set.
      • getRangeMatch

        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;
        Specified by:
        getRangeMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The rangeMatch.
      • getRangeMatchOrBuilder

        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;
        Specified by:
        getRangeMatchOrBuilder in interface HttpHeaderMatchOrBuilder
      • hasRegexMatch

        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;
        Specified by:
        hasRegexMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the regexMatch field is set.
      • getRegexMatch

        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;
        Specified by:
        getRegexMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The regexMatch.
      • getRegexMatchBytes

        public com.google.protobuf.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;
        Specified by:
        getRegexMatchBytes in interface HttpHeaderMatchOrBuilder
        Returns:
        The bytes for regexMatch.
      • hasSuffixMatch

        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;
        Specified by:
        hasSuffixMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        Whether the suffixMatch field is set.
      • getSuffixMatch

        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;
        Specified by:
        getSuffixMatch in interface HttpHeaderMatchOrBuilder
        Returns:
        The suffixMatch.
      • getSuffixMatchBytes

        public com.google.protobuf.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;
        Specified by:
        getSuffixMatchBytes in interface HttpHeaderMatchOrBuilder
        Returns:
        The bytes for suffixMatch.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static HttpHeaderMatch parseFrom​(ByteBuffer data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpHeaderMatch parseFrom​(ByteBuffer data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpHeaderMatch parseFrom​(com.google.protobuf.ByteString data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpHeaderMatch parseFrom​(com.google.protobuf.ByteString data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpHeaderMatch parseFrom​(byte[] data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpHeaderMatch parseFrom​(byte[] data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static HttpHeaderMatch parseFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws IOException
        Throws:
        IOException
      • newBuilderForType

        public HttpHeaderMatch.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public HttpHeaderMatch.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected HttpHeaderMatch.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • parser

        public static com.google.protobuf.Parser<HttpHeaderMatch> parser()
      • getParserForType

        public com.google.protobuf.Parser<HttpHeaderMatch> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public HttpHeaderMatch getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder