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: mcp.proto
package com.alibaba.nacos.istio.model.mcp;
/**
*
* A RequestResource can be sent in two situations:
* Initial message in an MCP bidirectional change stream
* as an ACK or NACK response to a previous Resources. In
* this case the response_nonce is set to the nonce value
* in the Resources. ACK/NACK is determined by the presence
* of error_detail.
* * ACK (nonce!="",error_details==nil)
* * NACK (nonce!="",error_details!=nil)
* * New/Update request (nonce=="",error_details ignored)
*
*
* Protobuf type {@code istio.mcp.v1alpha1.RequestResources}
*/
public final class RequestResources extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.mcp.v1alpha1.RequestResources)
RequestResourcesOrBuilder {
private static final long serialVersionUID = 0L;
// Use RequestResources.newBuilder() to construct.
private RequestResources(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RequestResources() {
collection_ = "";
responseNonce_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RequestResources();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RequestResources(
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: {
com.alibaba.nacos.istio.model.mcp.SinkNode.Builder subBuilder = null;
if (sinkNode_ != null) {
subBuilder = sinkNode_.toBuilder();
}
sinkNode_ = input.readMessage(com.alibaba.nacos.istio.model.mcp.SinkNode.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sinkNode_);
sinkNode_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
initialResourceVersions_ = com.google.protobuf.MapField.newMapField(
InitialResourceVersionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
initialResourceVersions__ = input.readMessage(
InitialResourceVersionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
initialResourceVersions_.getMutableMap().put(
initialResourceVersions__.getKey(), initialResourceVersions__.getValue());
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
responseNonce_ = s;
break;
}
case 42: {
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;
}
case 48: {
incremental_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_RequestResources_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetInitialResourceVersions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_RequestResources_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.alibaba.nacos.istio.model.mcp.RequestResources.class, com.alibaba.nacos.istio.model.mcp.RequestResources.Builder.class);
}
public static final int SINK_NODE_FIELD_NUMBER = 1;
private com.alibaba.nacos.istio.model.mcp.SinkNode sinkNode_;
/**
*
* The sink node making the request.
*
*
* .istio.mcp.v1alpha1.SinkNode sink_node = 1;
* @return Whether the sinkNode field is set.
*/
public boolean hasSinkNode() {
return sinkNode_ != null;
}
/**
*
* Type of resource collection that is being requested, e.g.
* istio/networking/v1alpha3/VirtualService
* k8s/<apiVersion>/<kind>
*
*
* string collection = 2;
* @return The bytes for collection.
*/
public com.google.protobuf.ByteString
getCollectionBytes() {
java.lang.Object ref = collection_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
collection_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INITIAL_RESOURCE_VERSIONS_FIELD_NUMBER = 3;
private static final class InitialResourceVersionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_RequestResources_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();
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
*
* map<string, string> initial_resource_versions = 3;
*/
public boolean containsInitialResourceVersions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetInitialResourceVersions().getMap().containsKey(key);
}
/**
* Use {@link #getInitialResourceVersionsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getInitialResourceVersions() {
return getInitialResourceVersionsMap();
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
*
* map<string, string> initial_resource_versions = 3;
*/
public java.lang.String getInitialResourceVersionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
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 = 4;
private volatile java.lang.Object responseNonce_;
/**
*
* When the RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
* When the RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
*
* string response_nonce = 4;
* @return The bytes for responseNonce.
*/
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 = 5;
private com.google.rpc.Status errorDetail_;
/**
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
*
* .google.rpc.Status error_detail = 5;
* @return Whether the errorDetail field is set.
*/
public boolean hasErrorDetail() {
return errorDetail_ != null;
}
/**
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
*
* .google.rpc.Status error_detail = 5;
*/
public com.google.rpc.StatusOrBuilder getErrorDetailOrBuilder() {
return getErrorDetail();
}
public static final int INCREMENTAL_FIELD_NUMBER = 6;
private boolean incremental_;
/**
*
* Request an incremental update for the specified collection. The source may choose to
* honor this request or ignore and and provide a full-state update in the corresponding
* `Resource` response.
*
* A RequestResource can be sent in two situations:
* Initial message in an MCP bidirectional change stream
* as an ACK or NACK response to a previous Resources. In
* this case the response_nonce is set to the nonce value
* in the Resources. ACK/NACK is determined by the presence
* of error_detail.
* * ACK (nonce!="",error_details==nil)
* * NACK (nonce!="",error_details!=nil)
* * New/Update request (nonce=="",error_details ignored)
*
*
* Protobuf type {@code istio.mcp.v1alpha1.RequestResources}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.mcp.v1alpha1.RequestResources)
com.alibaba.nacos.istio.model.mcp.RequestResourcesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_RequestResources_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetInitialResourceVersions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 3:
return internalGetMutableInitialResourceVersions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_RequestResources_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.alibaba.nacos.istio.model.mcp.RequestResources.class, com.alibaba.nacos.istio.model.mcp.RequestResources.Builder.class);
}
// Construct using com.alibaba.nacos.istio.model.mcp.RequestResources.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();
if (sinkNodeBuilder_ == null) {
sinkNode_ = null;
} else {
sinkNode_ = null;
sinkNodeBuilder_ = null;
}
collection_ = "";
internalGetMutableInitialResourceVersions().clear();
responseNonce_ = "";
if (errorDetailBuilder_ == null) {
errorDetail_ = null;
} else {
errorDetail_ = null;
errorDetailBuilder_ = null;
}
incremental_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_RequestResources_descriptor;
}
@java.lang.Override
public com.alibaba.nacos.istio.model.mcp.RequestResources getDefaultInstanceForType() {
return com.alibaba.nacos.istio.model.mcp.RequestResources.getDefaultInstance();
}
@java.lang.Override
public com.alibaba.nacos.istio.model.mcp.RequestResources build() {
com.alibaba.nacos.istio.model.mcp.RequestResources result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.alibaba.nacos.istio.model.mcp.RequestResources buildPartial() {
com.alibaba.nacos.istio.model.mcp.RequestResources result = new com.alibaba.nacos.istio.model.mcp.RequestResources(this);
int from_bitField0_ = bitField0_;
if (sinkNodeBuilder_ == null) {
result.sinkNode_ = sinkNode_;
} else {
result.sinkNode_ = sinkNodeBuilder_.build();
}
result.collection_ = collection_;
result.initialResourceVersions_ = internalGetInitialResourceVersions();
result.initialResourceVersions_.makeImmutable();
result.responseNonce_ = responseNonce_;
if (errorDetailBuilder_ == null) {
result.errorDetail_ = errorDetail_;
} else {
result.errorDetail_ = errorDetailBuilder_.build();
}
result.incremental_ = incremental_;
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 com.alibaba.nacos.istio.model.mcp.RequestResources) {
return mergeFrom((com.alibaba.nacos.istio.model.mcp.RequestResources)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.alibaba.nacos.istio.model.mcp.RequestResources other) {
if (other == com.alibaba.nacos.istio.model.mcp.RequestResources.getDefaultInstance()) return this;
if (other.hasSinkNode()) {
mergeSinkNode(other.getSinkNode());
}
if (!other.getCollection().isEmpty()) {
collection_ = other.collection_;
onChanged();
}
internalGetMutableInitialResourceVersions().mergeFrom(
other.internalGetInitialResourceVersions());
if (!other.getResponseNonce().isEmpty()) {
responseNonce_ = other.responseNonce_;
onChanged();
}
if (other.hasErrorDetail()) {
mergeErrorDetail(other.getErrorDetail());
}
if (other.getIncremental() != false) {
setIncremental(other.getIncremental());
}
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 {
com.alibaba.nacos.istio.model.mcp.RequestResources parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.alibaba.nacos.istio.model.mcp.RequestResources) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.alibaba.nacos.istio.model.mcp.SinkNode sinkNode_;
private com.google.protobuf.SingleFieldBuilderV3<
com.alibaba.nacos.istio.model.mcp.SinkNode, com.alibaba.nacos.istio.model.mcp.SinkNode.Builder, com.alibaba.nacos.istio.model.mcp.SinkNodeOrBuilder> sinkNodeBuilder_;
/**
*
* The sink node making the request.
*
*
* .istio.mcp.v1alpha1.SinkNode sink_node = 1;
* @return Whether the sinkNode field is set.
*/
public boolean hasSinkNode() {
return sinkNodeBuilder_ != null || sinkNode_ != null;
}
/**
*
* Type of resource collection that is being requested, e.g.
* istio/networking/v1alpha3/VirtualService
* k8s/<apiVersion>/<kind>
*
*
* string collection = 2;
* @return The bytes for collection.
*/
public com.google.protobuf.ByteString
getCollectionBytes() {
java.lang.Object ref = collection_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
collection_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Type of resource collection that is being requested, e.g.
* istio/networking/v1alpha3/VirtualService
* k8s/<apiVersion>/<kind>
*
*
* string collection = 2;
* @param value The collection to set.
* @return This builder for chaining.
*/
public Builder setCollection(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
collection_ = value;
onChanged();
return this;
}
/**
*
* Type of resource collection that is being requested, e.g.
* istio/networking/v1alpha3/VirtualService
* k8s/<apiVersion>/<kind>
*
*
* string collection = 2;
* @return This builder for chaining.
*/
public Builder clearCollection() {
collection_ = getDefaultInstance().getCollection();
onChanged();
return this;
}
/**
*
* Type of resource collection that is being requested, e.g.
* istio/networking/v1alpha3/VirtualService
* k8s/<apiVersion>/<kind>
*
*
* string collection = 2;
* @param value The bytes for collection to set.
* @return This builder for chaining.
*/
public Builder setCollectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
collection_ = 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();
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
*
* map<string, string> initial_resource_versions = 3;
*/
public boolean containsInitialResourceVersions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetInitialResourceVersions().getMap().containsKey(key);
}
/**
* Use {@link #getInitialResourceVersionsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getInitialResourceVersions() {
return getInitialResourceVersionsMap();
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
*
* map<string, string> initial_resource_versions = 3;
*/
public java.lang.String getInitialResourceVersionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
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;
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
*
* map<string, string> initial_resource_versions = 3;
*/
public Builder removeInitialResourceVersions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableInitialResourceVersions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableInitialResourceVersions() {
return internalGetMutableInitialResourceVersions().getMutableMap();
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
*
* map<string, string> initial_resource_versions = 3;
*/
public Builder putInitialResourceVersions(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableInitialResourceVersions().getMutableMap()
.put(key, value);
return this;
}
/**
*
* When the RequestResources is the first in a stream, the initial_resource_versions must
* be populated. Otherwise, initial_resource_versions must be omitted. The keys are the
* resources names of the MCP resources known to the MCP client. The values in the map
* are the associated resource level version info.
*
* When the RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
* When the RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
*
* string response_nonce = 4;
* @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 RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
*
* string response_nonce = 4;
* @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 RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
*
* string response_nonce = 4;
* @return This builder for chaining.
*/
public Builder clearResponseNonce() {
responseNonce_ = getDefaultInstance().getResponseNonce();
onChanged();
return this;
}
/**
*
* When the RequestResources is an ACK or NACK message in response to a previous RequestResources,
* the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must
* be omitted.
*
*
* string response_nonce = 4;
* @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 previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
*
* .google.rpc.Status error_detail = 5;
* @return Whether the errorDetail field is set.
*/
public boolean hasErrorDetail() {
return errorDetailBuilder_ != null || errorDetail_ != null;
}
/**
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
*
* .google.rpc.Status error_detail = 5;
*/
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 previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* This is populated when the previously received resources could not be applied
* The *message* field in *error_details* provides the source internal error
* related to the failure.
*
* Request an incremental update for the specified collection. The source may choose to
* honor this request or ignore and and provide a full-state update in the corresponding
* `Resource` response.
*
*
* bool incremental = 6;
* @return The incremental.
*/
public boolean getIncremental() {
return incremental_;
}
/**
*
* Request an incremental update for the specified collection. The source may choose to
* honor this request or ignore and and provide a full-state update in the corresponding
* `Resource` response.
*
*
* bool incremental = 6;
* @param value The incremental to set.
* @return This builder for chaining.
*/
public Builder setIncremental(boolean value) {
incremental_ = value;
onChanged();
return this;
}
/**
*
* Request an incremental update for the specified collection. The source may choose to
* honor this request or ignore and and provide a full-state update in the corresponding
* `Resource` response.
*
*
* bool incremental = 6;
* @return This builder for chaining.
*/
public Builder clearIncremental() {
incremental_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:istio.mcp.v1alpha1.RequestResources)
}
// @@protoc_insertion_point(class_scope:istio.mcp.v1alpha1.RequestResources)
private static final com.alibaba.nacos.istio.model.mcp.RequestResources DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.alibaba.nacos.istio.model.mcp.RequestResources();
}
public static com.alibaba.nacos.istio.model.mcp.RequestResources getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RequestResources parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RequestResources(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 com.alibaba.nacos.istio.model.mcp.RequestResources getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}