Class HttpRoute.HeaderMatch

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.networkservices.v1.HttpRoute.HeaderMatch
All Implemented Interfaces:
HttpRoute.HeaderMatchOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
HttpRoute

public static final class HttpRoute.HeaderMatch extends com.google.protobuf.GeneratedMessage implements HttpRoute.HeaderMatchOrBuilder
 Specifies how to select a route rule based on HTTP request headers.
 
Protobuf type google.cloud.networkservices.v1.HttpRoute.HeaderMatch
See Also:
  • Field Details

    • EXACT_MATCH_FIELD_NUMBER

      public static final int EXACT_MATCH_FIELD_NUMBER
      See Also:
    • REGEX_MATCH_FIELD_NUMBER

      public static final int REGEX_MATCH_FIELD_NUMBER
      See Also:
    • PREFIX_MATCH_FIELD_NUMBER

      public static final int PREFIX_MATCH_FIELD_NUMBER
      See Also:
    • PRESENT_MATCH_FIELD_NUMBER

      public static final int PRESENT_MATCH_FIELD_NUMBER
      See Also:
    • SUFFIX_MATCH_FIELD_NUMBER

      public static final int SUFFIX_MATCH_FIELD_NUMBER
      See Also:
    • RANGE_MATCH_FIELD_NUMBER

      public static final int RANGE_MATCH_FIELD_NUMBER
      See Also:
    • HEADER_FIELD_NUMBER

      public static final int HEADER_FIELD_NUMBER
      See Also:
    • INVERT_MATCH_FIELD_NUMBER

      public static final int INVERT_MATCH_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getMatchTypeCase

      public HttpRoute.HeaderMatch.MatchTypeCase getMatchTypeCase()
      Specified by:
      getMatchTypeCase in interface HttpRoute.HeaderMatchOrBuilder
    • hasExactMatch

      public boolean hasExactMatch()
       The value of the header should match exactly the content of
       exact_match.
       
      string exact_match = 2;
      Specified by:
      hasExactMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      Whether the exactMatch field is set.
    • getExactMatch

      public String getExactMatch()
       The value of the header should match exactly the content of
       exact_match.
       
      string exact_match = 2;
      Specified by:
      getExactMatch in interface HttpRoute.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:
      getExactMatchBytes in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The bytes for exactMatch.
    • 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:
      hasRegexMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      Whether the regexMatch field is set.
    • 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;
      Specified by:
      getRegexMatch in interface HttpRoute.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:
      getRegexMatchBytes in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The bytes for regexMatch.
    • hasPrefixMatch

      public boolean hasPrefixMatch()
       The value of the header must start with the contents of prefix_match.
       
      string prefix_match = 4;
      Specified by:
      hasPrefixMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      Whether the prefixMatch field is set.
    • getPrefixMatch

      public String getPrefixMatch()
       The value of the header must start with the contents of prefix_match.
       
      string prefix_match = 4;
      Specified by:
      getPrefixMatch in interface HttpRoute.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:
      getPrefixMatchBytes in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The bytes for prefixMatch.
    • 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:
      hasPresentMatch in interface HttpRoute.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:
      getPresentMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The presentMatch.
    • hasSuffixMatch

      public boolean hasSuffixMatch()
       The value of the header must end with the contents of suffix_match.
       
      string suffix_match = 6;
      Specified by:
      hasSuffixMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      Whether the suffixMatch field is set.
    • getSuffixMatch

      public String getSuffixMatch()
       The value of the header must end with the contents of suffix_match.
       
      string suffix_match = 6;
      Specified by:
      getSuffixMatch in interface HttpRoute.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:
      getSuffixMatchBytes in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The bytes for suffixMatch.
    • 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:
      hasRangeMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      Whether the rangeMatch field is set.
    • 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;
      Specified by:
      getRangeMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The rangeMatch.
    • 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;
      Specified by:
      getRangeMatchOrBuilder in interface HttpRoute.HeaderMatchOrBuilder
    • getHeader

      public String getHeader()
       The name of the HTTP header to match against.
       
      string header = 1;
      Specified by:
      getHeader in interface HttpRoute.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:
      getHeaderBytes in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      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;
      Specified by:
      getInvertMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The invertMatch.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • 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.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • 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 HttpRoute.HeaderMatch parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static HttpRoute.HeaderMatch parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HttpRoute.HeaderMatch parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static HttpRoute.HeaderMatch parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static HttpRoute.HeaderMatch parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static HttpRoute.HeaderMatch parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public HttpRoute.HeaderMatch.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static HttpRoute.HeaderMatch.Builder newBuilder()
    • newBuilder

      public static HttpRoute.HeaderMatch.Builder newBuilder(HttpRoute.HeaderMatch prototype)
    • toBuilder

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

      protected HttpRoute.HeaderMatch.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static HttpRoute.HeaderMatch getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<HttpRoute.HeaderMatch> 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.GeneratedMessage
    • getDefaultInstanceForType

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