
io.envoyproxy.envoy.api.v2.route.Route Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/api/v2/route/route.proto
package io.envoyproxy.envoy.api.v2.route;
/**
*
* A route is both a specification of how to match a request as well as an indication of what to do
* next (e.g., redirect, forward, rewrite, etc.).
* .. attention::
* Envoy supports routing on HTTP method via :ref:`header matching
* <envoy_api_msg_route.HeaderMatcher>`.
* [#comment:next free field: 14]
*
*
* Protobuf type {@code envoy.api.v2.route.Route}
*/
public final class Route extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.route.Route)
RouteOrBuilder {
private static final long serialVersionUID = 0L;
// Use Route.newBuilder() to construct.
private Route(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Route() {
requestHeadersToAdd_ = java.util.Collections.emptyList();
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
responseHeadersToAdd_ = java.util.Collections.emptyList();
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Route(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
io.envoyproxy.envoy.api.v2.route.RouteMatch.Builder subBuilder = null;
if (match_ != null) {
subBuilder = match_.toBuilder();
}
match_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteMatch.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(match_);
match_ = subBuilder.buildPartial();
}
break;
}
case 18: {
io.envoyproxy.envoy.api.v2.route.RouteAction.Builder subBuilder = null;
if (actionCase_ == 2) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RouteAction) action_).toBuilder();
}
action_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RouteAction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.RouteAction) action_);
action_ = subBuilder.buildPartial();
}
actionCase_ = 2;
break;
}
case 26: {
io.envoyproxy.envoy.api.v2.route.RedirectAction.Builder subBuilder = null;
if (actionCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.RedirectAction) action_).toBuilder();
}
action_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.RedirectAction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.RedirectAction) action_);
action_ = subBuilder.buildPartial();
}
actionCase_ = 3;
break;
}
case 34: {
io.envoyproxy.envoy.api.v2.core.Metadata.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.Metadata.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
break;
}
case 42: {
io.envoyproxy.envoy.api.v2.route.Decorator.Builder subBuilder = null;
if (decorator_ != null) {
subBuilder = decorator_.toBuilder();
}
decorator_ = input.readMessage(io.envoyproxy.envoy.api.v2.route.Decorator.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(decorator_);
decorator_ = subBuilder.buildPartial();
}
break;
}
case 58: {
io.envoyproxy.envoy.api.v2.route.DirectResponseAction.Builder subBuilder = null;
if (actionCase_ == 7) {
subBuilder = ((io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_).toBuilder();
}
action_ =
input.readMessage(io.envoyproxy.envoy.api.v2.route.DirectResponseAction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_);
action_ = subBuilder.buildPartial();
}
actionCase_ = 7;
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
perFilterConfig_ = com.google.protobuf.MapField.newMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000040;
}
com.google.protobuf.MapEntry
perFilterConfig__ = input.readMessage(
PerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
perFilterConfig_.getMutableMap().put(
perFilterConfig__.getKey(), perFilterConfig__.getValue());
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
requestHeadersToAdd_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
requestHeadersToAdd_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValueOption.parser(), extensionRegistry));
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
responseHeadersToAdd_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
responseHeadersToAdd_.add(
input.readMessage(io.envoyproxy.envoy.api.v2.core.HeaderValueOption.parser(), extensionRegistry));
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000800;
}
responseHeadersToRemove_.add(s);
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000200;
}
requestHeadersToRemove_.add(s);
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
typedPerFilterConfig_ = com.google.protobuf.MapField.newMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000080;
}
com.google.protobuf.MapEntry
typedPerFilterConfig__ = input.readMessage(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
typedPerFilterConfig_.getMutableMap().put(
typedPerFilterConfig__.getKey(), typedPerFilterConfig__.getValue());
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_);
}
if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_);
}
if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
requestHeadersToRemove_ = requestHeadersToRemove_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 8:
return internalGetPerFilterConfig();
case 13:
return internalGetTypedPerFilterConfig();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.Route.class, io.envoyproxy.envoy.api.v2.route.Route.Builder.class);
}
private int bitField0_;
private int actionCase_ = 0;
private java.lang.Object action_;
public enum ActionCase
implements com.google.protobuf.Internal.EnumLite {
ROUTE(2),
REDIRECT(3),
DIRECT_RESPONSE(7),
ACTION_NOT_SET(0);
private final int value;
private ActionCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ActionCase valueOf(int value) {
return forNumber(value);
}
public static ActionCase forNumber(int value) {
switch (value) {
case 2: return ROUTE;
case 3: return REDIRECT;
case 7: return DIRECT_RESPONSE;
case 0: return ACTION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ActionCase
getActionCase() {
return ActionCase.forNumber(
actionCase_);
}
public static final int MATCH_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.api.v2.route.RouteMatch match_;
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public boolean hasMatch() {
return match_ != null;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.RouteMatch getMatch() {
return match_ == null ? io.envoyproxy.envoy.api.v2.route.RouteMatch.getDefaultInstance() : match_;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.RouteMatchOrBuilder getMatchOrBuilder() {
return getMatch();
}
public static final int ROUTE_FIELD_NUMBER = 2;
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public boolean hasRoute() {
return actionCase_ == 2;
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction getRoute() {
if (actionCase_ == 2) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance();
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public io.envoyproxy.envoy.api.v2.route.RouteActionOrBuilder getRouteOrBuilder() {
if (actionCase_ == 2) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance();
}
public static final int REDIRECT_FIELD_NUMBER = 3;
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public boolean hasRedirect() {
return actionCase_ == 3;
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public io.envoyproxy.envoy.api.v2.route.RedirectAction getRedirect() {
if (actionCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.RedirectAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance();
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public io.envoyproxy.envoy.api.v2.route.RedirectActionOrBuilder getRedirectOrBuilder() {
if (actionCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.RedirectAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance();
}
public static final int DIRECT_RESPONSE_FIELD_NUMBER = 7;
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public boolean hasDirectResponse() {
return actionCase_ == 7;
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public io.envoyproxy.envoy.api.v2.route.DirectResponseAction getDirectResponse() {
if (actionCase_ == 7) {
return (io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance();
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public io.envoyproxy.envoy.api.v2.route.DirectResponseActionOrBuilder getDirectResponseOrBuilder() {
if (actionCase_ == 7) {
return (io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance();
}
public static final int METADATA_FIELD_NUMBER = 4;
private io.envoyproxy.envoy.api.v2.core.Metadata metadata_;
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public boolean hasMetadata() {
return metadata_ != null;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public io.envoyproxy.envoy.api.v2.core.Metadata getMetadata() {
return metadata_ == null ? io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadata_;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
public static final int DECORATOR_FIELD_NUMBER = 5;
private io.envoyproxy.envoy.api.v2.route.Decorator decorator_;
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public boolean hasDecorator() {
return decorator_ != null;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public io.envoyproxy.envoy.api.v2.route.Decorator getDecorator() {
return decorator_ == null ? io.envoyproxy.envoy.api.v2.route.Decorator.getDefaultInstance() : decorator_;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public io.envoyproxy.envoy.api.v2.route.DecoratorOrBuilder getDecoratorOrBuilder() {
return getDecorator();
}
public static final int PER_FILTER_CONFIG_FIELD_NUMBER = 8;
private static final class PerFilterConfigDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Struct> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_PerFilterConfigEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Struct.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Struct> perFilterConfig_;
private com.google.protobuf.MapField
internalGetPerFilterConfig() {
if (perFilterConfig_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
}
return perFilterConfig_;
}
@java.lang.Deprecated
public int getPerFilterConfigCount() {
return internalGetPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public boolean containsPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetPerFilterConfig().getMap().containsKey(key);
}
/**
* Use {@link #getPerFilterConfigMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getPerFilterConfig() {
return getPerFilterConfigMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public java.util.Map getPerFilterConfigMap() {
return internalGetPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrDefault(
java.lang.String key,
com.google.protobuf.Struct defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TYPED_PER_FILTER_CONFIG_FIELD_NUMBER = 13;
private static final class TypedPerFilterConfigDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Any> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_TypedPerFilterConfigEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Any.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Any> typedPerFilterConfig_;
private com.google.protobuf.MapField
internalGetTypedPerFilterConfig() {
if (typedPerFilterConfig_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
}
return typedPerFilterConfig_;
}
public int getTypedPerFilterConfigCount() {
return internalGetTypedPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public boolean containsTypedPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTypedPerFilterConfig().getMap().containsKey(key);
}
/**
* Use {@link #getTypedPerFilterConfigMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTypedPerFilterConfig() {
return getTypedPerFilterConfigMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public java.util.Map getTypedPerFilterConfigMap() {
return internalGetTypedPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public com.google.protobuf.Any getTypedPerFilterConfigOrDefault(
java.lang.String key,
com.google.protobuf.Any defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTypedPerFilterConfig().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public com.google.protobuf.Any getTypedPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTypedPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int REQUEST_HEADERS_TO_ADD_FIELD_NUMBER = 9;
private java.util.List requestHeadersToAdd_;
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public java.util.List getRequestHeadersToAddList() {
return requestHeadersToAdd_;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddOrBuilderList() {
return requestHeadersToAdd_;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public int getRequestHeadersToAddCount() {
return requestHeadersToAdd_.size();
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption getRequestHeadersToAdd(int index) {
return requestHeadersToAdd_.get(index);
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getRequestHeadersToAddOrBuilder(
int index) {
return requestHeadersToAdd_.get(index);
}
public static final int REQUEST_HEADERS_TO_REMOVE_FIELD_NUMBER = 12;
private com.google.protobuf.LazyStringList requestHeadersToRemove_;
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public com.google.protobuf.ProtocolStringList
getRequestHeadersToRemoveList() {
return requestHeadersToRemove_;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public int getRequestHeadersToRemoveCount() {
return requestHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public java.lang.String getRequestHeadersToRemove(int index) {
return requestHeadersToRemove_.get(index);
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public com.google.protobuf.ByteString
getRequestHeadersToRemoveBytes(int index) {
return requestHeadersToRemove_.getByteString(index);
}
public static final int RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER = 10;
private java.util.List responseHeadersToAdd_;
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public java.util.List getResponseHeadersToAddList() {
return responseHeadersToAdd_;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddOrBuilderList() {
return responseHeadersToAdd_;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public int getResponseHeadersToAddCount() {
return responseHeadersToAdd_.size();
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption getResponseHeadersToAdd(int index) {
return responseHeadersToAdd_.get(index);
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(
int index) {
return responseHeadersToAdd_.get(index);
}
public static final int RESPONSE_HEADERS_TO_REMOVE_FIELD_NUMBER = 11;
private com.google.protobuf.LazyStringList responseHeadersToRemove_;
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public com.google.protobuf.ProtocolStringList
getResponseHeadersToRemoveList() {
return responseHeadersToRemove_;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public int getResponseHeadersToRemoveCount() {
return responseHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public java.lang.String getResponseHeadersToRemove(int index) {
return responseHeadersToRemove_.get(index);
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public com.google.protobuf.ByteString
getResponseHeadersToRemoveBytes(int index) {
return responseHeadersToRemove_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (match_ != null) {
output.writeMessage(1, getMatch());
}
if (actionCase_ == 2) {
output.writeMessage(2, (io.envoyproxy.envoy.api.v2.route.RouteAction) action_);
}
if (actionCase_ == 3) {
output.writeMessage(3, (io.envoyproxy.envoy.api.v2.route.RedirectAction) action_);
}
if (metadata_ != null) {
output.writeMessage(4, getMetadata());
}
if (decorator_ != null) {
output.writeMessage(5, getDecorator());
}
if (actionCase_ == 7) {
output.writeMessage(7, (io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetPerFilterConfig(),
PerFilterConfigDefaultEntryHolder.defaultEntry,
8);
for (int i = 0; i < requestHeadersToAdd_.size(); i++) {
output.writeMessage(9, requestHeadersToAdd_.get(i));
}
for (int i = 0; i < responseHeadersToAdd_.size(); i++) {
output.writeMessage(10, responseHeadersToAdd_.get(i));
}
for (int i = 0; i < responseHeadersToRemove_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, responseHeadersToRemove_.getRaw(i));
}
for (int i = 0; i < requestHeadersToRemove_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, requestHeadersToRemove_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetTypedPerFilterConfig(),
TypedPerFilterConfigDefaultEntryHolder.defaultEntry,
13);
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (match_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getMatch());
}
if (actionCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.envoyproxy.envoy.api.v2.route.RouteAction) action_);
}
if (actionCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.envoyproxy.envoy.api.v2.route.RedirectAction) action_);
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMetadata());
}
if (decorator_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getDecorator());
}
if (actionCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_);
}
for (java.util.Map.Entry entry
: internalGetPerFilterConfig().getMap().entrySet()) {
com.google.protobuf.MapEntry
perFilterConfig__ = PerFilterConfigDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, perFilterConfig__);
}
for (int i = 0; i < requestHeadersToAdd_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, requestHeadersToAdd_.get(i));
}
for (int i = 0; i < responseHeadersToAdd_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, responseHeadersToAdd_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < responseHeadersToRemove_.size(); i++) {
dataSize += computeStringSizeNoTag(responseHeadersToRemove_.getRaw(i));
}
size += dataSize;
size += 1 * getResponseHeadersToRemoveList().size();
}
{
int dataSize = 0;
for (int i = 0; i < requestHeadersToRemove_.size(); i++) {
dataSize += computeStringSizeNoTag(requestHeadersToRemove_.getRaw(i));
}
size += dataSize;
size += 1 * getRequestHeadersToRemoveList().size();
}
for (java.util.Map.Entry entry
: internalGetTypedPerFilterConfig().getMap().entrySet()) {
com.google.protobuf.MapEntry
typedPerFilterConfig__ = TypedPerFilterConfigDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, typedPerFilterConfig__);
}
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.api.v2.route.Route)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.route.Route other = (io.envoyproxy.envoy.api.v2.route.Route) obj;
boolean result = true;
result = result && (hasMatch() == other.hasMatch());
if (hasMatch()) {
result = result && getMatch()
.equals(other.getMatch());
}
result = result && (hasMetadata() == other.hasMetadata());
if (hasMetadata()) {
result = result && getMetadata()
.equals(other.getMetadata());
}
result = result && (hasDecorator() == other.hasDecorator());
if (hasDecorator()) {
result = result && getDecorator()
.equals(other.getDecorator());
}
result = result && internalGetPerFilterConfig().equals(
other.internalGetPerFilterConfig());
result = result && internalGetTypedPerFilterConfig().equals(
other.internalGetTypedPerFilterConfig());
result = result && getRequestHeadersToAddList()
.equals(other.getRequestHeadersToAddList());
result = result && getRequestHeadersToRemoveList()
.equals(other.getRequestHeadersToRemoveList());
result = result && getResponseHeadersToAddList()
.equals(other.getResponseHeadersToAddList());
result = result && getResponseHeadersToRemoveList()
.equals(other.getResponseHeadersToRemoveList());
result = result && getActionCase().equals(
other.getActionCase());
if (!result) return false;
switch (actionCase_) {
case 2:
result = result && getRoute()
.equals(other.getRoute());
break;
case 3:
result = result && getRedirect()
.equals(other.getRedirect());
break;
case 7:
result = result && getDirectResponse()
.equals(other.getDirectResponse());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMatch()) {
hash = (37 * hash) + MATCH_FIELD_NUMBER;
hash = (53 * hash) + getMatch().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
if (hasDecorator()) {
hash = (37 * hash) + DECORATOR_FIELD_NUMBER;
hash = (53 * hash) + getDecorator().hashCode();
}
if (!internalGetPerFilterConfig().getMap().isEmpty()) {
hash = (37 * hash) + PER_FILTER_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + internalGetPerFilterConfig().hashCode();
}
if (!internalGetTypedPerFilterConfig().getMap().isEmpty()) {
hash = (37 * hash) + TYPED_PER_FILTER_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + internalGetTypedPerFilterConfig().hashCode();
}
if (getRequestHeadersToAddCount() > 0) {
hash = (37 * hash) + REQUEST_HEADERS_TO_ADD_FIELD_NUMBER;
hash = (53 * hash) + getRequestHeadersToAddList().hashCode();
}
if (getRequestHeadersToRemoveCount() > 0) {
hash = (37 * hash) + REQUEST_HEADERS_TO_REMOVE_FIELD_NUMBER;
hash = (53 * hash) + getRequestHeadersToRemoveList().hashCode();
}
if (getResponseHeadersToAddCount() > 0) {
hash = (37 * hash) + RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER;
hash = (53 * hash) + getResponseHeadersToAddList().hashCode();
}
if (getResponseHeadersToRemoveCount() > 0) {
hash = (37 * hash) + RESPONSE_HEADERS_TO_REMOVE_FIELD_NUMBER;
hash = (53 * hash) + getResponseHeadersToRemoveList().hashCode();
}
switch (actionCase_) {
case 2:
hash = (37 * hash) + ROUTE_FIELD_NUMBER;
hash = (53 * hash) + getRoute().hashCode();
break;
case 3:
hash = (37 * hash) + REDIRECT_FIELD_NUMBER;
hash = (53 * hash) + getRedirect().hashCode();
break;
case 7:
hash = (37 * hash) + DIRECT_RESPONSE_FIELD_NUMBER;
hash = (53 * hash) + getDirectResponse().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.route.Route parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.Route 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.api.v2.route.Route parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.Route 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.api.v2.route.Route parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.route.Route parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.route.Route parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.Route 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.api.v2.route.Route parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.Route 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.api.v2.route.Route parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.route.Route parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.api.v2.route.Route prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* A route is both a specification of how to match a request as well as an indication of what to do
* next (e.g., redirect, forward, rewrite, etc.).
* .. attention::
* Envoy supports routing on HTTP method via :ref:`header matching
* <envoy_api_msg_route.HeaderMatcher>`.
* [#comment:next free field: 14]
*
*
* Protobuf type {@code envoy.api.v2.route.Route}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.route.Route)
io.envoyproxy.envoy.api.v2.route.RouteOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 8:
return internalGetPerFilterConfig();
case 13:
return internalGetTypedPerFilterConfig();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 8:
return internalGetMutablePerFilterConfig();
case 13:
return internalGetMutableTypedPerFilterConfig();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.route.Route.class, io.envoyproxy.envoy.api.v2.route.Route.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.route.Route.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRequestHeadersToAddFieldBuilder();
getResponseHeadersToAddFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (matchBuilder_ == null) {
match_ = null;
} else {
match_ = null;
matchBuilder_ = null;
}
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
if (decoratorBuilder_ == null) {
decorator_ = null;
} else {
decorator_ = null;
decoratorBuilder_ = null;
}
internalGetMutablePerFilterConfig().clear();
internalGetMutableTypedPerFilterConfig().clear();
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
} else {
requestHeadersToAddBuilder_.clear();
}
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
} else {
responseHeadersToAddBuilder_.clear();
}
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000800);
actionCase_ = 0;
action_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.route.RouteProto.internal_static_envoy_api_v2_route_Route_descriptor;
}
public io.envoyproxy.envoy.api.v2.route.Route getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.route.Route.getDefaultInstance();
}
public io.envoyproxy.envoy.api.v2.route.Route build() {
io.envoyproxy.envoy.api.v2.route.Route result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public io.envoyproxy.envoy.api.v2.route.Route buildPartial() {
io.envoyproxy.envoy.api.v2.route.Route result = new io.envoyproxy.envoy.api.v2.route.Route(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (matchBuilder_ == null) {
result.match_ = match_;
} else {
result.match_ = matchBuilder_.build();
}
if (actionCase_ == 2) {
if (routeBuilder_ == null) {
result.action_ = action_;
} else {
result.action_ = routeBuilder_.build();
}
}
if (actionCase_ == 3) {
if (redirectBuilder_ == null) {
result.action_ = action_;
} else {
result.action_ = redirectBuilder_.build();
}
}
if (actionCase_ == 7) {
if (directResponseBuilder_ == null) {
result.action_ = action_;
} else {
result.action_ = directResponseBuilder_.build();
}
}
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
if (decoratorBuilder_ == null) {
result.decorator_ = decorator_;
} else {
result.decorator_ = decoratorBuilder_.build();
}
result.perFilterConfig_ = internalGetPerFilterConfig();
result.perFilterConfig_.makeImmutable();
result.typedPerFilterConfig_ = internalGetTypedPerFilterConfig();
result.typedPerFilterConfig_.makeImmutable();
if (requestHeadersToAddBuilder_ == null) {
if (((bitField0_ & 0x00000100) == 0x00000100)) {
requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.requestHeadersToAdd_ = requestHeadersToAdd_;
} else {
result.requestHeadersToAdd_ = requestHeadersToAddBuilder_.build();
}
if (((bitField0_ & 0x00000200) == 0x00000200)) {
requestHeadersToRemove_ = requestHeadersToRemove_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000200);
}
result.requestHeadersToRemove_ = requestHeadersToRemove_;
if (responseHeadersToAddBuilder_ == null) {
if (((bitField0_ & 0x00000400) == 0x00000400)) {
responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.responseHeadersToAdd_ = responseHeadersToAdd_;
} else {
result.responseHeadersToAdd_ = responseHeadersToAddBuilder_.build();
}
if (((bitField0_ & 0x00000800) == 0x00000800)) {
responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000800);
}
result.responseHeadersToRemove_ = responseHeadersToRemove_;
result.bitField0_ = to_bitField0_;
result.actionCase_ = actionCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.api.v2.route.Route) {
return mergeFrom((io.envoyproxy.envoy.api.v2.route.Route)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.route.Route other) {
if (other == io.envoyproxy.envoy.api.v2.route.Route.getDefaultInstance()) return this;
if (other.hasMatch()) {
mergeMatch(other.getMatch());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (other.hasDecorator()) {
mergeDecorator(other.getDecorator());
}
internalGetMutablePerFilterConfig().mergeFrom(
other.internalGetPerFilterConfig());
internalGetMutableTypedPerFilterConfig().mergeFrom(
other.internalGetTypedPerFilterConfig());
if (requestHeadersToAddBuilder_ == null) {
if (!other.requestHeadersToAdd_.isEmpty()) {
if (requestHeadersToAdd_.isEmpty()) {
requestHeadersToAdd_ = other.requestHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.addAll(other.requestHeadersToAdd_);
}
onChanged();
}
} else {
if (!other.requestHeadersToAdd_.isEmpty()) {
if (requestHeadersToAddBuilder_.isEmpty()) {
requestHeadersToAddBuilder_.dispose();
requestHeadersToAddBuilder_ = null;
requestHeadersToAdd_ = other.requestHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000100);
requestHeadersToAddBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRequestHeadersToAddFieldBuilder() : null;
} else {
requestHeadersToAddBuilder_.addAllMessages(other.requestHeadersToAdd_);
}
}
}
if (!other.requestHeadersToRemove_.isEmpty()) {
if (requestHeadersToRemove_.isEmpty()) {
requestHeadersToRemove_ = other.requestHeadersToRemove_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureRequestHeadersToRemoveIsMutable();
requestHeadersToRemove_.addAll(other.requestHeadersToRemove_);
}
onChanged();
}
if (responseHeadersToAddBuilder_ == null) {
if (!other.responseHeadersToAdd_.isEmpty()) {
if (responseHeadersToAdd_.isEmpty()) {
responseHeadersToAdd_ = other.responseHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.addAll(other.responseHeadersToAdd_);
}
onChanged();
}
} else {
if (!other.responseHeadersToAdd_.isEmpty()) {
if (responseHeadersToAddBuilder_.isEmpty()) {
responseHeadersToAddBuilder_.dispose();
responseHeadersToAddBuilder_ = null;
responseHeadersToAdd_ = other.responseHeadersToAdd_;
bitField0_ = (bitField0_ & ~0x00000400);
responseHeadersToAddBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getResponseHeadersToAddFieldBuilder() : null;
} else {
responseHeadersToAddBuilder_.addAllMessages(other.responseHeadersToAdd_);
}
}
}
if (!other.responseHeadersToRemove_.isEmpty()) {
if (responseHeadersToRemove_.isEmpty()) {
responseHeadersToRemove_ = other.responseHeadersToRemove_;
bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensureResponseHeadersToRemoveIsMutable();
responseHeadersToRemove_.addAll(other.responseHeadersToRemove_);
}
onChanged();
}
switch (other.getActionCase()) {
case ROUTE: {
mergeRoute(other.getRoute());
break;
}
case REDIRECT: {
mergeRedirect(other.getRedirect());
break;
}
case DIRECT_RESPONSE: {
mergeDirectResponse(other.getDirectResponse());
break;
}
case ACTION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.api.v2.route.Route parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.route.Route) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int actionCase_ = 0;
private java.lang.Object action_;
public ActionCase
getActionCase() {
return ActionCase.forNumber(
actionCase_);
}
public Builder clearAction() {
actionCase_ = 0;
action_ = null;
onChanged();
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.api.v2.route.RouteMatch match_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteMatch, io.envoyproxy.envoy.api.v2.route.RouteMatch.Builder, io.envoyproxy.envoy.api.v2.route.RouteMatchOrBuilder> matchBuilder_;
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public boolean hasMatch() {
return matchBuilder_ != null || match_ != null;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.RouteMatch getMatch() {
if (matchBuilder_ == null) {
return match_ == null ? io.envoyproxy.envoy.api.v2.route.RouteMatch.getDefaultInstance() : match_;
} else {
return matchBuilder_.getMessage();
}
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public Builder setMatch(io.envoyproxy.envoy.api.v2.route.RouteMatch value) {
if (matchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
match_ = value;
onChanged();
} else {
matchBuilder_.setMessage(value);
}
return this;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public Builder setMatch(
io.envoyproxy.envoy.api.v2.route.RouteMatch.Builder builderForValue) {
if (matchBuilder_ == null) {
match_ = builderForValue.build();
onChanged();
} else {
matchBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public Builder mergeMatch(io.envoyproxy.envoy.api.v2.route.RouteMatch value) {
if (matchBuilder_ == null) {
if (match_ != null) {
match_ =
io.envoyproxy.envoy.api.v2.route.RouteMatch.newBuilder(match_).mergeFrom(value).buildPartial();
} else {
match_ = value;
}
onChanged();
} else {
matchBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public Builder clearMatch() {
if (matchBuilder_ == null) {
match_ = null;
onChanged();
} else {
match_ = null;
matchBuilder_ = null;
}
return this;
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.RouteMatch.Builder getMatchBuilder() {
onChanged();
return getMatchFieldBuilder().getBuilder();
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.route.RouteMatchOrBuilder getMatchOrBuilder() {
if (matchBuilder_ != null) {
return matchBuilder_.getMessageOrBuilder();
} else {
return match_ == null ?
io.envoyproxy.envoy.api.v2.route.RouteMatch.getDefaultInstance() : match_;
}
}
/**
*
* Route matching parameters.
*
*
* .envoy.api.v2.route.RouteMatch match = 1 [(.gogoproto.nullable) = false, (.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteMatch, io.envoyproxy.envoy.api.v2.route.RouteMatch.Builder, io.envoyproxy.envoy.api.v2.route.RouteMatchOrBuilder>
getMatchFieldBuilder() {
if (matchBuilder_ == null) {
matchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteMatch, io.envoyproxy.envoy.api.v2.route.RouteMatch.Builder, io.envoyproxy.envoy.api.v2.route.RouteMatchOrBuilder>(
getMatch(),
getParentForChildren(),
isClean());
match_ = null;
}
return matchBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteAction, io.envoyproxy.envoy.api.v2.route.RouteAction.Builder, io.envoyproxy.envoy.api.v2.route.RouteActionOrBuilder> routeBuilder_;
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public boolean hasRoute() {
return actionCase_ == 2;
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction getRoute() {
if (routeBuilder_ == null) {
if (actionCase_ == 2) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance();
} else {
if (actionCase_ == 2) {
return routeBuilder_.getMessage();
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance();
}
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public Builder setRoute(io.envoyproxy.envoy.api.v2.route.RouteAction value) {
if (routeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
action_ = value;
onChanged();
} else {
routeBuilder_.setMessage(value);
}
actionCase_ = 2;
return this;
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public Builder setRoute(
io.envoyproxy.envoy.api.v2.route.RouteAction.Builder builderForValue) {
if (routeBuilder_ == null) {
action_ = builderForValue.build();
onChanged();
} else {
routeBuilder_.setMessage(builderForValue.build());
}
actionCase_ = 2;
return this;
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public Builder mergeRoute(io.envoyproxy.envoy.api.v2.route.RouteAction value) {
if (routeBuilder_ == null) {
if (actionCase_ == 2 &&
action_ != io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance()) {
action_ = io.envoyproxy.envoy.api.v2.route.RouteAction.newBuilder((io.envoyproxy.envoy.api.v2.route.RouteAction) action_)
.mergeFrom(value).buildPartial();
} else {
action_ = value;
}
onChanged();
} else {
if (actionCase_ == 2) {
routeBuilder_.mergeFrom(value);
}
routeBuilder_.setMessage(value);
}
actionCase_ = 2;
return this;
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public Builder clearRoute() {
if (routeBuilder_ == null) {
if (actionCase_ == 2) {
actionCase_ = 0;
action_ = null;
onChanged();
}
} else {
if (actionCase_ == 2) {
actionCase_ = 0;
action_ = null;
}
routeBuilder_.clear();
}
return this;
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public io.envoyproxy.envoy.api.v2.route.RouteAction.Builder getRouteBuilder() {
return getRouteFieldBuilder().getBuilder();
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
public io.envoyproxy.envoy.api.v2.route.RouteActionOrBuilder getRouteOrBuilder() {
if ((actionCase_ == 2) && (routeBuilder_ != null)) {
return routeBuilder_.getMessageOrBuilder();
} else {
if (actionCase_ == 2) {
return (io.envoyproxy.envoy.api.v2.route.RouteAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance();
}
}
/**
*
* Route request to some upstream cluster.
*
*
* .envoy.api.v2.route.RouteAction route = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteAction, io.envoyproxy.envoy.api.v2.route.RouteAction.Builder, io.envoyproxy.envoy.api.v2.route.RouteActionOrBuilder>
getRouteFieldBuilder() {
if (routeBuilder_ == null) {
if (!(actionCase_ == 2)) {
action_ = io.envoyproxy.envoy.api.v2.route.RouteAction.getDefaultInstance();
}
routeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RouteAction, io.envoyproxy.envoy.api.v2.route.RouteAction.Builder, io.envoyproxy.envoy.api.v2.route.RouteActionOrBuilder>(
(io.envoyproxy.envoy.api.v2.route.RouteAction) action_,
getParentForChildren(),
isClean());
action_ = null;
}
actionCase_ = 2;
onChanged();;
return routeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RedirectAction, io.envoyproxy.envoy.api.v2.route.RedirectAction.Builder, io.envoyproxy.envoy.api.v2.route.RedirectActionOrBuilder> redirectBuilder_;
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public boolean hasRedirect() {
return actionCase_ == 3;
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public io.envoyproxy.envoy.api.v2.route.RedirectAction getRedirect() {
if (redirectBuilder_ == null) {
if (actionCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.RedirectAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance();
} else {
if (actionCase_ == 3) {
return redirectBuilder_.getMessage();
}
return io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance();
}
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public Builder setRedirect(io.envoyproxy.envoy.api.v2.route.RedirectAction value) {
if (redirectBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
action_ = value;
onChanged();
} else {
redirectBuilder_.setMessage(value);
}
actionCase_ = 3;
return this;
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public Builder setRedirect(
io.envoyproxy.envoy.api.v2.route.RedirectAction.Builder builderForValue) {
if (redirectBuilder_ == null) {
action_ = builderForValue.build();
onChanged();
} else {
redirectBuilder_.setMessage(builderForValue.build());
}
actionCase_ = 3;
return this;
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public Builder mergeRedirect(io.envoyproxy.envoy.api.v2.route.RedirectAction value) {
if (redirectBuilder_ == null) {
if (actionCase_ == 3 &&
action_ != io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance()) {
action_ = io.envoyproxy.envoy.api.v2.route.RedirectAction.newBuilder((io.envoyproxy.envoy.api.v2.route.RedirectAction) action_)
.mergeFrom(value).buildPartial();
} else {
action_ = value;
}
onChanged();
} else {
if (actionCase_ == 3) {
redirectBuilder_.mergeFrom(value);
}
redirectBuilder_.setMessage(value);
}
actionCase_ = 3;
return this;
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public Builder clearRedirect() {
if (redirectBuilder_ == null) {
if (actionCase_ == 3) {
actionCase_ = 0;
action_ = null;
onChanged();
}
} else {
if (actionCase_ == 3) {
actionCase_ = 0;
action_ = null;
}
redirectBuilder_.clear();
}
return this;
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public io.envoyproxy.envoy.api.v2.route.RedirectAction.Builder getRedirectBuilder() {
return getRedirectFieldBuilder().getBuilder();
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
public io.envoyproxy.envoy.api.v2.route.RedirectActionOrBuilder getRedirectOrBuilder() {
if ((actionCase_ == 3) && (redirectBuilder_ != null)) {
return redirectBuilder_.getMessageOrBuilder();
} else {
if (actionCase_ == 3) {
return (io.envoyproxy.envoy.api.v2.route.RedirectAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance();
}
}
/**
*
* Return a redirect.
*
*
* .envoy.api.v2.route.RedirectAction redirect = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RedirectAction, io.envoyproxy.envoy.api.v2.route.RedirectAction.Builder, io.envoyproxy.envoy.api.v2.route.RedirectActionOrBuilder>
getRedirectFieldBuilder() {
if (redirectBuilder_ == null) {
if (!(actionCase_ == 3)) {
action_ = io.envoyproxy.envoy.api.v2.route.RedirectAction.getDefaultInstance();
}
redirectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.RedirectAction, io.envoyproxy.envoy.api.v2.route.RedirectAction.Builder, io.envoyproxy.envoy.api.v2.route.RedirectActionOrBuilder>(
(io.envoyproxy.envoy.api.v2.route.RedirectAction) action_,
getParentForChildren(),
isClean());
action_ = null;
}
actionCase_ = 3;
onChanged();;
return redirectBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.DirectResponseAction, io.envoyproxy.envoy.api.v2.route.DirectResponseAction.Builder, io.envoyproxy.envoy.api.v2.route.DirectResponseActionOrBuilder> directResponseBuilder_;
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public boolean hasDirectResponse() {
return actionCase_ == 7;
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public io.envoyproxy.envoy.api.v2.route.DirectResponseAction getDirectResponse() {
if (directResponseBuilder_ == null) {
if (actionCase_ == 7) {
return (io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance();
} else {
if (actionCase_ == 7) {
return directResponseBuilder_.getMessage();
}
return io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance();
}
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public Builder setDirectResponse(io.envoyproxy.envoy.api.v2.route.DirectResponseAction value) {
if (directResponseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
action_ = value;
onChanged();
} else {
directResponseBuilder_.setMessage(value);
}
actionCase_ = 7;
return this;
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public Builder setDirectResponse(
io.envoyproxy.envoy.api.v2.route.DirectResponseAction.Builder builderForValue) {
if (directResponseBuilder_ == null) {
action_ = builderForValue.build();
onChanged();
} else {
directResponseBuilder_.setMessage(builderForValue.build());
}
actionCase_ = 7;
return this;
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public Builder mergeDirectResponse(io.envoyproxy.envoy.api.v2.route.DirectResponseAction value) {
if (directResponseBuilder_ == null) {
if (actionCase_ == 7 &&
action_ != io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance()) {
action_ = io.envoyproxy.envoy.api.v2.route.DirectResponseAction.newBuilder((io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_)
.mergeFrom(value).buildPartial();
} else {
action_ = value;
}
onChanged();
} else {
if (actionCase_ == 7) {
directResponseBuilder_.mergeFrom(value);
}
directResponseBuilder_.setMessage(value);
}
actionCase_ = 7;
return this;
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public Builder clearDirectResponse() {
if (directResponseBuilder_ == null) {
if (actionCase_ == 7) {
actionCase_ = 0;
action_ = null;
onChanged();
}
} else {
if (actionCase_ == 7) {
actionCase_ = 0;
action_ = null;
}
directResponseBuilder_.clear();
}
return this;
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public io.envoyproxy.envoy.api.v2.route.DirectResponseAction.Builder getDirectResponseBuilder() {
return getDirectResponseFieldBuilder().getBuilder();
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
public io.envoyproxy.envoy.api.v2.route.DirectResponseActionOrBuilder getDirectResponseOrBuilder() {
if ((actionCase_ == 7) && (directResponseBuilder_ != null)) {
return directResponseBuilder_.getMessageOrBuilder();
} else {
if (actionCase_ == 7) {
return (io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_;
}
return io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance();
}
}
/**
*
* Return an arbitrary HTTP response directly, without proxying.
*
*
* .envoy.api.v2.route.DirectResponseAction direct_response = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.DirectResponseAction, io.envoyproxy.envoy.api.v2.route.DirectResponseAction.Builder, io.envoyproxy.envoy.api.v2.route.DirectResponseActionOrBuilder>
getDirectResponseFieldBuilder() {
if (directResponseBuilder_ == null) {
if (!(actionCase_ == 7)) {
action_ = io.envoyproxy.envoy.api.v2.route.DirectResponseAction.getDefaultInstance();
}
directResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.DirectResponseAction, io.envoyproxy.envoy.api.v2.route.DirectResponseAction.Builder, io.envoyproxy.envoy.api.v2.route.DirectResponseActionOrBuilder>(
(io.envoyproxy.envoy.api.v2.route.DirectResponseAction) action_,
getParentForChildren(),
isClean());
action_ = null;
}
actionCase_ = 7;
onChanged();;
return directResponseBuilder_;
}
private io.envoyproxy.envoy.api.v2.core.Metadata metadata_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder> metadataBuilder_;
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public boolean hasMetadata() {
return metadataBuilder_ != null || metadata_ != null;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public io.envoyproxy.envoy.api.v2.core.Metadata getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public Builder setMetadata(io.envoyproxy.envoy.api.v2.core.Metadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
return this;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public Builder setMetadata(
io.envoyproxy.envoy.api.v2.core.Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public Builder mergeMetadata(io.envoyproxy.envoy.api.v2.core.Metadata value) {
if (metadataBuilder_ == null) {
if (metadata_ != null) {
metadata_ =
io.envoyproxy.envoy.api.v2.core.Metadata.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public io.envoyproxy.envoy.api.v2.core.Metadata.Builder getMetadataBuilder() {
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
public io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ?
io.envoyproxy.envoy.api.v2.core.Metadata.getDefaultInstance() : metadata_;
}
}
/**
*
* The Metadata field can be used to provide additional information
* about the route. It can be used for configuration, stats, and logging.
* The metadata should go under the filter namespace that will need it.
* For instance, if the metadata is intended for the Router filter,
* the filter name should be specified as *envoy.router*.
*
*
* .envoy.api.v2.core.Metadata metadata = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.Metadata, io.envoyproxy.envoy.api.v2.core.Metadata.Builder, io.envoyproxy.envoy.api.v2.core.MetadataOrBuilder>(
getMetadata(),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private io.envoyproxy.envoy.api.v2.route.Decorator decorator_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.Decorator, io.envoyproxy.envoy.api.v2.route.Decorator.Builder, io.envoyproxy.envoy.api.v2.route.DecoratorOrBuilder> decoratorBuilder_;
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public boolean hasDecorator() {
return decoratorBuilder_ != null || decorator_ != null;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public io.envoyproxy.envoy.api.v2.route.Decorator getDecorator() {
if (decoratorBuilder_ == null) {
return decorator_ == null ? io.envoyproxy.envoy.api.v2.route.Decorator.getDefaultInstance() : decorator_;
} else {
return decoratorBuilder_.getMessage();
}
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public Builder setDecorator(io.envoyproxy.envoy.api.v2.route.Decorator value) {
if (decoratorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
decorator_ = value;
onChanged();
} else {
decoratorBuilder_.setMessage(value);
}
return this;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public Builder setDecorator(
io.envoyproxy.envoy.api.v2.route.Decorator.Builder builderForValue) {
if (decoratorBuilder_ == null) {
decorator_ = builderForValue.build();
onChanged();
} else {
decoratorBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public Builder mergeDecorator(io.envoyproxy.envoy.api.v2.route.Decorator value) {
if (decoratorBuilder_ == null) {
if (decorator_ != null) {
decorator_ =
io.envoyproxy.envoy.api.v2.route.Decorator.newBuilder(decorator_).mergeFrom(value).buildPartial();
} else {
decorator_ = value;
}
onChanged();
} else {
decoratorBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public Builder clearDecorator() {
if (decoratorBuilder_ == null) {
decorator_ = null;
onChanged();
} else {
decorator_ = null;
decoratorBuilder_ = null;
}
return this;
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public io.envoyproxy.envoy.api.v2.route.Decorator.Builder getDecoratorBuilder() {
onChanged();
return getDecoratorFieldBuilder().getBuilder();
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
public io.envoyproxy.envoy.api.v2.route.DecoratorOrBuilder getDecoratorOrBuilder() {
if (decoratorBuilder_ != null) {
return decoratorBuilder_.getMessageOrBuilder();
} else {
return decorator_ == null ?
io.envoyproxy.envoy.api.v2.route.Decorator.getDefaultInstance() : decorator_;
}
}
/**
*
* Decorator for the matched route.
*
*
* .envoy.api.v2.route.Decorator decorator = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.Decorator, io.envoyproxy.envoy.api.v2.route.Decorator.Builder, io.envoyproxy.envoy.api.v2.route.DecoratorOrBuilder>
getDecoratorFieldBuilder() {
if (decoratorBuilder_ == null) {
decoratorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.route.Decorator, io.envoyproxy.envoy.api.v2.route.Decorator.Builder, io.envoyproxy.envoy.api.v2.route.DecoratorOrBuilder>(
getDecorator(),
getParentForChildren(),
isClean());
decorator_ = null;
}
return decoratorBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Struct> perFilterConfig_;
private com.google.protobuf.MapField
internalGetPerFilterConfig() {
if (perFilterConfig_ == null) {
return com.google.protobuf.MapField.emptyMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
}
return perFilterConfig_;
}
private com.google.protobuf.MapField
internalGetMutablePerFilterConfig() {
onChanged();;
if (perFilterConfig_ == null) {
perFilterConfig_ = com.google.protobuf.MapField.newMapField(
PerFilterConfigDefaultEntryHolder.defaultEntry);
}
if (!perFilterConfig_.isMutable()) {
perFilterConfig_ = perFilterConfig_.copy();
}
return perFilterConfig_;
}
@java.lang.Deprecated
public int getPerFilterConfigCount() {
return internalGetPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public boolean containsPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetPerFilterConfig().getMap().containsKey(key);
}
/**
* Use {@link #getPerFilterConfigMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getPerFilterConfig() {
return getPerFilterConfigMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public java.util.Map getPerFilterConfigMap() {
return internalGetPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrDefault(
java.lang.String key,
com.google.protobuf.Struct defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public com.google.protobuf.Struct getPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
@java.lang.Deprecated
public Builder clearPerFilterConfig() {
internalGetMutablePerFilterConfig().getMutableMap()
.clear();
return this;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public Builder removePerFilterConfig(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutablePerFilterConfig().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutablePerFilterConfig() {
return internalGetMutablePerFilterConfig().getMutableMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated public Builder putPerFilterConfig(
java.lang.String key,
com.google.protobuf.Struct value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutablePerFilterConfig().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Struct> per_filter_config = 8 [deprecated = true];
*/
@java.lang.Deprecated
public Builder putAllPerFilterConfig(
java.util.Map values) {
internalGetMutablePerFilterConfig().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Any> typedPerFilterConfig_;
private com.google.protobuf.MapField
internalGetTypedPerFilterConfig() {
if (typedPerFilterConfig_ == null) {
return com.google.protobuf.MapField.emptyMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
}
return typedPerFilterConfig_;
}
private com.google.protobuf.MapField
internalGetMutableTypedPerFilterConfig() {
onChanged();;
if (typedPerFilterConfig_ == null) {
typedPerFilterConfig_ = com.google.protobuf.MapField.newMapField(
TypedPerFilterConfigDefaultEntryHolder.defaultEntry);
}
if (!typedPerFilterConfig_.isMutable()) {
typedPerFilterConfig_ = typedPerFilterConfig_.copy();
}
return typedPerFilterConfig_;
}
public int getTypedPerFilterConfigCount() {
return internalGetTypedPerFilterConfig().getMap().size();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public boolean containsTypedPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetTypedPerFilterConfig().getMap().containsKey(key);
}
/**
* Use {@link #getTypedPerFilterConfigMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getTypedPerFilterConfig() {
return getTypedPerFilterConfigMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public java.util.Map getTypedPerFilterConfigMap() {
return internalGetTypedPerFilterConfig().getMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public com.google.protobuf.Any getTypedPerFilterConfigOrDefault(
java.lang.String key,
com.google.protobuf.Any defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTypedPerFilterConfig().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public com.google.protobuf.Any getTypedPerFilterConfigOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetTypedPerFilterConfig().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearTypedPerFilterConfig() {
internalGetMutableTypedPerFilterConfig().getMutableMap()
.clear();
return this;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public Builder removeTypedPerFilterConfig(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableTypedPerFilterConfig().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableTypedPerFilterConfig() {
return internalGetMutableTypedPerFilterConfig().getMutableMap();
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public Builder putTypedPerFilterConfig(
java.lang.String key,
com.google.protobuf.Any value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableTypedPerFilterConfig().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The per_filter_config field can be used to provide route-specific
* configurations for filters. The key should match the filter name, such as
* *envoy.buffer* for the HTTP buffer filter. Use of this field is filter
* specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
* if and how it is utilized.
*
*
* map<string, .google.protobuf.Any> typed_per_filter_config = 13;
*/
public Builder putAllTypedPerFilterConfig(
java.util.Map values) {
internalGetMutableTypedPerFilterConfig().getMutableMap()
.putAll(values);
return this;
}
private java.util.List requestHeadersToAdd_ =
java.util.Collections.emptyList();
private void ensureRequestHeadersToAddIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
requestHeadersToAdd_ = new java.util.ArrayList(requestHeadersToAdd_);
bitField0_ |= 0x00000100;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder> requestHeadersToAddBuilder_;
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public java.util.List getRequestHeadersToAddList() {
if (requestHeadersToAddBuilder_ == null) {
return java.util.Collections.unmodifiableList(requestHeadersToAdd_);
} else {
return requestHeadersToAddBuilder_.getMessageList();
}
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public int getRequestHeadersToAddCount() {
if (requestHeadersToAddBuilder_ == null) {
return requestHeadersToAdd_.size();
} else {
return requestHeadersToAddBuilder_.getCount();
}
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption getRequestHeadersToAdd(int index) {
if (requestHeadersToAddBuilder_ == null) {
return requestHeadersToAdd_.get(index);
} else {
return requestHeadersToAddBuilder_.getMessage(index);
}
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder setRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption value) {
if (requestHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.set(index, value);
onChanged();
} else {
requestHeadersToAddBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder setRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder builderForValue) {
if (requestHeadersToAddBuilder_ == null) {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.set(index, builderForValue.build());
onChanged();
} else {
requestHeadersToAddBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(io.envoyproxy.envoy.api.v2.core.HeaderValueOption value) {
if (requestHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.add(value);
onChanged();
} else {
requestHeadersToAddBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption value) {
if (requestHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.add(index, value);
onChanged();
} else {
requestHeadersToAddBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(
io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder builderForValue) {
if (requestHeadersToAddBuilder_ == null) {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.add(builderForValue.build());
onChanged();
} else {
requestHeadersToAddBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder addRequestHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder builderForValue) {
if (requestHeadersToAddBuilder_ == null) {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.add(index, builderForValue.build());
onChanged();
} else {
requestHeadersToAddBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder addAllRequestHeadersToAdd(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.core.HeaderValueOption> values) {
if (requestHeadersToAddBuilder_ == null) {
ensureRequestHeadersToAddIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requestHeadersToAdd_);
onChanged();
} else {
requestHeadersToAddBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder clearRequestHeadersToAdd() {
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
} else {
requestHeadersToAddBuilder_.clear();
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public Builder removeRequestHeadersToAdd(int index) {
if (requestHeadersToAddBuilder_ == null) {
ensureRequestHeadersToAddIsMutable();
requestHeadersToAdd_.remove(index);
onChanged();
} else {
requestHeadersToAddBuilder_.remove(index);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder getRequestHeadersToAddBuilder(
int index) {
return getRequestHeadersToAddFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getRequestHeadersToAddOrBuilder(
int index) {
if (requestHeadersToAddBuilder_ == null) {
return requestHeadersToAdd_.get(index); } else {
return requestHeadersToAddBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddOrBuilderList() {
if (requestHeadersToAddBuilder_ != null) {
return requestHeadersToAddBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(requestHeadersToAdd_);
}
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addRequestHeadersToAddBuilder() {
return getRequestHeadersToAddFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addRequestHeadersToAddBuilder(
int index) {
return getRequestHeadersToAddFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a set of headers that will be added to requests matching this
* route. Headers specified at this level are applied before headers from the
* enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on
* header value syntax, see the documentation on :ref:`custom request headers
* <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption request_headers_to_add = 9 [(.validate.rules) = { ... }
*/
public java.util.List
getRequestHeadersToAddBuilderList() {
return getRequestHeadersToAddFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getRequestHeadersToAddFieldBuilder() {
if (requestHeadersToAddBuilder_ == null) {
requestHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>(
requestHeadersToAdd_,
((bitField0_ & 0x00000100) == 0x00000100),
getParentForChildren(),
isClean());
requestHeadersToAdd_ = null;
}
return requestHeadersToAddBuilder_;
}
private com.google.protobuf.LazyStringList requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureRequestHeadersToRemoveIsMutable() {
if (!((bitField0_ & 0x00000200) == 0x00000200)) {
requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(requestHeadersToRemove_);
bitField0_ |= 0x00000200;
}
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public com.google.protobuf.ProtocolStringList
getRequestHeadersToRemoveList() {
return requestHeadersToRemove_.getUnmodifiableView();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public int getRequestHeadersToRemoveCount() {
return requestHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public java.lang.String getRequestHeadersToRemove(int index) {
return requestHeadersToRemove_.get(index);
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public com.google.protobuf.ByteString
getRequestHeadersToRemoveBytes(int index) {
return requestHeadersToRemove_.getByteString(index);
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public Builder setRequestHeadersToRemove(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestHeadersToRemoveIsMutable();
requestHeadersToRemove_.set(index, value);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public Builder addRequestHeadersToRemove(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRequestHeadersToRemoveIsMutable();
requestHeadersToRemove_.add(value);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public Builder addAllRequestHeadersToRemove(
java.lang.Iterable values) {
ensureRequestHeadersToRemoveIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requestHeadersToRemove_);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public Builder clearRequestHeadersToRemove() {
requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each request
* matching this route.
*
*
* repeated string request_headers_to_remove = 12;
*/
public Builder addRequestHeadersToRemoveBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureRequestHeadersToRemoveIsMutable();
requestHeadersToRemove_.add(value);
onChanged();
return this;
}
private java.util.List responseHeadersToAdd_ =
java.util.Collections.emptyList();
private void ensureResponseHeadersToAddIsMutable() {
if (!((bitField0_ & 0x00000400) == 0x00000400)) {
responseHeadersToAdd_ = new java.util.ArrayList(responseHeadersToAdd_);
bitField0_ |= 0x00000400;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder> responseHeadersToAddBuilder_;
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public java.util.List getResponseHeadersToAddList() {
if (responseHeadersToAddBuilder_ == null) {
return java.util.Collections.unmodifiableList(responseHeadersToAdd_);
} else {
return responseHeadersToAddBuilder_.getMessageList();
}
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public int getResponseHeadersToAddCount() {
if (responseHeadersToAddBuilder_ == null) {
return responseHeadersToAdd_.size();
} else {
return responseHeadersToAddBuilder_.getCount();
}
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption getResponseHeadersToAdd(int index) {
if (responseHeadersToAddBuilder_ == null) {
return responseHeadersToAdd_.get(index);
} else {
return responseHeadersToAddBuilder_.getMessage(index);
}
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder setResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption value) {
if (responseHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.set(index, value);
onChanged();
} else {
responseHeadersToAddBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder setResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder builderForValue) {
if (responseHeadersToAddBuilder_ == null) {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.set(index, builderForValue.build());
onChanged();
} else {
responseHeadersToAddBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(io.envoyproxy.envoy.api.v2.core.HeaderValueOption value) {
if (responseHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.add(value);
onChanged();
} else {
responseHeadersToAddBuilder_.addMessage(value);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption value) {
if (responseHeadersToAddBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.add(index, value);
onChanged();
} else {
responseHeadersToAddBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(
io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder builderForValue) {
if (responseHeadersToAddBuilder_ == null) {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.add(builderForValue.build());
onChanged();
} else {
responseHeadersToAddBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder addResponseHeadersToAdd(
int index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder builderForValue) {
if (responseHeadersToAddBuilder_ == null) {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.add(index, builderForValue.build());
onChanged();
} else {
responseHeadersToAddBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder addAllResponseHeadersToAdd(
java.lang.Iterable extends io.envoyproxy.envoy.api.v2.core.HeaderValueOption> values) {
if (responseHeadersToAddBuilder_ == null) {
ensureResponseHeadersToAddIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, responseHeadersToAdd_);
onChanged();
} else {
responseHeadersToAddBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder clearResponseHeadersToAdd() {
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAdd_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
} else {
responseHeadersToAddBuilder_.clear();
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public Builder removeResponseHeadersToAdd(int index) {
if (responseHeadersToAddBuilder_ == null) {
ensureResponseHeadersToAddIsMutable();
responseHeadersToAdd_.remove(index);
onChanged();
} else {
responseHeadersToAddBuilder_.remove(index);
}
return this;
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder getResponseHeadersToAddBuilder(
int index) {
return getResponseHeadersToAddFieldBuilder().getBuilder(index);
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(
int index) {
if (responseHeadersToAddBuilder_ == null) {
return responseHeadersToAdd_.get(index); } else {
return responseHeadersToAddBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public java.util.List extends io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddOrBuilderList() {
if (responseHeadersToAddBuilder_ != null) {
return responseHeadersToAddBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(responseHeadersToAdd_);
}
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addResponseHeadersToAddBuilder() {
return getResponseHeadersToAddFieldBuilder().addBuilder(
io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder addResponseHeadersToAddBuilder(
int index) {
return getResponseHeadersToAddFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.getDefaultInstance());
}
/**
*
* Specifies a set of headers that will be added to responses to requests
* matching this route. Headers specified at this level are applied before
* headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
* :ref:`envoy_api_msg_RouteConfiguration`. For more information, including
* details on header value syntax, see the documentation on
* :ref:`custom request headers <config_http_conn_man_headers_custom_request_headers>`.
*
*
* repeated .envoy.api.v2.core.HeaderValueOption response_headers_to_add = 10 [(.validate.rules) = { ... }
*/
public java.util.List
getResponseHeadersToAddBuilderList() {
return getResponseHeadersToAddFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>
getResponseHeadersToAddFieldBuilder() {
if (responseHeadersToAddBuilder_ == null) {
responseHeadersToAddBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.HeaderValueOption, io.envoyproxy.envoy.api.v2.core.HeaderValueOption.Builder, io.envoyproxy.envoy.api.v2.core.HeaderValueOptionOrBuilder>(
responseHeadersToAdd_,
((bitField0_ & 0x00000400) == 0x00000400),
getParentForChildren(),
isClean());
responseHeadersToAdd_ = null;
}
return responseHeadersToAddBuilder_;
}
private com.google.protobuf.LazyStringList responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureResponseHeadersToRemoveIsMutable() {
if (!((bitField0_ & 0x00000800) == 0x00000800)) {
responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(responseHeadersToRemove_);
bitField0_ |= 0x00000800;
}
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public com.google.protobuf.ProtocolStringList
getResponseHeadersToRemoveList() {
return responseHeadersToRemove_.getUnmodifiableView();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public int getResponseHeadersToRemoveCount() {
return responseHeadersToRemove_.size();
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public java.lang.String getResponseHeadersToRemove(int index) {
return responseHeadersToRemove_.get(index);
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public com.google.protobuf.ByteString
getResponseHeadersToRemoveBytes(int index) {
return responseHeadersToRemove_.getByteString(index);
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public Builder setResponseHeadersToRemove(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResponseHeadersToRemoveIsMutable();
responseHeadersToRemove_.set(index, value);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public Builder addResponseHeadersToRemove(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResponseHeadersToRemoveIsMutable();
responseHeadersToRemove_.add(value);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public Builder addAllResponseHeadersToRemove(
java.lang.Iterable values) {
ensureResponseHeadersToRemoveIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, responseHeadersToRemove_);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public Builder clearResponseHeadersToRemove() {
responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
* Specifies a list of HTTP headers that should be removed from each response
* to requests matching this route.
*
*
* repeated string response_headers_to_remove = 11;
*/
public Builder addResponseHeadersToRemoveBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureResponseHeadersToRemoveIsMutable();
responseHeadersToRemove_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.api.v2.route.Route)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.route.Route)
private static final io.envoyproxy.envoy.api.v2.route.Route DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.route.Route();
}
public static io.envoyproxy.envoy.api.v2.route.Route getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Route parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Route(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public io.envoyproxy.envoy.api.v2.route.Route getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy