TEsScanRange.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 TEsScanRange implements org.apache.thrift.TBase<TEsScanRange, TEsScanRange._Fields>, java.io.Serializable, Cloneable, Comparable<TEsScanRange> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TEsScanRange");

  private static final org.apache.thrift.protocol.TField ES_HOSTS_FIELD_DESC = new org.apache.thrift.protocol.TField("es_hosts", org.apache.thrift.protocol.TType.LIST, (short)1);
  private static final org.apache.thrift.protocol.TField INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("index", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField SHARD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("shard_id", org.apache.thrift.protocol.TType.I32, (short)4);

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

  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNetworkAddress> es_hosts; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String index; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String type; // optional
  public int shard_id; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    ES_HOSTS((short)1, "es_hosts"),
    INDEX((short)2, "index"),
    TYPE((short)3, "type"),
    SHARD_ID((short)4, "shard_id");

    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: // ES_HOSTS
          return ES_HOSTS;
        case 2: // INDEX
          return INDEX;
        case 3: // TYPE
          return TYPE;
        case 4: // SHARD_ID
          return SHARD_ID;
        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 int __SHARD_ID_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.TYPE};
  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.ES_HOSTS, new org.apache.thrift.meta_data.FieldMetaData("es_hosts", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        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.TNetworkAddress.class))));
    tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SHARD_ID, new org.apache.thrift.meta_data.FieldMetaData("shard_id", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TEsScanRange.class, metaDataMap);
  }

  public TEsScanRange() {
  }

  public TEsScanRange(
    java.util.List<org.apache.doris.thrift.TNetworkAddress> es_hosts,
    java.lang.String index,
    int shard_id)
  {
    this();
    this.es_hosts = es_hosts;
    this.index = index;
    this.shard_id = shard_id;
    setShardIdIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TEsScanRange(TEsScanRange other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetEsHosts()) {
      java.util.List<org.apache.doris.thrift.TNetworkAddress> __this__es_hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(other.es_hosts.size());
      for (org.apache.doris.thrift.TNetworkAddress other_element : other.es_hosts) {
        __this__es_hosts.add(new org.apache.doris.thrift.TNetworkAddress(other_element));
      }
      this.es_hosts = __this__es_hosts;
    }
    if (other.isSetIndex()) {
      this.index = other.index;
    }
    if (other.isSetType()) {
      this.type = other.type;
    }
    this.shard_id = other.shard_id;
  }

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

  @Override
  public void clear() {
    this.es_hosts = null;
    this.index = null;
    this.type = null;
    setShardIdIsSet(false);
    this.shard_id = 0;
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<org.apache.doris.thrift.TNetworkAddress> getEsHostsIterator() {
    return (this.es_hosts == null) ? null : this.es_hosts.iterator();
  }

  public void addToEsHosts(org.apache.doris.thrift.TNetworkAddress elem) {
    if (this.es_hosts == null) {
      this.es_hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>();
    }
    this.es_hosts.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.doris.thrift.TNetworkAddress> getEsHosts() {
    return this.es_hosts;
  }

  public TEsScanRange setEsHosts(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNetworkAddress> es_hosts) {
    this.es_hosts = es_hosts;
    return this;
  }

  public void unsetEsHosts() {
    this.es_hosts = null;
  }

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

  public void setEsHostsIsSet(boolean value) {
    if (!value) {
      this.es_hosts = null;
    }
  }

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

  public TEsScanRange setIndex(@org.apache.thrift.annotation.Nullable java.lang.String index) {
    this.index = index;
    return this;
  }

  public void unsetIndex() {
    this.index = null;
  }

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

  public void setIndexIsSet(boolean value) {
    if (!value) {
      this.index = null;
    }
  }

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

  public TEsScanRange setType(@org.apache.thrift.annotation.Nullable java.lang.String type) {
    this.type = type;
    return this;
  }

  public void unsetType() {
    this.type = null;
  }

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

  public void setTypeIsSet(boolean value) {
    if (!value) {
      this.type = null;
    }
  }

  public int getShardId() {
    return this.shard_id;
  }

  public TEsScanRange setShardId(int shard_id) {
    this.shard_id = shard_id;
    setShardIdIsSet(true);
    return this;
  }

  public void unsetShardId() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHARD_ID_ISSET_ID);
  }

  /** Returns true if field shard_id is set (has been assigned a value) and false otherwise */
  public boolean isSetShardId() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHARD_ID_ISSET_ID);
  }

  public void setShardIdIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHARD_ID_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case ES_HOSTS:
      if (value == null) {
        unsetEsHosts();
      } else {
        setEsHosts((java.util.List<org.apache.doris.thrift.TNetworkAddress>)value);
      }
      break;

    case INDEX:
      if (value == null) {
        unsetIndex();
      } else {
        setIndex((java.lang.String)value);
      }
      break;

    case TYPE:
      if (value == null) {
        unsetType();
      } else {
        setType((java.lang.String)value);
      }
      break;

    case SHARD_ID:
      if (value == null) {
        unsetShardId();
      } else {
        setShardId((java.lang.Integer)value);
      }
      break;

    }
  }

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

    case INDEX:
      return getIndex();

    case TYPE:
      return getType();

    case SHARD_ID:
      return getShardId();

    }
    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 ES_HOSTS:
      return isSetEsHosts();
    case INDEX:
      return isSetIndex();
    case TYPE:
      return isSetType();
    case SHARD_ID:
      return isSetShardId();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_es_hosts = true && this.isSetEsHosts();
    boolean that_present_es_hosts = true && that.isSetEsHosts();
    if (this_present_es_hosts || that_present_es_hosts) {
      if (!(this_present_es_hosts && that_present_es_hosts))
        return false;
      if (!this.es_hosts.equals(that.es_hosts))
        return false;
    }

    boolean this_present_index = true && this.isSetIndex();
    boolean that_present_index = true && that.isSetIndex();
    if (this_present_index || that_present_index) {
      if (!(this_present_index && that_present_index))
        return false;
      if (!this.index.equals(that.index))
        return false;
    }

    boolean this_present_type = true && this.isSetType();
    boolean that_present_type = true && that.isSetType();
    if (this_present_type || that_present_type) {
      if (!(this_present_type && that_present_type))
        return false;
      if (!this.type.equals(that.type))
        return false;
    }

    boolean this_present_shard_id = true;
    boolean that_present_shard_id = true;
    if (this_present_shard_id || that_present_shard_id) {
      if (!(this_present_shard_id && that_present_shard_id))
        return false;
      if (this.shard_id != that.shard_id)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetEsHosts()) ? 131071 : 524287);
    if (isSetEsHosts())
      hashCode = hashCode * 8191 + es_hosts.hashCode();

    hashCode = hashCode * 8191 + ((isSetIndex()) ? 131071 : 524287);
    if (isSetIndex())
      hashCode = hashCode * 8191 + index.hashCode();

    hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
    if (isSetType())
      hashCode = hashCode * 8191 + type.hashCode();

    hashCode = hashCode * 8191 + shard_id;

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetEsHosts(), other.isSetEsHosts());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEsHosts()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.es_hosts, other.es_hosts);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetIndex(), other.isSetIndex());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIndex()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index, other.index);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetShardId(), other.isSetShardId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShardId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shard_id, other.shard_id);
      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("TEsScanRange(");
    boolean first = true;

    sb.append("es_hosts:");
    if (this.es_hosts == null) {
      sb.append("null");
    } else {
      sb.append(this.es_hosts);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("index:");
    if (this.index == null) {
      sb.append("null");
    } else {
      sb.append(this.index);
    }
    first = false;
    if (isSetType()) {
      if (!first) sb.append(", ");
      sb.append("type:");
      if (this.type == null) {
        sb.append("null");
      } else {
        sb.append(this.type);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("shard_id:");
    sb.append(this.shard_id);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (es_hosts == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'es_hosts' was not present! Struct: " + toString());
    }
    if (index == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'index' was not present! Struct: " + toString());
    }
    // alas, we cannot check 'shard_id' because it's a primitive and you chose the non-beans generator.
    // check for sub-struct validity
  }

  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 {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      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 TEsScanRangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TEsScanRangeStandardScheme getScheme() {
      return new TEsScanRangeStandardScheme();
    }
  }

  private static class TEsScanRangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TEsScanRange> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TEsScanRange 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: // ES_HOSTS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
                struct.es_hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(_list94.size);
                @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress _elem95;
                for (int _i96 = 0; _i96 < _list94.size; ++_i96)
                {
                  _elem95 = new org.apache.doris.thrift.TNetworkAddress();
                  _elem95.read(iprot);
                  struct.es_hosts.add(_elem95);
                }
                iprot.readListEnd();
              }
              struct.setEsHostsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // INDEX
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.index = iprot.readString();
              struct.setIndexIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.type = iprot.readString();
              struct.setTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // SHARD_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.shard_id = iprot.readI32();
              struct.setShardIdIsSet(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
      if (!struct.isSetShardId()) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'shard_id' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.es_hosts != null) {
        oprot.writeFieldBegin(ES_HOSTS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.es_hosts.size()));
          for (org.apache.doris.thrift.TNetworkAddress _iter97 : struct.es_hosts)
          {
            _iter97.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.index != null) {
        oprot.writeFieldBegin(INDEX_FIELD_DESC);
        oprot.writeString(struct.index);
        oprot.writeFieldEnd();
      }
      if (struct.type != null) {
        if (struct.isSetType()) {
          oprot.writeFieldBegin(TYPE_FIELD_DESC);
          oprot.writeString(struct.type);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldBegin(SHARD_ID_FIELD_DESC);
      oprot.writeI32(struct.shard_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TEsScanRangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TEsScanRange> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TEsScanRange struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      {
        oprot.writeI32(struct.es_hosts.size());
        for (org.apache.doris.thrift.TNetworkAddress _iter98 : struct.es_hosts)
        {
          _iter98.write(oprot);
        }
      }
      oprot.writeString(struct.index);
      oprot.writeI32(struct.shard_id);
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetType()) {
        optionals.set(0);
      }
      oprot.writeBitSet(optionals, 1);
      if (struct.isSetType()) {
        oprot.writeString(struct.type);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TEsScanRange struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      {
        org.apache.thrift.protocol.TList _list99 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
        struct.es_hosts = new java.util.ArrayList<org.apache.doris.thrift.TNetworkAddress>(_list99.size);
        @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress _elem100;
        for (int _i101 = 0; _i101 < _list99.size; ++_i101)
        {
          _elem100 = new org.apache.doris.thrift.TNetworkAddress();
          _elem100.read(iprot);
          struct.es_hosts.add(_elem100);
        }
      }
      struct.setEsHostsIsSet(true);
      struct.index = iprot.readString();
      struct.setIndexIsSet(true);
      struct.shard_id = iprot.readI32();
      struct.setShardIdIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(1);
      if (incoming.get(0)) {
        struct.type = iprot.readString();
        struct.setTypeIsSet(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();
  }
}