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

  private static final org.apache.thrift.protocol.TField DOWNLOAD_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("download_type", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField BE_IP_FIELD_DESC = new org.apache.thrift.protocol.TField("be_ip", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField BRPC_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("brpc_port", org.apache.thrift.protocol.TType.I32, (short)3);
  private static final org.apache.thrift.protocol.TField TABLET_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_ids", org.apache.thrift.protocol.TType.LIST, (short)4);

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

  /**
   * 
   * @see TDownloadType
   */
  public @org.apache.thrift.annotation.Nullable TDownloadType download_type; // required
  public @org.apache.thrift.annotation.Nullable java.lang.String be_ip; // optional
  public int brpc_port; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablet_ids; // 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 {
    /**
     * 
     * @see TDownloadType
     */
    DOWNLOAD_TYPE((short)1, "download_type"),
    BE_IP((short)2, "be_ip"),
    BRPC_PORT((short)3, "brpc_port"),
    TABLET_IDS((short)4, "tablet_ids");

    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: // DOWNLOAD_TYPE
          return DOWNLOAD_TYPE;
        case 2: // BE_IP
          return BE_IP;
        case 3: // BRPC_PORT
          return BRPC_PORT;
        case 4: // TABLET_IDS
          return TABLET_IDS;
        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 __BRPC_PORT_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.BE_IP,_Fields.BRPC_PORT,_Fields.TABLET_IDS};
  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.DOWNLOAD_TYPE, new org.apache.thrift.meta_data.FieldMetaData("download_type", org.apache.thrift.TFieldRequirementType.REQUIRED, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDownloadType.class)));
    tmpMap.put(_Fields.BE_IP, new org.apache.thrift.meta_data.FieldMetaData("be_ip", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BRPC_PORT, new org.apache.thrift.meta_data.FieldMetaData("brpc_port", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.TABLET_IDS, new org.apache.thrift.meta_data.FieldMetaData("tablet_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TJobMeta.class, metaDataMap);
  }

  public TJobMeta() {
  }

  public TJobMeta(
    TDownloadType download_type)
  {
    this();
    this.download_type = download_type;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TJobMeta(TJobMeta other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetDownloadType()) {
      this.download_type = other.download_type;
    }
    if (other.isSetBeIp()) {
      this.be_ip = other.be_ip;
    }
    this.brpc_port = other.brpc_port;
    if (other.isSetTabletIds()) {
      java.util.List<java.lang.Long> __this__tablet_ids = new java.util.ArrayList<java.lang.Long>(other.tablet_ids);
      this.tablet_ids = __this__tablet_ids;
    }
  }

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

  @Override
  public void clear() {
    this.download_type = null;
    this.be_ip = null;
    setBrpcPortIsSet(false);
    this.brpc_port = 0;
    this.tablet_ids = null;
  }

  /**
   * 
   * @see TDownloadType
   */
  @org.apache.thrift.annotation.Nullable
  public TDownloadType getDownloadType() {
    return this.download_type;
  }

  /**
   * 
   * @see TDownloadType
   */
  public TJobMeta setDownloadType(@org.apache.thrift.annotation.Nullable TDownloadType download_type) {
    this.download_type = download_type;
    return this;
  }

  public void unsetDownloadType() {
    this.download_type = null;
  }

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

  public void setDownloadTypeIsSet(boolean value) {
    if (!value) {
      this.download_type = null;
    }
  }

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

  public TJobMeta setBeIp(@org.apache.thrift.annotation.Nullable java.lang.String be_ip) {
    this.be_ip = be_ip;
    return this;
  }

  public void unsetBeIp() {
    this.be_ip = null;
  }

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

  public void setBeIpIsSet(boolean value) {
    if (!value) {
      this.be_ip = null;
    }
  }

  public int getBrpcPort() {
    return this.brpc_port;
  }

  public TJobMeta setBrpcPort(int brpc_port) {
    this.brpc_port = brpc_port;
    setBrpcPortIsSet(true);
    return this;
  }

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

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

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

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.Long> getTabletIdsIterator() {
    return (this.tablet_ids == null) ? null : this.tablet_ids.iterator();
  }

  public void addToTabletIds(long elem) {
    if (this.tablet_ids == null) {
      this.tablet_ids = new java.util.ArrayList<java.lang.Long>();
    }
    this.tablet_ids.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<java.lang.Long> getTabletIds() {
    return this.tablet_ids;
  }

  public TJobMeta setTabletIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablet_ids) {
    this.tablet_ids = tablet_ids;
    return this;
  }

  public void unsetTabletIds() {
    this.tablet_ids = null;
  }

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

  public void setTabletIdsIsSet(boolean value) {
    if (!value) {
      this.tablet_ids = null;
    }
  }

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case DOWNLOAD_TYPE:
      if (value == null) {
        unsetDownloadType();
      } else {
        setDownloadType((TDownloadType)value);
      }
      break;

    case BE_IP:
      if (value == null) {
        unsetBeIp();
      } else {
        setBeIp((java.lang.String)value);
      }
      break;

    case BRPC_PORT:
      if (value == null) {
        unsetBrpcPort();
      } else {
        setBrpcPort((java.lang.Integer)value);
      }
      break;

    case TABLET_IDS:
      if (value == null) {
        unsetTabletIds();
      } else {
        setTabletIds((java.util.List<java.lang.Long>)value);
      }
      break;

    }
  }

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

    case BE_IP:
      return getBeIp();

    case BRPC_PORT:
      return getBrpcPort();

    case TABLET_IDS:
      return getTabletIds();

    }
    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 DOWNLOAD_TYPE:
      return isSetDownloadType();
    case BE_IP:
      return isSetBeIp();
    case BRPC_PORT:
      return isSetBrpcPort();
    case TABLET_IDS:
      return isSetTabletIds();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_download_type = true && this.isSetDownloadType();
    boolean that_present_download_type = true && that.isSetDownloadType();
    if (this_present_download_type || that_present_download_type) {
      if (!(this_present_download_type && that_present_download_type))
        return false;
      if (!this.download_type.equals(that.download_type))
        return false;
    }

    boolean this_present_be_ip = true && this.isSetBeIp();
    boolean that_present_be_ip = true && that.isSetBeIp();
    if (this_present_be_ip || that_present_be_ip) {
      if (!(this_present_be_ip && that_present_be_ip))
        return false;
      if (!this.be_ip.equals(that.be_ip))
        return false;
    }

    boolean this_present_brpc_port = true && this.isSetBrpcPort();
    boolean that_present_brpc_port = true && that.isSetBrpcPort();
    if (this_present_brpc_port || that_present_brpc_port) {
      if (!(this_present_brpc_port && that_present_brpc_port))
        return false;
      if (this.brpc_port != that.brpc_port)
        return false;
    }

    boolean this_present_tablet_ids = true && this.isSetTabletIds();
    boolean that_present_tablet_ids = true && that.isSetTabletIds();
    if (this_present_tablet_ids || that_present_tablet_ids) {
      if (!(this_present_tablet_ids && that_present_tablet_ids))
        return false;
      if (!this.tablet_ids.equals(that.tablet_ids))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetDownloadType()) ? 131071 : 524287);
    if (isSetDownloadType())
      hashCode = hashCode * 8191 + download_type.getValue();

    hashCode = hashCode * 8191 + ((isSetBeIp()) ? 131071 : 524287);
    if (isSetBeIp())
      hashCode = hashCode * 8191 + be_ip.hashCode();

    hashCode = hashCode * 8191 + ((isSetBrpcPort()) ? 131071 : 524287);
    if (isSetBrpcPort())
      hashCode = hashCode * 8191 + brpc_port;

    hashCode = hashCode * 8191 + ((isSetTabletIds()) ? 131071 : 524287);
    if (isSetTabletIds())
      hashCode = hashCode * 8191 + tablet_ids.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetDownloadType(), other.isSetDownloadType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDownloadType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.download_type, other.download_type);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBeIp(), other.isSetBeIp());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBeIp()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.be_ip, other.be_ip);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBrpcPort(), other.isSetBrpcPort());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBrpcPort()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brpc_port, other.brpc_port);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTabletIds(), other.isSetTabletIds());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTabletIds()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_ids, other.tablet_ids);
      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("TJobMeta(");
    boolean first = true;

    sb.append("download_type:");
    if (this.download_type == null) {
      sb.append("null");
    } else {
      sb.append(this.download_type);
    }
    first = false;
    if (isSetBeIp()) {
      if (!first) sb.append(", ");
      sb.append("be_ip:");
      if (this.be_ip == null) {
        sb.append("null");
      } else {
        sb.append(this.be_ip);
      }
      first = false;
    }
    if (isSetBrpcPort()) {
      if (!first) sb.append(", ");
      sb.append("brpc_port:");
      sb.append(this.brpc_port);
      first = false;
    }
    if (isSetTabletIds()) {
      if (!first) sb.append(", ");
      sb.append("tablet_ids:");
      if (this.tablet_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.tablet_ids);
      }
      first = false;
    }
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    if (download_type == null) {
      throw new org.apache.thrift.protocol.TProtocolException("Required field 'download_type' was not present! Struct: " + toString());
    }
    // 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 TJobMetaStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TJobMetaStandardScheme getScheme() {
      return new TJobMetaStandardScheme();
    }
  }

  private static class TJobMetaStandardScheme extends org.apache.thrift.scheme.StandardScheme<TJobMeta> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TJobMeta 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: // DOWNLOAD_TYPE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.download_type = org.apache.doris.thrift.TDownloadType.findByValue(iprot.readI32());
              struct.setDownloadTypeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // BE_IP
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.be_ip = iprot.readString();
              struct.setBeIpIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // BRPC_PORT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.brpc_port = iprot.readI32();
              struct.setBrpcPortIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // TABLET_IDS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
                struct.tablet_ids = new java.util.ArrayList<java.lang.Long>(_list122.size);
                long _elem123;
                for (int _i124 = 0; _i124 < _list122.size; ++_i124)
                {
                  _elem123 = iprot.readI64();
                  struct.tablet_ids.add(_elem123);
                }
                iprot.readListEnd();
              }
              struct.setTabletIdsIsSet(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, TJobMeta struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.download_type != null) {
        oprot.writeFieldBegin(DOWNLOAD_TYPE_FIELD_DESC);
        oprot.writeI32(struct.download_type.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.be_ip != null) {
        if (struct.isSetBeIp()) {
          oprot.writeFieldBegin(BE_IP_FIELD_DESC);
          oprot.writeString(struct.be_ip);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetBrpcPort()) {
        oprot.writeFieldBegin(BRPC_PORT_FIELD_DESC);
        oprot.writeI32(struct.brpc_port);
        oprot.writeFieldEnd();
      }
      if (struct.tablet_ids != null) {
        if (struct.isSetTabletIds()) {
          oprot.writeFieldBegin(TABLET_IDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.tablet_ids.size()));
            for (long _iter125 : struct.tablet_ids)
            {
              oprot.writeI64(_iter125);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TJobMetaTupleScheme extends org.apache.thrift.scheme.TupleScheme<TJobMeta> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TJobMeta struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      oprot.writeI32(struct.download_type.getValue());
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetBeIp()) {
        optionals.set(0);
      }
      if (struct.isSetBrpcPort()) {
        optionals.set(1);
      }
      if (struct.isSetTabletIds()) {
        optionals.set(2);
      }
      oprot.writeBitSet(optionals, 3);
      if (struct.isSetBeIp()) {
        oprot.writeString(struct.be_ip);
      }
      if (struct.isSetBrpcPort()) {
        oprot.writeI32(struct.brpc_port);
      }
      if (struct.isSetTabletIds()) {
        {
          oprot.writeI32(struct.tablet_ids.size());
          for (long _iter126 : struct.tablet_ids)
          {
            oprot.writeI64(_iter126);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TJobMeta struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      struct.download_type = org.apache.doris.thrift.TDownloadType.findByValue(iprot.readI32());
      struct.setDownloadTypeIsSet(true);
      java.util.BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.be_ip = iprot.readString();
        struct.setBeIpIsSet(true);
      }
      if (incoming.get(1)) {
        struct.brpc_port = iprot.readI32();
        struct.setBrpcPortIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list127 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
          struct.tablet_ids = new java.util.ArrayList<java.lang.Long>(_list127.size);
          long _elem128;
          for (int _i129 = 0; _i129 < _list127.size; ++_i129)
          {
            _elem128 = iprot.readI64();
            struct.tablet_ids.add(_elem128);
          }
        }
        struct.setTabletIdsIsSet(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();
  }
}