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/api/v2/discovery.proto
package io.envoyproxy.envoy.api.v2;
/**
*
* DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC
* endpoint for Delta xDS.
* With Delta xDS, the DeltaDiscoveryResponses do not need to include a full
* snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a
* diff to the state of a xDS client.
* In Delta XDS there are per-resource versions, which allow tracking state at
* the resource granularity.
* An xDS Delta session is always in the context of a gRPC bidirectional
* stream. This allows the xDS server to keep track of the state of xDS clients
* connected to it.
* In Delta xDS the nonce field is required and used to pair
* DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK.
* Optionally, a response message level system_version_info is present for
* debugging purposes only.
* DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest
* can be either or both of: [1] informing the server of what resources the
* client has gained/lost interest in (using resource_names_subscribe and
* resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from
* the server (using response_nonce, with presence of error_detail making it a NACK).
* Additionally, the first message (for a given type_url) of a reconnected gRPC stream
* has a third role: informing the server of the resources (and their versions)
* that the client already possesses, using the initial_resource_versions field.
* As with state-of-the-world, when multiple resource types are multiplexed (ADS),
* all requests/acknowledgments/updates are logically walled off by type_url:
* a Cluster ACK exists in a completely separate world from a prior Route NACK.
* In particular, initial_resource_versions being sent at the "start" of every
* gRPC stream actually entails a message for each type_url, each with its own
* initial_resource_versions.
* [#next-free-field: 8]
*
*
* Protobuf type {@code envoy.api.v2.DeltaDiscoveryRequest}
*/
public final class DeltaDiscoveryRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.DeltaDiscoveryRequest)
DeltaDiscoveryRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use DeltaDiscoveryRequest.newBuilder() to construct.
private DeltaDiscoveryRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DeltaDiscoveryRequest() {
typeUrl_ = "";
resourceNamesSubscribe_ = com.google.protobuf.LazyStringArrayList.EMPTY;
resourceNamesUnsubscribe_ = com.google.protobuf.LazyStringArrayList.EMPTY;
responseNonce_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DeltaDiscoveryRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DeltaDiscoveryRequest(
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: {
io.envoyproxy.envoy.api.v2.core.Node.Builder subBuilder = null;
if (node_ != null) {
subBuilder = node_.toBuilder();
}
node_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.Node.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(node_);
node_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
typeUrl_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
resourceNamesSubscribe_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
resourceNamesSubscribe_.add(s);
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
resourceNamesUnsubscribe_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
resourceNamesUnsubscribe_.add(s);
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
initialResourceVersions_ = com.google.protobuf.MapField.newMapField(
InitialResourceVersionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000004;
}
com.google.protobuf.MapEntry
initialResourceVersions__ = input.readMessage(
InitialResourceVersionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
initialResourceVersions_.getMutableMap().put(
initialResourceVersions__.getKey(), initialResourceVersions__.getValue());
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
responseNonce_ = s;
break;
}
case 58: {
com.google.rpc.Status.Builder subBuilder = null;
if (errorDetail_ != null) {
subBuilder = errorDetail_.toBuilder();
}
errorDetail_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(errorDetail_);
errorDetail_ = 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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
resourceNamesSubscribe_ = resourceNamesSubscribe_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
resourceNamesUnsubscribe_ = resourceNamesUnsubscribe_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_DeltaDiscoveryRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
return internalGetInitialResourceVersions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_DeltaDiscoveryRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest.class, io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest.Builder.class);
}
public static final int NODE_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.api.v2.core.Node node_;
/**
*
* The node making the request.
*
*
* .envoy.api.v2.core.Node node = 1;
* @return Whether the node field is set.
*/
@java.lang.Override
public boolean hasNode() {
return node_ != null;
}
/**
*
* Type of the resource that is being requested, e.g.
* "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment".
*
*
* string type_url = 2;
* @return The bytes for typeUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeUrlBytes() {
java.lang.Object ref = typeUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCE_NAMES_SUBSCRIBE_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList resourceNamesSubscribe_;
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @return A list containing the resourceNamesSubscribe.
*/
public com.google.protobuf.ProtocolStringList
getResourceNamesSubscribeList() {
return resourceNamesSubscribe_;
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @return The count of resourceNamesSubscribe.
*/
public int getResourceNamesSubscribeCount() {
return resourceNamesSubscribe_.size();
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param index The index of the element to return.
* @return The resourceNamesSubscribe at the given index.
*/
public java.lang.String getResourceNamesSubscribe(int index) {
return resourceNamesSubscribe_.get(index);
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param index The index of the value to return.
* @return The bytes of the resourceNamesSubscribe at the given index.
*/
public com.google.protobuf.ByteString
getResourceNamesSubscribeBytes(int index) {
return resourceNamesSubscribe_.getByteString(index);
}
public static final int RESOURCE_NAMES_UNSUBSCRIBE_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList resourceNamesUnsubscribe_;
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @return A list containing the resourceNamesUnsubscribe.
*/
public com.google.protobuf.ProtocolStringList
getResourceNamesUnsubscribeList() {
return resourceNamesUnsubscribe_;
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @return The count of resourceNamesUnsubscribe.
*/
public int getResourceNamesUnsubscribeCount() {
return resourceNamesUnsubscribe_.size();
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param index The index of the element to return.
* @return The resourceNamesUnsubscribe at the given index.
*/
public java.lang.String getResourceNamesUnsubscribe(int index) {
return resourceNamesUnsubscribe_.get(index);
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param index The index of the value to return.
* @return The bytes of the resourceNamesUnsubscribe at the given index.
*/
public com.google.protobuf.ByteString
getResourceNamesUnsubscribeBytes(int index) {
return resourceNamesUnsubscribe_.getByteString(index);
}
public static final int INITIAL_RESOURCE_VERSIONS_FIELD_NUMBER = 5;
private static final class InitialResourceVersionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> initialResourceVersions_;
private com.google.protobuf.MapField
internalGetInitialResourceVersions() {
if (initialResourceVersions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InitialResourceVersionsDefaultEntryHolder.defaultEntry);
}
return initialResourceVersions_;
}
public int getInitialResourceVersionsCount() {
return internalGetInitialResourceVersions().getMap().size();
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
*
* map<string, string> initial_resource_versions = 5;
*/
@java.lang.Override
public boolean containsInitialResourceVersions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetInitialResourceVersions().getMap().containsKey(key);
}
/**
* Use {@link #getInitialResourceVersionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getInitialResourceVersions() {
return getInitialResourceVersionsMap();
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
*
* map<string, string> initial_resource_versions = 5;
*/
@java.lang.Override
public java.lang.String getInitialResourceVersionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetInitialResourceVersions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int RESPONSE_NONCE_FIELD_NUMBER = 6;
private volatile java.lang.Object responseNonce_;
/**
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
*
* string response_nonce = 6;
* @return The bytes for responseNonce.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getResponseNonceBytes() {
java.lang.Object ref = responseNonce_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
responseNonce_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ERROR_DETAIL_FIELD_NUMBER = 7;
private com.google.rpc.Status errorDetail_;
/**
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
*
* .google.rpc.Status error_detail = 7;
* @return Whether the errorDetail field is set.
*/
@java.lang.Override
public boolean hasErrorDetail() {
return errorDetail_ != null;
}
/**
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
*
* .google.rpc.Status error_detail = 7;
*/
@java.lang.Override
public com.google.rpc.StatusOrBuilder getErrorDetailOrBuilder() {
return getErrorDetail();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (node_ != null) {
output.writeMessage(1, getNode());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, typeUrl_);
}
for (int i = 0; i < resourceNamesSubscribe_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceNamesSubscribe_.getRaw(i));
}
for (int i = 0; i < resourceNamesUnsubscribe_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceNamesUnsubscribe_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetInitialResourceVersions(),
InitialResourceVersionsDefaultEntryHolder.defaultEntry,
5);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseNonce_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, responseNonce_);
}
if (errorDetail_ != null) {
output.writeMessage(7, getErrorDetail());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (node_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getNode());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, typeUrl_);
}
{
int dataSize = 0;
for (int i = 0; i < resourceNamesSubscribe_.size(); i++) {
dataSize += computeStringSizeNoTag(resourceNamesSubscribe_.getRaw(i));
}
size += dataSize;
size += 1 * getResourceNamesSubscribeList().size();
}
{
int dataSize = 0;
for (int i = 0; i < resourceNamesUnsubscribe_.size(); i++) {
dataSize += computeStringSizeNoTag(resourceNamesUnsubscribe_.getRaw(i));
}
size += dataSize;
size += 1 * getResourceNamesUnsubscribeList().size();
}
for (java.util.Map.Entry entry
: internalGetInitialResourceVersions().getMap().entrySet()) {
com.google.protobuf.MapEntry
initialResourceVersions__ = InitialResourceVersionsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, initialResourceVersions__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseNonce_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, responseNonce_);
}
if (errorDetail_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getErrorDetail());
}
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.DeltaDiscoveryRequest)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest other = (io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest) obj;
if (hasNode() != other.hasNode()) return false;
if (hasNode()) {
if (!getNode()
.equals(other.getNode())) return false;
}
if (!getTypeUrl()
.equals(other.getTypeUrl())) return false;
if (!getResourceNamesSubscribeList()
.equals(other.getResourceNamesSubscribeList())) return false;
if (!getResourceNamesUnsubscribeList()
.equals(other.getResourceNamesUnsubscribeList())) return false;
if (!internalGetInitialResourceVersions().equals(
other.internalGetInitialResourceVersions())) return false;
if (!getResponseNonce()
.equals(other.getResponseNonce())) return false;
if (hasErrorDetail() != other.hasErrorDetail()) return false;
if (hasErrorDetail()) {
if (!getErrorDetail()
.equals(other.getErrorDetail())) 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 (hasNode()) {
hash = (37 * hash) + NODE_FIELD_NUMBER;
hash = (53 * hash) + getNode().hashCode();
}
hash = (37 * hash) + TYPE_URL_FIELD_NUMBER;
hash = (53 * hash) + getTypeUrl().hashCode();
if (getResourceNamesSubscribeCount() > 0) {
hash = (37 * hash) + RESOURCE_NAMES_SUBSCRIBE_FIELD_NUMBER;
hash = (53 * hash) + getResourceNamesSubscribeList().hashCode();
}
if (getResourceNamesUnsubscribeCount() > 0) {
hash = (37 * hash) + RESOURCE_NAMES_UNSUBSCRIBE_FIELD_NUMBER;
hash = (53 * hash) + getResourceNamesUnsubscribeList().hashCode();
}
if (!internalGetInitialResourceVersions().getMap().isEmpty()) {
hash = (37 * hash) + INITIAL_RESOURCE_VERSIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetInitialResourceVersions().hashCode();
}
hash = (37 * hash) + RESPONSE_NONCE_FIELD_NUMBER;
hash = (53 * hash) + getResponseNonce().hashCode();
if (hasErrorDetail()) {
hash = (37 * hash) + ERROR_DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getErrorDetail().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest 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.DeltaDiscoveryRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest 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.DeltaDiscoveryRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest 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.DeltaDiscoveryRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest 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.DeltaDiscoveryRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest 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.DeltaDiscoveryRequest 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.DeltaDiscoveryRequest 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.api.v2.DeltaDiscoveryRequest 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;
}
/**
*
* DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC
* endpoint for Delta xDS.
* With Delta xDS, the DeltaDiscoveryResponses do not need to include a full
* snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a
* diff to the state of a xDS client.
* In Delta XDS there are per-resource versions, which allow tracking state at
* the resource granularity.
* An xDS Delta session is always in the context of a gRPC bidirectional
* stream. This allows the xDS server to keep track of the state of xDS clients
* connected to it.
* In Delta xDS the nonce field is required and used to pair
* DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK.
* Optionally, a response message level system_version_info is present for
* debugging purposes only.
* DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest
* can be either or both of: [1] informing the server of what resources the
* client has gained/lost interest in (using resource_names_subscribe and
* resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from
* the server (using response_nonce, with presence of error_detail making it a NACK).
* Additionally, the first message (for a given type_url) of a reconnected gRPC stream
* has a third role: informing the server of the resources (and their versions)
* that the client already possesses, using the initial_resource_versions field.
* As with state-of-the-world, when multiple resource types are multiplexed (ADS),
* all requests/acknowledgments/updates are logically walled off by type_url:
* a Cluster ACK exists in a completely separate world from a prior Route NACK.
* In particular, initial_resource_versions being sent at the "start" of every
* gRPC stream actually entails a message for each type_url, each with its own
* initial_resource_versions.
* [#next-free-field: 8]
*
* Type of the resource that is being requested, e.g.
* "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment".
*
*
* string type_url = 2;
* @return The bytes for typeUrl.
*/
public com.google.protobuf.ByteString
getTypeUrlBytes() {
java.lang.Object ref = typeUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Type of the resource that is being requested, e.g.
* "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment".
*
*
* string type_url = 2;
* @param value The typeUrl to set.
* @return This builder for chaining.
*/
public Builder setTypeUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
typeUrl_ = value;
onChanged();
return this;
}
/**
*
* Type of the resource that is being requested, e.g.
* "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment".
*
*
* string type_url = 2;
* @return This builder for chaining.
*/
public Builder clearTypeUrl() {
typeUrl_ = getDefaultInstance().getTypeUrl();
onChanged();
return this;
}
/**
*
* Type of the resource that is being requested, e.g.
* "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment".
*
*
* string type_url = 2;
* @param value The bytes for typeUrl to set.
* @return This builder for chaining.
*/
public Builder setTypeUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
typeUrl_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList resourceNamesSubscribe_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureResourceNamesSubscribeIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
resourceNamesSubscribe_ = new com.google.protobuf.LazyStringArrayList(resourceNamesSubscribe_);
bitField0_ |= 0x00000001;
}
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @return A list containing the resourceNamesSubscribe.
*/
public com.google.protobuf.ProtocolStringList
getResourceNamesSubscribeList() {
return resourceNamesSubscribe_.getUnmodifiableView();
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @return The count of resourceNamesSubscribe.
*/
public int getResourceNamesSubscribeCount() {
return resourceNamesSubscribe_.size();
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param index The index of the element to return.
* @return The resourceNamesSubscribe at the given index.
*/
public java.lang.String getResourceNamesSubscribe(int index) {
return resourceNamesSubscribe_.get(index);
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param index The index of the value to return.
* @return The bytes of the resourceNamesSubscribe at the given index.
*/
public com.google.protobuf.ByteString
getResourceNamesSubscribeBytes(int index) {
return resourceNamesSubscribe_.getByteString(index);
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param index The index to set the value at.
* @param value The resourceNamesSubscribe to set.
* @return This builder for chaining.
*/
public Builder setResourceNamesSubscribe(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceNamesSubscribeIsMutable();
resourceNamesSubscribe_.set(index, value);
onChanged();
return this;
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param value The resourceNamesSubscribe to add.
* @return This builder for chaining.
*/
public Builder addResourceNamesSubscribe(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceNamesSubscribeIsMutable();
resourceNamesSubscribe_.add(value);
onChanged();
return this;
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param values The resourceNamesSubscribe to add.
* @return This builder for chaining.
*/
public Builder addAllResourceNamesSubscribe(
java.lang.Iterable values) {
ensureResourceNamesSubscribeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, resourceNamesSubscribe_);
onChanged();
return this;
}
/**
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
* DeltaDiscoveryRequests allow the client to add or remove individual
* resources to the set of tracked resources in the context of a stream.
* All resource names in the resource_names_subscribe list are added to the
* set of tracked resources and all resource names in the resource_names_unsubscribe
* list are removed from the set of tracked resources.
* *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
* resource_names_unsubscribe list simply means that no resources are to be
* added or removed to the resource list.
* *Like* state-of-the-world xDS, the server must send updates for all tracked
* resources, but can also send updates for resources the client has not subscribed to.
* NOTE: the server must respond with all resources listed in resource_names_subscribe,
* even if it believes the client has the most recent version of them. The reason:
* the client may have dropped them, but then regained interest before it had a chance
* to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
* These two fields can be set in any DeltaDiscoveryRequest, including ACKs
* and initial_resource_versions.
* A list of Resource names to add to the list of tracked resources.
*
*
* repeated string resource_names_subscribe = 3;
* @param value The bytes of the resourceNamesSubscribe to add.
* @return This builder for chaining.
*/
public Builder addResourceNamesSubscribeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureResourceNamesSubscribeIsMutable();
resourceNamesSubscribe_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList resourceNamesUnsubscribe_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureResourceNamesUnsubscribeIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
resourceNamesUnsubscribe_ = new com.google.protobuf.LazyStringArrayList(resourceNamesUnsubscribe_);
bitField0_ |= 0x00000002;
}
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @return A list containing the resourceNamesUnsubscribe.
*/
public com.google.protobuf.ProtocolStringList
getResourceNamesUnsubscribeList() {
return resourceNamesUnsubscribe_.getUnmodifiableView();
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @return The count of resourceNamesUnsubscribe.
*/
public int getResourceNamesUnsubscribeCount() {
return resourceNamesUnsubscribe_.size();
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param index The index of the element to return.
* @return The resourceNamesUnsubscribe at the given index.
*/
public java.lang.String getResourceNamesUnsubscribe(int index) {
return resourceNamesUnsubscribe_.get(index);
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param index The index of the value to return.
* @return The bytes of the resourceNamesUnsubscribe at the given index.
*/
public com.google.protobuf.ByteString
getResourceNamesUnsubscribeBytes(int index) {
return resourceNamesUnsubscribe_.getByteString(index);
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param index The index to set the value at.
* @param value The resourceNamesUnsubscribe to set.
* @return This builder for chaining.
*/
public Builder setResourceNamesUnsubscribe(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceNamesUnsubscribeIsMutable();
resourceNamesUnsubscribe_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param value The resourceNamesUnsubscribe to add.
* @return This builder for chaining.
*/
public Builder addResourceNamesUnsubscribe(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceNamesUnsubscribeIsMutable();
resourceNamesUnsubscribe_.add(value);
onChanged();
return this;
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param values The resourceNamesUnsubscribe to add.
* @return This builder for chaining.
*/
public Builder addAllResourceNamesUnsubscribe(
java.lang.Iterable values) {
ensureResourceNamesUnsubscribeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, resourceNamesUnsubscribe_);
onChanged();
return this;
}
/**
*
* A list of Resource names to remove from the list of tracked resources.
*
* A list of Resource names to remove from the list of tracked resources.
*
*
* repeated string resource_names_unsubscribe = 4;
* @param value The bytes of the resourceNamesUnsubscribe to add.
* @return This builder for chaining.
*/
public Builder addResourceNamesUnsubscribeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureResourceNamesUnsubscribeIsMutable();
resourceNamesUnsubscribe_.add(value);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> initialResourceVersions_;
private com.google.protobuf.MapField
internalGetInitialResourceVersions() {
if (initialResourceVersions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InitialResourceVersionsDefaultEntryHolder.defaultEntry);
}
return initialResourceVersions_;
}
private com.google.protobuf.MapField
internalGetMutableInitialResourceVersions() {
onChanged();;
if (initialResourceVersions_ == null) {
initialResourceVersions_ = com.google.protobuf.MapField.newMapField(
InitialResourceVersionsDefaultEntryHolder.defaultEntry);
}
if (!initialResourceVersions_.isMutable()) {
initialResourceVersions_ = initialResourceVersions_.copy();
}
return initialResourceVersions_;
}
public int getInitialResourceVersionsCount() {
return internalGetInitialResourceVersions().getMap().size();
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
*
* map<string, string> initial_resource_versions = 5;
*/
@java.lang.Override
public boolean containsInitialResourceVersions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetInitialResourceVersions().getMap().containsKey(key);
}
/**
* Use {@link #getInitialResourceVersionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getInitialResourceVersions() {
return getInitialResourceVersionsMap();
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
*
* map<string, string> initial_resource_versions = 5;
*/
@java.lang.Override
public java.lang.String getInitialResourceVersionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetInitialResourceVersions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearInitialResourceVersions() {
internalGetMutableInitialResourceVersions().getMutableMap()
.clear();
return this;
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
*
* map<string, string> initial_resource_versions = 5;
*/
public Builder removeInitialResourceVersions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableInitialResourceVersions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableInitialResourceVersions() {
return internalGetMutableInitialResourceVersions().getMutableMap();
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
*
* map<string, string> initial_resource_versions = 5;
*/
public Builder putInitialResourceVersions(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableInitialResourceVersions().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Informs the server of the versions of the resources the xDS client knows of, to enable the
* client to continue the same logical xDS session even in the face of gRPC stream reconnection.
* It will not be populated: [1] in the very first stream of a session, since the client will
* not yet have any resources, [2] in any message after the first in a stream (for a given
* type_url), since the server will already be correctly tracking the client's state.
* (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
* The map's keys are names of xDS resources known to the xDS client.
* The map's values are opaque resource versions.
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
*
* string response_nonce = 6;
* @return The bytes for responseNonce.
*/
public com.google.protobuf.ByteString
getResponseNonceBytes() {
java.lang.Object ref = responseNonce_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
responseNonce_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
*
* string response_nonce = 6;
* @param value The responseNonce to set.
* @return This builder for chaining.
*/
public Builder setResponseNonce(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
responseNonce_ = value;
onChanged();
return this;
}
/**
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
*
* string response_nonce = 6;
* @return This builder for chaining.
*/
public Builder clearResponseNonce() {
responseNonce_ = getDefaultInstance().getResponseNonce();
onChanged();
return this;
}
/**
*
* When the DeltaDiscoveryRequest is a ACK or NACK message in response
* to a previous DeltaDiscoveryResponse, the response_nonce must be the
* nonce in the DeltaDiscoveryResponse.
* Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
*
*
* string response_nonce = 6;
* @param value The bytes for responseNonce to set.
* @return This builder for chaining.
*/
public Builder setResponseNonceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
responseNonce_ = value;
onChanged();
return this;
}
private com.google.rpc.Status errorDetail_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorDetailBuilder_;
/**
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
*
* .google.rpc.Status error_detail = 7;
* @return Whether the errorDetail field is set.
*/
public boolean hasErrorDetail() {
return errorDetailBuilder_ != null || errorDetail_ != null;
}
/**
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
*
* .google.rpc.Status error_detail = 7;
*/
public Builder setErrorDetail(com.google.rpc.Status value) {
if (errorDetailBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
errorDetail_ = value;
onChanged();
} else {
errorDetailBuilder_.setMessage(value);
}
return this;
}
/**
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
* This is populated when the previous :ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`
* failed to update configuration. The *message* field in *error_details*
* provides the Envoy internal exception related to the failure.
*
*
* .google.rpc.Status error_detail = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getErrorDetailFieldBuilder() {
if (errorDetailBuilder_ == null) {
errorDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(
getErrorDetail(),
getParentForChildren(),
isClean());
errorDetail_ = null;
}
return errorDetailBuilder_;
}
@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.api.v2.DeltaDiscoveryRequest)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.DeltaDiscoveryRequest)
private static final io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest();
}
public static io.envoyproxy.envoy.api.v2.DeltaDiscoveryRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DeltaDiscoveryRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DeltaDiscoveryRequest(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.api.v2.DeltaDiscoveryRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}