All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.envoyproxy.envoy.config.route.v3.HeaderMatcher Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/config/route/v3/route_components.proto

package io.envoyproxy.envoy.config.route.v3;

/**
 * 
 * .. attention::
 *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host``
 *   header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
 * .. attention::
 *   To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both
 *   HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g.,
 *   .. code-block:: json
 *     {
 *       "name": ":method",
 *       "string_match": {
 *         "exact": "POST"
 *       }
 *     }
 * .. attention::
 *   In the absence of any header match specifier, match will default to :ref:`present_match
 *   <envoy_v3_api_field_config.route.v3.HeaderMatcher.present_match>`. i.e, a request that has the :ref:`name
 *   <envoy_v3_api_field_config.route.v3.HeaderMatcher.name>` header will match, regardless of the header's
 *   value.
 *  [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.]
 * [#next-free-field: 15]
 * 
* * Protobuf type {@code envoy.config.route.v3.HeaderMatcher} */ public final class HeaderMatcher extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:envoy.config.route.v3.HeaderMatcher) HeaderMatcherOrBuilder { private static final long serialVersionUID = 0L; // Use HeaderMatcher.newBuilder() to construct. private HeaderMatcher(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private HeaderMatcher() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new HeaderMatcher(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private HeaderMatcher( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); headerMatchSpecifierCase_ = 4; headerMatchSpecifier_ = s; break; } case 50: { io.envoyproxy.envoy.type.v3.Int64Range.Builder subBuilder = null; if (headerMatchSpecifierCase_ == 6) { subBuilder = ((io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_).toBuilder(); } headerMatchSpecifier_ = input.readMessage(io.envoyproxy.envoy.type.v3.Int64Range.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_); headerMatchSpecifier_ = subBuilder.buildPartial(); } headerMatchSpecifierCase_ = 6; break; } case 56: { headerMatchSpecifier_ = input.readBool(); headerMatchSpecifierCase_ = 7; break; } case 64: { invertMatch_ = input.readBool(); break; } case 74: { java.lang.String s = input.readStringRequireUtf8(); headerMatchSpecifierCase_ = 9; headerMatchSpecifier_ = s; break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); headerMatchSpecifierCase_ = 10; headerMatchSpecifier_ = s; break; } case 90: { io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.Builder subBuilder = null; if (headerMatchSpecifierCase_ == 11) { subBuilder = ((io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_).toBuilder(); } headerMatchSpecifier_ = input.readMessage(io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_); headerMatchSpecifier_ = subBuilder.buildPartial(); } headerMatchSpecifierCase_ = 11; break; } case 98: { java.lang.String s = input.readStringRequireUtf8(); headerMatchSpecifierCase_ = 12; headerMatchSpecifier_ = s; break; } case 106: { io.envoyproxy.envoy.type.matcher.v3.StringMatcher.Builder subBuilder = null; if (headerMatchSpecifierCase_ == 13) { subBuilder = ((io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_).toBuilder(); } headerMatchSpecifier_ = input.readMessage(io.envoyproxy.envoy.type.matcher.v3.StringMatcher.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_); headerMatchSpecifier_ = subBuilder.buildPartial(); } headerMatchSpecifierCase_ = 13; break; } case 112: { treatMissingHeaderAsEmpty_ = input.readBool(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HeaderMatcher_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HeaderMatcher_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.HeaderMatcher.class, io.envoyproxy.envoy.config.route.v3.HeaderMatcher.Builder.class); } private int headerMatchSpecifierCase_ = 0; private java.lang.Object headerMatchSpecifier_; public enum HeaderMatchSpecifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { @java.lang.Deprecated EXACT_MATCH(4), @java.lang.Deprecated SAFE_REGEX_MATCH(11), RANGE_MATCH(6), PRESENT_MATCH(7), @java.lang.Deprecated PREFIX_MATCH(9), @java.lang.Deprecated SUFFIX_MATCH(10), @java.lang.Deprecated CONTAINS_MATCH(12), STRING_MATCH(13), HEADERMATCHSPECIFIER_NOT_SET(0); private final int value; private HeaderMatchSpecifierCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static HeaderMatchSpecifierCase valueOf(int value) { return forNumber(value); } public static HeaderMatchSpecifierCase forNumber(int value) { switch (value) { case 4: return EXACT_MATCH; case 11: return SAFE_REGEX_MATCH; case 6: return RANGE_MATCH; case 7: return PRESENT_MATCH; case 9: return PREFIX_MATCH; case 10: return SUFFIX_MATCH; case 12: return CONTAINS_MATCH; case 13: return STRING_MATCH; case 0: return HEADERMATCHSPECIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public HeaderMatchSpecifierCase getHeaderMatchSpecifierCase() { return HeaderMatchSpecifierCase.forNumber( headerMatchSpecifierCase_); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
   * Specifies the name of the header in the request.
   * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * Specifies the name of the header in the request.
   * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int EXACT_MATCH_FIELD_NUMBER = 4; /** *
   * If specified, header match will be performed based on the value of the header.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return Whether the exactMatch field is set. */ @java.lang.Deprecated public boolean hasExactMatch() { return headerMatchSpecifierCase_ == 4; } /** *
   * If specified, header match will be performed based on the value of the header.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return The exactMatch. */ @java.lang.Deprecated public java.lang.String getExactMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 4) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 4) { headerMatchSpecifier_ = s; } return s; } } /** *
   * If specified, header match will be performed based on the value of the header.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return The bytes for exactMatch. */ @java.lang.Deprecated public com.google.protobuf.ByteString getExactMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 4) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 4) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SAFE_REGEX_MATCH_FIELD_NUMBER = 11; /** *
   * If specified, this regex string is a regular expression rule which implies the entire request
   * header value must match the regex. The rule will not match if only a subsequence of the
   * request header value matches the regex.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2241 * @return Whether the safeRegexMatch field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasSafeRegexMatch() { return headerMatchSpecifierCase_ == 11; } /** *
   * If specified, this regex string is a regular expression rule which implies the entire request
   * header value must match the regex. The rule will not match if only a subsequence of the
   * request header value matches the regex.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2241 * @return The safeRegexMatch. */ @java.lang.Override @java.lang.Deprecated public io.envoyproxy.envoy.type.matcher.v3.RegexMatcher getSafeRegexMatch() { if (headerMatchSpecifierCase_ == 11) { return (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance(); } /** *
   * If specified, this regex string is a regular expression rule which implies the entire request
   * header value must match the regex. The rule will not match if only a subsequence of the
   * request header value matches the regex.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Override @java.lang.Deprecated public io.envoyproxy.envoy.type.matcher.v3.RegexMatcherOrBuilder getSafeRegexMatchOrBuilder() { if (headerMatchSpecifierCase_ == 11) { return (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance(); } public static final int RANGE_MATCH_FIELD_NUMBER = 6; /** *
   * If specified, header match will be performed based on range.
   * The rule will match if the request header value is within this range.
   * The entire request header value must represent an integer in base 10 notation: consisting of
   * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
   * the header value does not represent an integer. Match will fail for empty values, floating
   * point numbers or if only a subsequence of the header value is an integer.
   * Examples:
   * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
   *   ``-1somestring``
   * 
* * .envoy.type.v3.Int64Range range_match = 6; * @return Whether the rangeMatch field is set. */ @java.lang.Override public boolean hasRangeMatch() { return headerMatchSpecifierCase_ == 6; } /** *
   * If specified, header match will be performed based on range.
   * The rule will match if the request header value is within this range.
   * The entire request header value must represent an integer in base 10 notation: consisting of
   * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
   * the header value does not represent an integer. Match will fail for empty values, floating
   * point numbers or if only a subsequence of the header value is an integer.
   * Examples:
   * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
   *   ``-1somestring``
   * 
* * .envoy.type.v3.Int64Range range_match = 6; * @return The rangeMatch. */ @java.lang.Override public io.envoyproxy.envoy.type.v3.Int64Range getRangeMatch() { if (headerMatchSpecifierCase_ == 6) { return (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance(); } /** *
   * If specified, header match will be performed based on range.
   * The rule will match if the request header value is within this range.
   * The entire request header value must represent an integer in base 10 notation: consisting of
   * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
   * the header value does not represent an integer. Match will fail for empty values, floating
   * point numbers or if only a subsequence of the header value is an integer.
   * Examples:
   * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
   *   ``-1somestring``
   * 
* * .envoy.type.v3.Int64Range range_match = 6; */ @java.lang.Override public io.envoyproxy.envoy.type.v3.Int64RangeOrBuilder getRangeMatchOrBuilder() { if (headerMatchSpecifierCase_ == 6) { return (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance(); } public static final int PRESENT_MATCH_FIELD_NUMBER = 7; /** *
   * If specified as true, header match will be performed based on whether the header is in the
   * request. If specified as false, header match will be performed based on whether the header is absent.
   * 
* * bool present_match = 7; * @return Whether the presentMatch field is set. */ @java.lang.Override public boolean hasPresentMatch() { return headerMatchSpecifierCase_ == 7; } /** *
   * If specified as true, header match will be performed based on whether the header is in the
   * request. If specified as false, header match will be performed based on whether the header is absent.
   * 
* * bool present_match = 7; * @return The presentMatch. */ @java.lang.Override public boolean getPresentMatch() { if (headerMatchSpecifierCase_ == 7) { return (java.lang.Boolean) headerMatchSpecifier_; } return false; } public static final int PREFIX_MATCH_FIELD_NUMBER = 9; /** *
   * If specified, header match will be performed based on the prefix of the header value.
   * Note: empty prefix is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
   * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return Whether the prefixMatch field is set. */ @java.lang.Deprecated public boolean hasPrefixMatch() { return headerMatchSpecifierCase_ == 9; } /** *
   * If specified, header match will be performed based on the prefix of the header value.
   * Note: empty prefix is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
   * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return The prefixMatch. */ @java.lang.Deprecated public java.lang.String getPrefixMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 9) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 9) { headerMatchSpecifier_ = s; } return s; } } /** *
   * If specified, header match will be performed based on the prefix of the header value.
   * Note: empty prefix is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
   * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return The bytes for prefixMatch. */ @java.lang.Deprecated public com.google.protobuf.ByteString getPrefixMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 9) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 9) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SUFFIX_MATCH_FIELD_NUMBER = 10; /** *
   * If specified, header match will be performed based on the suffix of the header value.
   * Note: empty suffix is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
   * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return Whether the suffixMatch field is set. */ @java.lang.Deprecated public boolean hasSuffixMatch() { return headerMatchSpecifierCase_ == 10; } /** *
   * If specified, header match will be performed based on the suffix of the header value.
   * Note: empty suffix is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
   * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return The suffixMatch. */ @java.lang.Deprecated public java.lang.String getSuffixMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 10) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 10) { headerMatchSpecifier_ = s; } return s; } } /** *
   * If specified, header match will be performed based on the suffix of the header value.
   * Note: empty suffix is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
   * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return The bytes for suffixMatch. */ @java.lang.Deprecated public com.google.protobuf.ByteString getSuffixMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 10) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 10) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTAINS_MATCH_FIELD_NUMBER = 12; /** *
   * If specified, header match will be performed based on whether the header value contains
   * the given value or not.
   * Note: empty contains match is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
   * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return Whether the containsMatch field is set. */ @java.lang.Deprecated public boolean hasContainsMatch() { return headerMatchSpecifierCase_ == 12; } /** *
   * If specified, header match will be performed based on whether the header value contains
   * the given value or not.
   * Note: empty contains match is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
   * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return The containsMatch. */ @java.lang.Deprecated public java.lang.String getContainsMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 12) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 12) { headerMatchSpecifier_ = s; } return s; } } /** *
   * If specified, header match will be performed based on whether the header value contains
   * the given value or not.
   * Note: empty contains match is not allowed, please use present_match instead.
   * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
   * Examples:
   * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
   * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return The bytes for containsMatch. */ @java.lang.Deprecated public com.google.protobuf.ByteString getContainsMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 12) { ref = headerMatchSpecifier_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 12) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STRING_MATCH_FIELD_NUMBER = 13; /** *
   * If specified, header match will be performed based on the string match of the header value.
   * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; * @return Whether the stringMatch field is set. */ @java.lang.Override public boolean hasStringMatch() { return headerMatchSpecifierCase_ == 13; } /** *
   * If specified, header match will be performed based on the string match of the header value.
   * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; * @return The stringMatch. */ @java.lang.Override public io.envoyproxy.envoy.type.matcher.v3.StringMatcher getStringMatch() { if (headerMatchSpecifierCase_ == 13) { return (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance(); } /** *
   * If specified, header match will be performed based on the string match of the header value.
   * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ @java.lang.Override public io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder getStringMatchOrBuilder() { if (headerMatchSpecifierCase_ == 13) { return (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance(); } public static final int INVERT_MATCH_FIELD_NUMBER = 8; private boolean invertMatch_; /** *
   * If specified, the match result will be inverted before checking. Defaults to false.
   * Examples:
   * * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted.
   * * The range [-10,0) will match the value -1, so it will not match when inverted.
   * 
* * bool invert_match = 8; * @return The invertMatch. */ @java.lang.Override public boolean getInvertMatch() { return invertMatch_; } public static final int TREAT_MISSING_HEADER_AS_EMPTY_FIELD_NUMBER = 14; private boolean treatMissingHeaderAsEmpty_; /** *
   * If specified, for any header match rule, if the header match rule specified header
   * does not exist, this header value will be treated as empty. Defaults to false.
   * Examples:
   * * The header match rule specified header "header1" to range match of [0, 10],
   *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
   *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
   *   is set to true; The "header1" header is not present. The match rule will
   *   treat the "header1" as an empty header. The empty header does not match the range,
   *   so it will match when inverted.
   * * The header match rule specified header "header2" to range match of [0, 10],
   *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
   *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
   *   is set to false; The "header2" header is not present and the header
   *   matcher rule for "header2" will be ignored so it will not match.
   * * The header match rule specified header "header3" to a string regex match
   *   ``^$`` which means an empty string, and
   *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
   *   is set to true; The "header3" header is not present.
   *   The match rule will treat the "header3" header as an empty header so it will match.
   * * The header match rule specified header "header4" to a string regex match
   *   ``^$`` which means an empty string, and
   *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
   *   is set to false; The "header4" header is not present.
   *   The match rule for "header4" will be ignored so it will not match.
   * 
* * bool treat_missing_header_as_empty = 14; * @return The treatMissingHeaderAsEmpty. */ @java.lang.Override public boolean getTreatMissingHeaderAsEmpty() { return treatMissingHeaderAsEmpty_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (headerMatchSpecifierCase_ == 4) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 6) { output.writeMessage(6, (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 7) { output.writeBool( 7, (boolean)((java.lang.Boolean) headerMatchSpecifier_)); } if (invertMatch_ != false) { output.writeBool(8, invertMatch_); } if (headerMatchSpecifierCase_ == 9) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 10) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 11) { output.writeMessage(11, (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 12) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 13) { output.writeMessage(13, (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_); } if (treatMissingHeaderAsEmpty_ != false) { output.writeBool(14, treatMissingHeaderAsEmpty_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (headerMatchSpecifierCase_ == 4) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeBoolSize( 7, (boolean)((java.lang.Boolean) headerMatchSpecifier_)); } if (invertMatch_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(8, invertMatch_); } if (headerMatchSpecifierCase_ == 9) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 10) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 11) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 12) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, headerMatchSpecifier_); } if (headerMatchSpecifierCase_ == 13) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(13, (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_); } if (treatMissingHeaderAsEmpty_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(14, treatMissingHeaderAsEmpty_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.HeaderMatcher)) { return super.equals(obj); } io.envoyproxy.envoy.config.route.v3.HeaderMatcher other = (io.envoyproxy.envoy.config.route.v3.HeaderMatcher) obj; if (!getName() .equals(other.getName())) return false; if (getInvertMatch() != other.getInvertMatch()) return false; if (getTreatMissingHeaderAsEmpty() != other.getTreatMissingHeaderAsEmpty()) return false; if (!getHeaderMatchSpecifierCase().equals(other.getHeaderMatchSpecifierCase())) return false; switch (headerMatchSpecifierCase_) { case 4: if (!getExactMatch() .equals(other.getExactMatch())) return false; break; case 11: if (!getSafeRegexMatch() .equals(other.getSafeRegexMatch())) return false; break; case 6: if (!getRangeMatch() .equals(other.getRangeMatch())) return false; break; case 7: if (getPresentMatch() != other.getPresentMatch()) return false; break; case 9: if (!getPrefixMatch() .equals(other.getPrefixMatch())) return false; break; case 10: if (!getSuffixMatch() .equals(other.getSuffixMatch())) return false; break; case 12: if (!getContainsMatch() .equals(other.getContainsMatch())) return false; break; case 13: if (!getStringMatch() .equals(other.getStringMatch())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + INVERT_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getInvertMatch()); hash = (37 * hash) + TREAT_MISSING_HEADER_AS_EMPTY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getTreatMissingHeaderAsEmpty()); switch (headerMatchSpecifierCase_) { case 4: hash = (37 * hash) + EXACT_MATCH_FIELD_NUMBER; hash = (53 * hash) + getExactMatch().hashCode(); break; case 11: hash = (37 * hash) + SAFE_REGEX_MATCH_FIELD_NUMBER; hash = (53 * hash) + getSafeRegexMatch().hashCode(); break; case 6: hash = (37 * hash) + RANGE_MATCH_FIELD_NUMBER; hash = (53 * hash) + getRangeMatch().hashCode(); break; case 7: hash = (37 * hash) + PRESENT_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getPresentMatch()); break; case 9: hash = (37 * hash) + PREFIX_MATCH_FIELD_NUMBER; hash = (53 * hash) + getPrefixMatch().hashCode(); break; case 10: hash = (37 * hash) + SUFFIX_MATCH_FIELD_NUMBER; hash = (53 * hash) + getSuffixMatch().hashCode(); break; case 12: hash = (37 * hash) + CONTAINS_MATCH_FIELD_NUMBER; hash = (53 * hash) + getContainsMatch().hashCode(); break; case 13: hash = (37 * hash) + STRING_MATCH_FIELD_NUMBER; hash = (53 * hash) + getStringMatch().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.HeaderMatcher prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * .. attention::
   *   Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host``
   *   header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead.
   * .. attention::
   *   To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both
   *   HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g.,
   *   .. code-block:: json
   *     {
   *       "name": ":method",
   *       "string_match": {
   *         "exact": "POST"
   *       }
   *     }
   * .. attention::
   *   In the absence of any header match specifier, match will default to :ref:`present_match
   *   <envoy_v3_api_field_config.route.v3.HeaderMatcher.present_match>`. i.e, a request that has the :ref:`name
   *   <envoy_v3_api_field_config.route.v3.HeaderMatcher.name>` header will match, regardless of the header's
   *   value.
   *  [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.]
   * [#next-free-field: 15]
   * 
* * Protobuf type {@code envoy.config.route.v3.HeaderMatcher} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.config.route.v3.HeaderMatcher) io.envoyproxy.envoy.config.route.v3.HeaderMatcherOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HeaderMatcher_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HeaderMatcher_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.config.route.v3.HeaderMatcher.class, io.envoyproxy.envoy.config.route.v3.HeaderMatcher.Builder.class); } // Construct using io.envoyproxy.envoy.config.route.v3.HeaderMatcher.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; invertMatch_ = false; treatMissingHeaderAsEmpty_ = false; headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.config.route.v3.RouteComponentsProto.internal_static_envoy_config_route_v3_HeaderMatcher_descriptor; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HeaderMatcher getDefaultInstanceForType() { return io.envoyproxy.envoy.config.route.v3.HeaderMatcher.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HeaderMatcher build() { io.envoyproxy.envoy.config.route.v3.HeaderMatcher result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HeaderMatcher buildPartial() { io.envoyproxy.envoy.config.route.v3.HeaderMatcher result = new io.envoyproxy.envoy.config.route.v3.HeaderMatcher(this); result.name_ = name_; if (headerMatchSpecifierCase_ == 4) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } if (headerMatchSpecifierCase_ == 11) { if (safeRegexMatchBuilder_ == null) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } else { result.headerMatchSpecifier_ = safeRegexMatchBuilder_.build(); } } if (headerMatchSpecifierCase_ == 6) { if (rangeMatchBuilder_ == null) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } else { result.headerMatchSpecifier_ = rangeMatchBuilder_.build(); } } if (headerMatchSpecifierCase_ == 7) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } if (headerMatchSpecifierCase_ == 9) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } if (headerMatchSpecifierCase_ == 10) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } if (headerMatchSpecifierCase_ == 12) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } if (headerMatchSpecifierCase_ == 13) { if (stringMatchBuilder_ == null) { result.headerMatchSpecifier_ = headerMatchSpecifier_; } else { result.headerMatchSpecifier_ = stringMatchBuilder_.build(); } } result.invertMatch_ = invertMatch_; result.treatMissingHeaderAsEmpty_ = treatMissingHeaderAsEmpty_; result.headerMatchSpecifierCase_ = headerMatchSpecifierCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.envoyproxy.envoy.config.route.v3.HeaderMatcher) { return mergeFrom((io.envoyproxy.envoy.config.route.v3.HeaderMatcher)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.HeaderMatcher other) { if (other == io.envoyproxy.envoy.config.route.v3.HeaderMatcher.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.getInvertMatch() != false) { setInvertMatch(other.getInvertMatch()); } if (other.getTreatMissingHeaderAsEmpty() != false) { setTreatMissingHeaderAsEmpty(other.getTreatMissingHeaderAsEmpty()); } switch (other.getHeaderMatchSpecifierCase()) { case EXACT_MATCH: { headerMatchSpecifierCase_ = 4; headerMatchSpecifier_ = other.headerMatchSpecifier_; onChanged(); break; } case SAFE_REGEX_MATCH: { mergeSafeRegexMatch(other.getSafeRegexMatch()); break; } case RANGE_MATCH: { mergeRangeMatch(other.getRangeMatch()); break; } case PRESENT_MATCH: { setPresentMatch(other.getPresentMatch()); break; } case PREFIX_MATCH: { headerMatchSpecifierCase_ = 9; headerMatchSpecifier_ = other.headerMatchSpecifier_; onChanged(); break; } case SUFFIX_MATCH: { headerMatchSpecifierCase_ = 10; headerMatchSpecifier_ = other.headerMatchSpecifier_; onChanged(); break; } case CONTAINS_MATCH: { headerMatchSpecifierCase_ = 12; headerMatchSpecifier_ = other.headerMatchSpecifier_; onChanged(); break; } case STRING_MATCH: { mergeStringMatch(other.getStringMatch()); break; } case HEADERMATCHSPECIFIER_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.envoyproxy.envoy.config.route.v3.HeaderMatcher parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.envoyproxy.envoy.config.route.v3.HeaderMatcher) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int headerMatchSpecifierCase_ = 0; private java.lang.Object headerMatchSpecifier_; public HeaderMatchSpecifierCase getHeaderMatchSpecifierCase() { return HeaderMatchSpecifierCase.forNumber( headerMatchSpecifierCase_); } public Builder clearHeaderMatchSpecifier() { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
     * Specifies the name of the header in the request.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Specifies the name of the header in the request.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Specifies the name of the header in the request.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * Specifies the name of the header in the request.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * Specifies the name of the header in the request.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on the value of the header.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return Whether the exactMatch field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasExactMatch() { return headerMatchSpecifierCase_ == 4; } /** *
     * If specified, header match will be performed based on the value of the header.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return The exactMatch. */ @java.lang.Override @java.lang.Deprecated public java.lang.String getExactMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 4) { ref = headerMatchSpecifier_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 4) { headerMatchSpecifier_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * If specified, header match will be performed based on the value of the header.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return The bytes for exactMatch. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.ByteString getExactMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 4) { ref = headerMatchSpecifier_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 4) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * If specified, header match will be performed based on the value of the header.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @param value The exactMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setExactMatch( java.lang.String value) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifierCase_ = 4; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on the value of the header.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearExactMatch() { if (headerMatchSpecifierCase_ == 4) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } return this; } /** *
     * If specified, header match will be performed based on the value of the header.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * string exact_match = 4 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.exact_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2234 * @param value The bytes for exactMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setExactMatchBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); headerMatchSpecifierCase_ = 4; headerMatchSpecifier_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.matcher.v3.RegexMatcher, io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.RegexMatcherOrBuilder> safeRegexMatchBuilder_; /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2241 * @return Whether the safeRegexMatch field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasSafeRegexMatch() { return headerMatchSpecifierCase_ == 11; } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; * @deprecated envoy.config.route.v3.HeaderMatcher.safe_regex_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2241 * @return The safeRegexMatch. */ @java.lang.Override @java.lang.Deprecated public io.envoyproxy.envoy.type.matcher.v3.RegexMatcher getSafeRegexMatch() { if (safeRegexMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 11) { return (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance(); } else { if (headerMatchSpecifierCase_ == 11) { return safeRegexMatchBuilder_.getMessage(); } return io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance(); } } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder setSafeRegexMatch(io.envoyproxy.envoy.type.matcher.v3.RegexMatcher value) { if (safeRegexMatchBuilder_ == null) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifier_ = value; onChanged(); } else { safeRegexMatchBuilder_.setMessage(value); } headerMatchSpecifierCase_ = 11; return this; } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder setSafeRegexMatch( io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.Builder builderForValue) { if (safeRegexMatchBuilder_ == null) { headerMatchSpecifier_ = builderForValue.build(); onChanged(); } else { safeRegexMatchBuilder_.setMessage(builderForValue.build()); } headerMatchSpecifierCase_ = 11; return this; } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder mergeSafeRegexMatch(io.envoyproxy.envoy.type.matcher.v3.RegexMatcher value) { if (safeRegexMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 11 && headerMatchSpecifier_ != io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance()) { headerMatchSpecifier_ = io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.newBuilder((io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_) .mergeFrom(value).buildPartial(); } else { headerMatchSpecifier_ = value; } onChanged(); } else { if (headerMatchSpecifierCase_ == 11) { safeRegexMatchBuilder_.mergeFrom(value); } else { safeRegexMatchBuilder_.setMessage(value); } } headerMatchSpecifierCase_ = 11; return this; } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public Builder clearSafeRegexMatch() { if (safeRegexMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 11) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } } else { if (headerMatchSpecifierCase_ == 11) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; } safeRegexMatchBuilder_.clear(); } return this; } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Deprecated public io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.Builder getSafeRegexMatchBuilder() { return getSafeRegexMatchFieldBuilder().getBuilder(); } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ @java.lang.Override @java.lang.Deprecated public io.envoyproxy.envoy.type.matcher.v3.RegexMatcherOrBuilder getSafeRegexMatchOrBuilder() { if ((headerMatchSpecifierCase_ == 11) && (safeRegexMatchBuilder_ != null)) { return safeRegexMatchBuilder_.getMessageOrBuilder(); } else { if (headerMatchSpecifierCase_ == 11) { return (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance(); } } /** *
     * If specified, this regex string is a regular expression rule which implies the entire request
     * header value must match the regex. The rule will not match if only a subsequence of the
     * request header value matches the regex.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * 
* * .envoy.type.matcher.v3.RegexMatcher safe_regex_match = 11 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"]; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.matcher.v3.RegexMatcher, io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.RegexMatcherOrBuilder> getSafeRegexMatchFieldBuilder() { if (safeRegexMatchBuilder_ == null) { if (!(headerMatchSpecifierCase_ == 11)) { headerMatchSpecifier_ = io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.getDefaultInstance(); } safeRegexMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.matcher.v3.RegexMatcher, io.envoyproxy.envoy.type.matcher.v3.RegexMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.RegexMatcherOrBuilder>( (io.envoyproxy.envoy.type.matcher.v3.RegexMatcher) headerMatchSpecifier_, getParentForChildren(), isClean()); headerMatchSpecifier_ = null; } headerMatchSpecifierCase_ = 11; onChanged();; return safeRegexMatchBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.v3.Int64Range, io.envoyproxy.envoy.type.v3.Int64Range.Builder, io.envoyproxy.envoy.type.v3.Int64RangeOrBuilder> rangeMatchBuilder_; /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; * @return Whether the rangeMatch field is set. */ @java.lang.Override public boolean hasRangeMatch() { return headerMatchSpecifierCase_ == 6; } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; * @return The rangeMatch. */ @java.lang.Override public io.envoyproxy.envoy.type.v3.Int64Range getRangeMatch() { if (rangeMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 6) { return (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance(); } else { if (headerMatchSpecifierCase_ == 6) { return rangeMatchBuilder_.getMessage(); } return io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance(); } } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ public Builder setRangeMatch(io.envoyproxy.envoy.type.v3.Int64Range value) { if (rangeMatchBuilder_ == null) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifier_ = value; onChanged(); } else { rangeMatchBuilder_.setMessage(value); } headerMatchSpecifierCase_ = 6; return this; } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ public Builder setRangeMatch( io.envoyproxy.envoy.type.v3.Int64Range.Builder builderForValue) { if (rangeMatchBuilder_ == null) { headerMatchSpecifier_ = builderForValue.build(); onChanged(); } else { rangeMatchBuilder_.setMessage(builderForValue.build()); } headerMatchSpecifierCase_ = 6; return this; } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ public Builder mergeRangeMatch(io.envoyproxy.envoy.type.v3.Int64Range value) { if (rangeMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 6 && headerMatchSpecifier_ != io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance()) { headerMatchSpecifier_ = io.envoyproxy.envoy.type.v3.Int64Range.newBuilder((io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_) .mergeFrom(value).buildPartial(); } else { headerMatchSpecifier_ = value; } onChanged(); } else { if (headerMatchSpecifierCase_ == 6) { rangeMatchBuilder_.mergeFrom(value); } else { rangeMatchBuilder_.setMessage(value); } } headerMatchSpecifierCase_ = 6; return this; } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ public Builder clearRangeMatch() { if (rangeMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 6) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } } else { if (headerMatchSpecifierCase_ == 6) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; } rangeMatchBuilder_.clear(); } return this; } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ public io.envoyproxy.envoy.type.v3.Int64Range.Builder getRangeMatchBuilder() { return getRangeMatchFieldBuilder().getBuilder(); } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ @java.lang.Override public io.envoyproxy.envoy.type.v3.Int64RangeOrBuilder getRangeMatchOrBuilder() { if ((headerMatchSpecifierCase_ == 6) && (rangeMatchBuilder_ != null)) { return rangeMatchBuilder_.getMessageOrBuilder(); } else { if (headerMatchSpecifierCase_ == 6) { return (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance(); } } /** *
     * If specified, header match will be performed based on range.
     * The rule will match if the request header value is within this range.
     * The entire request header value must represent an integer in base 10 notation: consisting of
     * an optional plus or minus sign followed by a sequence of digits. The rule will not match if
     * the header value does not represent an integer. Match will fail for empty values, floating
     * point numbers or if only a subsequence of the header value is an integer.
     * Examples:
     * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9,
     *   ``-1somestring``
     * 
* * .envoy.type.v3.Int64Range range_match = 6; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.v3.Int64Range, io.envoyproxy.envoy.type.v3.Int64Range.Builder, io.envoyproxy.envoy.type.v3.Int64RangeOrBuilder> getRangeMatchFieldBuilder() { if (rangeMatchBuilder_ == null) { if (!(headerMatchSpecifierCase_ == 6)) { headerMatchSpecifier_ = io.envoyproxy.envoy.type.v3.Int64Range.getDefaultInstance(); } rangeMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.v3.Int64Range, io.envoyproxy.envoy.type.v3.Int64Range.Builder, io.envoyproxy.envoy.type.v3.Int64RangeOrBuilder>( (io.envoyproxy.envoy.type.v3.Int64Range) headerMatchSpecifier_, getParentForChildren(), isClean()); headerMatchSpecifier_ = null; } headerMatchSpecifierCase_ = 6; onChanged();; return rangeMatchBuilder_; } /** *
     * If specified as true, header match will be performed based on whether the header is in the
     * request. If specified as false, header match will be performed based on whether the header is absent.
     * 
* * bool present_match = 7; * @return Whether the presentMatch field is set. */ public boolean hasPresentMatch() { return headerMatchSpecifierCase_ == 7; } /** *
     * If specified as true, header match will be performed based on whether the header is in the
     * request. If specified as false, header match will be performed based on whether the header is absent.
     * 
* * bool present_match = 7; * @return The presentMatch. */ public boolean getPresentMatch() { if (headerMatchSpecifierCase_ == 7) { return (java.lang.Boolean) headerMatchSpecifier_; } return false; } /** *
     * If specified as true, header match will be performed based on whether the header is in the
     * request. If specified as false, header match will be performed based on whether the header is absent.
     * 
* * bool present_match = 7; * @param value The presentMatch to set. * @return This builder for chaining. */ public Builder setPresentMatch(boolean value) { headerMatchSpecifierCase_ = 7; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified as true, header match will be performed based on whether the header is in the
     * request. If specified as false, header match will be performed based on whether the header is absent.
     * 
* * bool present_match = 7; * @return This builder for chaining. */ public Builder clearPresentMatch() { if (headerMatchSpecifierCase_ == 7) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } return this; } /** *
     * If specified, header match will be performed based on the prefix of the header value.
     * Note: empty prefix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
     * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return Whether the prefixMatch field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasPrefixMatch() { return headerMatchSpecifierCase_ == 9; } /** *
     * If specified, header match will be performed based on the prefix of the header value.
     * Note: empty prefix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
     * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return The prefixMatch. */ @java.lang.Override @java.lang.Deprecated public java.lang.String getPrefixMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 9) { ref = headerMatchSpecifier_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 9) { headerMatchSpecifier_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * If specified, header match will be performed based on the prefix of the header value.
     * Note: empty prefix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
     * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return The bytes for prefixMatch. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.ByteString getPrefixMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 9) { ref = headerMatchSpecifier_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 9) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * If specified, header match will be performed based on the prefix of the header value.
     * Note: empty prefix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
     * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @param value The prefixMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setPrefixMatch( java.lang.String value) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifierCase_ = 9; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on the prefix of the header value.
     * Note: empty prefix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
     * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearPrefixMatch() { if (headerMatchSpecifierCase_ == 9) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } return this; } /** *
     * If specified, header match will be performed based on the prefix of the header value.
     * Note: empty prefix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``.
     * 
* * string prefix_match = 9 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.prefix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2268 * @param value The bytes for prefixMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setPrefixMatchBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); headerMatchSpecifierCase_ = 9; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on the suffix of the header value.
     * Note: empty suffix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
     * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return Whether the suffixMatch field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasSuffixMatch() { return headerMatchSpecifierCase_ == 10; } /** *
     * If specified, header match will be performed based on the suffix of the header value.
     * Note: empty suffix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
     * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return The suffixMatch. */ @java.lang.Override @java.lang.Deprecated public java.lang.String getSuffixMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 10) { ref = headerMatchSpecifier_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 10) { headerMatchSpecifier_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * If specified, header match will be performed based on the suffix of the header value.
     * Note: empty suffix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
     * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return The bytes for suffixMatch. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.ByteString getSuffixMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 10) { ref = headerMatchSpecifier_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 10) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * If specified, header match will be performed based on the suffix of the header value.
     * Note: empty suffix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
     * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @param value The suffixMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setSuffixMatch( java.lang.String value) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifierCase_ = 10; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on the suffix of the header value.
     * Note: empty suffix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
     * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearSuffixMatch() { if (headerMatchSpecifierCase_ == 10) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } return this; } /** *
     * If specified, header match will be performed based on the suffix of the header value.
     * Note: empty suffix is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``.
     * 
* * string suffix_match = 10 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.suffix_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2281 * @param value The bytes for suffixMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setSuffixMatchBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); headerMatchSpecifierCase_ = 10; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on whether the header value contains
     * the given value or not.
     * Note: empty contains match is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
     * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return Whether the containsMatch field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasContainsMatch() { return headerMatchSpecifierCase_ == 12; } /** *
     * If specified, header match will be performed based on whether the header value contains
     * the given value or not.
     * Note: empty contains match is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
     * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return The containsMatch. */ @java.lang.Override @java.lang.Deprecated public java.lang.String getContainsMatch() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 12) { ref = headerMatchSpecifier_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (headerMatchSpecifierCase_ == 12) { headerMatchSpecifier_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * If specified, header match will be performed based on whether the header value contains
     * the given value or not.
     * Note: empty contains match is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
     * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return The bytes for containsMatch. */ @java.lang.Override @java.lang.Deprecated public com.google.protobuf.ByteString getContainsMatchBytes() { java.lang.Object ref = ""; if (headerMatchSpecifierCase_ == 12) { ref = headerMatchSpecifier_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (headerMatchSpecifierCase_ == 12) { headerMatchSpecifier_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * If specified, header match will be performed based on whether the header value contains
     * the given value or not.
     * Note: empty contains match is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
     * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @param value The containsMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setContainsMatch( java.lang.String value) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifierCase_ = 12; headerMatchSpecifier_ = value; onChanged(); return this; } /** *
     * If specified, header match will be performed based on whether the header value contains
     * the given value or not.
     * Note: empty contains match is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
     * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearContainsMatch() { if (headerMatchSpecifierCase_ == 12) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } return this; } /** *
     * If specified, header match will be performed based on whether the header value contains
     * the given value or not.
     * Note: empty contains match is not allowed, please use present_match instead.
     * This field is deprecated. Please use :ref:`string_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.string_match>`.
     * Examples:
     * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``.
     * 
* * string contains_match = 12 [deprecated = true, (.validate.rules) = { ... } * @deprecated envoy.config.route.v3.HeaderMatcher.contains_match is deprecated. * See envoy/config/route/v3/route_components.proto;l=2295 * @param value The bytes for containsMatch to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setContainsMatchBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); headerMatchSpecifierCase_ = 12; headerMatchSpecifier_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.matcher.v3.StringMatcher, io.envoyproxy.envoy.type.matcher.v3.StringMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder> stringMatchBuilder_; /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; * @return Whether the stringMatch field is set. */ @java.lang.Override public boolean hasStringMatch() { return headerMatchSpecifierCase_ == 13; } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; * @return The stringMatch. */ @java.lang.Override public io.envoyproxy.envoy.type.matcher.v3.StringMatcher getStringMatch() { if (stringMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 13) { return (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance(); } else { if (headerMatchSpecifierCase_ == 13) { return stringMatchBuilder_.getMessage(); } return io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance(); } } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ public Builder setStringMatch(io.envoyproxy.envoy.type.matcher.v3.StringMatcher value) { if (stringMatchBuilder_ == null) { if (value == null) { throw new NullPointerException(); } headerMatchSpecifier_ = value; onChanged(); } else { stringMatchBuilder_.setMessage(value); } headerMatchSpecifierCase_ = 13; return this; } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ public Builder setStringMatch( io.envoyproxy.envoy.type.matcher.v3.StringMatcher.Builder builderForValue) { if (stringMatchBuilder_ == null) { headerMatchSpecifier_ = builderForValue.build(); onChanged(); } else { stringMatchBuilder_.setMessage(builderForValue.build()); } headerMatchSpecifierCase_ = 13; return this; } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ public Builder mergeStringMatch(io.envoyproxy.envoy.type.matcher.v3.StringMatcher value) { if (stringMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 13 && headerMatchSpecifier_ != io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance()) { headerMatchSpecifier_ = io.envoyproxy.envoy.type.matcher.v3.StringMatcher.newBuilder((io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_) .mergeFrom(value).buildPartial(); } else { headerMatchSpecifier_ = value; } onChanged(); } else { if (headerMatchSpecifierCase_ == 13) { stringMatchBuilder_.mergeFrom(value); } else { stringMatchBuilder_.setMessage(value); } } headerMatchSpecifierCase_ = 13; return this; } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ public Builder clearStringMatch() { if (stringMatchBuilder_ == null) { if (headerMatchSpecifierCase_ == 13) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; onChanged(); } } else { if (headerMatchSpecifierCase_ == 13) { headerMatchSpecifierCase_ = 0; headerMatchSpecifier_ = null; } stringMatchBuilder_.clear(); } return this; } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ public io.envoyproxy.envoy.type.matcher.v3.StringMatcher.Builder getStringMatchBuilder() { return getStringMatchFieldBuilder().getBuilder(); } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ @java.lang.Override public io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder getStringMatchOrBuilder() { if ((headerMatchSpecifierCase_ == 13) && (stringMatchBuilder_ != null)) { return stringMatchBuilder_.getMessageOrBuilder(); } else { if (headerMatchSpecifierCase_ == 13) { return (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_; } return io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance(); } } /** *
     * If specified, header match will be performed based on the string match of the header value.
     * 
* * .envoy.type.matcher.v3.StringMatcher string_match = 13; */ private com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.matcher.v3.StringMatcher, io.envoyproxy.envoy.type.matcher.v3.StringMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder> getStringMatchFieldBuilder() { if (stringMatchBuilder_ == null) { if (!(headerMatchSpecifierCase_ == 13)) { headerMatchSpecifier_ = io.envoyproxy.envoy.type.matcher.v3.StringMatcher.getDefaultInstance(); } stringMatchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.envoyproxy.envoy.type.matcher.v3.StringMatcher, io.envoyproxy.envoy.type.matcher.v3.StringMatcher.Builder, io.envoyproxy.envoy.type.matcher.v3.StringMatcherOrBuilder>( (io.envoyproxy.envoy.type.matcher.v3.StringMatcher) headerMatchSpecifier_, getParentForChildren(), isClean()); headerMatchSpecifier_ = null; } headerMatchSpecifierCase_ = 13; onChanged();; return stringMatchBuilder_; } private boolean invertMatch_ ; /** *
     * If specified, the match result will be inverted before checking. Defaults to false.
     * Examples:
     * * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted.
     * * The range [-10,0) will match the value -1, so it will not match when inverted.
     * 
* * bool invert_match = 8; * @return The invertMatch. */ @java.lang.Override public boolean getInvertMatch() { return invertMatch_; } /** *
     * If specified, the match result will be inverted before checking. Defaults to false.
     * Examples:
     * * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted.
     * * The range [-10,0) will match the value -1, so it will not match when inverted.
     * 
* * bool invert_match = 8; * @param value The invertMatch to set. * @return This builder for chaining. */ public Builder setInvertMatch(boolean value) { invertMatch_ = value; onChanged(); return this; } /** *
     * If specified, the match result will be inverted before checking. Defaults to false.
     * Examples:
     * * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted.
     * * The range [-10,0) will match the value -1, so it will not match when inverted.
     * 
* * bool invert_match = 8; * @return This builder for chaining. */ public Builder clearInvertMatch() { invertMatch_ = false; onChanged(); return this; } private boolean treatMissingHeaderAsEmpty_ ; /** *
     * If specified, for any header match rule, if the header match rule specified header
     * does not exist, this header value will be treated as empty. Defaults to false.
     * Examples:
     * * The header match rule specified header "header1" to range match of [0, 10],
     *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
     *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to true; The "header1" header is not present. The match rule will
     *   treat the "header1" as an empty header. The empty header does not match the range,
     *   so it will match when inverted.
     * * The header match rule specified header "header2" to range match of [0, 10],
     *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
     *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to false; The "header2" header is not present and the header
     *   matcher rule for "header2" will be ignored so it will not match.
     * * The header match rule specified header "header3" to a string regex match
     *   ``^$`` which means an empty string, and
     *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to true; The "header3" header is not present.
     *   The match rule will treat the "header3" header as an empty header so it will match.
     * * The header match rule specified header "header4" to a string regex match
     *   ``^$`` which means an empty string, and
     *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to false; The "header4" header is not present.
     *   The match rule for "header4" will be ignored so it will not match.
     * 
* * bool treat_missing_header_as_empty = 14; * @return The treatMissingHeaderAsEmpty. */ @java.lang.Override public boolean getTreatMissingHeaderAsEmpty() { return treatMissingHeaderAsEmpty_; } /** *
     * If specified, for any header match rule, if the header match rule specified header
     * does not exist, this header value will be treated as empty. Defaults to false.
     * Examples:
     * * The header match rule specified header "header1" to range match of [0, 10],
     *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
     *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to true; The "header1" header is not present. The match rule will
     *   treat the "header1" as an empty header. The empty header does not match the range,
     *   so it will match when inverted.
     * * The header match rule specified header "header2" to range match of [0, 10],
     *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
     *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to false; The "header2" header is not present and the header
     *   matcher rule for "header2" will be ignored so it will not match.
     * * The header match rule specified header "header3" to a string regex match
     *   ``^$`` which means an empty string, and
     *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to true; The "header3" header is not present.
     *   The match rule will treat the "header3" header as an empty header so it will match.
     * * The header match rule specified header "header4" to a string regex match
     *   ``^$`` which means an empty string, and
     *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to false; The "header4" header is not present.
     *   The match rule for "header4" will be ignored so it will not match.
     * 
* * bool treat_missing_header_as_empty = 14; * @param value The treatMissingHeaderAsEmpty to set. * @return This builder for chaining. */ public Builder setTreatMissingHeaderAsEmpty(boolean value) { treatMissingHeaderAsEmpty_ = value; onChanged(); return this; } /** *
     * If specified, for any header match rule, if the header match rule specified header
     * does not exist, this header value will be treated as empty. Defaults to false.
     * Examples:
     * * The header match rule specified header "header1" to range match of [0, 10],
     *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
     *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to true; The "header1" header is not present. The match rule will
     *   treat the "header1" as an empty header. The empty header does not match the range,
     *   so it will match when inverted.
     * * The header match rule specified header "header2" to range match of [0, 10],
     *   :ref:`invert_match <envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`
     *   is set to true and :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to false; The "header2" header is not present and the header
     *   matcher rule for "header2" will be ignored so it will not match.
     * * The header match rule specified header "header3" to a string regex match
     *   ``^$`` which means an empty string, and
     *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to true; The "header3" header is not present.
     *   The match rule will treat the "header3" header as an empty header so it will match.
     * * The header match rule specified header "header4" to a string regex match
     *   ``^$`` which means an empty string, and
     *   :ref:`treat_missing_header_as_empty <envoy_v3_api_field_config.route.v3.HeaderMatcher.treat_missing_header_as_empty>`
     *   is set to false; The "header4" header is not present.
     *   The match rule for "header4" will be ignored so it will not match.
     * 
* * bool treat_missing_header_as_empty = 14; * @return This builder for chaining. */ public Builder clearTreatMissingHeaderAsEmpty() { treatMissingHeaderAsEmpty_ = false; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:envoy.config.route.v3.HeaderMatcher) } // @@protoc_insertion_point(class_scope:envoy.config.route.v3.HeaderMatcher) private static final io.envoyproxy.envoy.config.route.v3.HeaderMatcher DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.HeaderMatcher(); } public static io.envoyproxy.envoy.config.route.v3.HeaderMatcher getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public HeaderMatcher parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new HeaderMatcher(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.config.route.v3.HeaderMatcher getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy