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

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

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private WatchRequest(
      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.WatchCreateRequest.Builder subBuilder = null;
            if (requestUnionCase_ == 1) {
              subBuilder = ((com.ibm.etcd.api.WatchCreateRequest) requestUnion_).toBuilder();
            }
            requestUnion_ =
                input.readMessage(com.ibm.etcd.api.WatchCreateRequest.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.WatchCreateRequest) requestUnion_);
              requestUnion_ = subBuilder.buildPartial();
            }
            requestUnionCase_ = 1;
            break;
          }
          case 18: {
            com.ibm.etcd.api.WatchCancelRequest.Builder subBuilder = null;
            if (requestUnionCase_ == 2) {
              subBuilder = ((com.ibm.etcd.api.WatchCancelRequest) requestUnion_).toBuilder();
            }
            requestUnion_ =
                input.readMessage(com.ibm.etcd.api.WatchCancelRequest.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.WatchCancelRequest) requestUnion_);
              requestUnion_ = subBuilder.buildPartial();
            }
            requestUnionCase_ = 2;
            break;
          }
          case 26: {
            com.ibm.etcd.api.WatchProgressRequest.Builder subBuilder = null;
            if (requestUnionCase_ == 3) {
              subBuilder = ((com.ibm.etcd.api.WatchProgressRequest) requestUnion_).toBuilder();
            }
            requestUnion_ =
                input.readMessage(com.ibm.etcd.api.WatchProgressRequest.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.ibm.etcd.api.WatchProgressRequest) requestUnion_);
              requestUnion_ = subBuilder.buildPartial();
            }
            requestUnionCase_ = 3;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_WatchRequest_descriptor;
  }

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

  private int requestUnionCase_ = 0;
  private java.lang.Object requestUnion_;
  public enum RequestUnionCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    CREATE_REQUEST(1),
    CANCEL_REQUEST(2),
    PROGRESS_REQUEST(3),
    REQUESTUNION_NOT_SET(0);
    private final int value;
    private RequestUnionCase(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 RequestUnionCase valueOf(int value) {
      return forNumber(value);
    }

    public static RequestUnionCase forNumber(int value) {
      switch (value) {
        case 1: return CREATE_REQUEST;
        case 2: return CANCEL_REQUEST;
        case 3: return PROGRESS_REQUEST;
        case 0: return REQUESTUNION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public RequestUnionCase
  getRequestUnionCase() {
    return RequestUnionCase.forNumber(
        requestUnionCase_);
  }

  public static final int CREATE_REQUEST_FIELD_NUMBER = 1;
  /**
   * .etcdserverpb.WatchCreateRequest create_request = 1;
   * @return Whether the createRequest field is set.
   */
  @java.lang.Override
  public boolean hasCreateRequest() {
    return requestUnionCase_ == 1;
  }
  /**
   * .etcdserverpb.WatchCreateRequest create_request = 1;
   * @return The createRequest.
   */
  @java.lang.Override
  public com.ibm.etcd.api.WatchCreateRequest getCreateRequest() {
    if (requestUnionCase_ == 1) {
       return (com.ibm.etcd.api.WatchCreateRequest) requestUnion_;
    }
    return com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance();
  }
  /**
   * .etcdserverpb.WatchCreateRequest create_request = 1;
   */
  @java.lang.Override
  public com.ibm.etcd.api.WatchCreateRequestOrBuilder getCreateRequestOrBuilder() {
    if (requestUnionCase_ == 1) {
       return (com.ibm.etcd.api.WatchCreateRequest) requestUnion_;
    }
    return com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance();
  }

  public static final int CANCEL_REQUEST_FIELD_NUMBER = 2;
  /**
   * .etcdserverpb.WatchCancelRequest cancel_request = 2;
   * @return Whether the cancelRequest field is set.
   */
  @java.lang.Override
  public boolean hasCancelRequest() {
    return requestUnionCase_ == 2;
  }
  /**
   * .etcdserverpb.WatchCancelRequest cancel_request = 2;
   * @return The cancelRequest.
   */
  @java.lang.Override
  public com.ibm.etcd.api.WatchCancelRequest getCancelRequest() {
    if (requestUnionCase_ == 2) {
       return (com.ibm.etcd.api.WatchCancelRequest) requestUnion_;
    }
    return com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance();
  }
  /**
   * .etcdserverpb.WatchCancelRequest cancel_request = 2;
   */
  @java.lang.Override
  public com.ibm.etcd.api.WatchCancelRequestOrBuilder getCancelRequestOrBuilder() {
    if (requestUnionCase_ == 2) {
       return (com.ibm.etcd.api.WatchCancelRequest) requestUnion_;
    }
    return com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance();
  }

  public static final int PROGRESS_REQUEST_FIELD_NUMBER = 3;
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   * @return Whether the progressRequest field is set.
   */
  @java.lang.Override
  public boolean hasProgressRequest() {
    return requestUnionCase_ == 3;
  }
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   * @return The progressRequest.
   */
  @java.lang.Override
  public com.ibm.etcd.api.WatchProgressRequest getProgressRequest() {
    if (requestUnionCase_ == 3) {
       return (com.ibm.etcd.api.WatchProgressRequest) requestUnion_;
    }
    return com.ibm.etcd.api.WatchProgressRequest.getDefaultInstance();
  }
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   */
  @java.lang.Override
  public com.ibm.etcd.api.WatchProgressRequestOrBuilder getProgressRequestOrBuilder() {
    if (requestUnionCase_ == 3) {
       return (com.ibm.etcd.api.WatchProgressRequest) requestUnion_;
    }
    return com.ibm.etcd.api.WatchProgressRequest.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 (requestUnionCase_ == 1) {
      output.writeMessage(1, (com.ibm.etcd.api.WatchCreateRequest) requestUnion_);
    }
    if (requestUnionCase_ == 2) {
      output.writeMessage(2, (com.ibm.etcd.api.WatchCancelRequest) requestUnion_);
    }
    if (requestUnionCase_ == 3) {
      output.writeMessage(3, (com.ibm.etcd.api.WatchProgressRequest) requestUnion_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (requestUnionCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (com.ibm.etcd.api.WatchCreateRequest) requestUnion_);
    }
    if (requestUnionCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (com.ibm.etcd.api.WatchCancelRequest) requestUnion_);
    }
    if (requestUnionCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.ibm.etcd.api.WatchProgressRequest) requestUnion_);
    }
    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.WatchRequest)) {
      return super.equals(obj);
    }
    com.ibm.etcd.api.WatchRequest other = (com.ibm.etcd.api.WatchRequest) obj;

    if (!getRequestUnionCase().equals(other.getRequestUnionCase())) return false;
    switch (requestUnionCase_) {
      case 1:
        if (!getCreateRequest()
            .equals(other.getCreateRequest())) return false;
        break;
      case 2:
        if (!getCancelRequest()
            .equals(other.getCancelRequest())) return false;
        break;
      case 3:
        if (!getProgressRequest()
            .equals(other.getProgressRequest())) 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 (requestUnionCase_) {
      case 1:
        hash = (37 * hash) + CREATE_REQUEST_FIELD_NUMBER;
        hash = (53 * hash) + getCreateRequest().hashCode();
        break;
      case 2:
        hash = (37 * hash) + CANCEL_REQUEST_FIELD_NUMBER;
        hash = (53 * hash) + getCancelRequest().hashCode();
        break;
      case 3:
        hash = (37 * hash) + PROGRESS_REQUEST_FIELD_NUMBER;
        hash = (53 * hash) + getProgressRequest().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ibm.etcd.api.WatchRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ibm.etcd.api.WatchRequest 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.WatchRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ibm.etcd.api.WatchRequest 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.WatchRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ibm.etcd.api.WatchRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ibm.etcd.api.WatchRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ibm.etcd.api.WatchRequest 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.WatchRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ibm.etcd.api.WatchRequest 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.WatchRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ibm.etcd.api.WatchRequest 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.WatchRequest 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.WatchRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:etcdserverpb.WatchRequest)
      com.ibm.etcd.api.WatchRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ibm.etcd.api.Rpc.internal_static_etcdserverpb_WatchRequest_descriptor;
    }

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

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

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

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

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

    @java.lang.Override
    public com.ibm.etcd.api.WatchRequest buildPartial() {
      com.ibm.etcd.api.WatchRequest result = new com.ibm.etcd.api.WatchRequest(this);
      if (requestUnionCase_ == 1) {
        if (createRequestBuilder_ == null) {
          result.requestUnion_ = requestUnion_;
        } else {
          result.requestUnion_ = createRequestBuilder_.build();
        }
      }
      if (requestUnionCase_ == 2) {
        if (cancelRequestBuilder_ == null) {
          result.requestUnion_ = requestUnion_;
        } else {
          result.requestUnion_ = cancelRequestBuilder_.build();
        }
      }
      if (requestUnionCase_ == 3) {
        if (progressRequestBuilder_ == null) {
          result.requestUnion_ = requestUnion_;
        } else {
          result.requestUnion_ = progressRequestBuilder_.build();
        }
      }
      result.requestUnionCase_ = requestUnionCase_;
      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.WatchRequest) {
        return mergeFrom((com.ibm.etcd.api.WatchRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ibm.etcd.api.WatchRequest other) {
      if (other == com.ibm.etcd.api.WatchRequest.getDefaultInstance()) return this;
      switch (other.getRequestUnionCase()) {
        case CREATE_REQUEST: {
          mergeCreateRequest(other.getCreateRequest());
          break;
        }
        case CANCEL_REQUEST: {
          mergeCancelRequest(other.getCancelRequest());
          break;
        }
        case PROGRESS_REQUEST: {
          mergeProgressRequest(other.getProgressRequest());
          break;
        }
        case REQUESTUNION_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.WatchRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ibm.etcd.api.WatchRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int requestUnionCase_ = 0;
    private java.lang.Object requestUnion_;
    public RequestUnionCase
        getRequestUnionCase() {
      return RequestUnionCase.forNumber(
          requestUnionCase_);
    }

    public Builder clearRequestUnion() {
      requestUnionCase_ = 0;
      requestUnion_ = null;
      onChanged();
      return this;
    }


    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.WatchCreateRequest, com.ibm.etcd.api.WatchCreateRequest.Builder, com.ibm.etcd.api.WatchCreateRequestOrBuilder> createRequestBuilder_;
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     * @return Whether the createRequest field is set.
     */
    @java.lang.Override
    public boolean hasCreateRequest() {
      return requestUnionCase_ == 1;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     * @return The createRequest.
     */
    @java.lang.Override
    public com.ibm.etcd.api.WatchCreateRequest getCreateRequest() {
      if (createRequestBuilder_ == null) {
        if (requestUnionCase_ == 1) {
          return (com.ibm.etcd.api.WatchCreateRequest) requestUnion_;
        }
        return com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance();
      } else {
        if (requestUnionCase_ == 1) {
          return createRequestBuilder_.getMessage();
        }
        return com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public Builder setCreateRequest(com.ibm.etcd.api.WatchCreateRequest value) {
      if (createRequestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        requestUnion_ = value;
        onChanged();
      } else {
        createRequestBuilder_.setMessage(value);
      }
      requestUnionCase_ = 1;
      return this;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public Builder setCreateRequest(
        com.ibm.etcd.api.WatchCreateRequest.Builder builderForValue) {
      if (createRequestBuilder_ == null) {
        requestUnion_ = builderForValue.build();
        onChanged();
      } else {
        createRequestBuilder_.setMessage(builderForValue.build());
      }
      requestUnionCase_ = 1;
      return this;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public Builder mergeCreateRequest(com.ibm.etcd.api.WatchCreateRequest value) {
      if (createRequestBuilder_ == null) {
        if (requestUnionCase_ == 1 &&
            requestUnion_ != com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance()) {
          requestUnion_ = com.ibm.etcd.api.WatchCreateRequest.newBuilder((com.ibm.etcd.api.WatchCreateRequest) requestUnion_)
              .mergeFrom(value).buildPartial();
        } else {
          requestUnion_ = value;
        }
        onChanged();
      } else {
        if (requestUnionCase_ == 1) {
          createRequestBuilder_.mergeFrom(value);
        }
        createRequestBuilder_.setMessage(value);
      }
      requestUnionCase_ = 1;
      return this;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public Builder clearCreateRequest() {
      if (createRequestBuilder_ == null) {
        if (requestUnionCase_ == 1) {
          requestUnionCase_ = 0;
          requestUnion_ = null;
          onChanged();
        }
      } else {
        if (requestUnionCase_ == 1) {
          requestUnionCase_ = 0;
          requestUnion_ = null;
        }
        createRequestBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public com.ibm.etcd.api.WatchCreateRequest.Builder getCreateRequestBuilder() {
      return getCreateRequestFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    @java.lang.Override
    public com.ibm.etcd.api.WatchCreateRequestOrBuilder getCreateRequestOrBuilder() {
      if ((requestUnionCase_ == 1) && (createRequestBuilder_ != null)) {
        return createRequestBuilder_.getMessageOrBuilder();
      } else {
        if (requestUnionCase_ == 1) {
          return (com.ibm.etcd.api.WatchCreateRequest) requestUnion_;
        }
        return com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.WatchCreateRequest, com.ibm.etcd.api.WatchCreateRequest.Builder, com.ibm.etcd.api.WatchCreateRequestOrBuilder> 
        getCreateRequestFieldBuilder() {
      if (createRequestBuilder_ == null) {
        if (!(requestUnionCase_ == 1)) {
          requestUnion_ = com.ibm.etcd.api.WatchCreateRequest.getDefaultInstance();
        }
        createRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.WatchCreateRequest, com.ibm.etcd.api.WatchCreateRequest.Builder, com.ibm.etcd.api.WatchCreateRequestOrBuilder>(
                (com.ibm.etcd.api.WatchCreateRequest) requestUnion_,
                getParentForChildren(),
                isClean());
        requestUnion_ = null;
      }
      requestUnionCase_ = 1;
      onChanged();;
      return createRequestBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.WatchCancelRequest, com.ibm.etcd.api.WatchCancelRequest.Builder, com.ibm.etcd.api.WatchCancelRequestOrBuilder> cancelRequestBuilder_;
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     * @return Whether the cancelRequest field is set.
     */
    @java.lang.Override
    public boolean hasCancelRequest() {
      return requestUnionCase_ == 2;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     * @return The cancelRequest.
     */
    @java.lang.Override
    public com.ibm.etcd.api.WatchCancelRequest getCancelRequest() {
      if (cancelRequestBuilder_ == null) {
        if (requestUnionCase_ == 2) {
          return (com.ibm.etcd.api.WatchCancelRequest) requestUnion_;
        }
        return com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance();
      } else {
        if (requestUnionCase_ == 2) {
          return cancelRequestBuilder_.getMessage();
        }
        return com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public Builder setCancelRequest(com.ibm.etcd.api.WatchCancelRequest value) {
      if (cancelRequestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        requestUnion_ = value;
        onChanged();
      } else {
        cancelRequestBuilder_.setMessage(value);
      }
      requestUnionCase_ = 2;
      return this;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public Builder setCancelRequest(
        com.ibm.etcd.api.WatchCancelRequest.Builder builderForValue) {
      if (cancelRequestBuilder_ == null) {
        requestUnion_ = builderForValue.build();
        onChanged();
      } else {
        cancelRequestBuilder_.setMessage(builderForValue.build());
      }
      requestUnionCase_ = 2;
      return this;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public Builder mergeCancelRequest(com.ibm.etcd.api.WatchCancelRequest value) {
      if (cancelRequestBuilder_ == null) {
        if (requestUnionCase_ == 2 &&
            requestUnion_ != com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance()) {
          requestUnion_ = com.ibm.etcd.api.WatchCancelRequest.newBuilder((com.ibm.etcd.api.WatchCancelRequest) requestUnion_)
              .mergeFrom(value).buildPartial();
        } else {
          requestUnion_ = value;
        }
        onChanged();
      } else {
        if (requestUnionCase_ == 2) {
          cancelRequestBuilder_.mergeFrom(value);
        }
        cancelRequestBuilder_.setMessage(value);
      }
      requestUnionCase_ = 2;
      return this;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public Builder clearCancelRequest() {
      if (cancelRequestBuilder_ == null) {
        if (requestUnionCase_ == 2) {
          requestUnionCase_ = 0;
          requestUnion_ = null;
          onChanged();
        }
      } else {
        if (requestUnionCase_ == 2) {
          requestUnionCase_ = 0;
          requestUnion_ = null;
        }
        cancelRequestBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public com.ibm.etcd.api.WatchCancelRequest.Builder getCancelRequestBuilder() {
      return getCancelRequestFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    @java.lang.Override
    public com.ibm.etcd.api.WatchCancelRequestOrBuilder getCancelRequestOrBuilder() {
      if ((requestUnionCase_ == 2) && (cancelRequestBuilder_ != null)) {
        return cancelRequestBuilder_.getMessageOrBuilder();
      } else {
        if (requestUnionCase_ == 2) {
          return (com.ibm.etcd.api.WatchCancelRequest) requestUnion_;
        }
        return com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.WatchCancelRequest, com.ibm.etcd.api.WatchCancelRequest.Builder, com.ibm.etcd.api.WatchCancelRequestOrBuilder> 
        getCancelRequestFieldBuilder() {
      if (cancelRequestBuilder_ == null) {
        if (!(requestUnionCase_ == 2)) {
          requestUnion_ = com.ibm.etcd.api.WatchCancelRequest.getDefaultInstance();
        }
        cancelRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.WatchCancelRequest, com.ibm.etcd.api.WatchCancelRequest.Builder, com.ibm.etcd.api.WatchCancelRequestOrBuilder>(
                (com.ibm.etcd.api.WatchCancelRequest) requestUnion_,
                getParentForChildren(),
                isClean());
        requestUnion_ = null;
      }
      requestUnionCase_ = 2;
      onChanged();;
      return cancelRequestBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.WatchProgressRequest, com.ibm.etcd.api.WatchProgressRequest.Builder, com.ibm.etcd.api.WatchProgressRequestOrBuilder> progressRequestBuilder_;
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     * @return Whether the progressRequest field is set.
     */
    @java.lang.Override
    public boolean hasProgressRequest() {
      return requestUnionCase_ == 3;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     * @return The progressRequest.
     */
    @java.lang.Override
    public com.ibm.etcd.api.WatchProgressRequest getProgressRequest() {
      if (progressRequestBuilder_ == null) {
        if (requestUnionCase_ == 3) {
          return (com.ibm.etcd.api.WatchProgressRequest) requestUnion_;
        }
        return com.ibm.etcd.api.WatchProgressRequest.getDefaultInstance();
      } else {
        if (requestUnionCase_ == 3) {
          return progressRequestBuilder_.getMessage();
        }
        return com.ibm.etcd.api.WatchProgressRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public Builder setProgressRequest(com.ibm.etcd.api.WatchProgressRequest value) {
      if (progressRequestBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        requestUnion_ = value;
        onChanged();
      } else {
        progressRequestBuilder_.setMessage(value);
      }
      requestUnionCase_ = 3;
      return this;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public Builder setProgressRequest(
        com.ibm.etcd.api.WatchProgressRequest.Builder builderForValue) {
      if (progressRequestBuilder_ == null) {
        requestUnion_ = builderForValue.build();
        onChanged();
      } else {
        progressRequestBuilder_.setMessage(builderForValue.build());
      }
      requestUnionCase_ = 3;
      return this;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public Builder mergeProgressRequest(com.ibm.etcd.api.WatchProgressRequest value) {
      if (progressRequestBuilder_ == null) {
        if (requestUnionCase_ == 3 &&
            requestUnion_ != com.ibm.etcd.api.WatchProgressRequest.getDefaultInstance()) {
          requestUnion_ = com.ibm.etcd.api.WatchProgressRequest.newBuilder((com.ibm.etcd.api.WatchProgressRequest) requestUnion_)
              .mergeFrom(value).buildPartial();
        } else {
          requestUnion_ = value;
        }
        onChanged();
      } else {
        if (requestUnionCase_ == 3) {
          progressRequestBuilder_.mergeFrom(value);
        }
        progressRequestBuilder_.setMessage(value);
      }
      requestUnionCase_ = 3;
      return this;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public Builder clearProgressRequest() {
      if (progressRequestBuilder_ == null) {
        if (requestUnionCase_ == 3) {
          requestUnionCase_ = 0;
          requestUnion_ = null;
          onChanged();
        }
      } else {
        if (requestUnionCase_ == 3) {
          requestUnionCase_ = 0;
          requestUnion_ = null;
        }
        progressRequestBuilder_.clear();
      }
      return this;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public com.ibm.etcd.api.WatchProgressRequest.Builder getProgressRequestBuilder() {
      return getProgressRequestFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    @java.lang.Override
    public com.ibm.etcd.api.WatchProgressRequestOrBuilder getProgressRequestOrBuilder() {
      if ((requestUnionCase_ == 3) && (progressRequestBuilder_ != null)) {
        return progressRequestBuilder_.getMessageOrBuilder();
      } else {
        if (requestUnionCase_ == 3) {
          return (com.ibm.etcd.api.WatchProgressRequest) requestUnion_;
        }
        return com.ibm.etcd.api.WatchProgressRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ibm.etcd.api.WatchProgressRequest, com.ibm.etcd.api.WatchProgressRequest.Builder, com.ibm.etcd.api.WatchProgressRequestOrBuilder> 
        getProgressRequestFieldBuilder() {
      if (progressRequestBuilder_ == null) {
        if (!(requestUnionCase_ == 3)) {
          requestUnion_ = com.ibm.etcd.api.WatchProgressRequest.getDefaultInstance();
        }
        progressRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ibm.etcd.api.WatchProgressRequest, com.ibm.etcd.api.WatchProgressRequest.Builder, com.ibm.etcd.api.WatchProgressRequestOrBuilder>(
                (com.ibm.etcd.api.WatchProgressRequest) requestUnion_,
                getParentForChildren(),
                isClean());
        requestUnion_ = null;
      }
      requestUnionCase_ = 3;
      onChanged();;
      return progressRequestBuilder_;
    }
    @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.WatchRequest)
  }

  // @@protoc_insertion_point(class_scope:etcdserverpb.WatchRequest)
  private static final com.ibm.etcd.api.WatchRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ibm.etcd.api.WatchRequest();
  }

  public static com.ibm.etcd.api.WatchRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public WatchRequest parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new WatchRequest(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.WatchRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy