com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol 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: CounterOperations.proto
package com.alachisoft.ncache.common.protobuf;
public final class CounterOpertionsProtocol {
private static com.google.protobuf.Descriptors.Descriptor
internal_static_com_alachisoft_ncache_common_protobuf_CounterOperations_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_com_alachisoft_ncache_common_protobuf_CounterOperations_fieldAccessorTable;
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\027CounterOperations.proto\022%com.alachisof" +
"t.ncache.common.protobuf\"\255\001\n\021CounterOper" +
"ations\022\r\n\005value\030\001 \001(\003\022O\n\006method\030\002 \001(\0162?." +
"com.alachisoft.ncache.common.protobuf.Co" +
"unterOperations.Method\"8\n\006Method\022\017\n\013INCR" +
"EMENTBY\020\001\022\017\n\013DECREMENTBY\020\002\022\014\n\010SETVALUE\020\003" +
"B\032B\030CounterOpertionsProtocol"
};
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_CounterOperations_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_com_alachisoft_ncache_common_protobuf_CounterOperations_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_com_alachisoft_ncache_common_protobuf_CounterOperations_descriptor,
new java.lang.String[]{"Value", "Method",},
com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.class,
com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Builder.class);
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[]{
}, assigner);
}
private CounterOpertionsProtocol() {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
public static void internalForceInit() {
}
public static final class CounterOperations extends
com.google.protobuf.GeneratedMessage {
// optional int64 value = 1;
public static final int VALUE_FIELD_NUMBER = 1;
// optional .com.alachisoft.ncache.common.protobuf.CounterOperations.Method method = 2;
public static final int METHOD_FIELD_NUMBER = 2;
private static final CounterOperations defaultInstance;
static {
defaultInstance = new CounterOperations(true);
com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.internalForceInit();
defaultInstance.initFields();
}
private boolean hasValue;
private long value_ = 0L;
private boolean hasMethod;
private com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method method_;
private int memoizedSerializedSize = -1;
// Use CounterOperations.newBuilder() to construct.
private CounterOperations() {
initFields();
}
private CounterOperations(boolean noInit) {
}
public static CounterOperations getDefaultInstance() {
return defaultInstance;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.internal_static_com_alachisoft_ncache_common_protobuf_CounterOperations_descriptor;
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data).buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return newBuilder().mergeFrom(data, extensionRegistry)
.buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeFrom(input, extensionRegistry)
.buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations 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 com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return newBuilder().mergeFrom(input).buildParsed();
}
public static com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations 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 static Builder newBuilder(com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations prototype) {
return newBuilder().mergeFrom(prototype);
}
public CounterOperations getDefaultInstanceForType() {
return defaultInstance;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.internal_static_com_alachisoft_ncache_common_protobuf_CounterOperations_fieldAccessorTable;
}
public boolean hasValue() {
return hasValue;
}
public long getValue() {
return value_;
}
public boolean hasMethod() {
return hasMethod;
}
public com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method getMethod() {
return method_;
}
private void initFields() {
method_ = com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method.INCREMENTBY;
}
public final boolean isInitialized() {
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (hasValue()) {
output.writeInt64(1, getValue());
}
if (hasMethod()) {
output.writeEnum(2, getMethod().getNumber());
}
getUnknownFields().writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (hasValue()) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, getValue());
}
if (hasMethod()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, getMethod().getNumber());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
public Builder newBuilderForType() {
return newBuilder();
}
public Builder toBuilder() {
return newBuilder(this);
}
public enum Method
implements com.google.protobuf.ProtocolMessageEnum {
INCREMENTBY(0, 1),
DECREMENTBY(1, 2),
SETVALUE(2, 3),
;
private static final Method[] VALUES = {
INCREMENTBY, DECREMENTBY, SETVALUE,
};
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Method findValueByNumber(int number) {
return Method.valueOf(number)
;
}
};
static {
com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.getDescriptor();
}
private final int index;
private final int value;
private Method(int index, int value) {
this.index = index;
this.value = value;
}
public static Method valueOf(int value) {
switch (value) {
case 1:
return INCREMENTBY;
case 2:
return DECREMENTBY;
case 3:
return SETVALUE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.getDescriptor().getEnumTypes().get(0);
}
public static Method valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
public final int getNumber() {
return value;
}
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
// @@protoc_insertion_point(enum_scope:com.alachisoft.ncache.common.protobuf.CounterOperations.Method)
}
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder {
private com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations result;
// Construct using com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.newBuilder()
private Builder() {
}
private static Builder create() {
Builder builder = new Builder();
builder.result = new com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations();
return builder;
}
protected com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations internalGetResult() {
return result;
}
public Builder clear() {
if (result == null) {
throw new IllegalStateException(
"Cannot call clear() after build().");
}
result = new com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations();
return this;
}
public Builder clone() {
return create().mergeFrom(result);
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.getDescriptor();
}
public com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations getDefaultInstanceForType() {
return com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.getDefaultInstance();
}
public boolean isInitialized() {
return result.isInitialized();
}
public com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations build() {
if (result != null && !isInitialized()) {
throw newUninitializedMessageException(result);
}
return buildPartial();
}
private com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations buildParsed()
throws com.google.protobuf.InvalidProtocolBufferException {
if (!isInitialized()) {
throw newUninitializedMessageException(
result).asInvalidProtocolBufferException();
}
return buildPartial();
}
public com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations buildPartial() {
if (result == null) {
throw new IllegalStateException(
"build() has already been called on this Builder.");
}
com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations returnMe = result;
result = null;
return returnMe;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations) {
return mergeFrom((com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations other) {
if (other == com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.getDefaultInstance())
return this;
if (other.hasValue()) {
setValue(other.getValue());
}
if (other.hasMethod()) {
setMethod(other.getMethod());
}
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 8: {
setValue(input.readInt64());
break;
}
case 16: {
int rawValue = input.readEnum();
com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method value = com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(2, rawValue);
} else {
setMethod(value);
}
break;
}
}
}
}
// optional int64 value = 1;
public boolean hasValue() {
return result.hasValue();
}
public long getValue() {
return result.getValue();
}
public Builder setValue(long value) {
result.hasValue = true;
result.value_ = value;
return this;
}
public Builder clearValue() {
result.hasValue = false;
result.value_ = 0L;
return this;
}
// optional .com.alachisoft.ncache.common.protobuf.CounterOperations.Method method = 2;
public boolean hasMethod() {
return result.hasMethod();
}
public com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method getMethod() {
return result.getMethod();
}
public Builder setMethod(com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method value) {
if (value == null) {
throw new NullPointerException();
}
result.hasMethod = true;
result.method_ = value;
return this;
}
public Builder clearMethod() {
result.hasMethod = false;
result.method_ = com.alachisoft.ncache.common.protobuf.CounterOpertionsProtocol.CounterOperations.Method.INCREMENTBY;
return this;
}
// @@protoc_insertion_point(builder_scope:com.alachisoft.ncache.common.protobuf.CounterOperations)
}
// @@protoc_insertion_point(class_scope:com.alachisoft.ncache.common.protobuf.CounterOperations)
}
// @@protoc_insertion_point(outer_class_scope)
}