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

io.etcd.jetcd.api.ResponseOp 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.ResponseOp}
 */
public final class ResponseOp extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:etcdserverpb.ResponseOp)
    ResponseOpOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ResponseOp.newBuilder() to construct.
  private ResponseOp(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private ResponseOp() {
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new ResponseOp();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_ResponseOp_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_ResponseOp_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.etcd.jetcd.api.ResponseOp.class, io.etcd.jetcd.api.ResponseOp.Builder.class);
  }

  private int responseCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object response_;
  public enum ResponseCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    RESPONSE_RANGE(1),
    RESPONSE_PUT(2),
    RESPONSE_DELETE_RANGE(3),
    RESPONSE_TXN(4),
    RESPONSE_NOT_SET(0);
    private final int value;
    private ResponseCase(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 ResponseCase valueOf(int value) {
      return forNumber(value);
    }

    public static ResponseCase forNumber(int value) {
      switch (value) {
        case 1: return RESPONSE_RANGE;
        case 2: return RESPONSE_PUT;
        case 3: return RESPONSE_DELETE_RANGE;
        case 4: return RESPONSE_TXN;
        case 0: return RESPONSE_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public ResponseCase
  getResponseCase() {
    return ResponseCase.forNumber(
        responseCase_);
  }

  public static final int RESPONSE_RANGE_FIELD_NUMBER = 1;
  /**
   * .etcdserverpb.RangeResponse response_range = 1;
   * @return Whether the responseRange field is set.
   */
  @java.lang.Override
  public boolean hasResponseRange() {
    return responseCase_ == 1;
  }
  /**
   * .etcdserverpb.RangeResponse response_range = 1;
   * @return The responseRange.
   */
  @java.lang.Override
  public io.etcd.jetcd.api.RangeResponse getResponseRange() {
    if (responseCase_ == 1) {
       return (io.etcd.jetcd.api.RangeResponse) response_;
    }
    return io.etcd.jetcd.api.RangeResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.RangeResponse response_range = 1;
   */
  @java.lang.Override
  public io.etcd.jetcd.api.RangeResponseOrBuilder getResponseRangeOrBuilder() {
    if (responseCase_ == 1) {
       return (io.etcd.jetcd.api.RangeResponse) response_;
    }
    return io.etcd.jetcd.api.RangeResponse.getDefaultInstance();
  }

  public static final int RESPONSE_PUT_FIELD_NUMBER = 2;
  /**
   * .etcdserverpb.PutResponse response_put = 2;
   * @return Whether the responsePut field is set.
   */
  @java.lang.Override
  public boolean hasResponsePut() {
    return responseCase_ == 2;
  }
  /**
   * .etcdserverpb.PutResponse response_put = 2;
   * @return The responsePut.
   */
  @java.lang.Override
  public io.etcd.jetcd.api.PutResponse getResponsePut() {
    if (responseCase_ == 2) {
       return (io.etcd.jetcd.api.PutResponse) response_;
    }
    return io.etcd.jetcd.api.PutResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.PutResponse response_put = 2;
   */
  @java.lang.Override
  public io.etcd.jetcd.api.PutResponseOrBuilder getResponsePutOrBuilder() {
    if (responseCase_ == 2) {
       return (io.etcd.jetcd.api.PutResponse) response_;
    }
    return io.etcd.jetcd.api.PutResponse.getDefaultInstance();
  }

  public static final int RESPONSE_DELETE_RANGE_FIELD_NUMBER = 3;
  /**
   * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
   * @return Whether the responseDeleteRange field is set.
   */
  @java.lang.Override
  public boolean hasResponseDeleteRange() {
    return responseCase_ == 3;
  }
  /**
   * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
   * @return The responseDeleteRange.
   */
  @java.lang.Override
  public io.etcd.jetcd.api.DeleteRangeResponse getResponseDeleteRange() {
    if (responseCase_ == 3) {
       return (io.etcd.jetcd.api.DeleteRangeResponse) response_;
    }
    return io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
   */
  @java.lang.Override
  public io.etcd.jetcd.api.DeleteRangeResponseOrBuilder getResponseDeleteRangeOrBuilder() {
    if (responseCase_ == 3) {
       return (io.etcd.jetcd.api.DeleteRangeResponse) response_;
    }
    return io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance();
  }

  public static final int RESPONSE_TXN_FIELD_NUMBER = 4;
  /**
   * .etcdserverpb.TxnResponse response_txn = 4;
   * @return Whether the responseTxn field is set.
   */
  @java.lang.Override
  public boolean hasResponseTxn() {
    return responseCase_ == 4;
  }
  /**
   * .etcdserverpb.TxnResponse response_txn = 4;
   * @return The responseTxn.
   */
  @java.lang.Override
  public io.etcd.jetcd.api.TxnResponse getResponseTxn() {
    if (responseCase_ == 4) {
       return (io.etcd.jetcd.api.TxnResponse) response_;
    }
    return io.etcd.jetcd.api.TxnResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.TxnResponse response_txn = 4;
   */
  @java.lang.Override
  public io.etcd.jetcd.api.TxnResponseOrBuilder getResponseTxnOrBuilder() {
    if (responseCase_ == 4) {
       return (io.etcd.jetcd.api.TxnResponse) response_;
    }
    return io.etcd.jetcd.api.TxnResponse.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 (responseCase_ == 1) {
      output.writeMessage(1, (io.etcd.jetcd.api.RangeResponse) response_);
    }
    if (responseCase_ == 2) {
      output.writeMessage(2, (io.etcd.jetcd.api.PutResponse) response_);
    }
    if (responseCase_ == 3) {
      output.writeMessage(3, (io.etcd.jetcd.api.DeleteRangeResponse) response_);
    }
    if (responseCase_ == 4) {
      output.writeMessage(4, (io.etcd.jetcd.api.TxnResponse) response_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (responseCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (io.etcd.jetcd.api.RangeResponse) response_);
    }
    if (responseCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (io.etcd.jetcd.api.PutResponse) response_);
    }
    if (responseCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (io.etcd.jetcd.api.DeleteRangeResponse) response_);
    }
    if (responseCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (io.etcd.jetcd.api.TxnResponse) response_);
    }
    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.ResponseOp)) {
      return super.equals(obj);
    }
    io.etcd.jetcd.api.ResponseOp other = (io.etcd.jetcd.api.ResponseOp) obj;

    if (!getResponseCase().equals(other.getResponseCase())) return false;
    switch (responseCase_) {
      case 1:
        if (!getResponseRange()
            .equals(other.getResponseRange())) return false;
        break;
      case 2:
        if (!getResponsePut()
            .equals(other.getResponsePut())) return false;
        break;
      case 3:
        if (!getResponseDeleteRange()
            .equals(other.getResponseDeleteRange())) return false;
        break;
      case 4:
        if (!getResponseTxn()
            .equals(other.getResponseTxn())) 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 (responseCase_) {
      case 1:
        hash = (37 * hash) + RESPONSE_RANGE_FIELD_NUMBER;
        hash = (53 * hash) + getResponseRange().hashCode();
        break;
      case 2:
        hash = (37 * hash) + RESPONSE_PUT_FIELD_NUMBER;
        hash = (53 * hash) + getResponsePut().hashCode();
        break;
      case 3:
        hash = (37 * hash) + RESPONSE_DELETE_RANGE_FIELD_NUMBER;
        hash = (53 * hash) + getResponseDeleteRange().hashCode();
        break;
      case 4:
        hash = (37 * hash) + RESPONSE_TXN_FIELD_NUMBER;
        hash = (53 * hash) + getResponseTxn().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static io.etcd.jetcd.api.ResponseOp parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.etcd.jetcd.api.ResponseOp 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.ResponseOp parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.etcd.jetcd.api.ResponseOp 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.ResponseOp parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.etcd.jetcd.api.ResponseOp parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.etcd.jetcd.api.ResponseOp parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.etcd.jetcd.api.ResponseOp 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.ResponseOp parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static io.etcd.jetcd.api.ResponseOp 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.ResponseOp parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.etcd.jetcd.api.ResponseOp 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.ResponseOp 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.ResponseOp}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:etcdserverpb.ResponseOp)
      io.etcd.jetcd.api.ResponseOpOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_ResponseOp_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_ResponseOp_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.etcd.jetcd.api.ResponseOp.class, io.etcd.jetcd.api.ResponseOp.Builder.class);
    }

    // Construct using io.etcd.jetcd.api.ResponseOp.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (responseRangeBuilder_ != null) {
        responseRangeBuilder_.clear();
      }
      if (responsePutBuilder_ != null) {
        responsePutBuilder_.clear();
      }
      if (responseDeleteRangeBuilder_ != null) {
        responseDeleteRangeBuilder_.clear();
      }
      if (responseTxnBuilder_ != null) {
        responseTxnBuilder_.clear();
      }
      responseCase_ = 0;
      response_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_ResponseOp_descriptor;
    }

    @java.lang.Override
    public io.etcd.jetcd.api.ResponseOp getDefaultInstanceForType() {
      return io.etcd.jetcd.api.ResponseOp.getDefaultInstance();
    }

    @java.lang.Override
    public io.etcd.jetcd.api.ResponseOp build() {
      io.etcd.jetcd.api.ResponseOp result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.etcd.jetcd.api.ResponseOp buildPartial() {
      io.etcd.jetcd.api.ResponseOp result = new io.etcd.jetcd.api.ResponseOp(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartial0(io.etcd.jetcd.api.ResponseOp result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(io.etcd.jetcd.api.ResponseOp result) {
      result.responseCase_ = responseCase_;
      result.response_ = this.response_;
      if (responseCase_ == 1 &&
          responseRangeBuilder_ != null) {
        result.response_ = responseRangeBuilder_.build();
      }
      if (responseCase_ == 2 &&
          responsePutBuilder_ != null) {
        result.response_ = responsePutBuilder_.build();
      }
      if (responseCase_ == 3 &&
          responseDeleteRangeBuilder_ != null) {
        result.response_ = responseDeleteRangeBuilder_.build();
      }
      if (responseCase_ == 4 &&
          responseTxnBuilder_ != null) {
        result.response_ = responseTxnBuilder_.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.ResponseOp) {
        return mergeFrom((io.etcd.jetcd.api.ResponseOp)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.etcd.jetcd.api.ResponseOp other) {
      if (other == io.etcd.jetcd.api.ResponseOp.getDefaultInstance()) return this;
      switch (other.getResponseCase()) {
        case RESPONSE_RANGE: {
          mergeResponseRange(other.getResponseRange());
          break;
        }
        case RESPONSE_PUT: {
          mergeResponsePut(other.getResponsePut());
          break;
        }
        case RESPONSE_DELETE_RANGE: {
          mergeResponseDeleteRange(other.getResponseDeleteRange());
          break;
        }
        case RESPONSE_TXN: {
          mergeResponseTxn(other.getResponseTxn());
          break;
        }
        case RESPONSE_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(
                  getResponseRangeFieldBuilder().getBuilder(),
                  extensionRegistry);
              responseCase_ = 1;
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getResponsePutFieldBuilder().getBuilder(),
                  extensionRegistry);
              responseCase_ = 2;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  getResponseDeleteRangeFieldBuilder().getBuilder(),
                  extensionRegistry);
              responseCase_ = 3;
              break;
            } // case 26
            case 34: {
              input.readMessage(
                  getResponseTxnFieldBuilder().getBuilder(),
                  extensionRegistry);
              responseCase_ = 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 responseCase_ = 0;
    private java.lang.Object response_;
    public ResponseCase
        getResponseCase() {
      return ResponseCase.forNumber(
          responseCase_);
    }

    public Builder clearResponse() {
      responseCase_ = 0;
      response_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.RangeResponse, io.etcd.jetcd.api.RangeResponse.Builder, io.etcd.jetcd.api.RangeResponseOrBuilder> responseRangeBuilder_;
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     * @return Whether the responseRange field is set.
     */
    @java.lang.Override
    public boolean hasResponseRange() {
      return responseCase_ == 1;
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     * @return The responseRange.
     */
    @java.lang.Override
    public io.etcd.jetcd.api.RangeResponse getResponseRange() {
      if (responseRangeBuilder_ == null) {
        if (responseCase_ == 1) {
          return (io.etcd.jetcd.api.RangeResponse) response_;
        }
        return io.etcd.jetcd.api.RangeResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 1) {
          return responseRangeBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.RangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    public Builder setResponseRange(io.etcd.jetcd.api.RangeResponse value) {
      if (responseRangeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        response_ = value;
        onChanged();
      } else {
        responseRangeBuilder_.setMessage(value);
      }
      responseCase_ = 1;
      return this;
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    public Builder setResponseRange(
        io.etcd.jetcd.api.RangeResponse.Builder builderForValue) {
      if (responseRangeBuilder_ == null) {
        response_ = builderForValue.build();
        onChanged();
      } else {
        responseRangeBuilder_.setMessage(builderForValue.build());
      }
      responseCase_ = 1;
      return this;
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    public Builder mergeResponseRange(io.etcd.jetcd.api.RangeResponse value) {
      if (responseRangeBuilder_ == null) {
        if (responseCase_ == 1 &&
            response_ != io.etcd.jetcd.api.RangeResponse.getDefaultInstance()) {
          response_ = io.etcd.jetcd.api.RangeResponse.newBuilder((io.etcd.jetcd.api.RangeResponse) response_)
              .mergeFrom(value).buildPartial();
        } else {
          response_ = value;
        }
        onChanged();
      } else {
        if (responseCase_ == 1) {
          responseRangeBuilder_.mergeFrom(value);
        } else {
          responseRangeBuilder_.setMessage(value);
        }
      }
      responseCase_ = 1;
      return this;
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    public Builder clearResponseRange() {
      if (responseRangeBuilder_ == null) {
        if (responseCase_ == 1) {
          responseCase_ = 0;
          response_ = null;
          onChanged();
        }
      } else {
        if (responseCase_ == 1) {
          responseCase_ = 0;
          response_ = null;
        }
        responseRangeBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    public io.etcd.jetcd.api.RangeResponse.Builder getResponseRangeBuilder() {
      return getResponseRangeFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    @java.lang.Override
    public io.etcd.jetcd.api.RangeResponseOrBuilder getResponseRangeOrBuilder() {
      if ((responseCase_ == 1) && (responseRangeBuilder_ != null)) {
        return responseRangeBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 1) {
          return (io.etcd.jetcd.api.RangeResponse) response_;
        }
        return io.etcd.jetcd.api.RangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.RangeResponse, io.etcd.jetcd.api.RangeResponse.Builder, io.etcd.jetcd.api.RangeResponseOrBuilder> 
        getResponseRangeFieldBuilder() {
      if (responseRangeBuilder_ == null) {
        if (!(responseCase_ == 1)) {
          response_ = io.etcd.jetcd.api.RangeResponse.getDefaultInstance();
        }
        responseRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.RangeResponse, io.etcd.jetcd.api.RangeResponse.Builder, io.etcd.jetcd.api.RangeResponseOrBuilder>(
                (io.etcd.jetcd.api.RangeResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 1;
      onChanged();
      return responseRangeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.PutResponse, io.etcd.jetcd.api.PutResponse.Builder, io.etcd.jetcd.api.PutResponseOrBuilder> responsePutBuilder_;
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     * @return Whether the responsePut field is set.
     */
    @java.lang.Override
    public boolean hasResponsePut() {
      return responseCase_ == 2;
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     * @return The responsePut.
     */
    @java.lang.Override
    public io.etcd.jetcd.api.PutResponse getResponsePut() {
      if (responsePutBuilder_ == null) {
        if (responseCase_ == 2) {
          return (io.etcd.jetcd.api.PutResponse) response_;
        }
        return io.etcd.jetcd.api.PutResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 2) {
          return responsePutBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.PutResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    public Builder setResponsePut(io.etcd.jetcd.api.PutResponse value) {
      if (responsePutBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        response_ = value;
        onChanged();
      } else {
        responsePutBuilder_.setMessage(value);
      }
      responseCase_ = 2;
      return this;
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    public Builder setResponsePut(
        io.etcd.jetcd.api.PutResponse.Builder builderForValue) {
      if (responsePutBuilder_ == null) {
        response_ = builderForValue.build();
        onChanged();
      } else {
        responsePutBuilder_.setMessage(builderForValue.build());
      }
      responseCase_ = 2;
      return this;
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    public Builder mergeResponsePut(io.etcd.jetcd.api.PutResponse value) {
      if (responsePutBuilder_ == null) {
        if (responseCase_ == 2 &&
            response_ != io.etcd.jetcd.api.PutResponse.getDefaultInstance()) {
          response_ = io.etcd.jetcd.api.PutResponse.newBuilder((io.etcd.jetcd.api.PutResponse) response_)
              .mergeFrom(value).buildPartial();
        } else {
          response_ = value;
        }
        onChanged();
      } else {
        if (responseCase_ == 2) {
          responsePutBuilder_.mergeFrom(value);
        } else {
          responsePutBuilder_.setMessage(value);
        }
      }
      responseCase_ = 2;
      return this;
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    public Builder clearResponsePut() {
      if (responsePutBuilder_ == null) {
        if (responseCase_ == 2) {
          responseCase_ = 0;
          response_ = null;
          onChanged();
        }
      } else {
        if (responseCase_ == 2) {
          responseCase_ = 0;
          response_ = null;
        }
        responsePutBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    public io.etcd.jetcd.api.PutResponse.Builder getResponsePutBuilder() {
      return getResponsePutFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    @java.lang.Override
    public io.etcd.jetcd.api.PutResponseOrBuilder getResponsePutOrBuilder() {
      if ((responseCase_ == 2) && (responsePutBuilder_ != null)) {
        return responsePutBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 2) {
          return (io.etcd.jetcd.api.PutResponse) response_;
        }
        return io.etcd.jetcd.api.PutResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.PutResponse, io.etcd.jetcd.api.PutResponse.Builder, io.etcd.jetcd.api.PutResponseOrBuilder> 
        getResponsePutFieldBuilder() {
      if (responsePutBuilder_ == null) {
        if (!(responseCase_ == 2)) {
          response_ = io.etcd.jetcd.api.PutResponse.getDefaultInstance();
        }
        responsePutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.PutResponse, io.etcd.jetcd.api.PutResponse.Builder, io.etcd.jetcd.api.PutResponseOrBuilder>(
                (io.etcd.jetcd.api.PutResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 2;
      onChanged();
      return responsePutBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.DeleteRangeResponse, io.etcd.jetcd.api.DeleteRangeResponse.Builder, io.etcd.jetcd.api.DeleteRangeResponseOrBuilder> responseDeleteRangeBuilder_;
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     * @return Whether the responseDeleteRange field is set.
     */
    @java.lang.Override
    public boolean hasResponseDeleteRange() {
      return responseCase_ == 3;
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     * @return The responseDeleteRange.
     */
    @java.lang.Override
    public io.etcd.jetcd.api.DeleteRangeResponse getResponseDeleteRange() {
      if (responseDeleteRangeBuilder_ == null) {
        if (responseCase_ == 3) {
          return (io.etcd.jetcd.api.DeleteRangeResponse) response_;
        }
        return io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 3) {
          return responseDeleteRangeBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    public Builder setResponseDeleteRange(io.etcd.jetcd.api.DeleteRangeResponse value) {
      if (responseDeleteRangeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        response_ = value;
        onChanged();
      } else {
        responseDeleteRangeBuilder_.setMessage(value);
      }
      responseCase_ = 3;
      return this;
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    public Builder setResponseDeleteRange(
        io.etcd.jetcd.api.DeleteRangeResponse.Builder builderForValue) {
      if (responseDeleteRangeBuilder_ == null) {
        response_ = builderForValue.build();
        onChanged();
      } else {
        responseDeleteRangeBuilder_.setMessage(builderForValue.build());
      }
      responseCase_ = 3;
      return this;
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    public Builder mergeResponseDeleteRange(io.etcd.jetcd.api.DeleteRangeResponse value) {
      if (responseDeleteRangeBuilder_ == null) {
        if (responseCase_ == 3 &&
            response_ != io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance()) {
          response_ = io.etcd.jetcd.api.DeleteRangeResponse.newBuilder((io.etcd.jetcd.api.DeleteRangeResponse) response_)
              .mergeFrom(value).buildPartial();
        } else {
          response_ = value;
        }
        onChanged();
      } else {
        if (responseCase_ == 3) {
          responseDeleteRangeBuilder_.mergeFrom(value);
        } else {
          responseDeleteRangeBuilder_.setMessage(value);
        }
      }
      responseCase_ = 3;
      return this;
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    public Builder clearResponseDeleteRange() {
      if (responseDeleteRangeBuilder_ == null) {
        if (responseCase_ == 3) {
          responseCase_ = 0;
          response_ = null;
          onChanged();
        }
      } else {
        if (responseCase_ == 3) {
          responseCase_ = 0;
          response_ = null;
        }
        responseDeleteRangeBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    public io.etcd.jetcd.api.DeleteRangeResponse.Builder getResponseDeleteRangeBuilder() {
      return getResponseDeleteRangeFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    @java.lang.Override
    public io.etcd.jetcd.api.DeleteRangeResponseOrBuilder getResponseDeleteRangeOrBuilder() {
      if ((responseCase_ == 3) && (responseDeleteRangeBuilder_ != null)) {
        return responseDeleteRangeBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 3) {
          return (io.etcd.jetcd.api.DeleteRangeResponse) response_;
        }
        return io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.DeleteRangeResponse, io.etcd.jetcd.api.DeleteRangeResponse.Builder, io.etcd.jetcd.api.DeleteRangeResponseOrBuilder> 
        getResponseDeleteRangeFieldBuilder() {
      if (responseDeleteRangeBuilder_ == null) {
        if (!(responseCase_ == 3)) {
          response_ = io.etcd.jetcd.api.DeleteRangeResponse.getDefaultInstance();
        }
        responseDeleteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.DeleteRangeResponse, io.etcd.jetcd.api.DeleteRangeResponse.Builder, io.etcd.jetcd.api.DeleteRangeResponseOrBuilder>(
                (io.etcd.jetcd.api.DeleteRangeResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 3;
      onChanged();
      return responseDeleteRangeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.TxnResponse, io.etcd.jetcd.api.TxnResponse.Builder, io.etcd.jetcd.api.TxnResponseOrBuilder> responseTxnBuilder_;
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     * @return Whether the responseTxn field is set.
     */
    @java.lang.Override
    public boolean hasResponseTxn() {
      return responseCase_ == 4;
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     * @return The responseTxn.
     */
    @java.lang.Override
    public io.etcd.jetcd.api.TxnResponse getResponseTxn() {
      if (responseTxnBuilder_ == null) {
        if (responseCase_ == 4) {
          return (io.etcd.jetcd.api.TxnResponse) response_;
        }
        return io.etcd.jetcd.api.TxnResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 4) {
          return responseTxnBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.TxnResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    public Builder setResponseTxn(io.etcd.jetcd.api.TxnResponse value) {
      if (responseTxnBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        response_ = value;
        onChanged();
      } else {
        responseTxnBuilder_.setMessage(value);
      }
      responseCase_ = 4;
      return this;
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    public Builder setResponseTxn(
        io.etcd.jetcd.api.TxnResponse.Builder builderForValue) {
      if (responseTxnBuilder_ == null) {
        response_ = builderForValue.build();
        onChanged();
      } else {
        responseTxnBuilder_.setMessage(builderForValue.build());
      }
      responseCase_ = 4;
      return this;
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    public Builder mergeResponseTxn(io.etcd.jetcd.api.TxnResponse value) {
      if (responseTxnBuilder_ == null) {
        if (responseCase_ == 4 &&
            response_ != io.etcd.jetcd.api.TxnResponse.getDefaultInstance()) {
          response_ = io.etcd.jetcd.api.TxnResponse.newBuilder((io.etcd.jetcd.api.TxnResponse) response_)
              .mergeFrom(value).buildPartial();
        } else {
          response_ = value;
        }
        onChanged();
      } else {
        if (responseCase_ == 4) {
          responseTxnBuilder_.mergeFrom(value);
        } else {
          responseTxnBuilder_.setMessage(value);
        }
      }
      responseCase_ = 4;
      return this;
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    public Builder clearResponseTxn() {
      if (responseTxnBuilder_ == null) {
        if (responseCase_ == 4) {
          responseCase_ = 0;
          response_ = null;
          onChanged();
        }
      } else {
        if (responseCase_ == 4) {
          responseCase_ = 0;
          response_ = null;
        }
        responseTxnBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    public io.etcd.jetcd.api.TxnResponse.Builder getResponseTxnBuilder() {
      return getResponseTxnFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    @java.lang.Override
    public io.etcd.jetcd.api.TxnResponseOrBuilder getResponseTxnOrBuilder() {
      if ((responseCase_ == 4) && (responseTxnBuilder_ != null)) {
        return responseTxnBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 4) {
          return (io.etcd.jetcd.api.TxnResponse) response_;
        }
        return io.etcd.jetcd.api.TxnResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.TxnResponse, io.etcd.jetcd.api.TxnResponse.Builder, io.etcd.jetcd.api.TxnResponseOrBuilder> 
        getResponseTxnFieldBuilder() {
      if (responseTxnBuilder_ == null) {
        if (!(responseCase_ == 4)) {
          response_ = io.etcd.jetcd.api.TxnResponse.getDefaultInstance();
        }
        responseTxnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.TxnResponse, io.etcd.jetcd.api.TxnResponse.Builder, io.etcd.jetcd.api.TxnResponseOrBuilder>(
                (io.etcd.jetcd.api.TxnResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 4;
      onChanged();
      return responseTxnBuilder_;
    }
    @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.ResponseOp)
  }

  // @@protoc_insertion_point(class_scope:etcdserverpb.ResponseOp)
  private static final io.etcd.jetcd.api.ResponseOp DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.etcd.jetcd.api.ResponseOp();
  }

  public static io.etcd.jetcd.api.ResponseOp getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public ResponseOp 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.ResponseOp getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy