com.alachisoft.ncache.common.protobuf.CollectionGetChunkResponseProtocol Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-common Show documentation
Show all versions of nc-common Show documentation
Internal package of Alachisoft.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: CollectionGetChunkResponse.proto
package com.alachisoft.ncache.common.protobuf;
public final class CollectionGetChunkResponseProtocol {
private CollectionGetChunkResponseProtocol() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public static final class CollectionGetChunkResponse extends
com.google.protobuf.GeneratedMessage {
// Use CollectionGetChunkResponse.newBuilder() to construct.
private CollectionGetChunkResponse() {
initFields();
}
private CollectionGetChunkResponse(boolean noInit) {}
private static final CollectionGetChunkResponse defaultInstance;
public static CollectionGetChunkResponse getDefaultInstance() {
return defaultInstance;
}
public CollectionGetChunkResponse getDefaultInstanceForType() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return CollectionGetChunkResponseProtocol.internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_descriptor;
}
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return CollectionGetChunkResponseProtocol.internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_fieldAccessorTable;
}
// repeated .com.alachisoft.ncache.common.protobuf.CollectionItem data = 1;
public static final int DATA_FIELD_NUMBER = 1;
private java.util.List data_ =
java.util.Collections.emptyList();
public java.util.List getDataList() {
return data_;
}
public int getDataCount() { return data_.size(); }
public CollectionItemProtocol.CollectionItem getData(int index) {
return data_.get(index);
}
// optional int32 nextIndex = 2;
public static final int NEXTINDEX_FIELD_NUMBER = 2;
private boolean hasNextIndex;
private int nextIndex_ = 0;
public boolean hasNextIndex() { return hasNextIndex; }
public int getNextIndex() { return nextIndex_; }
// optional bool isLastChunk = 3;
public static final int ISLASTCHUNK_FIELD_NUMBER = 3;
private boolean hasIsLastChunk;
private boolean isLastChunk_ = false;
public boolean hasIsLastChunk() { return hasIsLastChunk; }
public boolean getIsLastChunk() { return isLastChunk_; }
// optional int32 version = 4;
public static final int VERSION_FIELD_NUMBER = 4;
private boolean hasVersion;
private int version_ = 0;
public boolean hasVersion() { return hasVersion; }
public int getVersion() { return version_; }
// optional .com.alachisoft.ncache.common.protobuf.CacheItemType.ItemType itemType = 5 [default = LIST];
public static final int ITEMTYPE_FIELD_NUMBER = 5;
private boolean hasItemType;
private CacheItemTypeProtocol.CacheItemType.ItemType itemType_;
public boolean hasItemType() { return hasItemType; }
public CacheItemTypeProtocol.CacheItemType.ItemType getItemType() { return itemType_; }
private void initFields() {
itemType_ = CacheItemTypeProtocol.CacheItemType.ItemType.LIST;
}
public final boolean isInitialized() {
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (CollectionItemProtocol.CollectionItem element : getDataList()) {
output.writeMessage(1, element);
}
if (hasNextIndex()) {
output.writeInt32(2, getNextIndex());
}
if (hasIsLastChunk()) {
output.writeBool(3, getIsLastChunk());
}
if (hasVersion()) {
output.writeInt32(4, getVersion());
}
if (hasItemType()) {
output.writeEnum(5, getItemType().getNumber());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
for (CollectionItemProtocol.CollectionItem element : getDataList()) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, element);
}
if (hasNextIndex()) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, getNextIndex());
}
if (hasIsLastChunk()) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, getIsLastChunk());
}
if (hasVersion()) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, getVersion());
}
if (hasItemType()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, getItemType().getNumber());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public static CollectionGetChunkResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static CollectionGetChunkResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static CollectionGetChunkResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static CollectionGetChunkResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static CollectionGetChunkResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static CollectionGetChunkResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static CollectionGetChunkResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static CollectionGetChunkResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static CollectionGetChunkResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static CollectionGetChunkResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(CollectionGetChunkResponse prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder {
private CollectionGetChunkResponse result;
// Construct using com.alachisoft.ncache.common.protobuf.CollectionGetChunkResponseProtocol.CollectionGetChunkResponse.newBuilder()
private Builder() {}
private static Builder create() {
Builder builder = new Builder();
builder.result = new CollectionGetChunkResponse();
return builder;
}
protected CollectionGetChunkResponse internalGetResult() {
return result;
}
public Builder clear() {
if (result == null) {
throw new IllegalStateException(
"Cannot call clear() after build().");
}
result = new CollectionGetChunkResponse();
return this;
}
public Builder clone() {
return create().mergeFrom(result);
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return CollectionGetChunkResponse.getDescriptor();
}
public CollectionGetChunkResponse getDefaultInstanceForType() {
return CollectionGetChunkResponse.getDefaultInstance();
}
public boolean isInitialized() {
return result.isInitialized();
}
public CollectionGetChunkResponse build() {
if (result != null && !isInitialized()) {
throw newUninitializedMessageException(result);
}
return buildPartial();
}
private CollectionGetChunkResponse buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
if (!isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return buildPartial();
}
public CollectionGetChunkResponse buildPartial() {
if (result == null) {
throw new IllegalStateException(
"build() has already been called on this Builder.");
}
if (result.data_ != java.util.Collections.EMPTY_LIST) {
result.data_ =
java.util.Collections.unmodifiableList(result.data_);
}
CollectionGetChunkResponse returnMe = result;
result = null;
return returnMe;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof CollectionGetChunkResponse) {
return mergeFrom((CollectionGetChunkResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(CollectionGetChunkResponse other) {
if (other == CollectionGetChunkResponse.getDefaultInstance()) return this;
if (!other.data_.isEmpty()) {
if (result.data_.isEmpty()) {
result.data_ = new java.util.ArrayList();
}
result.data_.addAll(other.data_);
}
if (other.hasNextIndex()) {
setNextIndex(other.getNextIndex());
}
if (other.hasIsLastChunk()) {
setIsLastChunk(other.getIsLastChunk());
}
if (other.hasVersion()) {
setVersion(other.getVersion());
}
if (other.hasItemType()) {
setItemType(other.getItemType());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(
this.getUnknownFields());
while (true) {
int tag = input.readTag();
switch (tag) {
case 0:
this.setUnknownFields(unknownFields.build());
return this;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.setUnknownFields(unknownFields.build());
return this;
}
break;
}
case 10: {
CollectionItemProtocol.CollectionItem.Builder subBuilder = CollectionItemProtocol.CollectionItem.newBuilder();
input.readMessage(subBuilder, extensionRegistry);
addData(subBuilder.buildPartial());
break;
}
case 16: {
setNextIndex(input.readInt32());
break;
}
case 24: {
setIsLastChunk(input.readBool());
break;
}
case 32: {
setVersion(input.readInt32());
break;
}
case 40: {
int rawValue = input.readEnum();
CacheItemTypeProtocol.CacheItemType.ItemType value = CacheItemTypeProtocol.CacheItemType.ItemType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(5, rawValue);
} else {
setItemType(value);
}
break;
}
}
}
}
// repeated .com.alachisoft.ncache.common.protobuf.CollectionItem data = 1;
public java.util.List getDataList() {
return java.util.Collections.unmodifiableList(result.data_);
}
public int getDataCount() {
return result.getDataCount();
}
public CollectionItemProtocol.CollectionItem getData(int index) {
return result.getData(index);
}
public Builder setData(int index, CollectionItemProtocol.CollectionItem value) {
if (value == null) {
throw new NullPointerException();
}
result.data_.set(index, value);
return this;
}
public Builder setData(int index, CollectionItemProtocol.CollectionItem.Builder builderForValue) {
result.data_.set(index, builderForValue.build());
return this;
}
public Builder addData(CollectionItemProtocol.CollectionItem value) {
if (value == null) {
throw new NullPointerException();
}
if (result.data_.isEmpty()) {
result.data_ = new java.util.ArrayList();
}
result.data_.add(value);
return this;
}
public Builder addData(CollectionItemProtocol.CollectionItem.Builder builderForValue) {
if (result.data_.isEmpty()) {
result.data_ = new java.util.ArrayList();
}
result.data_.add(builderForValue.build());
return this;
}
public Builder addAllData(
Iterable extends CollectionItemProtocol.CollectionItem> values) {
if (result.data_.isEmpty()) {
result.data_ = new java.util.ArrayList();
}
super.addAll(values, result.data_);
return this;
}
public Builder clearData() {
result.data_ = java.util.Collections.emptyList();
return this;
}
// optional int32 nextIndex = 2;
public boolean hasNextIndex() {
return result.hasNextIndex();
}
public int getNextIndex() {
return result.getNextIndex();
}
public Builder setNextIndex(int value) {
result.hasNextIndex = true;
result.nextIndex_ = value;
return this;
}
public Builder clearNextIndex() {
result.hasNextIndex = false;
result.nextIndex_ = 0;
return this;
}
// optional bool isLastChunk = 3;
public boolean hasIsLastChunk() {
return result.hasIsLastChunk();
}
public boolean getIsLastChunk() {
return result.getIsLastChunk();
}
public Builder setIsLastChunk(boolean value) {
result.hasIsLastChunk = true;
result.isLastChunk_ = value;
return this;
}
public Builder clearIsLastChunk() {
result.hasIsLastChunk = false;
result.isLastChunk_ = false;
return this;
}
// optional int32 version = 4;
public boolean hasVersion() {
return result.hasVersion();
}
public int getVersion() {
return result.getVersion();
}
public Builder setVersion(int value) {
result.hasVersion = true;
result.version_ = value;
return this;
}
public Builder clearVersion() {
result.hasVersion = false;
result.version_ = 0;
return this;
}
// optional .com.alachisoft.ncache.common.protobuf.CacheItemType.ItemType itemType = 5 [default = LIST];
public boolean hasItemType() {
return result.hasItemType();
}
public CacheItemTypeProtocol.CacheItemType.ItemType getItemType() {
return result.getItemType();
}
public Builder setItemType(CacheItemTypeProtocol.CacheItemType.ItemType value) {
if (value == null) {
throw new NullPointerException();
}
result.hasItemType = true;
result.itemType_ = value;
return this;
}
public Builder clearItemType() {
result.hasItemType = false;
result.itemType_ = CacheItemTypeProtocol.CacheItemType.ItemType.LIST;
return this;
}
// @@protoc_insertion_point(builder_scope:com.alachisoft.ncache.common.protobuf.CollectionGetChunkResponse)
}
static {
defaultInstance = new CollectionGetChunkResponse(true);
CollectionGetChunkResponseProtocol.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:com.alachisoft.ncache.common.protobuf.CollectionGetChunkResponse)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
String[] descriptorData = {
"\n CollectionGetChunkResponse.proto\022%com." +
"alachisoft.ncache.common.protobuf\032\024Colle" +
"ctionItem.proto\032\023CacheItemType.proto\"\361\001\n" +
"\032CollectionGetChunkResponse\022C\n\004data\030\001 \003(" +
"\01325.com.alachisoft.ncache.common.protobu" +
"f.CollectionItem\022\021\n\tnextIndex\030\002 \001(\005\022\023\n\013i" +
"sLastChunk\030\003 \001(\010\022\017\n\007version\030\004 \001(\005\022U\n\010ite" +
"mType\030\005 \001(\0162=.com.alachisoft.ncache.comm" +
"on.protobuf.CacheItemType.ItemType:\004LIST" +
"B$B\"CollectionGetChunkResponseProtocol"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_alachisoft_ncache_common_protobuf_CollectionGetChunkResponse_descriptor,
new String[] { "Data", "NextIndex", "IsLastChunk", "Version", "ItemType", },
CollectionGetChunkResponse.class,
CollectionGetChunkResponse.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
CollectionItemProtocol.getDescriptor(),
CacheItemTypeProtocol.getDescriptor(),
}, assigner);
}
public static void internalForceInit() {}
// @@protoc_insertion_point(outer_class_scope)
}