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;
}
}