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

apache.rocketmq.v1.HeartbeatRequest Maven / Gradle / Ivy

There is a newer version: 2.0.7.Final
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: apache/rocketmq/v1/service.proto

package apache.rocketmq.v1;

/**
 * Protobuf type {@code apache.rocketmq.v1.HeartbeatRequest}
 */
public final class HeartbeatRequest extends
    com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:apache.rocketmq.v1.HeartbeatRequest)
    HeartbeatRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use HeartbeatRequest.newBuilder() to construct.
  private HeartbeatRequest(com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private HeartbeatRequest() {
    clientId_ = "";
  }

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

  @java.lang.Override
  public final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private HeartbeatRequest(
      com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            clientId_ = s;
            break;
          }
          case 18: {
            apache.rocketmq.v1.ProducerData.Builder subBuilder = null;
            if (clientDataCase_ == 2) {
              subBuilder = ((apache.rocketmq.v1.ProducerData) clientData_).toBuilder();
            }
            clientData_ =
                input.readMessage(apache.rocketmq.v1.ProducerData.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((apache.rocketmq.v1.ProducerData) clientData_);
              clientData_ = subBuilder.buildPartial();
            }
            clientDataCase_ = 2;
            break;
          }
          case 26: {
            apache.rocketmq.v1.ConsumerData.Builder subBuilder = null;
            if (clientDataCase_ == 3) {
              subBuilder = ((apache.rocketmq.v1.ConsumerData) clientData_).toBuilder();
            }
            clientData_ =
                input.readMessage(apache.rocketmq.v1.ConsumerData.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((apache.rocketmq.v1.ConsumerData) clientData_);
              clientData_ = subBuilder.buildPartial();
            }
            clientDataCase_ = 3;
            break;
          }
          case 32: {

            fifoFlag_ = input.readBool();
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return apache.rocketmq.v1.MQService.internal_static_apache_rocketmq_v1_HeartbeatRequest_descriptor;
  }

  @java.lang.Override
  protected com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return apache.rocketmq.v1.MQService.internal_static_apache_rocketmq_v1_HeartbeatRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            apache.rocketmq.v1.HeartbeatRequest.class, apache.rocketmq.v1.HeartbeatRequest.Builder.class);
  }

  private int clientDataCase_ = 0;
  private java.lang.Object clientData_;
  public enum ClientDataCase
      implements com.aliyun.openservices.ons.shaded.com.google.protobuf.Internal.EnumLite,
          com.aliyun.openservices.ons.shaded.com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    PRODUCER_DATA(2),
    CONSUMER_DATA(3),
    CLIENTDATA_NOT_SET(0);
    private final int value;
    private ClientDataCase(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 ClientDataCase valueOf(int value) {
      return forNumber(value);
    }

    public static ClientDataCase forNumber(int value) {
      switch (value) {
        case 2: return PRODUCER_DATA;
        case 3: return CONSUMER_DATA;
        case 0: return CLIENTDATA_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public ClientDataCase
  getClientDataCase() {
    return ClientDataCase.forNumber(
        clientDataCase_);
  }

  public static final int CLIENT_ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object clientId_;
  /**
   * string client_id = 1;
   * @return The clientId.
   */
  @java.lang.Override
  public java.lang.String getClientId() {
    java.lang.Object ref = clientId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs = 
          (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      clientId_ = s;
      return s;
    }
  }
  /**
   * string client_id = 1;
   * @return The bytes for clientId.
   */
  @java.lang.Override
  public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString
      getClientIdBytes() {
    java.lang.Object ref = clientId_;
    if (ref instanceof java.lang.String) {
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = 
          com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      clientId_ = b;
      return b;
    } else {
      return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PRODUCER_DATA_FIELD_NUMBER = 2;
  /**
   * .apache.rocketmq.v1.ProducerData producer_data = 2;
   * @return Whether the producerData field is set.
   */
  @java.lang.Override
  public boolean hasProducerData() {
    return clientDataCase_ == 2;
  }
  /**
   * .apache.rocketmq.v1.ProducerData producer_data = 2;
   * @return The producerData.
   */
  @java.lang.Override
  public apache.rocketmq.v1.ProducerData getProducerData() {
    if (clientDataCase_ == 2) {
       return (apache.rocketmq.v1.ProducerData) clientData_;
    }
    return apache.rocketmq.v1.ProducerData.getDefaultInstance();
  }
  /**
   * .apache.rocketmq.v1.ProducerData producer_data = 2;
   */
  @java.lang.Override
  public apache.rocketmq.v1.ProducerDataOrBuilder getProducerDataOrBuilder() {
    if (clientDataCase_ == 2) {
       return (apache.rocketmq.v1.ProducerData) clientData_;
    }
    return apache.rocketmq.v1.ProducerData.getDefaultInstance();
  }

  public static final int CONSUMER_DATA_FIELD_NUMBER = 3;
  /**
   * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
   * @return Whether the consumerData field is set.
   */
  @java.lang.Override
  public boolean hasConsumerData() {
    return clientDataCase_ == 3;
  }
  /**
   * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
   * @return The consumerData.
   */
  @java.lang.Override
  public apache.rocketmq.v1.ConsumerData getConsumerData() {
    if (clientDataCase_ == 3) {
       return (apache.rocketmq.v1.ConsumerData) clientData_;
    }
    return apache.rocketmq.v1.ConsumerData.getDefaultInstance();
  }
  /**
   * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
   */
  @java.lang.Override
  public apache.rocketmq.v1.ConsumerDataOrBuilder getConsumerDataOrBuilder() {
    if (clientDataCase_ == 3) {
       return (apache.rocketmq.v1.ConsumerData) clientData_;
    }
    return apache.rocketmq.v1.ConsumerData.getDefaultInstance();
  }

  public static final int FIFO_FLAG_FIELD_NUMBER = 4;
  private boolean fifoFlag_;
  /**
   * bool fifo_flag = 4;
   * @return The fifoFlag.
   */
  @java.lang.Override
  public boolean getFifoFlag() {
    return fifoFlag_;
  }

  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.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getClientIdBytes().isEmpty()) {
      com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientId_);
    }
    if (clientDataCase_ == 2) {
      output.writeMessage(2, (apache.rocketmq.v1.ProducerData) clientData_);
    }
    if (clientDataCase_ == 3) {
      output.writeMessage(3, (apache.rocketmq.v1.ConsumerData) clientData_);
    }
    if (fifoFlag_ != false) {
      output.writeBool(4, fifoFlag_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getClientIdBytes().isEmpty()) {
      size += com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientId_);
    }
    if (clientDataCase_ == 2) {
      size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (apache.rocketmq.v1.ProducerData) clientData_);
    }
    if (clientDataCase_ == 3) {
      size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (apache.rocketmq.v1.ConsumerData) clientData_);
    }
    if (fifoFlag_ != false) {
      size += com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedOutputStream
        .computeBoolSize(4, fifoFlag_);
    }
    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 apache.rocketmq.v1.HeartbeatRequest)) {
      return super.equals(obj);
    }
    apache.rocketmq.v1.HeartbeatRequest other = (apache.rocketmq.v1.HeartbeatRequest) obj;

    if (!getClientId()
        .equals(other.getClientId())) return false;
    if (getFifoFlag()
        != other.getFifoFlag()) return false;
    if (!getClientDataCase().equals(other.getClientDataCase())) return false;
    switch (clientDataCase_) {
      case 2:
        if (!getProducerData()
            .equals(other.getProducerData())) return false;
        break;
      case 3:
        if (!getConsumerData()
            .equals(other.getConsumerData())) 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();
    hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
    hash = (53 * hash) + getClientId().hashCode();
    hash = (37 * hash) + FIFO_FLAG_FIELD_NUMBER;
    hash = (53 * hash) + com.aliyun.openservices.ons.shaded.com.google.protobuf.Internal.hashBoolean(
        getFifoFlag());
    switch (clientDataCase_) {
      case 2:
        hash = (37 * hash) + PRODUCER_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getProducerData().hashCode();
        break;
      case 3:
        hash = (37 * hash) + CONSUMER_DATA_FIELD_NUMBER;
        hash = (53 * hash) + getConsumerData().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      java.nio.ByteBuffer data,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString data)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString data,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(byte[] data)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      byte[] data,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      java.io.InputStream input,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseDelimitedFrom(
      java.io.InputStream input,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static apache.rocketmq.v1.HeartbeatRequest parseFrom(
      com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
      com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.aliyun.openservices.ons.shaded.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(apache.rocketmq.v1.HeartbeatRequest 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.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code apache.rocketmq.v1.HeartbeatRequest}
   */
  public static final class Builder extends
      com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:apache.rocketmq.v1.HeartbeatRequest)
      apache.rocketmq.v1.HeartbeatRequestOrBuilder {
    public static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return apache.rocketmq.v1.MQService.internal_static_apache_rocketmq_v1_HeartbeatRequest_descriptor;
    }

    @java.lang.Override
    protected com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return apache.rocketmq.v1.MQService.internal_static_apache_rocketmq_v1_HeartbeatRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              apache.rocketmq.v1.HeartbeatRequest.class, apache.rocketmq.v1.HeartbeatRequest.Builder.class);
    }

    // Construct using apache.rocketmq.v1.HeartbeatRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.aliyun.openservices.ons.shaded.com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      clientId_ = "";

      fifoFlag_ = false;

      clientDataCase_ = 0;
      clientData_ = null;
      return this;
    }

    @java.lang.Override
    public com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return apache.rocketmq.v1.MQService.internal_static_apache_rocketmq_v1_HeartbeatRequest_descriptor;
    }

    @java.lang.Override
    public apache.rocketmq.v1.HeartbeatRequest getDefaultInstanceForType() {
      return apache.rocketmq.v1.HeartbeatRequest.getDefaultInstance();
    }

    @java.lang.Override
    public apache.rocketmq.v1.HeartbeatRequest build() {
      apache.rocketmq.v1.HeartbeatRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public apache.rocketmq.v1.HeartbeatRequest buildPartial() {
      apache.rocketmq.v1.HeartbeatRequest result = new apache.rocketmq.v1.HeartbeatRequest(this);
      result.clientId_ = clientId_;
      if (clientDataCase_ == 2) {
        if (producerDataBuilder_ == null) {
          result.clientData_ = clientData_;
        } else {
          result.clientData_ = producerDataBuilder_.build();
        }
      }
      if (clientDataCase_ == 3) {
        if (consumerDataBuilder_ == null) {
          result.clientData_ = clientData_;
        } else {
          result.clientData_ = consumerDataBuilder_.build();
        }
      }
      result.fifoFlag_ = fifoFlag_;
      result.clientDataCase_ = clientDataCase_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.aliyun.openservices.ons.shaded.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.aliyun.openservices.ons.shaded.com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.aliyun.openservices.ons.shaded.com.google.protobuf.Message other) {
      if (other instanceof apache.rocketmq.v1.HeartbeatRequest) {
        return mergeFrom((apache.rocketmq.v1.HeartbeatRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(apache.rocketmq.v1.HeartbeatRequest other) {
      if (other == apache.rocketmq.v1.HeartbeatRequest.getDefaultInstance()) return this;
      if (!other.getClientId().isEmpty()) {
        clientId_ = other.clientId_;
        onChanged();
      }
      if (other.getFifoFlag() != false) {
        setFifoFlag(other.getFifoFlag());
      }
      switch (other.getClientDataCase()) {
        case PRODUCER_DATA: {
          mergeProducerData(other.getProducerData());
          break;
        }
        case CONSUMER_DATA: {
          mergeConsumerData(other.getConsumerData());
          break;
        }
        case CLIENTDATA_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.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
        com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      apache.rocketmq.v1.HeartbeatRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (apache.rocketmq.v1.HeartbeatRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int clientDataCase_ = 0;
    private java.lang.Object clientData_;
    public ClientDataCase
        getClientDataCase() {
      return ClientDataCase.forNumber(
          clientDataCase_);
    }

    public Builder clearClientData() {
      clientDataCase_ = 0;
      clientData_ = null;
      onChanged();
      return this;
    }


    private java.lang.Object clientId_ = "";
    /**
     * string client_id = 1;
     * @return The clientId.
     */
    public java.lang.String getClientId() {
      java.lang.Object ref = clientId_;
      if (!(ref instanceof java.lang.String)) {
        com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString bs =
            (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        clientId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string client_id = 1;
     * @return The bytes for clientId.
     */
    public com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString
        getClientIdBytes() {
      java.lang.Object ref = clientId_;
      if (ref instanceof String) {
        com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString b = 
            com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        clientId_ = b;
        return b;
      } else {
        return (com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string client_id = 1;
     * @param value The clientId to set.
     * @return This builder for chaining.
     */
    public Builder setClientId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      clientId_ = value;
      onChanged();
      return this;
    }
    /**
     * string client_id = 1;
     * @return This builder for chaining.
     */
    public Builder clearClientId() {
      
      clientId_ = getDefaultInstance().getClientId();
      onChanged();
      return this;
    }
    /**
     * string client_id = 1;
     * @param value The bytes for clientId to set.
     * @return This builder for chaining.
     */
    public Builder setClientIdBytes(
        com.aliyun.openservices.ons.shaded.com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      clientId_ = value;
      onChanged();
      return this;
    }

    private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
        apache.rocketmq.v1.ProducerData, apache.rocketmq.v1.ProducerData.Builder, apache.rocketmq.v1.ProducerDataOrBuilder> producerDataBuilder_;
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     * @return Whether the producerData field is set.
     */
    @java.lang.Override
    public boolean hasProducerData() {
      return clientDataCase_ == 2;
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     * @return The producerData.
     */
    @java.lang.Override
    public apache.rocketmq.v1.ProducerData getProducerData() {
      if (producerDataBuilder_ == null) {
        if (clientDataCase_ == 2) {
          return (apache.rocketmq.v1.ProducerData) clientData_;
        }
        return apache.rocketmq.v1.ProducerData.getDefaultInstance();
      } else {
        if (clientDataCase_ == 2) {
          return producerDataBuilder_.getMessage();
        }
        return apache.rocketmq.v1.ProducerData.getDefaultInstance();
      }
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    public Builder setProducerData(apache.rocketmq.v1.ProducerData value) {
      if (producerDataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        clientData_ = value;
        onChanged();
      } else {
        producerDataBuilder_.setMessage(value);
      }
      clientDataCase_ = 2;
      return this;
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    public Builder setProducerData(
        apache.rocketmq.v1.ProducerData.Builder builderForValue) {
      if (producerDataBuilder_ == null) {
        clientData_ = builderForValue.build();
        onChanged();
      } else {
        producerDataBuilder_.setMessage(builderForValue.build());
      }
      clientDataCase_ = 2;
      return this;
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    public Builder mergeProducerData(apache.rocketmq.v1.ProducerData value) {
      if (producerDataBuilder_ == null) {
        if (clientDataCase_ == 2 &&
            clientData_ != apache.rocketmq.v1.ProducerData.getDefaultInstance()) {
          clientData_ = apache.rocketmq.v1.ProducerData.newBuilder((apache.rocketmq.v1.ProducerData) clientData_)
              .mergeFrom(value).buildPartial();
        } else {
          clientData_ = value;
        }
        onChanged();
      } else {
        if (clientDataCase_ == 2) {
          producerDataBuilder_.mergeFrom(value);
        }
        producerDataBuilder_.setMessage(value);
      }
      clientDataCase_ = 2;
      return this;
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    public Builder clearProducerData() {
      if (producerDataBuilder_ == null) {
        if (clientDataCase_ == 2) {
          clientDataCase_ = 0;
          clientData_ = null;
          onChanged();
        }
      } else {
        if (clientDataCase_ == 2) {
          clientDataCase_ = 0;
          clientData_ = null;
        }
        producerDataBuilder_.clear();
      }
      return this;
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    public apache.rocketmq.v1.ProducerData.Builder getProducerDataBuilder() {
      return getProducerDataFieldBuilder().getBuilder();
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    @java.lang.Override
    public apache.rocketmq.v1.ProducerDataOrBuilder getProducerDataOrBuilder() {
      if ((clientDataCase_ == 2) && (producerDataBuilder_ != null)) {
        return producerDataBuilder_.getMessageOrBuilder();
      } else {
        if (clientDataCase_ == 2) {
          return (apache.rocketmq.v1.ProducerData) clientData_;
        }
        return apache.rocketmq.v1.ProducerData.getDefaultInstance();
      }
    }
    /**
     * .apache.rocketmq.v1.ProducerData producer_data = 2;
     */
    private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
        apache.rocketmq.v1.ProducerData, apache.rocketmq.v1.ProducerData.Builder, apache.rocketmq.v1.ProducerDataOrBuilder> 
        getProducerDataFieldBuilder() {
      if (producerDataBuilder_ == null) {
        if (!(clientDataCase_ == 2)) {
          clientData_ = apache.rocketmq.v1.ProducerData.getDefaultInstance();
        }
        producerDataBuilder_ = new com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
            apache.rocketmq.v1.ProducerData, apache.rocketmq.v1.ProducerData.Builder, apache.rocketmq.v1.ProducerDataOrBuilder>(
                (apache.rocketmq.v1.ProducerData) clientData_,
                getParentForChildren(),
                isClean());
        clientData_ = null;
      }
      clientDataCase_ = 2;
      onChanged();;
      return producerDataBuilder_;
    }

    private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
        apache.rocketmq.v1.ConsumerData, apache.rocketmq.v1.ConsumerData.Builder, apache.rocketmq.v1.ConsumerDataOrBuilder> consumerDataBuilder_;
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     * @return Whether the consumerData field is set.
     */
    @java.lang.Override
    public boolean hasConsumerData() {
      return clientDataCase_ == 3;
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     * @return The consumerData.
     */
    @java.lang.Override
    public apache.rocketmq.v1.ConsumerData getConsumerData() {
      if (consumerDataBuilder_ == null) {
        if (clientDataCase_ == 3) {
          return (apache.rocketmq.v1.ConsumerData) clientData_;
        }
        return apache.rocketmq.v1.ConsumerData.getDefaultInstance();
      } else {
        if (clientDataCase_ == 3) {
          return consumerDataBuilder_.getMessage();
        }
        return apache.rocketmq.v1.ConsumerData.getDefaultInstance();
      }
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    public Builder setConsumerData(apache.rocketmq.v1.ConsumerData value) {
      if (consumerDataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        clientData_ = value;
        onChanged();
      } else {
        consumerDataBuilder_.setMessage(value);
      }
      clientDataCase_ = 3;
      return this;
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    public Builder setConsumerData(
        apache.rocketmq.v1.ConsumerData.Builder builderForValue) {
      if (consumerDataBuilder_ == null) {
        clientData_ = builderForValue.build();
        onChanged();
      } else {
        consumerDataBuilder_.setMessage(builderForValue.build());
      }
      clientDataCase_ = 3;
      return this;
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    public Builder mergeConsumerData(apache.rocketmq.v1.ConsumerData value) {
      if (consumerDataBuilder_ == null) {
        if (clientDataCase_ == 3 &&
            clientData_ != apache.rocketmq.v1.ConsumerData.getDefaultInstance()) {
          clientData_ = apache.rocketmq.v1.ConsumerData.newBuilder((apache.rocketmq.v1.ConsumerData) clientData_)
              .mergeFrom(value).buildPartial();
        } else {
          clientData_ = value;
        }
        onChanged();
      } else {
        if (clientDataCase_ == 3) {
          consumerDataBuilder_.mergeFrom(value);
        }
        consumerDataBuilder_.setMessage(value);
      }
      clientDataCase_ = 3;
      return this;
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    public Builder clearConsumerData() {
      if (consumerDataBuilder_ == null) {
        if (clientDataCase_ == 3) {
          clientDataCase_ = 0;
          clientData_ = null;
          onChanged();
        }
      } else {
        if (clientDataCase_ == 3) {
          clientDataCase_ = 0;
          clientData_ = null;
        }
        consumerDataBuilder_.clear();
      }
      return this;
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    public apache.rocketmq.v1.ConsumerData.Builder getConsumerDataBuilder() {
      return getConsumerDataFieldBuilder().getBuilder();
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    @java.lang.Override
    public apache.rocketmq.v1.ConsumerDataOrBuilder getConsumerDataOrBuilder() {
      if ((clientDataCase_ == 3) && (consumerDataBuilder_ != null)) {
        return consumerDataBuilder_.getMessageOrBuilder();
      } else {
        if (clientDataCase_ == 3) {
          return (apache.rocketmq.v1.ConsumerData) clientData_;
        }
        return apache.rocketmq.v1.ConsumerData.getDefaultInstance();
      }
    }
    /**
     * .apache.rocketmq.v1.ConsumerData consumer_data = 3;
     */
    private com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
        apache.rocketmq.v1.ConsumerData, apache.rocketmq.v1.ConsumerData.Builder, apache.rocketmq.v1.ConsumerDataOrBuilder> 
        getConsumerDataFieldBuilder() {
      if (consumerDataBuilder_ == null) {
        if (!(clientDataCase_ == 3)) {
          clientData_ = apache.rocketmq.v1.ConsumerData.getDefaultInstance();
        }
        consumerDataBuilder_ = new com.aliyun.openservices.ons.shaded.com.google.protobuf.SingleFieldBuilderV3<
            apache.rocketmq.v1.ConsumerData, apache.rocketmq.v1.ConsumerData.Builder, apache.rocketmq.v1.ConsumerDataOrBuilder>(
                (apache.rocketmq.v1.ConsumerData) clientData_,
                getParentForChildren(),
                isClean());
        clientData_ = null;
      }
      clientDataCase_ = 3;
      onChanged();;
      return consumerDataBuilder_;
    }

    private boolean fifoFlag_ ;
    /**
     * bool fifo_flag = 4;
     * @return The fifoFlag.
     */
    @java.lang.Override
    public boolean getFifoFlag() {
      return fifoFlag_;
    }
    /**
     * bool fifo_flag = 4;
     * @param value The fifoFlag to set.
     * @return This builder for chaining.
     */
    public Builder setFifoFlag(boolean value) {
      
      fifoFlag_ = value;
      onChanged();
      return this;
    }
    /**
     * bool fifo_flag = 4;
     * @return This builder for chaining.
     */
    public Builder clearFifoFlag() {
      
      fifoFlag_ = false;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.aliyun.openservices.ons.shaded.com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:apache.rocketmq.v1.HeartbeatRequest)
  }

  // @@protoc_insertion_point(class_scope:apache.rocketmq.v1.HeartbeatRequest)
  private static final apache.rocketmq.v1.HeartbeatRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new apache.rocketmq.v1.HeartbeatRequest();
  }

  public static apache.rocketmq.v1.HeartbeatRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser
      PARSER = new com.aliyun.openservices.ons.shaded.com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public HeartbeatRequest parsePartialFrom(
        com.aliyun.openservices.ons.shaded.com.google.protobuf.CodedInputStream input,
        com.aliyun.openservices.ons.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.aliyun.openservices.ons.shaded.com.google.protobuf.InvalidProtocolBufferException {
      return new HeartbeatRequest(input, extensionRegistry);
    }
  };

  public static com.aliyun.openservices.ons.shaded.com.google.protobuf.Parser parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public apache.rocketmq.v1.HeartbeatRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy