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

io.etcd.jetcd.api.WatchRequest Maven / Gradle / Ivy

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

package io.etcd.jetcd.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: {
            io.etcd.jetcd.api.WatchCreateRequest.Builder subBuilder = null;
            if (requestUnionCase_ == 1) {
              subBuilder = ((io.etcd.jetcd.api.WatchCreateRequest) requestUnion_).toBuilder();
            }
            requestUnion_ =
                input.readMessage(io.etcd.jetcd.api.WatchCreateRequest.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.etcd.jetcd.api.WatchCreateRequest) requestUnion_);
              requestUnion_ = subBuilder.buildPartial();
            }
            requestUnionCase_ = 1;
            break;
          }
          case 18: {
            io.etcd.jetcd.api.WatchCancelRequest.Builder subBuilder = null;
            if (requestUnionCase_ == 2) {
              subBuilder = ((io.etcd.jetcd.api.WatchCancelRequest) requestUnion_).toBuilder();
            }
            requestUnion_ =
                input.readMessage(io.etcd.jetcd.api.WatchCancelRequest.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.etcd.jetcd.api.WatchCancelRequest) requestUnion_);
              requestUnion_ = subBuilder.buildPartial();
            }
            requestUnionCase_ = 2;
            break;
          }
          case 26: {
            io.etcd.jetcd.api.WatchProgressRequest.Builder subBuilder = null;
            if (requestUnionCase_ == 3) {
              subBuilder = ((io.etcd.jetcd.api.WatchProgressRequest) requestUnion_).toBuilder();
            }
            requestUnion_ =
                input.readMessage(io.etcd.jetcd.api.WatchProgressRequest.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((io.etcd.jetcd.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 io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_WatchRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_WatchRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.etcd.jetcd.api.WatchRequest.class, io.etcd.jetcd.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.
   */
  public boolean hasCreateRequest() {
    return requestUnionCase_ == 1;
  }
  /**
   * .etcdserverpb.WatchCreateRequest create_request = 1;
   * @return The createRequest.
   */
  public io.etcd.jetcd.api.WatchCreateRequest getCreateRequest() {
    if (requestUnionCase_ == 1) {
       return (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_;
    }
    return io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance();
  }
  /**
   * .etcdserverpb.WatchCreateRequest create_request = 1;
   */
  public io.etcd.jetcd.api.WatchCreateRequestOrBuilder getCreateRequestOrBuilder() {
    if (requestUnionCase_ == 1) {
       return (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_;
    }
    return io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance();
  }

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

  public static final int PROGRESS_REQUEST_FIELD_NUMBER = 3;
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   * @return Whether the progressRequest field is set.
   */
  public boolean hasProgressRequest() {
    return requestUnionCase_ == 3;
  }
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   * @return The progressRequest.
   */
  public io.etcd.jetcd.api.WatchProgressRequest getProgressRequest() {
    if (requestUnionCase_ == 3) {
       return (io.etcd.jetcd.api.WatchProgressRequest) requestUnion_;
    }
    return io.etcd.jetcd.api.WatchProgressRequest.getDefaultInstance();
  }
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   */
  public io.etcd.jetcd.api.WatchProgressRequestOrBuilder getProgressRequestOrBuilder() {
    if (requestUnionCase_ == 3) {
       return (io.etcd.jetcd.api.WatchProgressRequest) requestUnion_;
    }
    return io.etcd.jetcd.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, (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_);
    }
    if (requestUnionCase_ == 2) {
      output.writeMessage(2, (io.etcd.jetcd.api.WatchCancelRequest) requestUnion_);
    }
    if (requestUnionCase_ == 3) {
      output.writeMessage(3, (io.etcd.jetcd.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, (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_);
    }
    if (requestUnionCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (io.etcd.jetcd.api.WatchCancelRequest) requestUnion_);
    }
    if (requestUnionCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest)) {
      return super.equals(obj);
    }
    io.etcd.jetcd.api.WatchRequest other = (io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.etcd.jetcd.api.WatchRequest 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.WatchRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static io.etcd.jetcd.api.WatchRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static io.etcd.jetcd.api.WatchRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.etcd.jetcd.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(io.etcd.jetcd.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)
      io.etcd.jetcd.api.WatchRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_WatchRequest_descriptor;
    }

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

    // Construct using io.etcd.jetcd.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 io.etcd.jetcd.api.JetcdProto.internal_static_etcdserverpb_WatchRequest_descriptor;
    }

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

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

    @java.lang.Override
    public io.etcd.jetcd.api.WatchRequest buildPartial() {
      io.etcd.jetcd.api.WatchRequest result = new io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest) {
        return mergeFrom((io.etcd.jetcd.api.WatchRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.etcd.jetcd.api.WatchRequest other) {
      if (other == io.etcd.jetcd.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 {
      io.etcd.jetcd.api.WatchRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (io.etcd.jetcd.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<
        io.etcd.jetcd.api.WatchCreateRequest, io.etcd.jetcd.api.WatchCreateRequest.Builder, io.etcd.jetcd.api.WatchCreateRequestOrBuilder> createRequestBuilder_;
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     * @return Whether the createRequest field is set.
     */
    public boolean hasCreateRequest() {
      return requestUnionCase_ == 1;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     * @return The createRequest.
     */
    public io.etcd.jetcd.api.WatchCreateRequest getCreateRequest() {
      if (createRequestBuilder_ == null) {
        if (requestUnionCase_ == 1) {
          return (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_;
        }
        return io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance();
      } else {
        if (requestUnionCase_ == 1) {
          return createRequestBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public Builder setCreateRequest(io.etcd.jetcd.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(
        io.etcd.jetcd.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(io.etcd.jetcd.api.WatchCreateRequest value) {
      if (createRequestBuilder_ == null) {
        if (requestUnionCase_ == 1 &&
            requestUnion_ != io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance()) {
          requestUnion_ = io.etcd.jetcd.api.WatchCreateRequest.newBuilder((io.etcd.jetcd.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 io.etcd.jetcd.api.WatchCreateRequest.Builder getCreateRequestBuilder() {
      return getCreateRequestFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    public io.etcd.jetcd.api.WatchCreateRequestOrBuilder getCreateRequestOrBuilder() {
      if ((requestUnionCase_ == 1) && (createRequestBuilder_ != null)) {
        return createRequestBuilder_.getMessageOrBuilder();
      } else {
        if (requestUnionCase_ == 1) {
          return (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_;
        }
        return io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.WatchCreateRequest, io.etcd.jetcd.api.WatchCreateRequest.Builder, io.etcd.jetcd.api.WatchCreateRequestOrBuilder> 
        getCreateRequestFieldBuilder() {
      if (createRequestBuilder_ == null) {
        if (!(requestUnionCase_ == 1)) {
          requestUnion_ = io.etcd.jetcd.api.WatchCreateRequest.getDefaultInstance();
        }
        createRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.WatchCreateRequest, io.etcd.jetcd.api.WatchCreateRequest.Builder, io.etcd.jetcd.api.WatchCreateRequestOrBuilder>(
                (io.etcd.jetcd.api.WatchCreateRequest) requestUnion_,
                getParentForChildren(),
                isClean());
        requestUnion_ = null;
      }
      requestUnionCase_ = 1;
      onChanged();;
      return createRequestBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.WatchCancelRequest, io.etcd.jetcd.api.WatchCancelRequest.Builder, io.etcd.jetcd.api.WatchCancelRequestOrBuilder> cancelRequestBuilder_;
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     * @return Whether the cancelRequest field is set.
     */
    public boolean hasCancelRequest() {
      return requestUnionCase_ == 2;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     * @return The cancelRequest.
     */
    public io.etcd.jetcd.api.WatchCancelRequest getCancelRequest() {
      if (cancelRequestBuilder_ == null) {
        if (requestUnionCase_ == 2) {
          return (io.etcd.jetcd.api.WatchCancelRequest) requestUnion_;
        }
        return io.etcd.jetcd.api.WatchCancelRequest.getDefaultInstance();
      } else {
        if (requestUnionCase_ == 2) {
          return cancelRequestBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.WatchCancelRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public Builder setCancelRequest(io.etcd.jetcd.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(
        io.etcd.jetcd.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(io.etcd.jetcd.api.WatchCancelRequest value) {
      if (cancelRequestBuilder_ == null) {
        if (requestUnionCase_ == 2 &&
            requestUnion_ != io.etcd.jetcd.api.WatchCancelRequest.getDefaultInstance()) {
          requestUnion_ = io.etcd.jetcd.api.WatchCancelRequest.newBuilder((io.etcd.jetcd.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 io.etcd.jetcd.api.WatchCancelRequest.Builder getCancelRequestBuilder() {
      return getCancelRequestFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    public io.etcd.jetcd.api.WatchCancelRequestOrBuilder getCancelRequestOrBuilder() {
      if ((requestUnionCase_ == 2) && (cancelRequestBuilder_ != null)) {
        return cancelRequestBuilder_.getMessageOrBuilder();
      } else {
        if (requestUnionCase_ == 2) {
          return (io.etcd.jetcd.api.WatchCancelRequest) requestUnion_;
        }
        return io.etcd.jetcd.api.WatchCancelRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.WatchCancelRequest, io.etcd.jetcd.api.WatchCancelRequest.Builder, io.etcd.jetcd.api.WatchCancelRequestOrBuilder> 
        getCancelRequestFieldBuilder() {
      if (cancelRequestBuilder_ == null) {
        if (!(requestUnionCase_ == 2)) {
          requestUnion_ = io.etcd.jetcd.api.WatchCancelRequest.getDefaultInstance();
        }
        cancelRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.WatchCancelRequest, io.etcd.jetcd.api.WatchCancelRequest.Builder, io.etcd.jetcd.api.WatchCancelRequestOrBuilder>(
                (io.etcd.jetcd.api.WatchCancelRequest) requestUnion_,
                getParentForChildren(),
                isClean());
        requestUnion_ = null;
      }
      requestUnionCase_ = 2;
      onChanged();;
      return cancelRequestBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.WatchProgressRequest, io.etcd.jetcd.api.WatchProgressRequest.Builder, io.etcd.jetcd.api.WatchProgressRequestOrBuilder> progressRequestBuilder_;
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     * @return Whether the progressRequest field is set.
     */
    public boolean hasProgressRequest() {
      return requestUnionCase_ == 3;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     * @return The progressRequest.
     */
    public io.etcd.jetcd.api.WatchProgressRequest getProgressRequest() {
      if (progressRequestBuilder_ == null) {
        if (requestUnionCase_ == 3) {
          return (io.etcd.jetcd.api.WatchProgressRequest) requestUnion_;
        }
        return io.etcd.jetcd.api.WatchProgressRequest.getDefaultInstance();
      } else {
        if (requestUnionCase_ == 3) {
          return progressRequestBuilder_.getMessage();
        }
        return io.etcd.jetcd.api.WatchProgressRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public Builder setProgressRequest(io.etcd.jetcd.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(
        io.etcd.jetcd.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(io.etcd.jetcd.api.WatchProgressRequest value) {
      if (progressRequestBuilder_ == null) {
        if (requestUnionCase_ == 3 &&
            requestUnion_ != io.etcd.jetcd.api.WatchProgressRequest.getDefaultInstance()) {
          requestUnion_ = io.etcd.jetcd.api.WatchProgressRequest.newBuilder((io.etcd.jetcd.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 io.etcd.jetcd.api.WatchProgressRequest.Builder getProgressRequestBuilder() {
      return getProgressRequestFieldBuilder().getBuilder();
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    public io.etcd.jetcd.api.WatchProgressRequestOrBuilder getProgressRequestOrBuilder() {
      if ((requestUnionCase_ == 3) && (progressRequestBuilder_ != null)) {
        return progressRequestBuilder_.getMessageOrBuilder();
      } else {
        if (requestUnionCase_ == 3) {
          return (io.etcd.jetcd.api.WatchProgressRequest) requestUnion_;
        }
        return io.etcd.jetcd.api.WatchProgressRequest.getDefaultInstance();
      }
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        io.etcd.jetcd.api.WatchProgressRequest, io.etcd.jetcd.api.WatchProgressRequest.Builder, io.etcd.jetcd.api.WatchProgressRequestOrBuilder> 
        getProgressRequestFieldBuilder() {
      if (progressRequestBuilder_ == null) {
        if (!(requestUnionCase_ == 3)) {
          requestUnion_ = io.etcd.jetcd.api.WatchProgressRequest.getDefaultInstance();
        }
        progressRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            io.etcd.jetcd.api.WatchProgressRequest, io.etcd.jetcd.api.WatchProgressRequest.Builder, io.etcd.jetcd.api.WatchProgressRequestOrBuilder>(
                (io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.etcd.jetcd.api.WatchRequest();
  }

  public static io.etcd.jetcd.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 io.etcd.jetcd.api.WatchRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy