All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alachisoft.ncache.common.protobuf.KeyValueProtocol Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: KeyValue.proto

package com.alachisoft.ncache.common.protobuf;

public final class KeyValueProtocol {
    private static com.google.protobuf.Descriptors.Descriptor
            internal_static_com_alachisoft_ncache_common_protobuf_KeyValue_descriptor;
    private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
            internal_static_com_alachisoft_ncache_common_protobuf_KeyValue_fieldAccessorTable;
    private static com.google.protobuf.Descriptors.FileDescriptor
            descriptor;

    static {
        java.lang.String[] descriptorData = {
                "\n\016KeyValue.proto\022%com.alachisoft.ncache." +
                        "common.protobuf\032\023ValueWithType.proto\"\\\n\010" +
                        "KeyValue\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \003(\01324.c" +
                        "om.alachisoft.ncache.common.protobuf.Val" +
                        "ueWithTypeB\022B\020KeyValueProtocol"
        };
        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_KeyValue_descriptor =
                                getDescriptor().getMessageTypes().get(0);
                        internal_static_com_alachisoft_ncache_common_protobuf_KeyValue_fieldAccessorTable = new
                                com.google.protobuf.GeneratedMessage.FieldAccessorTable(
                                internal_static_com_alachisoft_ncache_common_protobuf_KeyValue_descriptor,
                                new java.lang.String[]{"Key", "Value",},
                                com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue.class,
                                com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue.Builder.class);
                        return null;
                    }
                };
        com.google.protobuf.Descriptors.FileDescriptor
                .internalBuildGeneratedFileFrom(descriptorData,
                        new com.google.protobuf.Descriptors.FileDescriptor[]{
                                com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.getDescriptor(),
                        }, assigner);
    }
    private KeyValueProtocol() {
    }

    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 KeyValue extends
            com.google.protobuf.GeneratedMessage {
        // optional string key = 1;
        public static final int KEY_FIELD_NUMBER = 1;
        // repeated .com.alachisoft.ncache.common.protobuf.ValueWithType value = 2;
        public static final int VALUE_FIELD_NUMBER = 2;
        private static final KeyValue defaultInstance;

        static {
            defaultInstance = new KeyValue(true);
            com.alachisoft.ncache.common.protobuf.KeyValueProtocol.internalForceInit();
            defaultInstance.initFields();
        }

        private boolean hasKey;
        private java.lang.String key_ = "";
        private java.util.List value_ =
                java.util.Collections.emptyList();
        private int memoizedSerializedSize = -1;
        // Use KeyValue.newBuilder() to construct.
        private KeyValue() {
            initFields();
        }
        private KeyValue(boolean noInit) {
        }

        public static KeyValue getDefaultInstance() {
            return defaultInstance;
        }

        public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
            return com.alachisoft.ncache.common.protobuf.KeyValueProtocol.internal_static_com_alachisoft_ncache_common_protobuf_KeyValue_descriptor;
        }

        public static com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue parseFrom(
                com.google.protobuf.ByteString data)
                throws com.google.protobuf.InvalidProtocolBufferException {
            return newBuilder().mergeFrom(data).buildParsed();
        }

        public static com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue 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.KeyValueProtocol.KeyValue parseFrom(byte[] data)
                throws com.google.protobuf.InvalidProtocolBufferException {
            return newBuilder().mergeFrom(data).buildParsed();
        }

        public static com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue 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.KeyValueProtocol.KeyValue parseFrom(java.io.InputStream input)
                throws java.io.IOException {
            return newBuilder().mergeFrom(input).buildParsed();
        }

        public static com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue 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.KeyValueProtocol.KeyValue 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.KeyValueProtocol.KeyValue 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.KeyValueProtocol.KeyValue parseFrom(
                com.google.protobuf.CodedInputStream input)
                throws java.io.IOException {
            return newBuilder().mergeFrom(input).buildParsed();
        }

        public static com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue 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.KeyValueProtocol.KeyValue prototype) {
            return newBuilder().mergeFrom(prototype);
        }

        public KeyValue getDefaultInstanceForType() {
            return defaultInstance;
        }

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
            return com.alachisoft.ncache.common.protobuf.KeyValueProtocol.internal_static_com_alachisoft_ncache_common_protobuf_KeyValue_fieldAccessorTable;
        }

        public boolean hasKey() {
            return hasKey;
        }

        public java.lang.String getKey() {
            return key_;
        }

        public java.util.List getValueList() {
            return value_;
        }

        public int getValueCount() {
            return value_.size();
        }

        public com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType getValue(int index) {
            return value_.get(index);
        }

        private void initFields() {
        }

        public final boolean isInitialized() {
            return true;
        }

        public void writeTo(com.google.protobuf.CodedOutputStream output)
                throws java.io.IOException {
            getSerializedSize();
            if (hasKey()) {
                output.writeString(1, getKey());
            }
            for (com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType element : getValueList()) {
                output.writeMessage(2, element);
            }
            getUnknownFields().writeTo(output);
        }

        public int getSerializedSize() {
            int size = memoizedSerializedSize;
            if (size != -1) return size;

            size = 0;
            if (hasKey()) {
                size += com.google.protobuf.CodedOutputStream
                        .computeStringSize(1, getKey());
            }
            for (com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType element : getValueList()) {
                size += com.google.protobuf.CodedOutputStream
                        .computeMessageSize(2, element);
            }
            size += getUnknownFields().getSerializedSize();
            memoizedSerializedSize = size;
            return size;
        }

        public Builder newBuilderForType() {
            return newBuilder();
        }

        public Builder toBuilder() {
            return newBuilder(this);
        }

        public static final class Builder extends
                com.google.protobuf.GeneratedMessage.Builder {
            private com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue result;

            // Construct using com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue.newBuilder()
            private Builder() {
            }

            private static Builder create() {
                Builder builder = new Builder();
                builder.result = new com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue();
                return builder;
            }

            protected com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue internalGetResult() {
                return result;
            }

            public Builder clear() {
                if (result == null) {
                    throw new IllegalStateException(
                            "Cannot call clear() after build().");
                }
                result = new com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue();
                return this;
            }

            public Builder clone() {
                return create().mergeFrom(result);
            }

            public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
                return com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue.getDescriptor();
            }

            public com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue getDefaultInstanceForType() {
                return com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue.getDefaultInstance();
            }

            public boolean isInitialized() {
                return result.isInitialized();
            }

            public com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue build() {
                if (result != null && !isInitialized()) {
                    throw newUninitializedMessageException(result);
                }
                return buildPartial();
            }

            private com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue buildParsed()
                    throws com.google.protobuf.InvalidProtocolBufferException {
                if (!isInitialized()) {
                    throw newUninitializedMessageException(
                            result).asInvalidProtocolBufferException();
                }
                return buildPartial();
            }

            public com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue buildPartial() {
                if (result == null) {
                    throw new IllegalStateException(
                            "build() has already been called on this Builder.");
                }
                if (result.value_ != java.util.Collections.EMPTY_LIST) {
                    result.value_ =
                            java.util.Collections.unmodifiableList(result.value_);
                }
                com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue returnMe = result;
                result = null;
                return returnMe;
            }

            public Builder mergeFrom(com.google.protobuf.Message other) {
                if (other instanceof com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue) {
                    return mergeFrom((com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue) other);
                } else {
                    super.mergeFrom(other);
                    return this;
                }
            }

            public Builder mergeFrom(com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue other) {
                if (other == com.alachisoft.ncache.common.protobuf.KeyValueProtocol.KeyValue.getDefaultInstance())
                    return this;
                if (other.hasKey()) {
                    setKey(other.getKey());
                }
                if (!other.value_.isEmpty()) {
                    if (result.value_.isEmpty()) {
                        result.value_ = new java.util.ArrayList();
                    }
                    result.value_.addAll(other.value_);
                }
                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: {
                            setKey(input.readString());
                            break;
                        }
                        case 18: {
                            com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType.Builder subBuilder = com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType.newBuilder();
                            input.readMessage(subBuilder, extensionRegistry);
                            addValue(subBuilder.buildPartial());
                            break;
                        }
                    }
                }
            }


            // optional string key = 1;
            public boolean hasKey() {
                return result.hasKey();
            }

            public java.lang.String getKey() {
                return result.getKey();
            }

            public Builder setKey(java.lang.String value) {
                if (value == null) {
                    throw new NullPointerException();
                }
                result.hasKey = true;
                result.key_ = value;
                return this;
            }

            public Builder clearKey() {
                result.hasKey = false;
                result.key_ = getDefaultInstance().getKey();
                return this;
            }

            // repeated .com.alachisoft.ncache.common.protobuf.ValueWithType value = 2;
            public java.util.List getValueList() {
                return java.util.Collections.unmodifiableList(result.value_);
            }

            public int getValueCount() {
                return result.getValueCount();
            }

            public com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType getValue(int index) {
                return result.getValue(index);
            }

            public Builder setValue(int index, com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType value) {
                if (value == null) {
                    throw new NullPointerException();
                }
                result.value_.set(index, value);
                return this;
            }

            public Builder setValue(int index, com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType.Builder builderForValue) {
                result.value_.set(index, builderForValue.build());
                return this;
            }

            public Builder addValue(com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType value) {
                if (value == null) {
                    throw new NullPointerException();
                }
                if (result.value_.isEmpty()) {
                    result.value_ = new java.util.ArrayList();
                }
                result.value_.add(value);
                return this;
            }

            public Builder addValue(com.alachisoft.ncache.common.protobuf.ValueWithTypeProtocol.ValueWithType.Builder builderForValue) {
                if (result.value_.isEmpty()) {
                    result.value_ = new java.util.ArrayList();
                }
                result.value_.add(builderForValue.build());
                return this;
            }

            public Builder addAllValue(
                    java.lang.Iterable values) {
                if (result.value_.isEmpty()) {
                    result.value_ = new java.util.ArrayList();
                }
                super.addAll(values, result.value_);
                return this;
            }

            public Builder clearValue() {
                result.value_ = java.util.Collections.emptyList();
                return this;
            }

            // @@protoc_insertion_point(builder_scope:com.alachisoft.ncache.common.protobuf.KeyValue)
        }

        // @@protoc_insertion_point(class_scope:com.alachisoft.ncache.common.protobuf.KeyValue)
    }

    // @@protoc_insertion_point(outer_class_scope)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy