Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/route/v3/scoped_route.proto
package io.envoyproxy.envoy.config.route.v3;
/**
*
* Specifies a routing scope, which associates a
* :ref:`Key<envoy_v3_api_msg_config.route.v3.ScopedRouteConfiguration.Key>` to a
* :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`.
* The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically
* via RDS (:ref:`route_configuration_name<envoy_v3_api_field_config.route.v3.ScopedRouteConfiguration.route_configuration_name>`)
* or specified inline (:ref:`route_configuration<envoy_v3_api_field_config.route.v3.ScopedRouteConfiguration.route_configuration>`).
* The HTTP connection manager builds up a table consisting of these Key to
* RouteConfiguration mappings, and looks up the RouteConfiguration to use per
* request according to the algorithm specified in the
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
* assigned to the HttpConnectionManager.
* For example, with the following configurations (in YAML):
* HttpConnectionManager config:
* .. code::
* ...
* scoped_routes:
* name: foo-scoped-routes
* scope_key_builder:
* fragments:
* - header_value_extractor:
* name: X-Route-Selector
* element_separator: ","
* element:
* separator: =
* key: vip
* ScopedRouteConfiguration resources (specified statically via
* :ref:`scoped_route_configurations_list<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list>`
* or obtained dynamically via SRDS):
* .. code::
* (1)
* name: route-scope1
* route_configuration_name: route-config1
* key:
* fragments:
* - string_key: 172.10.10.20
* (2)
* name: route-scope2
* route_configuration_name: route-config2
* key:
* fragments:
* - string_key: 172.20.20.30
* A request from a client such as:
* .. code::
* GET / HTTP/1.1
* Host: foo.com
* X-Route-Selector: vip=172.10.10.20
* would result in the routing table defined by the ``route-config1``
* RouteConfiguration being assigned to the HTTP request/stream.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.ScopedRouteConfiguration}
*/
public final class ScopedRouteConfiguration extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.ScopedRouteConfiguration)
ScopedRouteConfigurationOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScopedRouteConfiguration.newBuilder() to construct.
private ScopedRouteConfiguration(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScopedRouteConfiguration() {
name_ = "";
routeConfigurationName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ScopedRouteConfiguration();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ScopedRouteConfiguration(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
routeConfigurationName_ = s;
break;
}
case 26: {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Builder subBuilder = null;
if (key_ != null) {
subBuilder = key_.toBuilder();
}
key_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(key_);
key_ = subBuilder.buildPartial();
}
break;
}
case 32: {
onDemand_ = input.readBool();
break;
}
case 42: {
io.envoyproxy.envoy.config.route.v3.RouteConfiguration.Builder subBuilder = null;
if (routeConfiguration_ != null) {
subBuilder = routeConfiguration_.toBuilder();
}
routeConfiguration_ = input.readMessage(io.envoyproxy.envoy.config.route.v3.RouteConfiguration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(routeConfiguration_);
routeConfiguration_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.class, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Builder.class);
}
public interface KeyOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.ScopedRouteConfiguration.Key)
com.google.protobuf.MessageOrBuilder {
/**
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* Specifies a key which is matched against the output of the
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
* specified in the HttpConnectionManager. The matching is done per HTTP
* request and is dependent on the order of the fragments contained in the
* Key.
*
*
* Protobuf type {@code envoy.config.route.v3.ScopedRouteConfiguration.Key}
*/
public static final class Key extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.route.v3.ScopedRouteConfiguration.Key)
KeyOrBuilder {
private static final long serialVersionUID = 0L;
// Use Key.newBuilder() to construct.
private Key(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Key() {
fragments_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Key();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Key(
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;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
fragments_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
fragments_.add(
input.readMessage(io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
fragments_ = java.util.Collections.unmodifiableList(fragments_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_Key_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_Key_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.class, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Builder.class);
}
public interface FragmentOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment)
com.google.protobuf.MessageOrBuilder {
/**
*
* A string to match against.
*
*
* string string_key = 1;
* @return Whether the stringKey field is set.
*/
boolean hasStringKey();
/**
*
*
* string string_key = 1;
* @return The bytes for stringKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStringKeyBytes() {
java.lang.Object ref = "";
if (typeCase_ == 1) {
ref = type_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (typeCase_ == 1) {
type_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A string to match against.
*
*
* string string_key = 1;
* @param value The stringKey to set.
* @return This builder for chaining.
*/
public Builder setStringKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
typeCase_ = 1;
type_ = value;
onChanged();
return this;
}
/**
*
* A string to match against.
*
*
* string string_key = 1;
* @return This builder for chaining.
*/
public Builder clearStringKey() {
if (typeCase_ == 1) {
typeCase_ = 0;
type_ = null;
onChanged();
}
return this;
}
/**
*
* A string to match against.
*
*
* string string_key = 1;
* @param value The bytes for stringKey to set.
* @return This builder for chaining.
*/
public Builder setStringKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
typeCase_ = 1;
type_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment)
private static final io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment();
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Fragment parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Fragment(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int FRAGMENTS_FIELD_NUMBER = 1;
private java.util.List fragments_;
/**
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
*
* repeated .envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment fragments = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.FragmentOrBuilder getFragmentsOrBuilder(
int index) {
return fragments_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < fragments_.size(); i++) {
output.writeMessage(1, fragments_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < fragments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, fragments_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key other = (io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key) obj;
if (!getFragmentsList()
.equals(other.getFragmentsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getFragmentsCount() > 0) {
hash = (37 * hash) + FRAGMENTS_FIELD_NUMBER;
hash = (53 * hash) + getFragmentsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Specifies a key which is matched against the output of the
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
* specified in the HttpConnectionManager. The matching is done per HTTP
* request and is dependent on the order of the fragments contained in the
* Key.
*
*
* Protobuf type {@code envoy.config.route.v3.ScopedRouteConfiguration.Key}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.ScopedRouteConfiguration.Key)
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.KeyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_Key_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_Key_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.class, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFragmentsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (fragmentsBuilder_ == null) {
fragments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
fragmentsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_Key_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key build() {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key buildPartial() {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key result = new io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key(this);
int from_bitField0_ = bitField0_;
if (fragmentsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
fragments_ = java.util.Collections.unmodifiableList(fragments_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.fragments_ = fragments_;
} else {
result.fragments_ = fragmentsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key other) {
if (other == io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.getDefaultInstance()) return this;
if (fragmentsBuilder_ == null) {
if (!other.fragments_.isEmpty()) {
if (fragments_.isEmpty()) {
fragments_ = other.fragments_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFragmentsIsMutable();
fragments_.addAll(other.fragments_);
}
onChanged();
}
} else {
if (!other.fragments_.isEmpty()) {
if (fragmentsBuilder_.isEmpty()) {
fragmentsBuilder_.dispose();
fragmentsBuilder_ = null;
fragments_ = other.fragments_;
bitField0_ = (bitField0_ & ~0x00000001);
fragmentsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFragmentsFieldBuilder() : null;
} else {
fragmentsBuilder_.addAllMessages(other.fragments_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List fragments_ =
java.util.Collections.emptyList();
private void ensureFragmentsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
fragments_ = new java.util.ArrayList(fragments_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment.Builder, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.FragmentOrBuilder> fragmentsBuilder_;
/**
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
*
* repeated .envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment fragments = 1 [(.validate.rules) = { ... }
*/
public Builder setFragments(
int index, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment value) {
if (fragmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFragmentsIsMutable();
fragments_.set(index, value);
onChanged();
} else {
fragmentsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
*
* repeated .envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment fragments = 1 [(.validate.rules) = { ... }
*/
public Builder addFragments(
int index, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment value) {
if (fragmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFragmentsIsMutable();
fragments_.add(index, value);
onChanged();
} else {
fragmentsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
* The ordered set of fragments to match against. The order must match the
* fragments in the corresponding
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`.
*
*
* repeated .envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment fragments = 1 [(.validate.rules) = { ... }
*/
public java.util.List
getFragmentsBuilderList() {
return getFragmentsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment.Builder, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.FragmentOrBuilder>
getFragmentsFieldBuilder() {
if (fragmentsBuilder_ == null) {
fragmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment.Builder, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key.FragmentOrBuilder>(
fragments_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
fragments_ = null;
}
return fragmentsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.route.v3.ScopedRouteConfiguration.Key)
}
// @@protoc_insertion_point(class_scope:envoy.config.route.v3.ScopedRouteConfiguration.Key)
private static final io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key();
}
public static io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Key parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Key(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Key getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ON_DEMAND_FIELD_NUMBER = 4;
private boolean onDemand_;
/**
*
* Whether the RouteConfiguration should be loaded on demand.
*
*
* bool on_demand = 4;
* @return The onDemand.
*/
@java.lang.Override
public boolean getOnDemand() {
return onDemand_;
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROUTE_CONFIGURATION_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object routeConfigurationName_;
/**
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
*
* string route_configuration_name = 2 [(.udpa.annotations.field_migrate) = { ... }
* @return The bytes for routeConfigurationName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRouteConfigurationNameBytes() {
java.lang.Object ref = routeConfigurationName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
routeConfigurationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROUTE_CONFIGURATION_FIELD_NUMBER = 5;
private io.envoyproxy.envoy.config.route.v3.RouteConfiguration routeConfiguration_;
/**
*
* The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope.
*
*
* .envoy.config.route.v3.RouteConfiguration route_configuration = 5 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the routeConfiguration field is set.
*/
@java.lang.Override
public boolean hasRouteConfiguration() {
return routeConfiguration_ != null;
}
/**
*
* The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope.
*
* Specifies a routing scope, which associates a
* :ref:`Key<envoy_v3_api_msg_config.route.v3.ScopedRouteConfiguration.Key>` to a
* :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`.
* The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically
* via RDS (:ref:`route_configuration_name<envoy_v3_api_field_config.route.v3.ScopedRouteConfiguration.route_configuration_name>`)
* or specified inline (:ref:`route_configuration<envoy_v3_api_field_config.route.v3.ScopedRouteConfiguration.route_configuration>`).
* The HTTP connection manager builds up a table consisting of these Key to
* RouteConfiguration mappings, and looks up the RouteConfiguration to use per
* request according to the algorithm specified in the
* :ref:`scope_key_builder<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder>`
* assigned to the HttpConnectionManager.
* For example, with the following configurations (in YAML):
* HttpConnectionManager config:
* .. code::
* ...
* scoped_routes:
* name: foo-scoped-routes
* scope_key_builder:
* fragments:
* - header_value_extractor:
* name: X-Route-Selector
* element_separator: ","
* element:
* separator: =
* key: vip
* ScopedRouteConfiguration resources (specified statically via
* :ref:`scoped_route_configurations_list<envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list>`
* or obtained dynamically via SRDS):
* .. code::
* (1)
* name: route-scope1
* route_configuration_name: route-config1
* key:
* fragments:
* - string_key: 172.10.10.20
* (2)
* name: route-scope2
* route_configuration_name: route-config2
* key:
* fragments:
* - string_key: 172.20.20.30
* A request from a client such as:
* .. code::
* GET / HTTP/1.1
* Host: foo.com
* X-Route-Selector: vip=172.10.10.20
* would result in the routing table defined by the ``route-config1``
* RouteConfiguration being assigned to the HTTP request/stream.
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.route.v3.ScopedRouteConfiguration}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.route.v3.ScopedRouteConfiguration)
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfigurationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.class, io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
onDemand_ = false;
name_ = "";
routeConfigurationName_ = "";
if (routeConfigurationBuilder_ == null) {
routeConfiguration_ = null;
} else {
routeConfiguration_ = null;
routeConfigurationBuilder_ = null;
}
if (keyBuilder_ == null) {
key_ = null;
} else {
key_ = null;
keyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteProto.internal_static_envoy_config_route_v3_ScopedRouteConfiguration_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration build() {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration buildPartial() {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration result = new io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration(this);
result.onDemand_ = onDemand_;
result.name_ = name_;
result.routeConfigurationName_ = routeConfigurationName_;
if (routeConfigurationBuilder_ == null) {
result.routeConfiguration_ = routeConfiguration_;
} else {
result.routeConfiguration_ = routeConfigurationBuilder_.build();
}
if (keyBuilder_ == null) {
result.key_ = key_;
} else {
result.key_ = keyBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration) {
return mergeFrom((io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration other) {
if (other == io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration.getDefaultInstance()) return this;
if (other.getOnDemand() != false) {
setOnDemand(other.getOnDemand());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getRouteConfigurationName().isEmpty()) {
routeConfigurationName_ = other.routeConfigurationName_;
onChanged();
}
if (other.hasRouteConfiguration()) {
mergeRouteConfiguration(other.getRouteConfiguration());
}
if (other.hasKey()) {
mergeKey(other.getKey());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.route.v3.ScopedRouteConfiguration) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean onDemand_ ;
/**
*
* Whether the RouteConfiguration should be loaded on demand.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name assigned to the routing scope.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* The name assigned to the routing scope.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The name assigned to the routing scope.
*
*
* string name = 1 [(.validate.rules) = { ... }
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object routeConfigurationName_ = "";
/**
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
*
* string route_configuration_name = 2 [(.udpa.annotations.field_migrate) = { ... }
* @param value The routeConfigurationName to set.
* @return This builder for chaining.
*/
public Builder setRouteConfigurationName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
routeConfigurationName_ = value;
onChanged();
return this;
}
/**
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
* The resource name to use for a :ref:`envoy_v3_api_msg_service.discovery.v3.DiscoveryRequest` to an
* RDS server to fetch the :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated
* with this scope.
*
*
* string route_configuration_name = 2 [(.udpa.annotations.field_migrate) = { ... }
* @param value The bytes for routeConfigurationName to set.
* @return This builder for chaining.
*/
public Builder setRouteConfigurationNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
routeConfigurationName_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.route.v3.RouteConfiguration routeConfiguration_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.route.v3.RouteConfiguration, io.envoyproxy.envoy.config.route.v3.RouteConfiguration.Builder, io.envoyproxy.envoy.config.route.v3.RouteConfigurationOrBuilder> routeConfigurationBuilder_;
/**
*
* The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope.
*
*
* .envoy.config.route.v3.RouteConfiguration route_configuration = 5 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the routeConfiguration field is set.
*/
public boolean hasRouteConfiguration() {
return routeConfigurationBuilder_ != null || routeConfiguration_ != null;
}
/**
*
* The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope.
*