io.etcd.jetcd.api.RequestOp Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: rpc.proto
// Protobuf Java Version: 3.25.1
package io.etcd.jetcd.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();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_RequestOp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_RequestOp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.etcd.jetcd.api.RequestOp.class, io.etcd.jetcd.api.RequestOp.Builder.class);
}
private int requestCase_ = 0;
@SuppressWarnings("serial")
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 io.etcd.jetcd.api.RangeRequest getRequestRange() {
if (requestCase_ == 1) {
return (io.etcd.jetcd.api.RangeRequest) request_;
}
return io.etcd.jetcd.api.RangeRequest.getDefaultInstance();
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
@java.lang.Override
public io.etcd.jetcd.api.RangeRequestOrBuilder getRequestRangeOrBuilder() {
if (requestCase_ == 1) {
return (io.etcd.jetcd.api.RangeRequest) request_;
}
return io.etcd.jetcd.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 io.etcd.jetcd.api.PutRequest getRequestPut() {
if (requestCase_ == 2) {
return (io.etcd.jetcd.api.PutRequest) request_;
}
return io.etcd.jetcd.api.PutRequest.getDefaultInstance();
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
@java.lang.Override
public io.etcd.jetcd.api.PutRequestOrBuilder getRequestPutOrBuilder() {
if (requestCase_ == 2) {
return (io.etcd.jetcd.api.PutRequest) request_;
}
return io.etcd.jetcd.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 io.etcd.jetcd.api.DeleteRangeRequest getRequestDeleteRange() {
if (requestCase_ == 3) {
return (io.etcd.jetcd.api.DeleteRangeRequest) request_;
}
return io.etcd.jetcd.api.DeleteRangeRequest.getDefaultInstance();
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
@java.lang.Override
public io.etcd.jetcd.api.DeleteRangeRequestOrBuilder getRequestDeleteRangeOrBuilder() {
if (requestCase_ == 3) {
return (io.etcd.jetcd.api.DeleteRangeRequest) request_;
}
return io.etcd.jetcd.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 io.etcd.jetcd.api.TxnRequest getRequestTxn() {
if (requestCase_ == 4) {
return (io.etcd.jetcd.api.TxnRequest) request_;
}
return io.etcd.jetcd.api.TxnRequest.getDefaultInstance();
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
@java.lang.Override
public io.etcd.jetcd.api.TxnRequestOrBuilder getRequestTxnOrBuilder() {
if (requestCase_ == 4) {
return (io.etcd.jetcd.api.TxnRequest) request_;
}
return io.etcd.jetcd.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, (io.etcd.jetcd.api.RangeRequest) request_);
}
if (requestCase_ == 2) {
output.writeMessage(2, (io.etcd.jetcd.api.PutRequest) request_);
}
if (requestCase_ == 3) {
output.writeMessage(3, (io.etcd.jetcd.api.DeleteRangeRequest) request_);
}
if (requestCase_ == 4) {
output.writeMessage(4, (io.etcd.jetcd.api.TxnRequest) request_);
}
getUnknownFields().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, (io.etcd.jetcd.api.RangeRequest) request_);
}
if (requestCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.etcd.jetcd.api.PutRequest) request_);
}
if (requestCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.etcd.jetcd.api.DeleteRangeRequest) request_);
}
if (requestCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (io.etcd.jetcd.api.TxnRequest) request_);
}
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.etcd.jetcd.api.RequestOp)) {
return super.equals(obj);
}
io.etcd.jetcd.api.RequestOp other = (io.etcd.jetcd.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 (!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();
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) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.etcd.jetcd.api.RequestOp parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.etcd.jetcd.api.RequestOp parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.etcd.jetcd.api.RequestOp parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.etcd.jetcd.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 io.etcd.jetcd.api.RequestOp parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.etcd.jetcd.api.RequestOp parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.etcd.jetcd.api.RequestOp parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.etcd.jetcd.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 io.etcd.jetcd.api.RequestOp parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.etcd.jetcd.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 io.etcd.jetcd.api.RequestOp parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.etcd.jetcd.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(io.etcd.jetcd.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)
io.etcd.jetcd.api.RequestOpOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_RequestOp_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_RequestOp_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.etcd.jetcd.api.RequestOp.class, io.etcd.jetcd.api.RequestOp.Builder.class);
}
// Construct using io.etcd.jetcd.api.RequestOp.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (requestRangeBuilder_ != null) {
requestRangeBuilder_.clear();
}
if (requestPutBuilder_ != null) {
requestPutBuilder_.clear();
}
if (requestDeleteRangeBuilder_ != null) {
requestDeleteRangeBuilder_.clear();
}
if (requestTxnBuilder_ != null) {
requestTxnBuilder_.clear();
}
requestCase_ = 0;
request_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_RequestOp_descriptor;
}
@java.lang.Override
public io.etcd.jetcd.api.RequestOp getDefaultInstanceForType() {
return io.etcd.jetcd.api.RequestOp.getDefaultInstance();
}
@java.lang.Override
public io.etcd.jetcd.api.RequestOp build() {
io.etcd.jetcd.api.RequestOp result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.etcd.jetcd.api.RequestOp buildPartial() {
io.etcd.jetcd.api.RequestOp result = new io.etcd.jetcd.api.RequestOp(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(io.etcd.jetcd.api.RequestOp result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(io.etcd.jetcd.api.RequestOp result) {
result.requestCase_ = requestCase_;
result.request_ = this.request_;
if (requestCase_ == 1 &&
requestRangeBuilder_ != null) {
result.request_ = requestRangeBuilder_.build();
}
if (requestCase_ == 2 &&
requestPutBuilder_ != null) {
result.request_ = requestPutBuilder_.build();
}
if (requestCase_ == 3 &&
requestDeleteRangeBuilder_ != null) {
result.request_ = requestDeleteRangeBuilder_.build();
}
if (requestCase_ == 4 &&
requestTxnBuilder_ != null) {
result.request_ = requestTxnBuilder_.build();
}
}
@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.etcd.jetcd.api.RequestOp) {
return mergeFrom((io.etcd.jetcd.api.RequestOp)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.etcd.jetcd.api.RequestOp other) {
if (other == io.etcd.jetcd.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.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 10: {
input.readMessage(
getRequestRangeFieldBuilder().getBuilder(),
extensionRegistry);
requestCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getRequestPutFieldBuilder().getBuilder(),
extensionRegistry);
requestCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getRequestDeleteRangeFieldBuilder().getBuilder(),
extensionRegistry);
requestCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getRequestTxnFieldBuilder().getBuilder(),
extensionRegistry);
requestCase_ = 4;
break;
} // case 34
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 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 int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.RangeRequest, io.etcd.jetcd.api.RangeRequest.Builder, io.etcd.jetcd.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 io.etcd.jetcd.api.RangeRequest getRequestRange() {
if (requestRangeBuilder_ == null) {
if (requestCase_ == 1) {
return (io.etcd.jetcd.api.RangeRequest) request_;
}
return io.etcd.jetcd.api.RangeRequest.getDefaultInstance();
} else {
if (requestCase_ == 1) {
return requestRangeBuilder_.getMessage();
}
return io.etcd.jetcd.api.RangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
public Builder setRequestRange(io.etcd.jetcd.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(
io.etcd.jetcd.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(io.etcd.jetcd.api.RangeRequest value) {
if (requestRangeBuilder_ == null) {
if (requestCase_ == 1 &&
request_ != io.etcd.jetcd.api.RangeRequest.getDefaultInstance()) {
request_ = io.etcd.jetcd.api.RangeRequest.newBuilder((io.etcd.jetcd.api.RangeRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 1) {
requestRangeBuilder_.mergeFrom(value);
} else {
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 io.etcd.jetcd.api.RangeRequest.Builder getRequestRangeBuilder() {
return getRequestRangeFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
@java.lang.Override
public io.etcd.jetcd.api.RangeRequestOrBuilder getRequestRangeOrBuilder() {
if ((requestCase_ == 1) && (requestRangeBuilder_ != null)) {
return requestRangeBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 1) {
return (io.etcd.jetcd.api.RangeRequest) request_;
}
return io.etcd.jetcd.api.RangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.RangeRequest request_range = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.RangeRequest, io.etcd.jetcd.api.RangeRequest.Builder, io.etcd.jetcd.api.RangeRequestOrBuilder>
getRequestRangeFieldBuilder() {
if (requestRangeBuilder_ == null) {
if (!(requestCase_ == 1)) {
request_ = io.etcd.jetcd.api.RangeRequest.getDefaultInstance();
}
requestRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.RangeRequest, io.etcd.jetcd.api.RangeRequest.Builder, io.etcd.jetcd.api.RangeRequestOrBuilder>(
(io.etcd.jetcd.api.RangeRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 1;
onChanged();
return requestRangeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.PutRequest, io.etcd.jetcd.api.PutRequest.Builder, io.etcd.jetcd.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 io.etcd.jetcd.api.PutRequest getRequestPut() {
if (requestPutBuilder_ == null) {
if (requestCase_ == 2) {
return (io.etcd.jetcd.api.PutRequest) request_;
}
return io.etcd.jetcd.api.PutRequest.getDefaultInstance();
} else {
if (requestCase_ == 2) {
return requestPutBuilder_.getMessage();
}
return io.etcd.jetcd.api.PutRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
public Builder setRequestPut(io.etcd.jetcd.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(
io.etcd.jetcd.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(io.etcd.jetcd.api.PutRequest value) {
if (requestPutBuilder_ == null) {
if (requestCase_ == 2 &&
request_ != io.etcd.jetcd.api.PutRequest.getDefaultInstance()) {
request_ = io.etcd.jetcd.api.PutRequest.newBuilder((io.etcd.jetcd.api.PutRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 2) {
requestPutBuilder_.mergeFrom(value);
} else {
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 io.etcd.jetcd.api.PutRequest.Builder getRequestPutBuilder() {
return getRequestPutFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
@java.lang.Override
public io.etcd.jetcd.api.PutRequestOrBuilder getRequestPutOrBuilder() {
if ((requestCase_ == 2) && (requestPutBuilder_ != null)) {
return requestPutBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 2) {
return (io.etcd.jetcd.api.PutRequest) request_;
}
return io.etcd.jetcd.api.PutRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.PutRequest request_put = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.PutRequest, io.etcd.jetcd.api.PutRequest.Builder, io.etcd.jetcd.api.PutRequestOrBuilder>
getRequestPutFieldBuilder() {
if (requestPutBuilder_ == null) {
if (!(requestCase_ == 2)) {
request_ = io.etcd.jetcd.api.PutRequest.getDefaultInstance();
}
requestPutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.PutRequest, io.etcd.jetcd.api.PutRequest.Builder, io.etcd.jetcd.api.PutRequestOrBuilder>(
(io.etcd.jetcd.api.PutRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 2;
onChanged();
return requestPutBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.DeleteRangeRequest, io.etcd.jetcd.api.DeleteRangeRequest.Builder, io.etcd.jetcd.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 io.etcd.jetcd.api.DeleteRangeRequest getRequestDeleteRange() {
if (requestDeleteRangeBuilder_ == null) {
if (requestCase_ == 3) {
return (io.etcd.jetcd.api.DeleteRangeRequest) request_;
}
return io.etcd.jetcd.api.DeleteRangeRequest.getDefaultInstance();
} else {
if (requestCase_ == 3) {
return requestDeleteRangeBuilder_.getMessage();
}
return io.etcd.jetcd.api.DeleteRangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
public Builder setRequestDeleteRange(io.etcd.jetcd.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(
io.etcd.jetcd.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(io.etcd.jetcd.api.DeleteRangeRequest value) {
if (requestDeleteRangeBuilder_ == null) {
if (requestCase_ == 3 &&
request_ != io.etcd.jetcd.api.DeleteRangeRequest.getDefaultInstance()) {
request_ = io.etcd.jetcd.api.DeleteRangeRequest.newBuilder((io.etcd.jetcd.api.DeleteRangeRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 3) {
requestDeleteRangeBuilder_.mergeFrom(value);
} else {
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 io.etcd.jetcd.api.DeleteRangeRequest.Builder getRequestDeleteRangeBuilder() {
return getRequestDeleteRangeFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
@java.lang.Override
public io.etcd.jetcd.api.DeleteRangeRequestOrBuilder getRequestDeleteRangeOrBuilder() {
if ((requestCase_ == 3) && (requestDeleteRangeBuilder_ != null)) {
return requestDeleteRangeBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 3) {
return (io.etcd.jetcd.api.DeleteRangeRequest) request_;
}
return io.etcd.jetcd.api.DeleteRangeRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.DeleteRangeRequest request_delete_range = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.DeleteRangeRequest, io.etcd.jetcd.api.DeleteRangeRequest.Builder, io.etcd.jetcd.api.DeleteRangeRequestOrBuilder>
getRequestDeleteRangeFieldBuilder() {
if (requestDeleteRangeBuilder_ == null) {
if (!(requestCase_ == 3)) {
request_ = io.etcd.jetcd.api.DeleteRangeRequest.getDefaultInstance();
}
requestDeleteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.DeleteRangeRequest, io.etcd.jetcd.api.DeleteRangeRequest.Builder, io.etcd.jetcd.api.DeleteRangeRequestOrBuilder>(
(io.etcd.jetcd.api.DeleteRangeRequest) request_,
getParentForChildren(),
isClean());
request_ = null;
}
requestCase_ = 3;
onChanged();
return requestDeleteRangeBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.TxnRequest, io.etcd.jetcd.api.TxnRequest.Builder, io.etcd.jetcd.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 io.etcd.jetcd.api.TxnRequest getRequestTxn() {
if (requestTxnBuilder_ == null) {
if (requestCase_ == 4) {
return (io.etcd.jetcd.api.TxnRequest) request_;
}
return io.etcd.jetcd.api.TxnRequest.getDefaultInstance();
} else {
if (requestCase_ == 4) {
return requestTxnBuilder_.getMessage();
}
return io.etcd.jetcd.api.TxnRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
public Builder setRequestTxn(io.etcd.jetcd.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(
io.etcd.jetcd.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(io.etcd.jetcd.api.TxnRequest value) {
if (requestTxnBuilder_ == null) {
if (requestCase_ == 4 &&
request_ != io.etcd.jetcd.api.TxnRequest.getDefaultInstance()) {
request_ = io.etcd.jetcd.api.TxnRequest.newBuilder((io.etcd.jetcd.api.TxnRequest) request_)
.mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
if (requestCase_ == 4) {
requestTxnBuilder_.mergeFrom(value);
} else {
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 io.etcd.jetcd.api.TxnRequest.Builder getRequestTxnBuilder() {
return getRequestTxnFieldBuilder().getBuilder();
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
@java.lang.Override
public io.etcd.jetcd.api.TxnRequestOrBuilder getRequestTxnOrBuilder() {
if ((requestCase_ == 4) && (requestTxnBuilder_ != null)) {
return requestTxnBuilder_.getMessageOrBuilder();
} else {
if (requestCase_ == 4) {
return (io.etcd.jetcd.api.TxnRequest) request_;
}
return io.etcd.jetcd.api.TxnRequest.getDefaultInstance();
}
}
/**
* .etcdserverpb.TxnRequest request_txn = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.TxnRequest, io.etcd.jetcd.api.TxnRequest.Builder, io.etcd.jetcd.api.TxnRequestOrBuilder>
getRequestTxnFieldBuilder() {
if (requestTxnBuilder_ == null) {
if (!(requestCase_ == 4)) {
request_ = io.etcd.jetcd.api.TxnRequest.getDefaultInstance();
}
requestTxnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.etcd.jetcd.api.TxnRequest, io.etcd.jetcd.api.TxnRequest.Builder, io.etcd.jetcd.api.TxnRequestOrBuilder>(
(io.etcd.jetcd.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 io.etcd.jetcd.api.RequestOp DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.etcd.jetcd.api.RequestOp();
}
public static io.etcd.jetcd.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 {
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.etcd.jetcd.api.RequestOp getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}