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

io.milvus.grpc.Status Maven / Gradle / Ivy

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

package io.milvus.grpc;

/**
 * Protobuf type {@code milvus.proto.common.Status}
 */
public final class Status extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:milvus.proto.common.Status)
    StatusOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Status.newBuilder() to construct.
  private Status(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Status() {
    errorCode_ = 0;
    reason_ = "";
    detail_ = "";
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_Status_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 6:
        return internalGetExtraInfo();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_Status_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.milvus.grpc.Status.class, io.milvus.grpc.Status.Builder.class);
  }

  public static final int ERROR_CODE_FIELD_NUMBER = 1;
  private int errorCode_ = 0;
  /**
   * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
   * @deprecated milvus.proto.common.Status.error_code is deprecated.
   *     See common.proto;l=112
   * @return The enum numeric value on the wire for errorCode.
   */
  @java.lang.Override @java.lang.Deprecated public int getErrorCodeValue() {
    return errorCode_;
  }
  /**
   * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
   * @deprecated milvus.proto.common.Status.error_code is deprecated.
   *     See common.proto;l=112
   * @return The errorCode.
   */
  @java.lang.Override @java.lang.Deprecated public io.milvus.grpc.ErrorCode getErrorCode() {
    io.milvus.grpc.ErrorCode result = io.milvus.grpc.ErrorCode.forNumber(errorCode_);
    return result == null ? io.milvus.grpc.ErrorCode.UNRECOGNIZED : result;
  }

  public static final int REASON_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private volatile java.lang.Object reason_ = "";
  /**
   * string reason = 2;
   * @return The reason.
   */
  @java.lang.Override
  public java.lang.String getReason() {
    java.lang.Object ref = reason_;
    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();
      reason_ = s;
      return s;
    }
  }
  /**
   * string reason = 2;
   * @return The bytes for reason.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getReasonBytes() {
    java.lang.Object ref = reason_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      reason_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CODE_FIELD_NUMBER = 3;
  private int code_ = 0;
  /**
   * int32 code = 3;
   * @return The code.
   */
  @java.lang.Override
  public int getCode() {
    return code_;
  }

  public static final int RETRIABLE_FIELD_NUMBER = 4;
  private boolean retriable_ = false;
  /**
   * bool retriable = 4;
   * @return The retriable.
   */
  @java.lang.Override
  public boolean getRetriable() {
    return retriable_;
  }

  public static final int DETAIL_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private volatile java.lang.Object detail_ = "";
  /**
   * string detail = 5;
   * @return The detail.
   */
  @java.lang.Override
  public java.lang.String getDetail() {
    java.lang.Object ref = detail_;
    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();
      detail_ = s;
      return s;
    }
  }
  /**
   * string detail = 5;
   * @return The bytes for detail.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDetailBytes() {
    java.lang.Object ref = detail_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      detail_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EXTRA_INFO_FIELD_NUMBER = 6;
  private static final class ExtraInfoDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        java.lang.String, java.lang.String> defaultEntry =
            com.google.protobuf.MapEntry
            .newDefaultInstance(
                io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_Status_ExtraInfoEntry_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> extraInfo_;
  private com.google.protobuf.MapField
  internalGetExtraInfo() {
    if (extraInfo_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          ExtraInfoDefaultEntryHolder.defaultEntry);
    }
    return extraInfo_;
  }
  public int getExtraInfoCount() {
    return internalGetExtraInfo().getMap().size();
  }
  /**
   * map<string, string> extra_info = 6;
   */
  @java.lang.Override
  public boolean containsExtraInfo(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetExtraInfo().getMap().containsKey(key);
  }
  /**
   * Use {@link #getExtraInfoMap()} instead.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map getExtraInfo() {
    return getExtraInfoMap();
  }
  /**
   * map<string, string> extra_info = 6;
   */
  @java.lang.Override
  public java.util.Map getExtraInfoMap() {
    return internalGetExtraInfo().getMap();
  }
  /**
   * map<string, string> extra_info = 6;
   */
  @java.lang.Override
  public /* nullable */
java.lang.String getExtraInfoOrDefault(
      java.lang.String key,
      /* nullable */
java.lang.String defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetExtraInfo().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * map<string, string> extra_info = 6;
   */
  @java.lang.Override
  public java.lang.String getExtraInfoOrThrow(
      java.lang.String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map map =
        internalGetExtraInfo().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 (errorCode_ != io.milvus.grpc.ErrorCode.Success.getNumber()) {
      output.writeEnum(1, errorCode_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, reason_);
    }
    if (code_ != 0) {
      output.writeInt32(3, code_);
    }
    if (retriable_ != false) {
      output.writeBool(4, retriable_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, detail_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetExtraInfo(),
        ExtraInfoDefaultEntryHolder.defaultEntry,
        6);
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (errorCode_ != io.milvus.grpc.ErrorCode.Success.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, errorCode_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, reason_);
    }
    if (code_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, code_);
    }
    if (retriable_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(4, retriable_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, detail_);
    }
    for (java.util.Map.Entry entry
         : internalGetExtraInfo().getMap().entrySet()) {
      com.google.protobuf.MapEntry
      extraInfo__ = ExtraInfoDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, extraInfo__);
    }
    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.milvus.grpc.Status)) {
      return super.equals(obj);
    }
    io.milvus.grpc.Status other = (io.milvus.grpc.Status) obj;

    if (errorCode_ != other.errorCode_) return false;
    if (!getReason()
        .equals(other.getReason())) return false;
    if (getCode()
        != other.getCode()) return false;
    if (getRetriable()
        != other.getRetriable()) return false;
    if (!getDetail()
        .equals(other.getDetail())) return false;
    if (!internalGetExtraInfo().equals(
        other.internalGetExtraInfo())) 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) + ERROR_CODE_FIELD_NUMBER;
    hash = (53 * hash) + errorCode_;
    hash = (37 * hash) + REASON_FIELD_NUMBER;
    hash = (53 * hash) + getReason().hashCode();
    hash = (37 * hash) + CODE_FIELD_NUMBER;
    hash = (53 * hash) + getCode();
    hash = (37 * hash) + RETRIABLE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getRetriable());
    hash = (37 * hash) + DETAIL_FIELD_NUMBER;
    hash = (53 * hash) + getDetail().hashCode();
    if (!internalGetExtraInfo().getMap().isEmpty()) {
      hash = (37 * hash) + EXTRA_INFO_FIELD_NUMBER;
      hash = (53 * hash) + internalGetExtraInfo().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static io.milvus.grpc.Status 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.milvus.grpc.Status parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static io.milvus.grpc.Status 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.milvus.grpc.Status 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 milvus.proto.common.Status}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:milvus.proto.common.Status)
      io.milvus.grpc.StatusOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_Status_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 6:
          return internalGetExtraInfo();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 6:
          return internalGetMutableExtraInfo();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_Status_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.milvus.grpc.Status.class, io.milvus.grpc.Status.Builder.class);
    }

    // Construct using io.milvus.grpc.Status.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      errorCode_ = 0;
      reason_ = "";
      code_ = 0;
      retriable_ = false;
      detail_ = "";
      internalGetMutableExtraInfo().clear();
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_Status_descriptor;
    }

    @java.lang.Override
    public io.milvus.grpc.Status getDefaultInstanceForType() {
      return io.milvus.grpc.Status.getDefaultInstance();
    }

    @java.lang.Override
    public io.milvus.grpc.Status build() {
      io.milvus.grpc.Status result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.milvus.grpc.Status buildPartial() {
      io.milvus.grpc.Status result = new io.milvus.grpc.Status(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(io.milvus.grpc.Status result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.errorCode_ = errorCode_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.reason_ = reason_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.code_ = code_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.retriable_ = retriable_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.detail_ = detail_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.extraInfo_ = internalGetExtraInfo();
        result.extraInfo_.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 io.milvus.grpc.Status) {
        return mergeFrom((io.milvus.grpc.Status)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(io.milvus.grpc.Status other) {
      if (other == io.milvus.grpc.Status.getDefaultInstance()) return this;
      if (other.errorCode_ != 0) {
        setErrorCodeValue(other.getErrorCodeValue());
      }
      if (!other.getReason().isEmpty()) {
        reason_ = other.reason_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (other.getCode() != 0) {
        setCode(other.getCode());
      }
      if (other.getRetriable() != false) {
        setRetriable(other.getRetriable());
      }
      if (!other.getDetail().isEmpty()) {
        detail_ = other.detail_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      internalGetMutableExtraInfo().mergeFrom(
          other.internalGetExtraInfo());
      bitField0_ |= 0x00000020;
      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: {
              errorCode_ = input.readEnum();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 18: {
              reason_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 24: {
              code_ = input.readInt32();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 32: {
              retriable_ = input.readBool();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 42: {
              detail_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000010;
              break;
            } // case 42
            case 50: {
              com.google.protobuf.MapEntry
              extraInfo__ = input.readMessage(
                  ExtraInfoDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableExtraInfo().getMutableMap().put(
                  extraInfo__.getKey(), extraInfo__.getValue());
              bitField0_ |= 0x00000020;
              break;
            } // case 50
            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 int errorCode_ = 0;
    /**
     * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
     * @deprecated milvus.proto.common.Status.error_code is deprecated.
     *     See common.proto;l=112
     * @return The enum numeric value on the wire for errorCode.
     */
    @java.lang.Override @java.lang.Deprecated public int getErrorCodeValue() {
      return errorCode_;
    }
    /**
     * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
     * @deprecated milvus.proto.common.Status.error_code is deprecated.
     *     See common.proto;l=112
     * @param value The enum numeric value on the wire for errorCode to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated public Builder setErrorCodeValue(int value) {
      errorCode_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
     * @deprecated milvus.proto.common.Status.error_code is deprecated.
     *     See common.proto;l=112
     * @return The errorCode.
     */
    @java.lang.Override
    @java.lang.Deprecated public io.milvus.grpc.ErrorCode getErrorCode() {
      io.milvus.grpc.ErrorCode result = io.milvus.grpc.ErrorCode.forNumber(errorCode_);
      return result == null ? io.milvus.grpc.ErrorCode.UNRECOGNIZED : result;
    }
    /**
     * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
     * @deprecated milvus.proto.common.Status.error_code is deprecated.
     *     See common.proto;l=112
     * @param value The errorCode to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated public Builder setErrorCode(io.milvus.grpc.ErrorCode value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      errorCode_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .milvus.proto.common.ErrorCode error_code = 1 [deprecated = true];
     * @deprecated milvus.proto.common.Status.error_code is deprecated.
     *     See common.proto;l=112
     * @return This builder for chaining.
     */
    @java.lang.Deprecated public Builder clearErrorCode() {
      bitField0_ = (bitField0_ & ~0x00000001);
      errorCode_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object reason_ = "";
    /**
     * string reason = 2;
     * @return The reason.
     */
    public java.lang.String getReason() {
      java.lang.Object ref = reason_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        reason_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string reason = 2;
     * @return The bytes for reason.
     */
    public com.google.protobuf.ByteString
        getReasonBytes() {
      java.lang.Object ref = reason_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        reason_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string reason = 2;
     * @param value The reason to set.
     * @return This builder for chaining.
     */
    public Builder setReason(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      reason_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * string reason = 2;
     * @return This builder for chaining.
     */
    public Builder clearReason() {
      reason_ = getDefaultInstance().getReason();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * string reason = 2;
     * @param value The bytes for reason to set.
     * @return This builder for chaining.
     */
    public Builder setReasonBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      reason_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private int code_ ;
    /**
     * int32 code = 3;
     * @return The code.
     */
    @java.lang.Override
    public int getCode() {
      return code_;
    }
    /**
     * int32 code = 3;
     * @param value The code to set.
     * @return This builder for chaining.
     */
    public Builder setCode(int value) {

      code_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * int32 code = 3;
     * @return This builder for chaining.
     */
    public Builder clearCode() {
      bitField0_ = (bitField0_ & ~0x00000004);
      code_ = 0;
      onChanged();
      return this;
    }

    private boolean retriable_ ;
    /**
     * bool retriable = 4;
     * @return The retriable.
     */
    @java.lang.Override
    public boolean getRetriable() {
      return retriable_;
    }
    /**
     * bool retriable = 4;
     * @param value The retriable to set.
     * @return This builder for chaining.
     */
    public Builder setRetriable(boolean value) {

      retriable_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * bool retriable = 4;
     * @return This builder for chaining.
     */
    public Builder clearRetriable() {
      bitField0_ = (bitField0_ & ~0x00000008);
      retriable_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object detail_ = "";
    /**
     * string detail = 5;
     * @return The detail.
     */
    public java.lang.String getDetail() {
      java.lang.Object ref = detail_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        detail_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string detail = 5;
     * @return The bytes for detail.
     */
    public com.google.protobuf.ByteString
        getDetailBytes() {
      java.lang.Object ref = detail_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        detail_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string detail = 5;
     * @param value The detail to set.
     * @return This builder for chaining.
     */
    public Builder setDetail(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      detail_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * string detail = 5;
     * @return This builder for chaining.
     */
    public Builder clearDetail() {
      detail_ = getDefaultInstance().getDetail();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * string detail = 5;
     * @param value The bytes for detail to set.
     * @return This builder for chaining.
     */
    public Builder setDetailBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      detail_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> extraInfo_;
    private com.google.protobuf.MapField
        internalGetExtraInfo() {
      if (extraInfo_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            ExtraInfoDefaultEntryHolder.defaultEntry);
      }
      return extraInfo_;
    }
    private com.google.protobuf.MapField
        internalGetMutableExtraInfo() {
      if (extraInfo_ == null) {
        extraInfo_ = com.google.protobuf.MapField.newMapField(
            ExtraInfoDefaultEntryHolder.defaultEntry);
      }
      if (!extraInfo_.isMutable()) {
        extraInfo_ = extraInfo_.copy();
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return extraInfo_;
    }
    public int getExtraInfoCount() {
      return internalGetExtraInfo().getMap().size();
    }
    /**
     * map<string, string> extra_info = 6;
     */
    @java.lang.Override
    public boolean containsExtraInfo(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetExtraInfo().getMap().containsKey(key);
    }
    /**
     * Use {@link #getExtraInfoMap()} instead.
     */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map getExtraInfo() {
      return getExtraInfoMap();
    }
    /**
     * map<string, string> extra_info = 6;
     */
    @java.lang.Override
    public java.util.Map getExtraInfoMap() {
      return internalGetExtraInfo().getMap();
    }
    /**
     * map<string, string> extra_info = 6;
     */
    @java.lang.Override
    public /* nullable */
java.lang.String getExtraInfoOrDefault(
        java.lang.String key,
        /* nullable */
java.lang.String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetExtraInfo().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * map<string, string> extra_info = 6;
     */
    @java.lang.Override
    public java.lang.String getExtraInfoOrThrow(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map map =
          internalGetExtraInfo().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearExtraInfo() {
      bitField0_ = (bitField0_ & ~0x00000020);
      internalGetMutableExtraInfo().getMutableMap()
          .clear();
      return this;
    }
    /**
     * map<string, string> extra_info = 6;
     */
    public Builder removeExtraInfo(
        java.lang.String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableExtraInfo().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map
        getMutableExtraInfo() {
      bitField0_ |= 0x00000020;
      return internalGetMutableExtraInfo().getMutableMap();
    }
    /**
     * map<string, string> extra_info = 6;
     */
    public Builder putExtraInfo(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutableExtraInfo().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000020;
      return this;
    }
    /**
     * map<string, string> extra_info = 6;
     */
    public Builder putAllExtraInfo(
        java.util.Map values) {
      internalGetMutableExtraInfo().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000020;
      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:milvus.proto.common.Status)
  }

  // @@protoc_insertion_point(class_scope:milvus.proto.common.Status)
  private static final io.milvus.grpc.Status DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.milvus.grpc.Status();
  }

  public static io.milvus.grpc.Status getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public Status 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.milvus.grpc.Status getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy