com.ibm.etcd.api.RequestOp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of etcd-java Show documentation
Show all versions of etcd-java Show documentation
etcd3 java client and utilities
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: rpc.proto
package com.ibm.etcd.api;
/**
* Protobuf type {@code etcdserverpb.RequestOp}
*/
public final class RequestOp extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:etcdserverpb.RequestOp)
RequestOpOrBuilder {
private static final long serialVersionUID = 0L;
// Use RequestOp.newBuilder() to construct.
private RequestOp(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RequestOp() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RequestOp();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RequestOp(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
case 10: {
com.ibm.etcd.api.RangeRequest.Builder subBuilder = null;
if (requestCase_ == 1) {
subBuilder = ((com.ibm.etcd.api.RangeRequest) request_).toBuilder();
}
request_ =
input.readMessage(com.ibm.etcd.api.RangeRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.ibm.etcd.api.RangeRequest) request_);
request_ = subBuilder.buildPartial();
}
requestCase_ = 1;
break;
}
case 18: {
com.ibm.etcd.api.PutRequest.Builder subBuilder = null;
if (requestCase_ == 2) {
subBuilder = ((com.ibm.etcd.api.PutRequest) request_).toBuilder();
}
request_ =
input.readMessage(com.ibm.etcd.api.PutRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.ibm.etcd.api.PutRequest) request_);
request_ = subBuilder.buildPartial();
}
requestCase_ = 2;
break;
}
case 26: {
com.ibm.etcd.api.DeleteRangeRequest.Builder subBuilder = null;
if (requestCase_ == 3) {
subBuilder = ((com.ibm.etcd.api.DeleteRangeRequest) request_).toBuilder();
}
request_ =
input.readMessage(com.ibm.etcd.api.DeleteRangeRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.ibm.etcd.api.DeleteRangeRequest) request_);
request_ = subBuilder.buildPartial();
}
requestCase_ = 3;
break;
}
case 34: {
com.ibm.etcd.api.TxnRequest.Builder subBuilder = null;
if (requestCase_ == 4) {
subBuilder = ((com.ibm.etcd.api.TxnRequest) request_).toBuilder();
}
request_ =
input.readMessage(com.ibm.etcd.api.TxnRequest.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.ibm.etcd.api.TxnRequest) request_);
request_ = subBuilder.buildPartial();
}
requestCase_ = 4;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_RequestOp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_RequestOp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.ibm.etcd.api.RequestOp.class, com.ibm.etcd.api.RequestOp.Builder.class);
}
private int requestCase_ = 0;
private java.lang.Object request_;
public enum RequestCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
REQUEST_RANGE(1),
REQUEST_PUT(2),
REQUEST_DELETE_RANGE(3),
REQUEST_TXN(4),
REQUEST_NOT_SET(0);
private final int value;
private RequestCase(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 RequestCase valueOf(int value) {
return forNumber(value);
}
public static RequestCase forNumber(int value) {
switch (value) {
case 1: return REQUEST_RANGE;
case 2: return REQUEST_PUT;
case 3: return REQUEST_DELETE_RANGE;
case 4: return REQUEST_TXN;
case 0: return REQUEST_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public RequestCase
getRequestCase() {
return RequestCase.forNumber(
requestCase_);
}
public static final int REQUEST_RANGE_FIELD_NUMBER = 1;
/**
* .etcdserverpb.RangeRequest request_range = 1;
* @return Whether the requestRange field is set.
*/
@java.lang.Override
public boolean hasRequestRange() {
return requestCase_ == 1;
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
* @return The requestRange.
*/
@java.lang.Override
public com.ibm.etcd.api.RangeRequest getRequestRange() {
if (requestCase_ == 1) {
return (com.ibm.etcd.api.RangeRequest) request_;
}
return com.ibm.etcd.api.RangeRequest.getDefaultInstance();
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
@java.lang.Override
public com.ibm.etcd.api.RangeRequestOrBuilder getRequestRangeOrBuilder() {
if (requestCase_ == 1) {
return (com.ibm.etcd.api.RangeRequest) request_;
}
return com.ibm.etcd.api.RangeRequest.getDefaultInstance();
}
public static final int REQUEST_PUT_FIELD_NUMBER = 2;
/**
* .etcdserverpb.PutRequest request_put = 2;
* @return Whether the requestPut field is set.
*/
@java.lang.Override
public boolean hasRequestPut() {
return requestCase_ == 2;
}
/**
* .etcdserverpb.PutRequest request_put = 2;
* @return The requestPut.
*/
@java.lang.Override
public com.ibm.etcd.api.PutRequest getRequestPut() {
if (requestCase_ == 2) {
return (com.ibm.etcd.api.PutRequest) request_;
}
return com.ibm.etcd.api.PutRequest.getDefaultInstance();
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
@java.lang.Override
public com.ibm.etcd.api.PutRequestOrBuilder getRequestPutOrBuilder() {
if (requestCase_ == 2) {
return (com.ibm.etcd.api.PutRequest) request_;
}
return com.ibm.etcd.api.PutRequest.getDefaultInstance();
}
public static final int REQUEST_DELETE_RANGE_FIELD_NUMBER = 3;
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
* @return Whether the requestDeleteRange field is set.
*/
@java.lang.Override
public boolean hasRequestDeleteRange() {
return requestCase_ == 3;
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
* @return The requestDeleteRange.
*/
@java.lang.Override
public com.ibm.etcd.api.DeleteRangeRequest getRequestDeleteRange() {
if (requestCase_ == 3) {
return (com.ibm.etcd.api.DeleteRangeRequest) request_;
}
return com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance();
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
@java.lang.Override
public com.ibm.etcd.api.DeleteRangeRequestOrBuilder getRequestDeleteRangeOrBuilder() {
if (requestCase_ == 3) {
return (com.ibm.etcd.api.DeleteRangeRequest) request_;
}
return com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance();
}
public static final int REQUEST_TXN_FIELD_NUMBER = 4;
/**
* .etcdserverpb.TxnRequest request_txn = 4;
* @return Whether the requestTxn field is set.
*/
@java.lang.Override
public boolean hasRequestTxn() {
return requestCase_ == 4;
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
* @return The requestTxn.
*/
@java.lang.Override
public com.ibm.etcd.api.TxnRequest getRequestTxn() {
if (requestCase_ == 4) {
return (com.ibm.etcd.api.TxnRequest) request_;
}
return com.ibm.etcd.api.TxnRequest.getDefaultInstance();
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
@java.lang.Override
public com.ibm.etcd.api.TxnRequestOrBuilder getRequestTxnOrBuilder() {
if (requestCase_ == 4) {
return (com.ibm.etcd.api.TxnRequest) request_;
}
return com.ibm.etcd.api.TxnRequest.getDefaultInstance();
}
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 (requestCase_ == 1) {
output.writeMessage(1, (com.ibm.etcd.api.RangeRequest) request_);
}
if (requestCase_ == 2) {
output.writeMessage(2, (com.ibm.etcd.api.PutRequest) request_);
}
if (requestCase_ == 3) {
output.writeMessage(3, (com.ibm.etcd.api.DeleteRangeRequest) request_);
}
if (requestCase_ == 4) {
output.writeMessage(4, (com.ibm.etcd.api.TxnRequest) request_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (requestCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.ibm.etcd.api.RangeRequest) request_);
}
if (requestCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.ibm.etcd.api.PutRequest) request_);
}
if (requestCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.ibm.etcd.api.DeleteRangeRequest) request_);
}
if (requestCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.ibm.etcd.api.TxnRequest) request_);
}
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 com.ibm.etcd.api.RequestOp)) {
return super.equals(obj);
}
com.ibm.etcd.api.RequestOp other = (com.ibm.etcd.api.RequestOp) obj;
if (!getRequestCase().equals(other.getRequestCase())) return false;
switch (requestCase_) {
case 1:
if (!getRequestRange()
.equals(other.getRequestRange())) return false;
break;
case 2:
if (!getRequestPut()
.equals(other.getRequestPut())) return false;
break;
case 3:
if (!getRequestDeleteRange()
.equals(other.getRequestDeleteRange())) return false;
break;
case 4:
if (!getRequestTxn()
.equals(other.getRequestTxn())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (requestCase_) {
case 1:
hash = (37 * hash) + REQUEST_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getRequestRange().hashCode();
break;
case 2:
hash = (37 * hash) + REQUEST_PUT_FIELD_NUMBER;
hash = (53 * hash) + getRequestPut().hashCode();
break;
case 3:
hash = (37 * hash) + REQUEST_DELETE_RANGE_FIELD_NUMBER;
hash = (53 * hash) + getRequestDeleteRange().hashCode();
break;
case 4:
hash = (37 * hash) + REQUEST_TXN_FIELD_NUMBER;
hash = (53 * hash) + getRequestTxn().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.ibm.etcd.api.RequestOp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.ibm.etcd.api.RequestOp parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.ibm.etcd.api.RequestOp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.ibm.etcd.api.RequestOp parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.ibm.etcd.api.RequestOp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.ibm.etcd.api.RequestOp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.ibm.etcd.api.RequestOp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.ibm.etcd.api.RequestOp 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 com.ibm.etcd.api.RequestOp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.ibm.etcd.api.RequestOp 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 com.ibm.etcd.api.RequestOp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.ibm.etcd.api.RequestOp 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(com.ibm.etcd.api.RequestOp 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.RequestOp}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:etcdserverpb.RequestOp)
com.ibm.etcd.api.RequestOpOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_RequestOp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_RequestOp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.ibm.etcd.api.RequestOp.class, com.ibm.etcd.api.RequestOp.Builder.class);
}
// Construct using com.ibm.etcd.api.RequestOp.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
requestCase_ = 0;
request_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_RequestOp_descriptor;
}
@java.lang.Override
public com.ibm.etcd.api.RequestOp getDefaultInstanceForType() {
return com.ibm.etcd.api.RequestOp.getDefaultInstance();
}
@java.lang.Override
public com.ibm.etcd.api.RequestOp build() {
com.ibm.etcd.api.RequestOp result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.ibm.etcd.api.RequestOp buildPartial() {
com.ibm.etcd.api.RequestOp result = new com.ibm.etcd.api.RequestOp(this);
if (requestCase_ == 1) {
if (requestRangeBuilder_ == null) {
result.request_ = request_;
} else {
result.request_ = requestRangeBuilder_.build();
}
}
if (requestCase_ == 2) {
if (requestPutBuilder_ == null) {
result.request_ = request_;
} else {
result.request_ = requestPutBuilder_.build();
}
}
if (requestCase_ == 3) {
if (requestDeleteRangeBuilder_ == null) {
result.request_ = request_;
} else {
result.request_ = requestDeleteRangeBuilder_.build();
}
}
if (requestCase_ == 4) {
if (requestTxnBuilder_ == null) {
result.request_ = request_;
} else {
result.request_ = requestTxnBuilder_.build();
}
}
result.requestCase_ = requestCase_;
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 com.ibm.etcd.api.RequestOp) {
return mergeFrom((com.ibm.etcd.api.RequestOp)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.ibm.etcd.api.RequestOp other) {
if (other == com.ibm.etcd.api.RequestOp.getDefaultInstance()) return this;
switch (other.getRequestCase()) {
case REQUEST_RANGE: {
mergeRequestRange(other.getRequestRange());
break;
}
case REQUEST_PUT: {
mergeRequestPut(other.getRequestPut());
break;
}
case REQUEST_DELETE_RANGE: {
mergeRequestDeleteRange(other.getRequestDeleteRange());
break;
}
case REQUEST_TXN: {
mergeRequestTxn(other.getRequestTxn());
break;
}
case REQUEST_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.ibm.etcd.api.RequestOp parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.ibm.etcd.api.RequestOp) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int requestCase_ = 0;
private java.lang.Object request_;
public RequestCase
getRequestCase() {
return RequestCase.forNumber(
requestCase_);
}
public Builder clearRequest() {
requestCase_ = 0;
request_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.RangeRequest, com.ibm.etcd.api.RangeRequest.Builder, com.ibm.etcd.api.RangeRequestOrBuilder> requestRangeBuilder_;
/**
* .etcdserverpb.RangeRequest request_range = 1;
* @return Whether the requestRange field is set.
*/
@java.lang.Override
public boolean hasRequestRange() {
return requestCase_ == 1;
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
* @return The requestRange.
*/
@java.lang.Override
public com.ibm.etcd.api.RangeRequest getRequestRange() {
if (requestRangeBuilder_ == null) {
if (requestCase_ == 1) {
return (com.ibm.etcd.api.RangeRequest) request_;
}
return com.ibm.etcd.api.RangeRequest.getDefaultInstance();
} else {
if (requestCase_ == 1) {
return requestRangeBuilder_.getMessage();
}
return com.ibm.etcd.api.RangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
public Builder setRequestRange(com.ibm.etcd.api.RangeRequest value) {
if (requestRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
request_ = value;
onChanged();
} else {
requestRangeBuilder_.setMessage(value);
}
requestCase_ = 1;
return this;
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
public Builder setRequestRange(
com.ibm.etcd.api.RangeRequest.Builder builderForValue) {
if (requestRangeBuilder_ == null) {
request_ = builderForValue.build();
onChanged();
} else {
requestRangeBuilder_.setMessage(builderForValue.build());
}
requestCase_ = 1;
return this;
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
public Builder mergeRequestRange(com.ibm.etcd.api.RangeRequest value) {
if (requestRangeBuilder_ == null) {
if (requestCase_ == 1 &&
request_ != com.ibm.etcd.api.RangeRequest.getDefaultInstance()) {
request_ = com.ibm.etcd.api.RangeRequest.newBuilder((com.ibm.etcd.api.RangeRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 1) {
requestRangeBuilder_.mergeFrom(value);
}
requestRangeBuilder_.setMessage(value);
}
requestCase_ = 1;
return this;
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
public Builder clearRequestRange() {
if (requestRangeBuilder_ == null) {
if (requestCase_ == 1) {
requestCase_ = 0;
request_ = null;
onChanged();
}
} else {
if (requestCase_ == 1) {
requestCase_ = 0;
request_ = null;
}
requestRangeBuilder_.clear();
}
return this;
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
public com.ibm.etcd.api.RangeRequest.Builder getRequestRangeBuilder() {
return getRequestRangeFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
@java.lang.Override
public com.ibm.etcd.api.RangeRequestOrBuilder getRequestRangeOrBuilder() {
if ((requestCase_ == 1) && (requestRangeBuilder_ != null)) {
return requestRangeBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 1) {
return (com.ibm.etcd.api.RangeRequest) request_;
}
return com.ibm.etcd.api.RangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.RangeRequest, com.ibm.etcd.api.RangeRequest.Builder, com.ibm.etcd.api.RangeRequestOrBuilder>
getRequestRangeFieldBuilder() {
if (requestRangeBuilder_ == null) {
if (!(requestCase_ == 1)) {
request_ = com.ibm.etcd.api.RangeRequest.getDefaultInstance();
}
requestRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.RangeRequest, com.ibm.etcd.api.RangeRequest.Builder, com.ibm.etcd.api.RangeRequestOrBuilder>(
(com.ibm.etcd.api.RangeRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 1;
onChanged();;
return requestRangeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.PutRequest, com.ibm.etcd.api.PutRequest.Builder, com.ibm.etcd.api.PutRequestOrBuilder> requestPutBuilder_;
/**
* .etcdserverpb.PutRequest request_put = 2;
* @return Whether the requestPut field is set.
*/
@java.lang.Override
public boolean hasRequestPut() {
return requestCase_ == 2;
}
/**
* .etcdserverpb.PutRequest request_put = 2;
* @return The requestPut.
*/
@java.lang.Override
public com.ibm.etcd.api.PutRequest getRequestPut() {
if (requestPutBuilder_ == null) {
if (requestCase_ == 2) {
return (com.ibm.etcd.api.PutRequest) request_;
}
return com.ibm.etcd.api.PutRequest.getDefaultInstance();
} else {
if (requestCase_ == 2) {
return requestPutBuilder_.getMessage();
}
return com.ibm.etcd.api.PutRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
public Builder setRequestPut(com.ibm.etcd.api.PutRequest value) {
if (requestPutBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
request_ = value;
onChanged();
} else {
requestPutBuilder_.setMessage(value);
}
requestCase_ = 2;
return this;
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
public Builder setRequestPut(
com.ibm.etcd.api.PutRequest.Builder builderForValue) {
if (requestPutBuilder_ == null) {
request_ = builderForValue.build();
onChanged();
} else {
requestPutBuilder_.setMessage(builderForValue.build());
}
requestCase_ = 2;
return this;
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
public Builder mergeRequestPut(com.ibm.etcd.api.PutRequest value) {
if (requestPutBuilder_ == null) {
if (requestCase_ == 2 &&
request_ != com.ibm.etcd.api.PutRequest.getDefaultInstance()) {
request_ = com.ibm.etcd.api.PutRequest.newBuilder((com.ibm.etcd.api.PutRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 2) {
requestPutBuilder_.mergeFrom(value);
}
requestPutBuilder_.setMessage(value);
}
requestCase_ = 2;
return this;
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
public Builder clearRequestPut() {
if (requestPutBuilder_ == null) {
if (requestCase_ == 2) {
requestCase_ = 0;
request_ = null;
onChanged();
}
} else {
if (requestCase_ == 2) {
requestCase_ = 0;
request_ = null;
}
requestPutBuilder_.clear();
}
return this;
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
public com.ibm.etcd.api.PutRequest.Builder getRequestPutBuilder() {
return getRequestPutFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
@java.lang.Override
public com.ibm.etcd.api.PutRequestOrBuilder getRequestPutOrBuilder() {
if ((requestCase_ == 2) && (requestPutBuilder_ != null)) {
return requestPutBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 2) {
return (com.ibm.etcd.api.PutRequest) request_;
}
return com.ibm.etcd.api.PutRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.PutRequest, com.ibm.etcd.api.PutRequest.Builder, com.ibm.etcd.api.PutRequestOrBuilder>
getRequestPutFieldBuilder() {
if (requestPutBuilder_ == null) {
if (!(requestCase_ == 2)) {
request_ = com.ibm.etcd.api.PutRequest.getDefaultInstance();
}
requestPutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.PutRequest, com.ibm.etcd.api.PutRequest.Builder, com.ibm.etcd.api.PutRequestOrBuilder>(
(com.ibm.etcd.api.PutRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 2;
onChanged();;
return requestPutBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.DeleteRangeRequest, com.ibm.etcd.api.DeleteRangeRequest.Builder, com.ibm.etcd.api.DeleteRangeRequestOrBuilder> requestDeleteRangeBuilder_;
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
* @return Whether the requestDeleteRange field is set.
*/
@java.lang.Override
public boolean hasRequestDeleteRange() {
return requestCase_ == 3;
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
* @return The requestDeleteRange.
*/
@java.lang.Override
public com.ibm.etcd.api.DeleteRangeRequest getRequestDeleteRange() {
if (requestDeleteRangeBuilder_ == null) {
if (requestCase_ == 3) {
return (com.ibm.etcd.api.DeleteRangeRequest) request_;
}
return com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance();
} else {
if (requestCase_ == 3) {
return requestDeleteRangeBuilder_.getMessage();
}
return com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
public Builder setRequestDeleteRange(com.ibm.etcd.api.DeleteRangeRequest value) {
if (requestDeleteRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
request_ = value;
onChanged();
} else {
requestDeleteRangeBuilder_.setMessage(value);
}
requestCase_ = 3;
return this;
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
public Builder setRequestDeleteRange(
com.ibm.etcd.api.DeleteRangeRequest.Builder builderForValue) {
if (requestDeleteRangeBuilder_ == null) {
request_ = builderForValue.build();
onChanged();
} else {
requestDeleteRangeBuilder_.setMessage(builderForValue.build());
}
requestCase_ = 3;
return this;
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
public Builder mergeRequestDeleteRange(com.ibm.etcd.api.DeleteRangeRequest value) {
if (requestDeleteRangeBuilder_ == null) {
if (requestCase_ == 3 &&
request_ != com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance()) {
request_ = com.ibm.etcd.api.DeleteRangeRequest.newBuilder((com.ibm.etcd.api.DeleteRangeRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 3) {
requestDeleteRangeBuilder_.mergeFrom(value);
}
requestDeleteRangeBuilder_.setMessage(value);
}
requestCase_ = 3;
return this;
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
public Builder clearRequestDeleteRange() {
if (requestDeleteRangeBuilder_ == null) {
if (requestCase_ == 3) {
requestCase_ = 0;
request_ = null;
onChanged();
}
} else {
if (requestCase_ == 3) {
requestCase_ = 0;
request_ = null;
}
requestDeleteRangeBuilder_.clear();
}
return this;
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
public com.ibm.etcd.api.DeleteRangeRequest.Builder getRequestDeleteRangeBuilder() {
return getRequestDeleteRangeFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
@java.lang.Override
public com.ibm.etcd.api.DeleteRangeRequestOrBuilder getRequestDeleteRangeOrBuilder() {
if ((requestCase_ == 3) && (requestDeleteRangeBuilder_ != null)) {
return requestDeleteRangeBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 3) {
return (com.ibm.etcd.api.DeleteRangeRequest) request_;
}
return com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.DeleteRangeRequest, com.ibm.etcd.api.DeleteRangeRequest.Builder, com.ibm.etcd.api.DeleteRangeRequestOrBuilder>
getRequestDeleteRangeFieldBuilder() {
if (requestDeleteRangeBuilder_ == null) {
if (!(requestCase_ == 3)) {
request_ = com.ibm.etcd.api.DeleteRangeRequest.getDefaultInstance();
}
requestDeleteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.DeleteRangeRequest, com.ibm.etcd.api.DeleteRangeRequest.Builder, com.ibm.etcd.api.DeleteRangeRequestOrBuilder>(
(com.ibm.etcd.api.DeleteRangeRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 3;
onChanged();;
return requestDeleteRangeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.TxnRequest, com.ibm.etcd.api.TxnRequest.Builder, com.ibm.etcd.api.TxnRequestOrBuilder> requestTxnBuilder_;
/**
* .etcdserverpb.TxnRequest request_txn = 4;
* @return Whether the requestTxn field is set.
*/
@java.lang.Override
public boolean hasRequestTxn() {
return requestCase_ == 4;
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
* @return The requestTxn.
*/
@java.lang.Override
public com.ibm.etcd.api.TxnRequest getRequestTxn() {
if (requestTxnBuilder_ == null) {
if (requestCase_ == 4) {
return (com.ibm.etcd.api.TxnRequest) request_;
}
return com.ibm.etcd.api.TxnRequest.getDefaultInstance();
} else {
if (requestCase_ == 4) {
return requestTxnBuilder_.getMessage();
}
return com.ibm.etcd.api.TxnRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
public Builder setRequestTxn(com.ibm.etcd.api.TxnRequest value) {
if (requestTxnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
request_ = value;
onChanged();
} else {
requestTxnBuilder_.setMessage(value);
}
requestCase_ = 4;
return this;
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
public Builder setRequestTxn(
com.ibm.etcd.api.TxnRequest.Builder builderForValue) {
if (requestTxnBuilder_ == null) {
request_ = builderForValue.build();
onChanged();
} else {
requestTxnBuilder_.setMessage(builderForValue.build());
}
requestCase_ = 4;
return this;
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
public Builder mergeRequestTxn(com.ibm.etcd.api.TxnRequest value) {
if (requestTxnBuilder_ == null) {
if (requestCase_ == 4 &&
request_ != com.ibm.etcd.api.TxnRequest.getDefaultInstance()) {
request_ = com.ibm.etcd.api.TxnRequest.newBuilder((com.ibm.etcd.api.TxnRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 4) {
requestTxnBuilder_.mergeFrom(value);
}
requestTxnBuilder_.setMessage(value);
}
requestCase_ = 4;
return this;
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
public Builder clearRequestTxn() {
if (requestTxnBuilder_ == null) {
if (requestCase_ == 4) {
requestCase_ = 0;
request_ = null;
onChanged();
}
} else {
if (requestCase_ == 4) {
requestCase_ = 0;
request_ = null;
}
requestTxnBuilder_.clear();
}
return this;
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
public com.ibm.etcd.api.TxnRequest.Builder getRequestTxnBuilder() {
return getRequestTxnFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
@java.lang.Override
public com.ibm.etcd.api.TxnRequestOrBuilder getRequestTxnOrBuilder() {
if ((requestCase_ == 4) && (requestTxnBuilder_ != null)) {
return requestTxnBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 4) {
return (com.ibm.etcd.api.TxnRequest) request_;
}
return com.ibm.etcd.api.TxnRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.TxnRequest, com.ibm.etcd.api.TxnRequest.Builder, com.ibm.etcd.api.TxnRequestOrBuilder>
getRequestTxnFieldBuilder() {
if (requestTxnBuilder_ == null) {
if (!(requestCase_ == 4)) {
request_ = com.ibm.etcd.api.TxnRequest.getDefaultInstance();
}
requestTxnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.ibm.etcd.api.TxnRequest, com.ibm.etcd.api.TxnRequest.Builder, com.ibm.etcd.api.TxnRequestOrBuilder>(
(com.ibm.etcd.api.TxnRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 4;
onChanged();;
return requestTxnBuilder_;
}
@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.RequestOp)
}
// @@protoc_insertion_point(class_scope:etcdserverpb.RequestOp)
private static final com.ibm.etcd.api.RequestOp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.ibm.etcd.api.RequestOp();
}
public static com.ibm.etcd.api.RequestOp getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RequestOp parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RequestOp(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.ibm.etcd.api.RequestOp getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}