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;
/**
*
* Resources do not need to include a full snapshot of the tracked
* resources. Instead they are a diff to the state of a MCP client.
* Per resource versions allow sources and sinks to track state at
* the resource granularity. An MCP incremental session is always
* in the context of a gRPC bidirectional stream. This allows the
* MCP source to keep track of the state of MCP sink connected to
* it.
* In Incremental MCP the nonce field is required and used to pair
* Resources to an RequestResources ACK or NACK.
*
*
* Protobuf type {@code istio.mcp.v1alpha1.Resources}
*/
public final class Resources extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.mcp.v1alpha1.Resources)
ResourcesOrBuilder {
private static final long serialVersionUID = 0L;
// Use Resources.newBuilder() to construct.
private Resources(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Resources() {
systemVersionInfo_ = "";
collection_ = "";
resources_ = java.util.Collections.emptyList();
removedResources_ = com.google.protobuf.LazyStringArrayList.EMPTY;
nonce_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Resources();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Resources(
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: {
java.lang.String s = input.readStringRequireUtf8();
systemVersionInfo_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
collection_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
resources_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
resources_.add(
input.readMessage(com.alibaba.nacos.istio.model.mcp.Resource.parser(), extensionRegistry));
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
removedResources_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
removedResources_.add(s);
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
nonce_ = s;
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
resources_ = java.util.Collections.unmodifiableList(resources_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
removedResources_ = removedResources_.getUnmodifiableView();
}
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_Resources_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.alibaba.nacos.istio.model.mcp.Mcp.internal_static_istio_mcp_v1alpha1_Resources_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.alibaba.nacos.istio.model.mcp.Resources.class, com.alibaba.nacos.istio.model.mcp.Resources.Builder.class);
}
public static final int SYSTEM_VERSION_INFO_FIELD_NUMBER = 1;
private volatile java.lang.Object systemVersionInfo_;
/**
*
* The version of the response data (used for debugging).
*
* 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 RESOURCES_FIELD_NUMBER = 3;
private java.util.List resources_;
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public int getResourcesCount() {
return resources_.size();
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public com.alibaba.nacos.istio.model.mcp.ResourceOrBuilder getResourcesOrBuilder(
int index) {
return resources_.get(index);
}
public static final int REMOVED_RESOURCES_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList removedResources_;
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @return A list containing the removedResources.
*/
public com.google.protobuf.ProtocolStringList
getRemovedResourcesList() {
return removedResources_;
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @return The count of removedResources.
*/
public int getRemovedResourcesCount() {
return removedResources_.size();
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param index The index of the element to return.
* @return The removedResources at the given index.
*/
public java.lang.String getRemovedResources(int index) {
return removedResources_.get(index);
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param index The index of the value to return.
* @return The bytes of the removedResources at the given index.
*/
public com.google.protobuf.ByteString
getRemovedResourcesBytes(int index) {
return removedResources_.getByteString(index);
}
public static final int NONCE_FIELD_NUMBER = 5;
private volatile java.lang.Object nonce_;
/**
*
* Required. The nonce provides a way for RequestChange to uniquely
* reference a RequestResources.
*
* Required. The nonce provides a way for RequestChange to uniquely
* reference a RequestResources.
*
*
* string nonce = 5;
* @return The bytes for nonce.
*/
public com.google.protobuf.ByteString
getNonceBytes() {
java.lang.Object ref = nonce_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
nonce_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INCREMENTAL_FIELD_NUMBER = 6;
private boolean incremental_;
/**
*
* This resource response is an incremental update. The source should only send
* incremental updates if the sink requested them.
*
*
* bool incremental = 6;
* @return The incremental.
*/
public boolean getIncremental() {
return incremental_;
}
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 (!getSystemVersionInfoBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, systemVersionInfo_);
}
if (!getCollectionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, collection_);
}
for (int i = 0; i < resources_.size(); i++) {
output.writeMessage(3, resources_.get(i));
}
for (int i = 0; i < removedResources_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, removedResources_.getRaw(i));
}
if (!getNonceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, nonce_);
}
if (incremental_ != false) {
output.writeBool(6, incremental_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSystemVersionInfoBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, systemVersionInfo_);
}
if (!getCollectionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, collection_);
}
for (int i = 0; i < resources_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, resources_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < removedResources_.size(); i++) {
dataSize += computeStringSizeNoTag(removedResources_.getRaw(i));
}
size += dataSize;
size += 1 * getRemovedResourcesList().size();
}
if (!getNonceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, nonce_);
}
if (incremental_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, incremental_);
}
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 com.alibaba.nacos.istio.model.mcp.Resources)) {
return super.equals(obj);
}
com.alibaba.nacos.istio.model.mcp.Resources other = (com.alibaba.nacos.istio.model.mcp.Resources) obj;
if (!getSystemVersionInfo()
.equals(other.getSystemVersionInfo())) return false;
if (!getCollection()
.equals(other.getCollection())) return false;
if (!getResourcesList()
.equals(other.getResourcesList())) return false;
if (!getRemovedResourcesList()
.equals(other.getRemovedResourcesList())) return false;
if (!getNonce()
.equals(other.getNonce())) return false;
if (getIncremental()
!= other.getIncremental()) 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();
hash = (37 * hash) + SYSTEM_VERSION_INFO_FIELD_NUMBER;
hash = (53 * hash) + getSystemVersionInfo().hashCode();
hash = (37 * hash) + COLLECTION_FIELD_NUMBER;
hash = (53 * hash) + getCollection().hashCode();
if (getResourcesCount() > 0) {
hash = (37 * hash) + RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + getResourcesList().hashCode();
}
if (getRemovedResourcesCount() > 0) {
hash = (37 * hash) + REMOVED_RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + getRemovedResourcesList().hashCode();
}
hash = (37 * hash) + NONCE_FIELD_NUMBER;
hash = (53 * hash) + getNonce().hashCode();
hash = (37 * hash) + INCREMENTAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIncremental());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.mcp.Resources parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.alibaba.nacos.istio.model.mcp.Resources 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 com.alibaba.nacos.istio.model.mcp.Resources parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.alibaba.nacos.istio.model.mcp.Resources 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 com.alibaba.nacos.istio.model.mcp.Resources parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.alibaba.nacos.istio.model.mcp.Resources 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(com.alibaba.nacos.istio.model.mcp.Resources 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;
}
/**
*
* Resources do not need to include a full snapshot of the tracked
* resources. Instead they are a diff to the state of a MCP client.
* Per resource versions allow sources and sinks to track state at
* the resource granularity. An MCP incremental session is always
* in the context of a gRPC bidirectional stream. This allows the
* MCP source to keep track of the state of MCP sink connected to
* it.
* In Incremental MCP the nonce field is required and used to pair
* Resources to an RequestResources ACK or NACK.
*
* 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 java.util.List resources_ =
java.util.Collections.emptyList();
private void ensureResourcesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
resources_ = new java.util.ArrayList(resources_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.alibaba.nacos.istio.model.mcp.Resource, com.alibaba.nacos.istio.model.mcp.Resource.Builder, com.alibaba.nacos.istio.model.mcp.ResourceOrBuilder> resourcesBuilder_;
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public int getResourcesCount() {
if (resourcesBuilder_ == null) {
return resources_.size();
} else {
return resourcesBuilder_.getCount();
}
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public Builder setResources(
int index, com.alibaba.nacos.istio.model.mcp.Resource value) {
if (resourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourcesIsMutable();
resources_.set(index, value);
onChanged();
} else {
resourcesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public Builder addResources(com.alibaba.nacos.istio.model.mcp.Resource value) {
if (resourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourcesIsMutable();
resources_.add(value);
onChanged();
} else {
resourcesBuilder_.addMessage(value);
}
return this;
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public Builder addResources(
int index, com.alibaba.nacos.istio.model.mcp.Resource value) {
if (resourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourcesIsMutable();
resources_.add(index, value);
onChanged();
} else {
resourcesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public com.alibaba.nacos.istio.model.mcp.Resource.Builder getResourcesBuilder(
int index) {
return getResourcesFieldBuilder().getBuilder(index);
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
*
* repeated .istio.mcp.v1alpha1.Resource resources = 3;
*/
public com.alibaba.nacos.istio.model.mcp.ResourceOrBuilder getResourcesOrBuilder(
int index) {
if (resourcesBuilder_ == null) {
return resources_.get(index); } else {
return resourcesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* The response resources wrapped in the common MCP *Resource* message.
* These are typed resources that match the type url in the
* RequestResources message.
* When `incremental` is true, this contains an array of resources to add/update
* for the specified collection. This modifies the existing collection at the sink
* When `incremental` is false, this contains the full set of resources for the
* specified collection. This replaces any previously delivered resources.
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @return A list containing the removedResources.
*/
public com.google.protobuf.ProtocolStringList
getRemovedResourcesList() {
return removedResources_.getUnmodifiableView();
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @return The count of removedResources.
*/
public int getRemovedResourcesCount() {
return removedResources_.size();
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param index The index of the element to return.
* @return The removedResources at the given index.
*/
public java.lang.String getRemovedResources(int index) {
return removedResources_.get(index);
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param index The index of the value to return.
* @return The bytes of the removedResources at the given index.
*/
public com.google.protobuf.ByteString
getRemovedResourcesBytes(int index) {
return removedResources_.getByteString(index);
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param index The index to set the value at.
* @param value The removedResources to set.
* @return This builder for chaining.
*/
public Builder setRemovedResources(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRemovedResourcesIsMutable();
removedResources_.set(index, value);
onChanged();
return this;
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param value The removedResources to add.
* @return This builder for chaining.
*/
public Builder addRemovedResources(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRemovedResourcesIsMutable();
removedResources_.add(value);
onChanged();
return this;
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param values The removedResources to add.
* @return This builder for chaining.
*/
public Builder addAllRemovedResources(
java.lang.Iterable values) {
ensureRemovedResourcesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, removedResources_);
onChanged();
return this;
}
/**
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
* Names of resources that have been deleted and to be
* removed from the MCP sink node. Removed resources for missing
* resources can be ignored.
* When `incremental` is true, this contains an array of resource names to remove
* for the specified collection. This modifies the existing resource collection at
* the sink.
* When `incremental` is false, this field should be ignored.
*
*
* repeated string removed_resources = 4;
* @param value The bytes of the removedResources to add.
* @return This builder for chaining.
*/
public Builder addRemovedResourcesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureRemovedResourcesIsMutable();
removedResources_.add(value);
onChanged();
return this;
}
private java.lang.Object nonce_ = "";
/**
*
* Required. The nonce provides a way for RequestChange to uniquely
* reference a RequestResources.
*