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

com.ibm.etcd.api.ResponseOp Maven / Gradle / Ivy

There is a newer version: 0.0.24
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: rpc.proto

package com.ibm.etcd.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();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ResponseOp(
      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.RangeResponse.Builder subBuilder = null;
            if (responseCase_ == 1) {
              subBuilder = ((com.ibm.etcd.api.RangeResponse) response_).toBuilder();
            }
            response_ =
                input.readMessage(com.ibm.etcd.api.RangeResponse.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.RangeResponse) response_);
              response_ = subBuilder.buildPartial();
            }
            responseCase_ = 1;
            break;
          }
          case 18: {
            com.ibm.etcd.api.PutResponse.Builder subBuilder = null;
            if (responseCase_ == 2) {
              subBuilder = ((com.ibm.etcd.api.PutResponse) response_).toBuilder();
            }
            response_ =
                input.readMessage(com.ibm.etcd.api.PutResponse.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.PutResponse) response_);
              response_ = subBuilder.buildPartial();
            }
            responseCase_ = 2;
            break;
          }
          case 26: {
            com.ibm.etcd.api.DeleteRangeResponse.Builder subBuilder = null;
            if (responseCase_ == 3) {
              subBuilder = ((com.ibm.etcd.api.DeleteRangeResponse) response_).toBuilder();
            }
            response_ =
                input.readMessage(com.ibm.etcd.api.DeleteRangeResponse.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.DeleteRangeResponse) response_);
              response_ = subBuilder.buildPartial();
            }
            responseCase_ = 3;
            break;
          }
          case 34: {
            com.ibm.etcd.api.TxnResponse.Builder subBuilder = null;
            if (responseCase_ == 4) {
              subBuilder = ((com.ibm.etcd.api.TxnResponse) response_).toBuilder();
            }
            response_ =
                input.readMessage(com.ibm.etcd.api.TxnResponse.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.TxnResponse) response_);
              response_ = subBuilder.buildPartial();
            }
            responseCase_ = 4;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().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_ResponseOp_descriptor;
  }

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

  private int responseCase_ = 0;
  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 com.ibm.etcd.api.RangeResponse getResponseRange() {
    if (responseCase_ == 1) {
       return (com.ibm.etcd.api.RangeResponse) response_;
    }
    return com.ibm.etcd.api.RangeResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.RangeResponse response_range = 1;
   */
  @java.lang.Override
  public com.ibm.etcd.api.RangeResponseOrBuilder getResponseRangeOrBuilder() {
    if (responseCase_ == 1) {
       return (com.ibm.etcd.api.RangeResponse) response_;
    }
    return com.ibm.etcd.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 com.ibm.etcd.api.PutResponse getResponsePut() {
    if (responseCase_ == 2) {
       return (com.ibm.etcd.api.PutResponse) response_;
    }
    return com.ibm.etcd.api.PutResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.PutResponse response_put = 2;
   */
  @java.lang.Override
  public com.ibm.etcd.api.PutResponseOrBuilder getResponsePutOrBuilder() {
    if (responseCase_ == 2) {
       return (com.ibm.etcd.api.PutResponse) response_;
    }
    return com.ibm.etcd.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 com.ibm.etcd.api.DeleteRangeResponse getResponseDeleteRange() {
    if (responseCase_ == 3) {
       return (com.ibm.etcd.api.DeleteRangeResponse) response_;
    }
    return com.ibm.etcd.api.DeleteRangeResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
   */
  @java.lang.Override
  public com.ibm.etcd.api.DeleteRangeResponseOrBuilder getResponseDeleteRangeOrBuilder() {
    if (responseCase_ == 3) {
       return (com.ibm.etcd.api.DeleteRangeResponse) response_;
    }
    return com.ibm.etcd.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 com.ibm.etcd.api.TxnResponse getResponseTxn() {
    if (responseCase_ == 4) {
       return (com.ibm.etcd.api.TxnResponse) response_;
    }
    return com.ibm.etcd.api.TxnResponse.getDefaultInstance();
  }
  /**
   * .etcdserverpb.TxnResponse response_txn = 4;
   */
  @java.lang.Override
  public com.ibm.etcd.api.TxnResponseOrBuilder getResponseTxnOrBuilder() {
    if (responseCase_ == 4) {
       return (com.ibm.etcd.api.TxnResponse) response_;
    }
    return com.ibm.etcd.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, (com.ibm.etcd.api.RangeResponse) response_);
    }
    if (responseCase_ == 2) {
      output.writeMessage(2, (com.ibm.etcd.api.PutResponse) response_);
    }
    if (responseCase_ == 3) {
      output.writeMessage(3, (com.ibm.etcd.api.DeleteRangeResponse) response_);
    }
    if (responseCase_ == 4) {
      output.writeMessage(4, (com.ibm.etcd.api.TxnResponse) response_);
    }
    unknownFields.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, (com.ibm.etcd.api.RangeResponse) response_);
    }
    if (responseCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (com.ibm.etcd.api.PutResponse) response_);
    }
    if (responseCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.ibm.etcd.api.DeleteRangeResponse) response_);
    }
    if (responseCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (com.ibm.etcd.api.TxnResponse) response_);
    }
    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.ResponseOp)) {
      return super.equals(obj);
    }
    com.ibm.etcd.api.ResponseOp other = (com.ibm.etcd.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 (!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 (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) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

    // Construct using com.ibm.etcd.api.ResponseOp.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();
      responseCase_ = 0;
      response_ = null;
      return this;
    }

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

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

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

    @java.lang.Override
    public com.ibm.etcd.api.ResponseOp buildPartial() {
      com.ibm.etcd.api.ResponseOp result = new com.ibm.etcd.api.ResponseOp(this);
      if (responseCase_ == 1) {
        if (responseRangeBuilder_ == null) {
          result.response_ = response_;
        } else {
          result.response_ = responseRangeBuilder_.build();
        }
      }
      if (responseCase_ == 2) {
        if (responsePutBuilder_ == null) {
          result.response_ = response_;
        } else {
          result.response_ = responsePutBuilder_.build();
        }
      }
      if (responseCase_ == 3) {
        if (responseDeleteRangeBuilder_ == null) {
          result.response_ = response_;
        } else {
          result.response_ = responseDeleteRangeBuilder_.build();
        }
      }
      if (responseCase_ == 4) {
        if (responseTxnBuilder_ == null) {
          result.response_ = response_;
        } else {
          result.response_ = responseTxnBuilder_.build();
        }
      }
      result.responseCase_ = responseCase_;
      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.ResponseOp) {
        return mergeFrom((com.ibm.etcd.api.ResponseOp)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ibm.etcd.api.ResponseOp other) {
      if (other == com.ibm.etcd.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.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.ResponseOp parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ibm.etcd.api.ResponseOp) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      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 com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.RangeResponse, com.ibm.etcd.api.RangeResponse.Builder, com.ibm.etcd.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 com.ibm.etcd.api.RangeResponse getResponseRange() {
      if (responseRangeBuilder_ == null) {
        if (responseCase_ == 1) {
          return (com.ibm.etcd.api.RangeResponse) response_;
        }
        return com.ibm.etcd.api.RangeResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 1) {
          return responseRangeBuilder_.getMessage();
        }
        return com.ibm.etcd.api.RangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    public Builder setResponseRange(com.ibm.etcd.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(
        com.ibm.etcd.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(com.ibm.etcd.api.RangeResponse value) {
      if (responseRangeBuilder_ == null) {
        if (responseCase_ == 1 &&
            response_ != com.ibm.etcd.api.RangeResponse.getDefaultInstance()) {
          response_ = com.ibm.etcd.api.RangeResponse.newBuilder((com.ibm.etcd.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 com.ibm.etcd.api.RangeResponse.Builder getResponseRangeBuilder() {
      return getResponseRangeFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    @java.lang.Override
    public com.ibm.etcd.api.RangeResponseOrBuilder getResponseRangeOrBuilder() {
      if ((responseCase_ == 1) && (responseRangeBuilder_ != null)) {
        return responseRangeBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 1) {
          return (com.ibm.etcd.api.RangeResponse) response_;
        }
        return com.ibm.etcd.api.RangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.RangeResponse response_range = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.RangeResponse, com.ibm.etcd.api.RangeResponse.Builder, com.ibm.etcd.api.RangeResponseOrBuilder> 
        getResponseRangeFieldBuilder() {
      if (responseRangeBuilder_ == null) {
        if (!(responseCase_ == 1)) {
          response_ = com.ibm.etcd.api.RangeResponse.getDefaultInstance();
        }
        responseRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.RangeResponse, com.ibm.etcd.api.RangeResponse.Builder, com.ibm.etcd.api.RangeResponseOrBuilder>(
                (com.ibm.etcd.api.RangeResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 1;
      onChanged();;
      return responseRangeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.PutResponse, com.ibm.etcd.api.PutResponse.Builder, com.ibm.etcd.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 com.ibm.etcd.api.PutResponse getResponsePut() {
      if (responsePutBuilder_ == null) {
        if (responseCase_ == 2) {
          return (com.ibm.etcd.api.PutResponse) response_;
        }
        return com.ibm.etcd.api.PutResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 2) {
          return responsePutBuilder_.getMessage();
        }
        return com.ibm.etcd.api.PutResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    public Builder setResponsePut(com.ibm.etcd.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(
        com.ibm.etcd.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(com.ibm.etcd.api.PutResponse value) {
      if (responsePutBuilder_ == null) {
        if (responseCase_ == 2 &&
            response_ != com.ibm.etcd.api.PutResponse.getDefaultInstance()) {
          response_ = com.ibm.etcd.api.PutResponse.newBuilder((com.ibm.etcd.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 com.ibm.etcd.api.PutResponse.Builder getResponsePutBuilder() {
      return getResponsePutFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    @java.lang.Override
    public com.ibm.etcd.api.PutResponseOrBuilder getResponsePutOrBuilder() {
      if ((responseCase_ == 2) && (responsePutBuilder_ != null)) {
        return responsePutBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 2) {
          return (com.ibm.etcd.api.PutResponse) response_;
        }
        return com.ibm.etcd.api.PutResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.PutResponse response_put = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.PutResponse, com.ibm.etcd.api.PutResponse.Builder, com.ibm.etcd.api.PutResponseOrBuilder> 
        getResponsePutFieldBuilder() {
      if (responsePutBuilder_ == null) {
        if (!(responseCase_ == 2)) {
          response_ = com.ibm.etcd.api.PutResponse.getDefaultInstance();
        }
        responsePutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.PutResponse, com.ibm.etcd.api.PutResponse.Builder, com.ibm.etcd.api.PutResponseOrBuilder>(
                (com.ibm.etcd.api.PutResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 2;
      onChanged();;
      return responsePutBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.DeleteRangeResponse, com.ibm.etcd.api.DeleteRangeResponse.Builder, com.ibm.etcd.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 com.ibm.etcd.api.DeleteRangeResponse getResponseDeleteRange() {
      if (responseDeleteRangeBuilder_ == null) {
        if (responseCase_ == 3) {
          return (com.ibm.etcd.api.DeleteRangeResponse) response_;
        }
        return com.ibm.etcd.api.DeleteRangeResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 3) {
          return responseDeleteRangeBuilder_.getMessage();
        }
        return com.ibm.etcd.api.DeleteRangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    public Builder setResponseDeleteRange(com.ibm.etcd.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(
        com.ibm.etcd.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(com.ibm.etcd.api.DeleteRangeResponse value) {
      if (responseDeleteRangeBuilder_ == null) {
        if (responseCase_ == 3 &&
            response_ != com.ibm.etcd.api.DeleteRangeResponse.getDefaultInstance()) {
          response_ = com.ibm.etcd.api.DeleteRangeResponse.newBuilder((com.ibm.etcd.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 com.ibm.etcd.api.DeleteRangeResponse.Builder getResponseDeleteRangeBuilder() {
      return getResponseDeleteRangeFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    @java.lang.Override
    public com.ibm.etcd.api.DeleteRangeResponseOrBuilder getResponseDeleteRangeOrBuilder() {
      if ((responseCase_ == 3) && (responseDeleteRangeBuilder_ != null)) {
        return responseDeleteRangeBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 3) {
          return (com.ibm.etcd.api.DeleteRangeResponse) response_;
        }
        return com.ibm.etcd.api.DeleteRangeResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.DeleteRangeResponse response_delete_range = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.DeleteRangeResponse, com.ibm.etcd.api.DeleteRangeResponse.Builder, com.ibm.etcd.api.DeleteRangeResponseOrBuilder> 
        getResponseDeleteRangeFieldBuilder() {
      if (responseDeleteRangeBuilder_ == null) {
        if (!(responseCase_ == 3)) {
          response_ = com.ibm.etcd.api.DeleteRangeResponse.getDefaultInstance();
        }
        responseDeleteRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.DeleteRangeResponse, com.ibm.etcd.api.DeleteRangeResponse.Builder, com.ibm.etcd.api.DeleteRangeResponseOrBuilder>(
                (com.ibm.etcd.api.DeleteRangeResponse) response_,
                getParentForChildren(),
                isClean());
        response_ = null;
      }
      responseCase_ = 3;
      onChanged();;
      return responseDeleteRangeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.TxnResponse, com.ibm.etcd.api.TxnResponse.Builder, com.ibm.etcd.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 com.ibm.etcd.api.TxnResponse getResponseTxn() {
      if (responseTxnBuilder_ == null) {
        if (responseCase_ == 4) {
          return (com.ibm.etcd.api.TxnResponse) response_;
        }
        return com.ibm.etcd.api.TxnResponse.getDefaultInstance();
      } else {
        if (responseCase_ == 4) {
          return responseTxnBuilder_.getMessage();
        }
        return com.ibm.etcd.api.TxnResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    public Builder setResponseTxn(com.ibm.etcd.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(
        com.ibm.etcd.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(com.ibm.etcd.api.TxnResponse value) {
      if (responseTxnBuilder_ == null) {
        if (responseCase_ == 4 &&
            response_ != com.ibm.etcd.api.TxnResponse.getDefaultInstance()) {
          response_ = com.ibm.etcd.api.TxnResponse.newBuilder((com.ibm.etcd.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 com.ibm.etcd.api.TxnResponse.Builder getResponseTxnBuilder() {
      return getResponseTxnFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    @java.lang.Override
    public com.ibm.etcd.api.TxnResponseOrBuilder getResponseTxnOrBuilder() {
      if ((responseCase_ == 4) && (responseTxnBuilder_ != null)) {
        return responseTxnBuilder_.getMessageOrBuilder();
      } else {
        if (responseCase_ == 4) {
          return (com.ibm.etcd.api.TxnResponse) response_;
        }
        return com.ibm.etcd.api.TxnResponse.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.TxnResponse response_txn = 4;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.TxnResponse, com.ibm.etcd.api.TxnResponse.Builder, com.ibm.etcd.api.TxnResponseOrBuilder> 
        getResponseTxnFieldBuilder() {
      if (responseTxnBuilder_ == null) {
        if (!(responseCase_ == 4)) {
          response_ = com.ibm.etcd.api.TxnResponse.getDefaultInstance();
        }
        responseTxnBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.TxnResponse, com.ibm.etcd.api.TxnResponse.Builder, com.ibm.etcd.api.TxnResponseOrBuilder>(
                (com.ibm.etcd.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 com.ibm.etcd.api.ResponseOp DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ibm.etcd.api.ResponseOp();
  }

  public static com.ibm.etcd.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 {
      return new ResponseOp(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.ResponseOp getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy