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

org.apache.eventmesh.meta.raft.rpc.RequestResponse Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: request.proto

// Protobuf Java Version: 3.25.4
package org.apache.eventmesh.meta.raft.rpc;

/**
 * Protobuf type {@code RequestResponse}
 */
public final class RequestResponse extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:RequestResponse)
    RequestResponseOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RequestResponse.newBuilder() to construct.
  private RequestResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private RequestResponse() {
    redirect_ = "";
    errorMsg_ = "";
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.apache.eventmesh.meta.raft.rpc.Request.internal_static_RequestResponse_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
      int number) {
    switch (number) {
      case 5:
        return internalGetInfo();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.apache.eventmesh.meta.raft.rpc.Request.internal_static_RequestResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.apache.eventmesh.meta.raft.rpc.RequestResponse.class, org.apache.eventmesh.meta.raft.rpc.RequestResponse.Builder.class);
  }

  public static final int VALUE_FIELD_NUMBER = 1;
  private long value_ = 0L;
  /**
   * int64 value = 1;
   * @return The value.
   */
  @java.lang.Override
  public long getValue() {
    return value_;
  }

  public static final int SUCCESS_FIELD_NUMBER = 2;
  private boolean success_ = false;
  /**
   * bool success = 2;
   * @return The success.
   */
  @java.lang.Override
  public boolean getSuccess() {
    return success_;
  }

  public static final int REDIRECT_FIELD_NUMBER = 3;
  @SuppressWarnings("serial")
  private volatile java.lang.Object redirect_ = "";
  /**
   * string redirect = 3;
   * @return The redirect.
   */
  @java.lang.Override
  public java.lang.String getRedirect() {
    java.lang.Object ref = redirect_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      redirect_ = s;
      return s;
    }
  }
  /**
   * string redirect = 3;
   * @return The bytes for redirect.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getRedirectBytes() {
    java.lang.Object ref = redirect_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      redirect_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ERRORMSG_FIELD_NUMBER = 4;
  @SuppressWarnings("serial")
  private volatile java.lang.Object errorMsg_ = "";
  /**
   * string errorMsg = 4;
   * @return The errorMsg.
   */
  @java.lang.Override
  public java.lang.String getErrorMsg() {
    java.lang.Object ref = errorMsg_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      errorMsg_ = s;
      return s;
    }
  }
  /**
   * string errorMsg = 4;
   * @return The bytes for errorMsg.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getErrorMsgBytes() {
    java.lang.Object ref = errorMsg_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      errorMsg_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INFO_FIELD_NUMBER = 5;
  private static final class InfoDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.String> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                org.apache.eventmesh.meta.raft.rpc.Request.internal_static_RequestResponse_InfoEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.String> info_;
  private com.google.protobuf.MapField
  internalGetInfo() {
    if (info_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          InfoDefaultEntryHolder.defaultEntry);
    }
    return info_;
  }
  public int getInfoCount() {
    return internalGetInfo().getMap().size();
  }
  /**
   * map<string, string> info = 5;
   */
  @java.lang.Override
  public boolean containsInfo(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetInfo().getMap().containsKey(key);
  }
  /**
   * Use {@link #getInfoMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map getInfo() {
    return getInfoMap();
  }
  /**
   * map<string, string> info = 5;
   */
  @java.lang.Override
  public java.util.Map getInfoMap() {
    return internalGetInfo().getMap();
  }
  /**
   * map<string, string> info = 5;
   */
  @java.lang.Override
  public /* nullable */
java.lang.String getInfoOrDefault(
      java.lang.String key,
      /* nullable */
java.lang.String defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetInfo().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, string> info = 5;
   */
  @java.lang.Override
  public java.lang.String getInfoOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetInfo().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  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 (value_ != 0L) {
      output.writeInt64(1, value_);
    }
    if (success_ != false) {
      output.writeBool(2, success_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, redirect_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMsg_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, errorMsg_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetInfo(),
        InfoDefaultEntryHolder.defaultEntry,
        5);
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (value_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(1, value_);
    }
    if (success_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(2, success_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirect_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, redirect_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(errorMsg_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, errorMsg_);
    }
    for (java.util.Map.Entry entry
         : internalGetInfo().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      info__ = InfoDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, info__);
    }
    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 org.apache.eventmesh.meta.raft.rpc.RequestResponse)) {
      return super.equals(obj);
    }
    org.apache.eventmesh.meta.raft.rpc.RequestResponse other = (org.apache.eventmesh.meta.raft.rpc.RequestResponse) obj;

    if (getValue()
        != other.getValue()) return false;
    if (getSuccess()
        != other.getSuccess()) return false;
    if (!getRedirect()
        .equals(other.getRedirect())) return false;
    if (!getErrorMsg()
        .equals(other.getErrorMsg())) return false;
    if (!internalGetInfo().equals(
        other.internalGetInfo())) return false;
    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();
    hash = (37 * hash) + VALUE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getValue());
    hash = (37 * hash) + SUCCESS_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getSuccess());
    hash = (37 * hash) + REDIRECT_FIELD_NUMBER;
    hash = (53 * hash) + getRedirect().hashCode();
    hash = (37 * hash) + ERRORMSG_FIELD_NUMBER;
    hash = (53 * hash) + getErrorMsg().hashCode();
    if (!internalGetInfo().getMap().isEmpty()) {
      hash = (37 * hash) + INFO_FIELD_NUMBER;
      hash = (53 * hash) + internalGetInfo().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse 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 org.apache.eventmesh.meta.raft.rpc.RequestResponse parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse 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 org.apache.eventmesh.meta.raft.rpc.RequestResponse parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse 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(org.apache.eventmesh.meta.raft.rpc.RequestResponse 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 RequestResponse}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:RequestResponse)
      org.apache.eventmesh.meta.raft.rpc.RequestResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.eventmesh.meta.raft.rpc.Request.internal_static_RequestResponse_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
        int number) {
      switch (number) {
        case 5:
          return internalGetInfo();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
        int number) {
      switch (number) {
        case 5:
          return internalGetMutableInfo();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.eventmesh.meta.raft.rpc.Request.internal_static_RequestResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.apache.eventmesh.meta.raft.rpc.RequestResponse.class, org.apache.eventmesh.meta.raft.rpc.RequestResponse.Builder.class);
    }

    // Construct using org.apache.eventmesh.meta.raft.rpc.RequestResponse.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      value_ = 0L;
      success_ = false;
      redirect_ = "";
      errorMsg_ = "";
      internalGetMutableInfo().clear();
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.apache.eventmesh.meta.raft.rpc.Request.internal_static_RequestResponse_descriptor;
    }

    @java.lang.Override
    public org.apache.eventmesh.meta.raft.rpc.RequestResponse getDefaultInstanceForType() {
      return org.apache.eventmesh.meta.raft.rpc.RequestResponse.getDefaultInstance();
    }

    @java.lang.Override
    public org.apache.eventmesh.meta.raft.rpc.RequestResponse build() {
      org.apache.eventmesh.meta.raft.rpc.RequestResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.apache.eventmesh.meta.raft.rpc.RequestResponse buildPartial() {
      org.apache.eventmesh.meta.raft.rpc.RequestResponse result = new org.apache.eventmesh.meta.raft.rpc.RequestResponse(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(org.apache.eventmesh.meta.raft.rpc.RequestResponse result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.value_ = value_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.success_ = success_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.redirect_ = redirect_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.errorMsg_ = errorMsg_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.info_ = internalGetInfo();
        result.info_.makeImmutable();
      }
    }

    @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 org.apache.eventmesh.meta.raft.rpc.RequestResponse) {
        return mergeFrom((org.apache.eventmesh.meta.raft.rpc.RequestResponse)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.apache.eventmesh.meta.raft.rpc.RequestResponse other) {
      if (other == org.apache.eventmesh.meta.raft.rpc.RequestResponse.getDefaultInstance()) return this;
      if (other.getValue() != 0L) {
        setValue(other.getValue());
      }
      if (other.getSuccess() != false) {
        setSuccess(other.getSuccess());
      }
      if (!other.getRedirect().isEmpty()) {
        redirect_ = other.redirect_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.getErrorMsg().isEmpty()) {
        errorMsg_ = other.errorMsg_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      internalGetMutableInfo().mergeFrom(
          other.internalGetInfo());
      bitField0_ |= 0x00000010;
      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 8: {
              value_ = input.readInt64();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              success_ = input.readBool();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 26: {
              redirect_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000004;
              break;
            } // case 26
            case 34: {
              errorMsg_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000008;
              break;
            } // case 34
            case 42: {
              com.google.protobuf.MapEntry
              info__ = input.readMessage(
                  InfoDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableInfo().getMutableMap().put(
                  info__.getKey(), info__.getValue());
              bitField0_ |= 0x00000010;
              break;
            } // case 42
            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 bitField0_;

    private long value_ ;
    /**
     * int64 value = 1;
     * @return The value.
     */
    @java.lang.Override
    public long getValue() {
      return value_;
    }
    /**
     * int64 value = 1;
     * @param value The value to set.
     * @return This builder for chaining.
     */
    public Builder setValue(long value) {

      value_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * int64 value = 1;
     * @return This builder for chaining.
     */
    public Builder clearValue() {
      bitField0_ = (bitField0_ & ~0x00000001);
      value_ = 0L;
      onChanged();
      return this;
    }

    private boolean success_ ;
    /**
     * bool success = 2;
     * @return The success.
     */
    @java.lang.Override
    public boolean getSuccess() {
      return success_;
    }
    /**
     * bool success = 2;
     * @param value The success to set.
     * @return This builder for chaining.
     */
    public Builder setSuccess(boolean value) {

      success_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * bool success = 2;
     * @return This builder for chaining.
     */
    public Builder clearSuccess() {
      bitField0_ = (bitField0_ & ~0x00000002);
      success_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object redirect_ = "";
    /**
     * string redirect = 3;
     * @return The redirect.
     */
    public java.lang.String getRedirect() {
      java.lang.Object ref = redirect_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        redirect_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string redirect = 3;
     * @return The bytes for redirect.
     */
    public com.google.protobuf.ByteString
        getRedirectBytes() {
      java.lang.Object ref = redirect_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        redirect_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string redirect = 3;
     * @param value The redirect to set.
     * @return This builder for chaining.
     */
    public Builder setRedirect(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      redirect_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * string redirect = 3;
     * @return This builder for chaining.
     */
    public Builder clearRedirect() {
      redirect_ = getDefaultInstance().getRedirect();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     * string redirect = 3;
     * @param value The bytes for redirect to set.
     * @return This builder for chaining.
     */
    public Builder setRedirectBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      redirect_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.lang.Object errorMsg_ = "";
    /**
     * string errorMsg = 4;
     * @return The errorMsg.
     */
    public java.lang.String getErrorMsg() {
      java.lang.Object ref = errorMsg_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        errorMsg_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string errorMsg = 4;
     * @return The bytes for errorMsg.
     */
    public com.google.protobuf.ByteString
        getErrorMsgBytes() {
      java.lang.Object ref = errorMsg_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        errorMsg_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string errorMsg = 4;
     * @param value The errorMsg to set.
     * @return This builder for chaining.
     */
    public Builder setErrorMsg(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      errorMsg_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * string errorMsg = 4;
     * @return This builder for chaining.
     */
    public Builder clearErrorMsg() {
      errorMsg_ = getDefaultInstance().getErrorMsg();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     * string errorMsg = 4;
     * @param value The bytes for errorMsg to set.
     * @return This builder for chaining.
     */
    public Builder setErrorMsgBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      errorMsg_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> info_;
    private com.google.protobuf.MapField
        internalGetInfo() {
      if (info_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            InfoDefaultEntryHolder.defaultEntry);
      }
      return info_;
    }
    private com.google.protobuf.MapField
        internalGetMutableInfo() {
      if (info_ == null) {
        info_ = com.google.protobuf.MapField.newMapField(
            InfoDefaultEntryHolder.defaultEntry);
      }
      if (!info_.isMutable()) {
        info_ = info_.copy();
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return info_;
    }
    public int getInfoCount() {
      return internalGetInfo().getMap().size();
    }
    /**
     * map<string, string> info = 5;
     */
    @java.lang.Override
    public boolean containsInfo(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetInfo().getMap().containsKey(key);
    }
    /**
     * Use {@link #getInfoMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map getInfo() {
      return getInfoMap();
    }
    /**
     * map<string, string> info = 5;
     */
    @java.lang.Override
    public java.util.Map getInfoMap() {
      return internalGetInfo().getMap();
    }
    /**
     * map<string, string> info = 5;
     */
    @java.lang.Override
    public /* nullable */
java.lang.String getInfoOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetInfo().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * map<string, string> info = 5;
     */
    @java.lang.Override
    public java.lang.String getInfoOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetInfo().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearInfo() {
      bitField0_ = (bitField0_ & ~0x00000010);
      internalGetMutableInfo().getMutableMap()
          .clear();
      return this;
    }
    /**
     * map<string, string> info = 5;
     */
    public Builder removeInfo(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableInfo().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
        getMutableInfo() {
      bitField0_ |= 0x00000010;
      return internalGetMutableInfo().getMutableMap();
    }
    /**
     * map<string, string> info = 5;
     */
    public Builder putInfo(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutableInfo().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000010;
      return this;
    }
    /**
     * map<string, string> info = 5;
     */
    public Builder putAllInfo(
        java.util.Map values) {
      internalGetMutableInfo().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000010;
      return this;
    }
    @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:RequestResponse)
  }

  // @@protoc_insertion_point(class_scope:RequestResponse)
  private static final org.apache.eventmesh.meta.raft.rpc.RequestResponse DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.apache.eventmesh.meta.raft.rpc.RequestResponse();
  }

  public static org.apache.eventmesh.meta.raft.rpc.RequestResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public RequestResponse 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 org.apache.eventmesh.meta.raft.rpc.RequestResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy