TGetTabletReplicaInfosResult.java

/**
 * Autogenerated by Thrift Compiler (0.16.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.doris.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TGetTabletReplicaInfosResult implements org.apache.thrift.TBase<TGetTabletReplicaInfosResult, TGetTabletReplicaInfosResult._Fields>, java.io.Serializable, Cloneable, Comparable<TGetTabletReplicaInfosResult> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTabletReplicaInfosResult");

  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
  private static final org.apache.thrift.protocol.TField TABLET_REPLICA_INFOS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_replica_infos", org.apache.thrift.protocol.TType.MAP, (short)2);
  private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)3);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TGetTabletReplicaInfosResultStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TGetTabletReplicaInfosResultTupleSchemeFactory();

  public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>> tablet_replica_infos; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String token; // optional

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    STATUS((short)1, "status"),
    TABLET_REPLICA_INFOS((short)2, "tablet_replica_infos"),
    TOKEN((short)3, "token");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // STATUS
          return STATUS;
        case 2: // TABLET_REPLICA_INFOS
          return TABLET_REPLICA_INFOS;
        case 3: // TOKEN
          return TOKEN;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final _Fields optionals[] = {_Fields.STATUS,_Fields.TABLET_REPLICA_INFOS,_Fields.TOKEN};
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TStatus.class)));
    tmpMap.put(_Fields.TABLET_REPLICA_INFOS, new org.apache.thrift.meta_data.FieldMetaData("tablet_replica_infos", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
            new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
                new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TReplicaInfo.class)))));
    tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetTabletReplicaInfosResult.class, metaDataMap);
  }

  public TGetTabletReplicaInfosResult() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TGetTabletReplicaInfosResult(TGetTabletReplicaInfosResult other) {
    if (other.isSetStatus()) {
      this.status = new org.apache.doris.thrift.TStatus(other.status);
    }
    if (other.isSetTabletReplicaInfos()) {
      java.util.Map<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>> __this__tablet_replica_infos = new java.util.HashMap<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>>(other.tablet_replica_infos.size());
      for (java.util.Map.Entry<java.lang.Long, java.util.List<org.apache.doris.thrift.TReplicaInfo>> other_element : other.tablet_replica_infos.entrySet()) {

        java.lang.Long other_element_key = other_element.getKey();
        java.util.List<org.apache.doris.thrift.TReplicaInfo> other_element_value = other_element.getValue();

        java.lang.Long __this__tablet_replica_infos_copy_key = other_element_key;

        java.util.List<org.apache.doris.thrift.TReplicaInfo> __this__tablet_replica_infos_copy_value = new java.util.ArrayList<org.apache.doris.thrift.TReplicaInfo>(other_element_value.size());
        for (org.apache.doris.thrift.TReplicaInfo other_element_value_element : other_element_value) {
          __this__tablet_replica_infos_copy_value.add(new org.apache.doris.thrift.TReplicaInfo(other_element_value_element));
        }

        __this__tablet_replica_infos.put(__this__tablet_replica_infos_copy_key, __this__tablet_replica_infos_copy_value);
      }
      this.tablet_replica_infos = __this__tablet_replica_infos;
    }
    if (other.isSetToken()) {
      this.token = other.token;
    }
  }

  public TGetTabletReplicaInfosResult deepCopy() {
    return new TGetTabletReplicaInfosResult(this);
  }

  @Override
  public void clear() {
    this.status = null;
    this.tablet_replica_infos = null;
    this.token = null;
  }

  @org.apache.thrift.annotation.Nullable
  public org.apache.doris.thrift.TStatus getStatus() {
    return this.status;
  }

  public TGetTabletReplicaInfosResult setStatus(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status) {
    this.status = status;
    return this;
  }

  public void unsetStatus() {
    this.status = null;
  }

  /** Returns true if field status is set (has been assigned a value) and false otherwise */
  public boolean isSetStatus() {
    return this.status != null;
  }

  public void setStatusIsSet(boolean value) {
    if (!value) {
      this.status = null;
    }
  }

  public int getTabletReplicaInfosSize() {
    return (this.tablet_replica_infos == null) ? 0 : this.tablet_replica_infos.size();
  }

  public void putToTabletReplicaInfos(long key, java.util.List<org.apache.doris.thrift.TReplicaInfo> val) {
    if (this.tablet_replica_infos == null) {
      this.tablet_replica_infos = new java.util.HashMap<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>>();
    }
    this.tablet_replica_infos.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>> getTabletReplicaInfos() {
    return this.tablet_replica_infos;
  }

  public TGetTabletReplicaInfosResult setTabletReplicaInfos(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>> tablet_replica_infos) {
    this.tablet_replica_infos = tablet_replica_infos;
    return this;
  }

  public void unsetTabletReplicaInfos() {
    this.tablet_replica_infos = null;
  }

  /** Returns true if field tablet_replica_infos is set (has been assigned a value) and false otherwise */
  public boolean isSetTabletReplicaInfos() {
    return this.tablet_replica_infos != null;
  }

  public void setTabletReplicaInfosIsSet(boolean value) {
    if (!value) {
      this.tablet_replica_infos = null;
    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.String getToken() {
    return this.token;
  }

  public TGetTabletReplicaInfosResult setToken(@org.apache.thrift.annotation.Nullable java.lang.String token) {
    this.token = token;
    return this;
  }

  public void unsetToken() {
    this.token = null;
  }

  /** Returns true if field token is set (has been assigned a value) and false otherwise */
  public boolean isSetToken() {
    return this.token != null;
  }

  public void setTokenIsSet(boolean value) {
    if (!value) {
      this.token = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case STATUS:
      if (value == null) {
        unsetStatus();
      } else {
        setStatus((org.apache.doris.thrift.TStatus)value);
      }
      break;

    case TABLET_REPLICA_INFOS:
      if (value == null) {
        unsetTabletReplicaInfos();
      } else {
        setTabletReplicaInfos((java.util.Map<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>>)value);
      }
      break;

    case TOKEN:
      if (value == null) {
        unsetToken();
      } else {
        setToken((java.lang.String)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case STATUS:
      return getStatus();

    case TABLET_REPLICA_INFOS:
      return getTabletReplicaInfos();

    case TOKEN:
      return getToken();

    }
    throw new java.lang.IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new java.lang.IllegalArgumentException();
    }

    switch (field) {
    case STATUS:
      return isSetStatus();
    case TABLET_REPLICA_INFOS:
      return isSetTabletReplicaInfos();
    case TOKEN:
      return isSetToken();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof TGetTabletReplicaInfosResult)
      return this.equals((TGetTabletReplicaInfosResult)that);
    return false;
  }

  public boolean equals(TGetTabletReplicaInfosResult that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_status = true && this.isSetStatus();
    boolean that_present_status = true && that.isSetStatus();
    if (this_present_status || that_present_status) {
      if (!(this_present_status && that_present_status))
        return false;
      if (!this.status.equals(that.status))
        return false;
    }

    boolean this_present_tablet_replica_infos = true && this.isSetTabletReplicaInfos();
    boolean that_present_tablet_replica_infos = true && that.isSetTabletReplicaInfos();
    if (this_present_tablet_replica_infos || that_present_tablet_replica_infos) {
      if (!(this_present_tablet_replica_infos && that_present_tablet_replica_infos))
        return false;
      if (!this.tablet_replica_infos.equals(that.tablet_replica_infos))
        return false;
    }

    boolean this_present_token = true && this.isSetToken();
    boolean that_present_token = true && that.isSetToken();
    if (this_present_token || that_present_token) {
      if (!(this_present_token && that_present_token))
        return false;
      if (!this.token.equals(that.token))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
    if (isSetStatus())
      hashCode = hashCode * 8191 + status.hashCode();

    hashCode = hashCode * 8191 + ((isSetTabletReplicaInfos()) ? 131071 : 524287);
    if (isSetTabletReplicaInfos())
      hashCode = hashCode * 8191 + tablet_replica_infos.hashCode();

    hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287);
    if (isSetToken())
      hashCode = hashCode * 8191 + token.hashCode();

    return hashCode;
  }

  @Override
  public int compareTo(TGetTabletReplicaInfosResult other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTabletReplicaInfos(), other.isSetTabletReplicaInfos());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTabletReplicaInfos()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_replica_infos, other.tablet_replica_infos);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetToken()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("TGetTabletReplicaInfosResult(");
    boolean first = true;

    if (isSetStatus()) {
      sb.append("status:");
      if (this.status == null) {
        sb.append("null");
      } else {
        sb.append(this.status);
      }
      first = false;
    }
    if (isSetTabletReplicaInfos()) {
      if (!first) sb.append(", ");
      sb.append("tablet_replica_infos:");
      if (this.tablet_replica_infos == null) {
        sb.append("null");
      } else {
        sb.append(this.tablet_replica_infos);
      }
      first = false;
    }
    if (isSetToken()) {
      if (!first) sb.append(", ");
      sb.append("token:");
      if (this.token == null) {
        sb.append("null");
      } else {
        sb.append(this.token);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
    if (status != null) {
      status.validate();
    }
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class TGetTabletReplicaInfosResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TGetTabletReplicaInfosResultStandardScheme getScheme() {
      return new TGetTabletReplicaInfosResultStandardScheme();
    }
  }

  private static class TGetTabletReplicaInfosResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetTabletReplicaInfosResult> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTabletReplicaInfosResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // STATUS
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.status = new org.apache.doris.thrift.TStatus();
              struct.status.read(iprot);
              struct.setStatusIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // TABLET_REPLICA_INFOS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map590 = iprot.readMapBegin();
                struct.tablet_replica_infos = new java.util.HashMap<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>>(2*_map590.size);
                long _key591;
                @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TReplicaInfo> _val592;
                for (int _i593 = 0; _i593 < _map590.size; ++_i593)
                {
                  _key591 = iprot.readI64();
                  {
                    org.apache.thrift.protocol.TList _list594 = iprot.readListBegin();
                    _val592 = new java.util.ArrayList<org.apache.doris.thrift.TReplicaInfo>(_list594.size);
                    @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TReplicaInfo _elem595;
                    for (int _i596 = 0; _i596 < _list594.size; ++_i596)
                    {
                      _elem595 = new org.apache.doris.thrift.TReplicaInfo();
                      _elem595.read(iprot);
                      _val592.add(_elem595);
                    }
                    iprot.readListEnd();
                  }
                  struct.tablet_replica_infos.put(_key591, _val592);
                }
                iprot.readMapEnd();
              }
              struct.setTabletReplicaInfosIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TOKEN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.token = iprot.readString();
              struct.setTokenIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot, TGetTabletReplicaInfosResult struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.status != null) {
        if (struct.isSetStatus()) {
          oprot.writeFieldBegin(STATUS_FIELD_DESC);
          struct.status.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.tablet_replica_infos != null) {
        if (struct.isSetTabletReplicaInfos()) {
          oprot.writeFieldBegin(TABLET_REPLICA_INFOS_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST, struct.tablet_replica_infos.size()));
            for (java.util.Map.Entry<java.lang.Long, java.util.List<org.apache.doris.thrift.TReplicaInfo>> _iter597 : struct.tablet_replica_infos.entrySet())
            {
              oprot.writeI64(_iter597.getKey());
              {
                oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter597.getValue().size()));
                for (org.apache.doris.thrift.TReplicaInfo _iter598 : _iter597.getValue())
                {
                  _iter598.write(oprot);
                }
                oprot.writeListEnd();
              }
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.token != null) {
        if (struct.isSetToken()) {
          oprot.writeFieldBegin(TOKEN_FIELD_DESC);
          oprot.writeString(struct.token);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TGetTabletReplicaInfosResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TGetTabletReplicaInfosResultTupleScheme getScheme() {
      return new TGetTabletReplicaInfosResultTupleScheme();
    }
  }

  private static class TGetTabletReplicaInfosResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetTabletReplicaInfosResult> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TGetTabletReplicaInfosResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetStatus()) {
        optionals.set(0);
      }
      if (struct.isSetTabletReplicaInfos()) {
        optionals.set(1);
      }
      if (struct.isSetToken()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetStatus()) {
        struct.status.write(oprot);
      }
      if (struct.isSetTabletReplicaInfos()) {
        {
          oprot.writeI32(struct.tablet_replica_infos.size());
          for (java.util.Map.Entry<java.lang.Long, java.util.List<org.apache.doris.thrift.TReplicaInfo>> _iter599 : struct.tablet_replica_infos.entrySet())
          {
            oprot.writeI64(_iter599.getKey());
            {
              oprot.writeI32(_iter599.getValue().size());
              for (org.apache.doris.thrift.TReplicaInfo _iter600 : _iter599.getValue())
              {
                _iter600.write(oprot);
              }
            }
          }
        }
      }
      if (struct.isSetToken()) {
        oprot.writeString(struct.token);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TGetTabletReplicaInfosResult struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.status = new org.apache.doris.thrift.TStatus();
        struct.status.read(iprot);
        struct.setStatusIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TMap _map601 = iprot.readMapBegin(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.LIST); 
          struct.tablet_replica_infos = new java.util.HashMap<java.lang.Long,java.util.List<org.apache.doris.thrift.TReplicaInfo>>(2*_map601.size);
          long _key602;
          @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TReplicaInfo> _val603;
          for (int _i604 = 0; _i604 < _map601.size; ++_i604)
          {
            _key602 = iprot.readI64();
            {
              org.apache.thrift.protocol.TList _list605 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
              _val603 = new java.util.ArrayList<org.apache.doris.thrift.TReplicaInfo>(_list605.size);
              @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TReplicaInfo _elem606;
              for (int _i607 = 0; _i607 < _list605.size; ++_i607)
              {
                _elem606 = new org.apache.doris.thrift.TReplicaInfo();
                _elem606.read(iprot);
                _val603.add(_elem606);
              }
            }
            struct.tablet_replica_infos.put(_key602, _val603);
          }
        }
        struct.setTabletReplicaInfosIsSet(true);
      }
      if (incoming.get(2)) {
        struct.token = iprot.readString();
        struct.setTokenIsSet(true);
      }
    }
  }

  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
}