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

mvccpb.Kv Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: etcd/mvcc/mvccpb/kv.proto

package mvccpb;

public final class Kv {
  private Kv() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface KeyValueOrBuilder extends
      // @@protoc_insertion_point(interface_extends:mvccpb.KeyValue)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     * key is the key in bytes. An empty key is not allowed.
     * 
* * bytes key = 1; */ com.google.protobuf.ByteString getKey(); /** *
     * create_revision is the revision of last creation on this key.
     * 
* * int64 create_revision = 2; */ long getCreateRevision(); /** *
     * mod_revision is the revision of last modification on this key.
     * 
* * int64 mod_revision = 3; */ long getModRevision(); /** *
     * version is the version of the key. A deletion resets
     * the version to zero and any modification of the key
     * increases its version.
     * 
* * int64 version = 4; */ long getVersion(); /** *
     * value is the value held by the key, in bytes.
     * 
* * bytes value = 5; */ com.google.protobuf.ByteString getValue(); /** *
     * lease is the ID of the lease that attached to key.
     * When the attached lease expires, the key will be deleted.
     * If lease is 0, then no lease is attached to the key.
     * 
* * int64 lease = 6; */ long getLease(); } /** * Protobuf type {@code mvccpb.KeyValue} */ public static final class KeyValue extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:mvccpb.KeyValue) KeyValueOrBuilder { private static final long serialVersionUID = 0L; // Use KeyValue.newBuilder() to construct. private KeyValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private KeyValue() { key_ = com.google.protobuf.ByteString.EMPTY; createRevision_ = 0L; modRevision_ = 0L; version_ = 0L; value_ = com.google.protobuf.ByteString.EMPTY; lease_ = 0L; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private KeyValue( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); 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; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { key_ = input.readBytes(); break; } case 16: { createRevision_ = input.readInt64(); break; } case 24: { modRevision_ = input.readInt64(); break; } case 32: { version_ = input.readInt64(); break; } case 42: { value_ = input.readBytes(); break; } case 48: { lease_ = input.readInt64(); 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 mvccpb.Kv.internal_static_mvccpb_KeyValue_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return mvccpb.Kv.internal_static_mvccpb_KeyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( mvccpb.Kv.KeyValue.class, mvccpb.Kv.KeyValue.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private com.google.protobuf.ByteString key_; /** *
     * key is the key in bytes. An empty key is not allowed.
     * 
* * bytes key = 1; */ public com.google.protobuf.ByteString getKey() { return key_; } public static final int CREATE_REVISION_FIELD_NUMBER = 2; private long createRevision_; /** *
     * create_revision is the revision of last creation on this key.
     * 
* * int64 create_revision = 2; */ public long getCreateRevision() { return createRevision_; } public static final int MOD_REVISION_FIELD_NUMBER = 3; private long modRevision_; /** *
     * mod_revision is the revision of last modification on this key.
     * 
* * int64 mod_revision = 3; */ public long getModRevision() { return modRevision_; } public static final int VERSION_FIELD_NUMBER = 4; private long version_; /** *
     * version is the version of the key. A deletion resets
     * the version to zero and any modification of the key
     * increases its version.
     * 
* * int64 version = 4; */ public long getVersion() { return version_; } public static final int VALUE_FIELD_NUMBER = 5; private com.google.protobuf.ByteString value_; /** *
     * value is the value held by the key, in bytes.
     * 
* * bytes value = 5; */ public com.google.protobuf.ByteString getValue() { return value_; } public static final int LEASE_FIELD_NUMBER = 6; private long lease_; /** *
     * lease is the ID of the lease that attached to key.
     * When the attached lease expires, the key will be deleted.
     * If lease is 0, then no lease is attached to the key.
     * 
* * int64 lease = 6; */ public long getLease() { return lease_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!key_.isEmpty()) { output.writeBytes(1, key_); } if (createRevision_ != 0L) { output.writeInt64(2, createRevision_); } if (modRevision_ != 0L) { output.writeInt64(3, modRevision_); } if (version_ != 0L) { output.writeInt64(4, version_); } if (!value_.isEmpty()) { output.writeBytes(5, value_); } if (lease_ != 0L) { output.writeInt64(6, lease_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!key_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, key_); } if (createRevision_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, createRevision_); } if (modRevision_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, modRevision_); } if (version_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, version_); } if (!value_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, value_); } if (lease_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, lease_); } 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 mvccpb.Kv.KeyValue)) { return super.equals(obj); } mvccpb.Kv.KeyValue other = (mvccpb.Kv.KeyValue) obj; boolean result = true; result = result && getKey() .equals(other.getKey()); result = result && (getCreateRevision() == other.getCreateRevision()); result = result && (getModRevision() == other.getModRevision()); result = result && (getVersion() == other.getVersion()); result = result && getValue() .equals(other.getValue()); result = result && (getLease() == other.getLease()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + CREATE_REVISION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCreateRevision()); hash = (37 * hash) + MOD_REVISION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getModRevision()); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getVersion()); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + LEASE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLease()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static mvccpb.Kv.KeyValue parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static mvccpb.Kv.KeyValue parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static mvccpb.Kv.KeyValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static mvccpb.Kv.KeyValue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static mvccpb.Kv.KeyValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static mvccpb.Kv.KeyValue parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static mvccpb.Kv.KeyValue parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static mvccpb.Kv.KeyValue 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 mvccpb.Kv.KeyValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static mvccpb.Kv.KeyValue 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 mvccpb.Kv.KeyValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static mvccpb.Kv.KeyValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(mvccpb.Kv.KeyValue prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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; } /** * Protobuf type {@code mvccpb.KeyValue} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:mvccpb.KeyValue) mvccpb.Kv.KeyValueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return mvccpb.Kv.internal_static_mvccpb_KeyValue_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return mvccpb.Kv.internal_static_mvccpb_KeyValue_fieldAccessorTable .ensureFieldAccessorsInitialized( mvccpb.Kv.KeyValue.class, mvccpb.Kv.KeyValue.Builder.class); } // Construct using mvccpb.Kv.KeyValue.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); key_ = com.google.protobuf.ByteString.EMPTY; createRevision_ = 0L; modRevision_ = 0L; version_ = 0L; value_ = com.google.protobuf.ByteString.EMPTY; lease_ = 0L; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return mvccpb.Kv.internal_static_mvccpb_KeyValue_descriptor; } public mvccpb.Kv.KeyValue getDefaultInstanceForType() { return mvccpb.Kv.KeyValue.getDefaultInstance(); } public mvccpb.Kv.KeyValue build() { mvccpb.Kv.KeyValue result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public mvccpb.Kv.KeyValue buildPartial() { mvccpb.Kv.KeyValue result = new mvccpb.Kv.KeyValue(this); result.key_ = key_; result.createRevision_ = createRevision_; result.modRevision_ = modRevision_; result.version_ = version_; result.value_ = value_; result.lease_ = lease_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof mvccpb.Kv.KeyValue) { return mergeFrom((mvccpb.Kv.KeyValue)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(mvccpb.Kv.KeyValue other) { if (other == mvccpb.Kv.KeyValue.getDefaultInstance()) return this; if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { setKey(other.getKey()); } if (other.getCreateRevision() != 0L) { setCreateRevision(other.getCreateRevision()); } if (other.getModRevision() != 0L) { setModRevision(other.getModRevision()); } if (other.getVersion() != 0L) { setVersion(other.getVersion()); } if (other.getValue() != com.google.protobuf.ByteString.EMPTY) { setValue(other.getValue()); } if (other.getLease() != 0L) { setLease(other.getLease()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { mvccpb.Kv.KeyValue parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (mvccpb.Kv.KeyValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; /** *
       * key is the key in bytes. An empty key is not allowed.
       * 
* * bytes key = 1; */ public com.google.protobuf.ByteString getKey() { return key_; } /** *
       * key is the key in bytes. An empty key is not allowed.
       * 
* * bytes key = 1; */ public Builder setKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** *
       * key is the key in bytes. An empty key is not allowed.
       * 
* * bytes key = 1; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } private long createRevision_ ; /** *
       * create_revision is the revision of last creation on this key.
       * 
* * int64 create_revision = 2; */ public long getCreateRevision() { return createRevision_; } /** *
       * create_revision is the revision of last creation on this key.
       * 
* * int64 create_revision = 2; */ public Builder setCreateRevision(long value) { createRevision_ = value; onChanged(); return this; } /** *
       * create_revision is the revision of last creation on this key.
       * 
* * int64 create_revision = 2; */ public Builder clearCreateRevision() { createRevision_ = 0L; onChanged(); return this; } private long modRevision_ ; /** *
       * mod_revision is the revision of last modification on this key.
       * 
* * int64 mod_revision = 3; */ public long getModRevision() { return modRevision_; } /** *
       * mod_revision is the revision of last modification on this key.
       * 
* * int64 mod_revision = 3; */ public Builder setModRevision(long value) { modRevision_ = value; onChanged(); return this; } /** *
       * mod_revision is the revision of last modification on this key.
       * 
* * int64 mod_revision = 3; */ public Builder clearModRevision() { modRevision_ = 0L; onChanged(); return this; } private long version_ ; /** *
       * version is the version of the key. A deletion resets
       * the version to zero and any modification of the key
       * increases its version.
       * 
* * int64 version = 4; */ public long getVersion() { return version_; } /** *
       * version is the version of the key. A deletion resets
       * the version to zero and any modification of the key
       * increases its version.
       * 
* * int64 version = 4; */ public Builder setVersion(long value) { version_ = value; onChanged(); return this; } /** *
       * version is the version of the key. A deletion resets
       * the version to zero and any modification of the key
       * increases its version.
       * 
* * int64 version = 4; */ public Builder clearVersion() { version_ = 0L; onChanged(); return this; } private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; /** *
       * value is the value held by the key, in bytes.
       * 
* * bytes value = 5; */ public com.google.protobuf.ByteString getValue() { return value_; } /** *
       * value is the value held by the key, in bytes.
       * 
* * bytes value = 5; */ public Builder setValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); return this; } /** *
       * value is the value held by the key, in bytes.
       * 
* * bytes value = 5; */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } private long lease_ ; /** *
       * lease is the ID of the lease that attached to key.
       * When the attached lease expires, the key will be deleted.
       * If lease is 0, then no lease is attached to the key.
       * 
* * int64 lease = 6; */ public long getLease() { return lease_; } /** *
       * lease is the ID of the lease that attached to key.
       * When the attached lease expires, the key will be deleted.
       * If lease is 0, then no lease is attached to the key.
       * 
* * int64 lease = 6; */ public Builder setLease(long value) { lease_ = value; onChanged(); return this; } /** *
       * lease is the ID of the lease that attached to key.
       * When the attached lease expires, the key will be deleted.
       * If lease is 0, then no lease is attached to the key.
       * 
* * int64 lease = 6; */ public Builder clearLease() { lease_ = 0L; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:mvccpb.KeyValue) } // @@protoc_insertion_point(class_scope:mvccpb.KeyValue) private static final mvccpb.Kv.KeyValue DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new mvccpb.Kv.KeyValue(); } public static mvccpb.Kv.KeyValue getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public KeyValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new KeyValue(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public mvccpb.Kv.KeyValue getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface EventOrBuilder extends // @@protoc_insertion_point(interface_extends:mvccpb.Event) com.google.protobuf.MessageOrBuilder { /** *
     * type is the kind of event. If type is a PUT, it indicates
     * new data has been stored to the key. If type is a DELETE,
     * it indicates the key was deleted.
     * 
* * .mvccpb.Event.EventType type = 1; */ int getTypeValue(); /** *
     * type is the kind of event. If type is a PUT, it indicates
     * new data has been stored to the key. If type is a DELETE,
     * it indicates the key was deleted.
     * 
* * .mvccpb.Event.EventType type = 1; */ mvccpb.Kv.Event.EventType getType(); /** *
     * kv holds the KeyValue for the event.
     * A PUT event contains current kv pair.
     * A PUT event with kv.Version=1 indicates the creation of a key.
     * A DELETE/EXPIRE event contains the deleted key with
     * its modification revision set to the revision of deletion.
     * 
* * .mvccpb.KeyValue kv = 2; */ boolean hasKv(); /** *
     * kv holds the KeyValue for the event.
     * A PUT event contains current kv pair.
     * A PUT event with kv.Version=1 indicates the creation of a key.
     * A DELETE/EXPIRE event contains the deleted key with
     * its modification revision set to the revision of deletion.
     * 
* * .mvccpb.KeyValue kv = 2; */ mvccpb.Kv.KeyValue getKv(); /** *
     * kv holds the KeyValue for the event.
     * A PUT event contains current kv pair.
     * A PUT event with kv.Version=1 indicates the creation of a key.
     * A DELETE/EXPIRE event contains the deleted key with
     * its modification revision set to the revision of deletion.
     * 
* * .mvccpb.KeyValue kv = 2; */ mvccpb.Kv.KeyValueOrBuilder getKvOrBuilder(); /** *
     * prev_kv holds the key-value pair before the event happens.
     * 
* * .mvccpb.KeyValue prev_kv = 3; */ boolean hasPrevKv(); /** *
     * prev_kv holds the key-value pair before the event happens.
     * 
* * .mvccpb.KeyValue prev_kv = 3; */ mvccpb.Kv.KeyValue getPrevKv(); /** *
     * prev_kv holds the key-value pair before the event happens.
     * 
* * .mvccpb.KeyValue prev_kv = 3; */ mvccpb.Kv.KeyValueOrBuilder getPrevKvOrBuilder(); } /** * Protobuf type {@code mvccpb.Event} */ public static final class Event extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:mvccpb.Event) EventOrBuilder { private static final long serialVersionUID = 0L; // Use Event.newBuilder() to construct. private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Event() { type_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Event( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); 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; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 18: { mvccpb.Kv.KeyValue.Builder subBuilder = null; if (kv_ != null) { subBuilder = kv_.toBuilder(); } kv_ = input.readMessage(mvccpb.Kv.KeyValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(kv_); kv_ = subBuilder.buildPartial(); } break; } case 26: { mvccpb.Kv.KeyValue.Builder subBuilder = null; if (prevKv_ != null) { subBuilder = prevKv_.toBuilder(); } prevKv_ = input.readMessage(mvccpb.Kv.KeyValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(prevKv_); prevKv_ = subBuilder.buildPartial(); } 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 mvccpb.Kv.internal_static_mvccpb_Event_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return mvccpb.Kv.internal_static_mvccpb_Event_fieldAccessorTable .ensureFieldAccessorsInitialized( mvccpb.Kv.Event.class, mvccpb.Kv.Event.Builder.class); } /** * Protobuf enum {@code mvccpb.Event.EventType} */ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { /** * PUT = 0; */ PUT(0), /** * DELETE = 1; */ DELETE(1), UNRECOGNIZED(-1), ; /** * PUT = 0; */ public static final int PUT_VALUE = 0; /** * DELETE = 1; */ public static final int DELETE_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static EventType valueOf(int value) { return forNumber(value); } public static EventType forNumber(int value) { switch (value) { case 0: return PUT; case 1: return DELETE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< EventType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public EventType findValueByNumber(int number) { return EventType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return mvccpb.Kv.Event.getDescriptor().getEnumTypes().get(0); } private static final EventType[] VALUES = values(); public static EventType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private EventType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:mvccpb.Event.EventType) } public static final int TYPE_FIELD_NUMBER = 1; private int type_; /** *
     * type is the kind of event. If type is a PUT, it indicates
     * new data has been stored to the key. If type is a DELETE,
     * it indicates the key was deleted.
     * 
* * .mvccpb.Event.EventType type = 1; */ public int getTypeValue() { return type_; } /** *
     * type is the kind of event. If type is a PUT, it indicates
     * new data has been stored to the key. If type is a DELETE,
     * it indicates the key was deleted.
     * 
* * .mvccpb.Event.EventType type = 1; */ public mvccpb.Kv.Event.EventType getType() { mvccpb.Kv.Event.EventType result = mvccpb.Kv.Event.EventType.valueOf(type_); return result == null ? mvccpb.Kv.Event.EventType.UNRECOGNIZED : result; } public static final int KV_FIELD_NUMBER = 2; private mvccpb.Kv.KeyValue kv_; /** *
     * kv holds the KeyValue for the event.
     * A PUT event contains current kv pair.
     * A PUT event with kv.Version=1 indicates the creation of a key.
     * A DELETE/EXPIRE event contains the deleted key with
     * its modification revision set to the revision of deletion.
     * 
* * .mvccpb.KeyValue kv = 2; */ public boolean hasKv() { return kv_ != null; } /** *
     * kv holds the KeyValue for the event.
     * A PUT event contains current kv pair.
     * A PUT event with kv.Version=1 indicates the creation of a key.
     * A DELETE/EXPIRE event contains the deleted key with
     * its modification revision set to the revision of deletion.
     * 
* * .mvccpb.KeyValue kv = 2; */ public mvccpb.Kv.KeyValue getKv() { return kv_ == null ? mvccpb.Kv.KeyValue.getDefaultInstance() : kv_; } /** *
     * kv holds the KeyValue for the event.
     * A PUT event contains current kv pair.
     * A PUT event with kv.Version=1 indicates the creation of a key.
     * A DELETE/EXPIRE event contains the deleted key with
     * its modification revision set to the revision of deletion.
     * 
* * .mvccpb.KeyValue kv = 2; */ public mvccpb.Kv.KeyValueOrBuilder getKvOrBuilder() { return getKv(); } public static final int PREV_KV_FIELD_NUMBER = 3; private mvccpb.Kv.KeyValue prevKv_; /** *
     * prev_kv holds the key-value pair before the event happens.
     * 
* * .mvccpb.KeyValue prev_kv = 3; */ public boolean hasPrevKv() { return prevKv_ != null; } /** *
     * prev_kv holds the key-value pair before the event happens.
     * 
* * .mvccpb.KeyValue prev_kv = 3; */ public mvccpb.Kv.KeyValue getPrevKv() { return prevKv_ == null ? mvccpb.Kv.KeyValue.getDefaultInstance() : prevKv_; } /** *
     * prev_kv holds the key-value pair before the event happens.
     * 
* * .mvccpb.KeyValue prev_kv = 3; */ public mvccpb.Kv.KeyValueOrBuilder getPrevKvOrBuilder() { return getPrevKv(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (type_ != mvccpb.Kv.Event.EventType.PUT.getNumber()) { output.writeEnum(1, type_); } if (kv_ != null) { output.writeMessage(2, getKv()); } if (prevKv_ != null) { output.writeMessage(3, getPrevKv()); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != mvccpb.Kv.Event.EventType.PUT.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, type_); } if (kv_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getKv()); } if (prevKv_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getPrevKv()); } 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 mvccpb.Kv.Event)) { return super.equals(obj); } mvccpb.Kv.Event other = (mvccpb.Kv.Event) obj; boolean result = true; result = result && type_ == other.type_; result = result && (hasKv() == other.hasKv()); if (hasKv()) { result = result && getKv() .equals(other.getKv()); } result = result && (hasPrevKv() == other.hasPrevKv()); if (hasPrevKv()) { result = result && getPrevKv() .equals(other.getPrevKv()); } result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (hasKv()) { hash = (37 * hash) + KV_FIELD_NUMBER; hash = (53 * hash) + getKv().hashCode(); } if (hasPrevKv()) { hash = (37 * hash) + PREV_KV_FIELD_NUMBER; hash = (53 * hash) + getPrevKv().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static mvccpb.Kv.Event parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static mvccpb.Kv.Event parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static mvccpb.Kv.Event parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static mvccpb.Kv.Event parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static mvccpb.Kv.Event parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static mvccpb.Kv.Event parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static mvccpb.Kv.Event parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static mvccpb.Kv.Event 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 mvccpb.Kv.Event parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static mvccpb.Kv.Event 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 mvccpb.Kv.Event parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static mvccpb.Kv.Event parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(mvccpb.Kv.Event prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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; } /** * Protobuf type {@code mvccpb.Event} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:mvccpb.Event) mvccpb.Kv.EventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return mvccpb.Kv.internal_static_mvccpb_Event_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return mvccpb.Kv.internal_static_mvccpb_Event_fieldAccessorTable .ensureFieldAccessorsInitialized( mvccpb.Kv.Event.class, mvccpb.Kv.Event.Builder.class); } // Construct using mvccpb.Kv.Event.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); type_ = 0; if (kvBuilder_ == null) { kv_ = null; } else { kv_ = null; kvBuilder_ = null; } if (prevKvBuilder_ == null) { prevKv_ = null; } else { prevKv_ = null; prevKvBuilder_ = null; } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return mvccpb.Kv.internal_static_mvccpb_Event_descriptor; } public mvccpb.Kv.Event getDefaultInstanceForType() { return mvccpb.Kv.Event.getDefaultInstance(); } public mvccpb.Kv.Event build() { mvccpb.Kv.Event result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public mvccpb.Kv.Event buildPartial() { mvccpb.Kv.Event result = new mvccpb.Kv.Event(this); result.type_ = type_; if (kvBuilder_ == null) { result.kv_ = kv_; } else { result.kv_ = kvBuilder_.build(); } if (prevKvBuilder_ == null) { result.prevKv_ = prevKv_; } else { result.prevKv_ = prevKvBuilder_.build(); } onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof mvccpb.Kv.Event) { return mergeFrom((mvccpb.Kv.Event)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(mvccpb.Kv.Event other) { if (other == mvccpb.Kv.Event.getDefaultInstance()) return this; if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasKv()) { mergeKv(other.getKv()); } if (other.hasPrevKv()) { mergePrevKv(other.getPrevKv()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { mvccpb.Kv.Event parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (mvccpb.Kv.Event) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int type_ = 0; /** *
       * type is the kind of event. If type is a PUT, it indicates
       * new data has been stored to the key. If type is a DELETE,
       * it indicates the key was deleted.
       * 
* * .mvccpb.Event.EventType type = 1; */ public int getTypeValue() { return type_; } /** *
       * type is the kind of event. If type is a PUT, it indicates
       * new data has been stored to the key. If type is a DELETE,
       * it indicates the key was deleted.
       * 
* * .mvccpb.Event.EventType type = 1; */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** *
       * type is the kind of event. If type is a PUT, it indicates
       * new data has been stored to the key. If type is a DELETE,
       * it indicates the key was deleted.
       * 
* * .mvccpb.Event.EventType type = 1; */ public mvccpb.Kv.Event.EventType getType() { mvccpb.Kv.Event.EventType result = mvccpb.Kv.Event.EventType.valueOf(type_); return result == null ? mvccpb.Kv.Event.EventType.UNRECOGNIZED : result; } /** *
       * type is the kind of event. If type is a PUT, it indicates
       * new data has been stored to the key. If type is a DELETE,
       * it indicates the key was deleted.
       * 
* * .mvccpb.Event.EventType type = 1; */ public Builder setType(mvccpb.Kv.Event.EventType value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** *
       * type is the kind of event. If type is a PUT, it indicates
       * new data has been stored to the key. If type is a DELETE,
       * it indicates the key was deleted.
       * 
* * .mvccpb.Event.EventType type = 1; */ public Builder clearType() { type_ = 0; onChanged(); return this; } private mvccpb.Kv.KeyValue kv_ = null; private com.google.protobuf.SingleFieldBuilderV3< mvccpb.Kv.KeyValue, mvccpb.Kv.KeyValue.Builder, mvccpb.Kv.KeyValueOrBuilder> kvBuilder_; /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public boolean hasKv() { return kvBuilder_ != null || kv_ != null; } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public mvccpb.Kv.KeyValue getKv() { if (kvBuilder_ == null) { return kv_ == null ? mvccpb.Kv.KeyValue.getDefaultInstance() : kv_; } else { return kvBuilder_.getMessage(); } } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public Builder setKv(mvccpb.Kv.KeyValue value) { if (kvBuilder_ == null) { if (value == null) { throw new NullPointerException(); } kv_ = value; onChanged(); } else { kvBuilder_.setMessage(value); } return this; } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public Builder setKv( mvccpb.Kv.KeyValue.Builder builderForValue) { if (kvBuilder_ == null) { kv_ = builderForValue.build(); onChanged(); } else { kvBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public Builder mergeKv(mvccpb.Kv.KeyValue value) { if (kvBuilder_ == null) { if (kv_ != null) { kv_ = mvccpb.Kv.KeyValue.newBuilder(kv_).mergeFrom(value).buildPartial(); } else { kv_ = value; } onChanged(); } else { kvBuilder_.mergeFrom(value); } return this; } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public Builder clearKv() { if (kvBuilder_ == null) { kv_ = null; onChanged(); } else { kv_ = null; kvBuilder_ = null; } return this; } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public mvccpb.Kv.KeyValue.Builder getKvBuilder() { onChanged(); return getKvFieldBuilder().getBuilder(); } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ public mvccpb.Kv.KeyValueOrBuilder getKvOrBuilder() { if (kvBuilder_ != null) { return kvBuilder_.getMessageOrBuilder(); } else { return kv_ == null ? mvccpb.Kv.KeyValue.getDefaultInstance() : kv_; } } /** *
       * kv holds the KeyValue for the event.
       * A PUT event contains current kv pair.
       * A PUT event with kv.Version=1 indicates the creation of a key.
       * A DELETE/EXPIRE event contains the deleted key with
       * its modification revision set to the revision of deletion.
       * 
* * .mvccpb.KeyValue kv = 2; */ private com.google.protobuf.SingleFieldBuilderV3< mvccpb.Kv.KeyValue, mvccpb.Kv.KeyValue.Builder, mvccpb.Kv.KeyValueOrBuilder> getKvFieldBuilder() { if (kvBuilder_ == null) { kvBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< mvccpb.Kv.KeyValue, mvccpb.Kv.KeyValue.Builder, mvccpb.Kv.KeyValueOrBuilder>( getKv(), getParentForChildren(), isClean()); kv_ = null; } return kvBuilder_; } private mvccpb.Kv.KeyValue prevKv_ = null; private com.google.protobuf.SingleFieldBuilderV3< mvccpb.Kv.KeyValue, mvccpb.Kv.KeyValue.Builder, mvccpb.Kv.KeyValueOrBuilder> prevKvBuilder_; /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public boolean hasPrevKv() { return prevKvBuilder_ != null || prevKv_ != null; } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public mvccpb.Kv.KeyValue getPrevKv() { if (prevKvBuilder_ == null) { return prevKv_ == null ? mvccpb.Kv.KeyValue.getDefaultInstance() : prevKv_; } else { return prevKvBuilder_.getMessage(); } } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public Builder setPrevKv(mvccpb.Kv.KeyValue value) { if (prevKvBuilder_ == null) { if (value == null) { throw new NullPointerException(); } prevKv_ = value; onChanged(); } else { prevKvBuilder_.setMessage(value); } return this; } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public Builder setPrevKv( mvccpb.Kv.KeyValue.Builder builderForValue) { if (prevKvBuilder_ == null) { prevKv_ = builderForValue.build(); onChanged(); } else { prevKvBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public Builder mergePrevKv(mvccpb.Kv.KeyValue value) { if (prevKvBuilder_ == null) { if (prevKv_ != null) { prevKv_ = mvccpb.Kv.KeyValue.newBuilder(prevKv_).mergeFrom(value).buildPartial(); } else { prevKv_ = value; } onChanged(); } else { prevKvBuilder_.mergeFrom(value); } return this; } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public Builder clearPrevKv() { if (prevKvBuilder_ == null) { prevKv_ = null; onChanged(); } else { prevKv_ = null; prevKvBuilder_ = null; } return this; } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public mvccpb.Kv.KeyValue.Builder getPrevKvBuilder() { onChanged(); return getPrevKvFieldBuilder().getBuilder(); } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ public mvccpb.Kv.KeyValueOrBuilder getPrevKvOrBuilder() { if (prevKvBuilder_ != null) { return prevKvBuilder_.getMessageOrBuilder(); } else { return prevKv_ == null ? mvccpb.Kv.KeyValue.getDefaultInstance() : prevKv_; } } /** *
       * prev_kv holds the key-value pair before the event happens.
       * 
* * .mvccpb.KeyValue prev_kv = 3; */ private com.google.protobuf.SingleFieldBuilderV3< mvccpb.Kv.KeyValue, mvccpb.Kv.KeyValue.Builder, mvccpb.Kv.KeyValueOrBuilder> getPrevKvFieldBuilder() { if (prevKvBuilder_ == null) { prevKvBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< mvccpb.Kv.KeyValue, mvccpb.Kv.KeyValue.Builder, mvccpb.Kv.KeyValueOrBuilder>( getPrevKv(), getParentForChildren(), isClean()); prevKv_ = null; } return prevKvBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:mvccpb.Event) } // @@protoc_insertion_point(class_scope:mvccpb.Event) private static final mvccpb.Kv.Event DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new mvccpb.Kv.Event(); } public static mvccpb.Kv.Event getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Event parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Event(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public mvccpb.Kv.Event getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_mvccpb_KeyValue_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_mvccpb_KeyValue_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_mvccpb_Event_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_mvccpb_Event_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\031etcd/mvcc/mvccpb/kv.proto\022\006mvccpb\"u\n\010K" + "eyValue\022\013\n\003key\030\001 \001(\014\022\027\n\017create_revision\030" + "\002 \001(\003\022\024\n\014mod_revision\030\003 \001(\003\022\017\n\007version\030\004" + " \001(\003\022\r\n\005value\030\005 \001(\014\022\r\n\005lease\030\006 \001(\003\"\221\001\n\005E" + "vent\022%\n\004type\030\001 \001(\0162\027.mvccpb.Event.EventT" + "ype\022\034\n\002kv\030\002 \001(\0132\020.mvccpb.KeyValue\022!\n\007pre" + "v_kv\030\003 \001(\0132\020.mvccpb.KeyValue\" \n\tEventTyp" + "e\022\007\n\003PUT\020\000\022\n\n\006DELETE\020\001b\006proto3" }; 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; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); internal_static_mvccpb_KeyValue_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_mvccpb_KeyValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_mvccpb_KeyValue_descriptor, new java.lang.String[] { "Key", "CreateRevision", "ModRevision", "Version", "Value", "Lease", }); internal_static_mvccpb_Event_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_mvccpb_Event_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_mvccpb_Event_descriptor, new java.lang.String[] { "Type", "Kv", "PrevKv", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy