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 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.Builder<HttpRoute.HeaderMatch.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<HttpRoute.HeaderMatch.Builder>
    • getDefaultInstanceForType

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

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

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

      public HttpRoute.HeaderMatch.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpRoute.HeaderMatch.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<HttpRoute.HeaderMatch.Builder>
      Throws:
      IOException
    • getMatchTypeCase

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

      public HttpRoute.HeaderMatch.Builder clearMatchType()
    • 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.
    • setExactMatch

      public HttpRoute.HeaderMatch.Builder setExactMatch(String value)
       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

      public HttpRoute.HeaderMatch.Builder clearExactMatch()
       The value of the header should match exactly the content of
       exact_match.
       
      string exact_match = 2;
      Returns:
      This builder for chaining.
    • setExactMatchBytes

      public HttpRoute.HeaderMatch.Builder setExactMatchBytes(com.google.protobuf.ByteString value)
       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:
      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.
    • setRegexMatch

      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;
      Parameters:
      value - The regexMatch to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setRegexMatchBytes

      public HttpRoute.HeaderMatch.Builder setRegexMatchBytes(com.google.protobuf.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;
      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:
      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.
    • setPrefixMatch

      public HttpRoute.HeaderMatch.Builder setPrefixMatch(String value)
       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

      public HttpRoute.HeaderMatch.Builder clearPrefixMatch()
       The value of the header must start with the contents of prefix_match.
       
      string prefix_match = 4;
      Returns:
      This builder for chaining.
    • setPrefixMatchBytes

      public HttpRoute.HeaderMatch.Builder setPrefixMatchBytes(com.google.protobuf.ByteString value)
       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:
      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.
    • setPresentMatch

      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;
      Parameters:
      value - The presentMatch to set.
      Returns:
      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:
      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:
      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.
    • setSuffixMatch

      public HttpRoute.HeaderMatch.Builder setSuffixMatch(String value)
       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

      public HttpRoute.HeaderMatch.Builder clearSuffixMatch()
       The value of the header must end with the contents of suffix_match.
       
      string suffix_match = 6;
      Returns:
      This builder for chaining.
    • setSuffixMatchBytes

      public HttpRoute.HeaderMatch.Builder setSuffixMatchBytes(com.google.protobuf.ByteString value)
       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:
      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.
    • 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

       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

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

      public HttpRoute.HeaderMatch.IntegerRange.Builder 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

      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.
    • setHeader

      public HttpRoute.HeaderMatch.Builder setHeader(String value)
       The name of the HTTP header to match against.
       
      string header = 1;
      Parameters:
      value - The header to set.
      Returns:
      This builder for chaining.
    • clearHeader

      public HttpRoute.HeaderMatch.Builder clearHeader()
       The name of the HTTP header to match against.
       
      string header = 1;
      Returns:
      This builder for chaining.
    • setHeaderBytes

      public HttpRoute.HeaderMatch.Builder setHeaderBytes(com.google.protobuf.ByteString value)
       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:
      getInvertMatch in interface HttpRoute.HeaderMatchOrBuilder
      Returns:
      The invertMatch.
    • setInvertMatch

      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;
      Parameters:
      value - The invertMatch to set.
      Returns:
      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:
      This builder for chaining.