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

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

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: rpc.proto

// Protobuf Java Version: 3.25.1
package io.etcd.jetcd.api;

/**
 * Protobuf type {@code etcdserverpb.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();
  }

  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;
  @SuppressWarnings("serial")
  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 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;
   */
  @java.lang.Override
  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.
   */
  @java.lang.Override
  public boolean hasCancelRequest() {
    return requestUnionCase_ == 2;
  }
  /**
   * .etcdserverpb.WatchCancelRequest cancel_request = 2;
   * @return The cancelRequest.
   */
  @java.lang.Override
  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;
   */
  @java.lang.Override
  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.
   */
  @java.lang.Override
  public boolean hasProgressRequest() {
    return requestUnionCase_ == 3;
  }
  /**
   * .etcdserverpb.WatchProgressRequest progress_request = 3;
   * @return The progressRequest.
   */
  @java.lang.Override
  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;
   */
  @java.lang.Override
  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_);
    }
    getUnknownFields().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 += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof io.etcd.jetcd.api.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 (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    switch (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) + getUnknownFields().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() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (createRequestBuilder_ != null) {
        createRequestBuilder_.clear();
      }
      if (cancelRequestBuilder_ != null) {
        cancelRequestBuilder_.clear();
      }
      if (progressRequestBuilder_ != null) {
        progressRequestBuilder_.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 (bitField0_ != 0) { buildPartial0(result); }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

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

    private void buildPartialOneofs(io.etcd.jetcd.api.WatchRequest result) {
      result.requestUnionCase_ = requestUnionCase_;
      result.requestUnion_ = this.requestUnion_;
      if (requestUnionCase_ == 1 &&
          createRequestBuilder_ != null) {
        result.requestUnion_ = createRequestBuilder_.build();
      }
      if (requestUnionCase_ == 2 &&
          cancelRequestBuilder_ != null) {
        result.requestUnion_ = cancelRequestBuilder_.build();
      }
      if (requestUnionCase_ == 3 &&
          progressRequestBuilder_ != null) {
        result.requestUnion_ = progressRequestBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof io.etcd.jetcd.api.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.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getCreateRequestFieldBuilder().getBuilder(),
                  extensionRegistry);
              requestUnionCase_ = 1;
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getCancelRequestFieldBuilder().getBuilder(),
                  extensionRegistry);
              requestUnionCase_ = 2;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  getProgressRequestFieldBuilder().getBuilder(),
                  extensionRegistry);
              requestUnionCase_ = 3;
              break;
            } // case 26
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int 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 int bitField0_;

    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.
     */
    @java.lang.Override
    public boolean hasCreateRequest() {
      return requestUnionCase_ == 1;
    }
    /**
     * .etcdserverpb.WatchCreateRequest create_request = 1;
     * @return The createRequest.
     */
    @java.lang.Override
    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);
        } else {
          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;
     */
    @java.lang.Override
    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.
     */
    @java.lang.Override
    public boolean hasCancelRequest() {
      return requestUnionCase_ == 2;
    }
    /**
     * .etcdserverpb.WatchCancelRequest cancel_request = 2;
     * @return The cancelRequest.
     */
    @java.lang.Override
    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);
        } else {
          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;
     */
    @java.lang.Override
    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.
     */
    @java.lang.Override
    public boolean hasProgressRequest() {
      return requestUnionCase_ == 3;
    }
    /**
     * .etcdserverpb.WatchProgressRequest progress_request = 3;
     * @return The progressRequest.
     */
    @java.lang.Override
    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);
        } else {
          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;
     */
    @java.lang.Override
    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 {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser getParserForType() {
    return PARSER;
  }

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy