protobuf.java.io.helidon.config.etcd.internal.client.proto.Compare Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: rpc.proto
package io.helidon.config.etcd.internal.client.proto;
/**
* Protobuf type {@code etcdserverpb.Compare}
*/
public final class Compare extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.Compare)
CompareOrBuilder {
private static final long serialVersionUID = 0L;
// Use Compare.newBuilder() to construct.
private Compare(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Compare() {
result_ = 0;
target_ = 0;
key_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Compare();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.internal_static_etcdserverpb_Compare_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.internal_static_etcdserverpb_Compare_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.helidon.config.etcd.internal.client.proto.Compare.class, io.helidon.config.etcd.internal.client.proto.Compare.Builder.class);
}
/**
* Protobuf enum {@code etcdserverpb.Compare.CompareResult}
*/
public enum CompareResult
implements com.google.protobuf.ProtocolMessageEnum {
/**
* EQUAL = 0;
*/
EQUAL(0),
/**
* GREATER = 1;
*/
GREATER(1),
/**
* LESS = 2;
*/
LESS(2),
/**
* NOT_EQUAL = 3;
*/
NOT_EQUAL(3),
UNRECOGNIZED(-1),
;
/**
* EQUAL = 0;
*/
public static final int EQUAL_VALUE = 0;
/**
* GREATER = 1;
*/
public static final int GREATER_VALUE = 1;
/**
* LESS = 2;
*/
public static final int LESS_VALUE = 2;
/**
* NOT_EQUAL = 3;
*/
public static final int NOT_EQUAL_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CompareResult valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CompareResult forNumber(int value) {
switch (value) {
case 0: return EQUAL;
case 1: return GREATER;
case 2: return LESS;
case 3: return NOT_EQUAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CompareResult> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CompareResult findValueByNumber(int number) {
return CompareResult.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 io.helidon.config.etcd.internal.client.proto.Compare.getDescriptor().getEnumTypes().get(0);
}
private static final CompareResult[] VALUES = values();
public static CompareResult 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 CompareResult(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.Compare.CompareResult)
}
/**
* Protobuf enum {@code etcdserverpb.Compare.CompareTarget}
*/
public enum CompareTarget
implements com.google.protobuf.ProtocolMessageEnum {
/**
* VERSION = 0;
*/
VERSION(0),
/**
* CREATE = 1;
*/
CREATE(1),
/**
* MOD = 2;
*/
MOD(2),
/**
* VALUE = 3;
*/
VALUE(3),
UNRECOGNIZED(-1),
;
/**
* VERSION = 0;
*/
public static final int VERSION_VALUE = 0;
/**
* CREATE = 1;
*/
public static final int CREATE_VALUE = 1;
/**
* MOD = 2;
*/
public static final int MOD_VALUE = 2;
/**
* VALUE = 3;
*/
public static final int VALUE_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static CompareTarget valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static CompareTarget forNumber(int value) {
switch (value) {
case 0: return VERSION;
case 1: return CREATE;
case 2: return MOD;
case 3: return VALUE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
CompareTarget> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public CompareTarget findValueByNumber(int number) {
return CompareTarget.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 io.helidon.config.etcd.internal.client.proto.Compare.getDescriptor().getEnumTypes().get(1);
}
private static final CompareTarget[] VALUES = values();
public static CompareTarget 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 CompareTarget(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:etcdserverpb.Compare.CompareTarget)
}
private int targetUnionCase_ = 0;
private java.lang.Object targetUnion_;
public enum TargetUnionCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
VERSION(4),
CREATE_REVISION(5),
MOD_REVISION(6),
VALUE(7),
TARGETUNION_NOT_SET(0);
private final int value;
private TargetUnionCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TargetUnionCase valueOf(int value) {
return forNumber(value);
}
public static TargetUnionCase forNumber(int value) {
switch (value) {
case 4: return VERSION;
case 5: return CREATE_REVISION;
case 6: return MOD_REVISION;
case 7: return VALUE;
case 0: return TARGETUNION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TargetUnionCase
getTargetUnionCase() {
return TargetUnionCase.forNumber(
targetUnionCase_);
}
public static final int RESULT_FIELD_NUMBER = 1;
private int result_;
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @return The enum numeric value on the wire for result.
*/
@java.lang.Override public int getResultValue() {
return result_;
}
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @return The result.
*/
@java.lang.Override public io.helidon.config.etcd.internal.client.proto.Compare.CompareResult getResult() {
@SuppressWarnings("deprecation")
io.helidon.config.etcd.internal.client.proto.Compare.CompareResult result = io.helidon.config.etcd.internal.client.proto.Compare.CompareResult.valueOf(result_);
return result == null ? io.helidon.config.etcd.internal.client.proto.Compare.CompareResult.UNRECOGNIZED : result;
}
public static final int TARGET_FIELD_NUMBER = 2;
private int target_;
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @return The enum numeric value on the wire for target.
*/
@java.lang.Override public int getTargetValue() {
return target_;
}
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @return The target.
*/
@java.lang.Override public io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget getTarget() {
@SuppressWarnings("deprecation")
io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget result = io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget.valueOf(target_);
return result == null ? io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget.UNRECOGNIZED : result;
}
public static final int KEY_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString key_;
/**
*
* key is the subject key for the comparison operation.
*
*
* bytes key = 3;
* @return The key.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKey() {
return key_;
}
public static final int VERSION_FIELD_NUMBER = 4;
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
* @return Whether the version field is set.
*/
@java.lang.Override
public boolean hasVersion() {
return targetUnionCase_ == 4;
}
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
* @return The version.
*/
@java.lang.Override
public long getVersion() {
if (targetUnionCase_ == 4) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
public static final int CREATE_REVISION_FIELD_NUMBER = 5;
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
* @return Whether the createRevision field is set.
*/
@java.lang.Override
public boolean hasCreateRevision() {
return targetUnionCase_ == 5;
}
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
* @return The createRevision.
*/
@java.lang.Override
public long getCreateRevision() {
if (targetUnionCase_ == 5) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
public static final int MOD_REVISION_FIELD_NUMBER = 6;
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
* @return Whether the modRevision field is set.
*/
@java.lang.Override
public boolean hasModRevision() {
return targetUnionCase_ == 6;
}
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
* @return The modRevision.
*/
@java.lang.Override
public long getModRevision() {
if (targetUnionCase_ == 6) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
public static final int VALUE_FIELD_NUMBER = 7;
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return targetUnionCase_ == 7;
}
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
* @return The value.
*/
@java.lang.Override
public com.google.protobuf.ByteString getValue() {
if (targetUnionCase_ == 7) {
return (com.google.protobuf.ByteString) targetUnion_;
}
return com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (result_ != io.helidon.config.etcd.internal.client.proto.Compare.CompareResult.EQUAL.getNumber()) {
output.writeEnum(1, result_);
}
if (target_ != io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget.VERSION.getNumber()) {
output.writeEnum(2, target_);
}
if (!key_.isEmpty()) {
output.writeBytes(3, key_);
}
if (targetUnionCase_ == 4) {
output.writeInt64(
4, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 5) {
output.writeInt64(
5, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 6) {
output.writeInt64(
6, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 7) {
output.writeBytes(
7, (com.google.protobuf.ByteString) targetUnion_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (result_ != io.helidon.config.etcd.internal.client.proto.Compare.CompareResult.EQUAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, result_);
}
if (target_ != io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget.VERSION.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, target_);
}
if (!key_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, key_);
}
if (targetUnionCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
4, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
5, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
6, (long)((java.lang.Long) targetUnion_));
}
if (targetUnionCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(
7, (com.google.protobuf.ByteString) targetUnion_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.helidon.config.etcd.internal.client.proto.Compare)) {
return super.equals(obj);
}
io.helidon.config.etcd.internal.client.proto.Compare other = (io.helidon.config.etcd.internal.client.proto.Compare) obj;
if (result_ != other.result_) return false;
if (target_ != other.target_) return false;
if (!getKey()
.equals(other.getKey())) return false;
if (!getTargetUnionCase().equals(other.getTargetUnionCase())) return false;
switch (targetUnionCase_) {
case 4:
if (getVersion()
!= other.getVersion()) return false;
break;
case 5:
if (getCreateRevision()
!= other.getCreateRevision()) return false;
break;
case 6:
if (getModRevision()
!= other.getModRevision()) return false;
break;
case 7:
if (!getValue()
.equals(other.getValue())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + RESULT_FIELD_NUMBER;
hash = (53 * hash) + result_;
hash = (37 * hash) + TARGET_FIELD_NUMBER;
hash = (53 * hash) + target_;
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
switch (targetUnionCase_) {
case 4:
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getVersion());
break;
case 5:
hash = (37 * hash) + CREATE_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCreateRevision());
break;
case 6:
hash = (37 * hash) + MOD_REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getModRevision());
break;
case 7:
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.helidon.config.etcd.internal.client.proto.Compare 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 io.helidon.config.etcd.internal.client.proto.Compare parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.helidon.config.etcd.internal.client.proto.Compare 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 io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.helidon.config.etcd.internal.client.proto.Compare parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.helidon.config.etcd.internal.client.proto.Compare prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code etcdserverpb.Compare}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.Compare)
io.helidon.config.etcd.internal.client.proto.CompareOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.internal_static_etcdserverpb_Compare_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.internal_static_etcdserverpb_Compare_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.helidon.config.etcd.internal.client.proto.Compare.class, io.helidon.config.etcd.internal.client.proto.Compare.Builder.class);
}
// Construct using io.helidon.config.etcd.internal.client.proto.Compare.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
result_ = 0;
target_ = 0;
key_ = com.google.protobuf.ByteString.EMPTY;
targetUnionCase_ = 0;
targetUnion_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.helidon.config.etcd.internal.client.proto.EtcdProto.internal_static_etcdserverpb_Compare_descriptor;
}
@java.lang.Override
public io.helidon.config.etcd.internal.client.proto.Compare getDefaultInstanceForType() {
return io.helidon.config.etcd.internal.client.proto.Compare.getDefaultInstance();
}
@java.lang.Override
public io.helidon.config.etcd.internal.client.proto.Compare build() {
io.helidon.config.etcd.internal.client.proto.Compare result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.helidon.config.etcd.internal.client.proto.Compare buildPartial() {
io.helidon.config.etcd.internal.client.proto.Compare result = new io.helidon.config.etcd.internal.client.proto.Compare(this);
result.result_ = result_;
result.target_ = target_;
result.key_ = key_;
if (targetUnionCase_ == 4) {
result.targetUnion_ = targetUnion_;
}
if (targetUnionCase_ == 5) {
result.targetUnion_ = targetUnion_;
}
if (targetUnionCase_ == 6) {
result.targetUnion_ = targetUnion_;
}
if (targetUnionCase_ == 7) {
result.targetUnion_ = targetUnion_;
}
result.targetUnionCase_ = targetUnionCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.helidon.config.etcd.internal.client.proto.Compare) {
return mergeFrom((io.helidon.config.etcd.internal.client.proto.Compare)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.helidon.config.etcd.internal.client.proto.Compare other) {
if (other == io.helidon.config.etcd.internal.client.proto.Compare.getDefaultInstance()) return this;
if (other.result_ != 0) {
setResultValue(other.getResultValue());
}
if (other.target_ != 0) {
setTargetValue(other.getTargetValue());
}
if (other.getKey() != com.google.protobuf.ByteString.EMPTY) {
setKey(other.getKey());
}
switch (other.getTargetUnionCase()) {
case VERSION: {
setVersion(other.getVersion());
break;
}
case CREATE_REVISION: {
setCreateRevision(other.getCreateRevision());
break;
}
case MOD_REVISION: {
setModRevision(other.getModRevision());
break;
}
case VALUE: {
setValue(other.getValue());
break;
}
case TARGETUNION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
result_ = input.readEnum();
break;
} // case 8
case 16: {
target_ = input.readEnum();
break;
} // case 16
case 26: {
key_ = input.readBytes();
break;
} // case 26
case 32: {
targetUnion_ = input.readInt64();
targetUnionCase_ = 4;
break;
} // case 32
case 40: {
targetUnion_ = input.readInt64();
targetUnionCase_ = 5;
break;
} // case 40
case 48: {
targetUnion_ = input.readInt64();
targetUnionCase_ = 6;
break;
} // case 48
case 58: {
targetUnion_ = input.readBytes();
targetUnionCase_ = 7;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int targetUnionCase_ = 0;
private java.lang.Object targetUnion_;
public TargetUnionCase
getTargetUnionCase() {
return TargetUnionCase.forNumber(
targetUnionCase_);
}
public Builder clearTargetUnion() {
targetUnionCase_ = 0;
targetUnion_ = null;
onChanged();
return this;
}
private int result_ = 0;
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @return The enum numeric value on the wire for result.
*/
@java.lang.Override public int getResultValue() {
return result_;
}
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @param value The enum numeric value on the wire for result to set.
* @return This builder for chaining.
*/
public Builder setResultValue(int value) {
result_ = value;
onChanged();
return this;
}
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @return The result.
*/
@java.lang.Override
public io.helidon.config.etcd.internal.client.proto.Compare.CompareResult getResult() {
@SuppressWarnings("deprecation")
io.helidon.config.etcd.internal.client.proto.Compare.CompareResult result = io.helidon.config.etcd.internal.client.proto.Compare.CompareResult.valueOf(result_);
return result == null ? io.helidon.config.etcd.internal.client.proto.Compare.CompareResult.UNRECOGNIZED : result;
}
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @param value The result to set.
* @return This builder for chaining.
*/
public Builder setResult(io.helidon.config.etcd.internal.client.proto.Compare.CompareResult value) {
if (value == null) {
throw new NullPointerException();
}
result_ = value.getNumber();
onChanged();
return this;
}
/**
*
* result is logical comparison operation for this comparison.
*
*
* .etcdserverpb.Compare.CompareResult result = 1;
* @return This builder for chaining.
*/
public Builder clearResult() {
result_ = 0;
onChanged();
return this;
}
private int target_ = 0;
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @return The enum numeric value on the wire for target.
*/
@java.lang.Override public int getTargetValue() {
return target_;
}
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @param value The enum numeric value on the wire for target to set.
* @return This builder for chaining.
*/
public Builder setTargetValue(int value) {
target_ = value;
onChanged();
return this;
}
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @return The target.
*/
@java.lang.Override
public io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget getTarget() {
@SuppressWarnings("deprecation")
io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget result = io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget.valueOf(target_);
return result == null ? io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget.UNRECOGNIZED : result;
}
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @param value The target to set.
* @return This builder for chaining.
*/
public Builder setTarget(io.helidon.config.etcd.internal.client.proto.Compare.CompareTarget value) {
if (value == null) {
throw new NullPointerException();
}
target_ = value.getNumber();
onChanged();
return this;
}
/**
*
* target is the key-value field to inspect for the comparison.
*
*
* .etcdserverpb.Compare.CompareTarget target = 2;
* @return This builder for chaining.
*/
public Builder clearTarget() {
target_ = 0;
onChanged();
return this;
}
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* key is the subject key for the comparison operation.
*
*
* bytes key = 3;
* @return The key.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKey() {
return key_;
}
/**
*
* key is the subject key for the comparison operation.
*
*
* bytes key = 3;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* key is the subject key for the comparison operation.
*
*
* bytes key = 3;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
* @return Whether the version field is set.
*/
public boolean hasVersion() {
return targetUnionCase_ == 4;
}
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
* @return The version.
*/
public long getVersion() {
if (targetUnionCase_ == 4) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(long value) {
targetUnionCase_ = 4;
targetUnion_ = value;
onChanged();
return this;
}
/**
*
* version is the version of the given key
*
*
* int64 version = 4;
* @return This builder for chaining.
*/
public Builder clearVersion() {
if (targetUnionCase_ == 4) {
targetUnionCase_ = 0;
targetUnion_ = null;
onChanged();
}
return this;
}
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
* @return Whether the createRevision field is set.
*/
public boolean hasCreateRevision() {
return targetUnionCase_ == 5;
}
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
* @return The createRevision.
*/
public long getCreateRevision() {
if (targetUnionCase_ == 5) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
* @param value The createRevision to set.
* @return This builder for chaining.
*/
public Builder setCreateRevision(long value) {
targetUnionCase_ = 5;
targetUnion_ = value;
onChanged();
return this;
}
/**
*
* create_revision is the creation revision of the given key
*
*
* int64 create_revision = 5;
* @return This builder for chaining.
*/
public Builder clearCreateRevision() {
if (targetUnionCase_ == 5) {
targetUnionCase_ = 0;
targetUnion_ = null;
onChanged();
}
return this;
}
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
* @return Whether the modRevision field is set.
*/
public boolean hasModRevision() {
return targetUnionCase_ == 6;
}
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
* @return The modRevision.
*/
public long getModRevision() {
if (targetUnionCase_ == 6) {
return (java.lang.Long) targetUnion_;
}
return 0L;
}
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
* @param value The modRevision to set.
* @return This builder for chaining.
*/
public Builder setModRevision(long value) {
targetUnionCase_ = 6;
targetUnion_ = value;
onChanged();
return this;
}
/**
*
* mod_revision is the last modified revision of the given key.
*
*
* int64 mod_revision = 6;
* @return This builder for chaining.
*/
public Builder clearModRevision() {
if (targetUnionCase_ == 6) {
targetUnionCase_ = 0;
targetUnion_ = null;
onChanged();
}
return this;
}
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return targetUnionCase_ == 7;
}
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
* @return The value.
*/
public com.google.protobuf.ByteString getValue() {
if (targetUnionCase_ == 7) {
return (com.google.protobuf.ByteString) targetUnion_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
targetUnionCase_ = 7;
targetUnion_ = value;
onChanged();
return this;
}
/**
*
* value is the value of the given key, in bytes.
*
*
* bytes value = 7;
* @return This builder for chaining.
*/
public Builder clearValue() {
if (targetUnionCase_ == 7) {
targetUnionCase_ = 0;
targetUnion_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:etcdserverpb.Compare)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.Compare)
private static final io.helidon.config.etcd.internal.client.proto.Compare DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.helidon.config.etcd.internal.client.proto.Compare();
}
public static io.helidon.config.etcd.internal.client.proto.Compare getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Compare parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.helidon.config.etcd.internal.client.proto.Compare getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}