content: /**
   * Autogenerated by Thrift Compiler (0.9.1)
   *
   * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
   * 
   * @generated
   */
  package com.airbnb.reair.incremental.thrift;
  
  import org.apache.thrift.scheme.IScheme;
  import org.apache.thrift.scheme.SchemeFactory;
  import org.apache.thrift.scheme.StandardScheme;
  
  import org.apache.thrift.scheme.TupleScheme;
  import org.apache.thrift.protocol.TTupleProtocol;
  import org.apache.thrift.EncodingUtils;
  
  import java.util.List;
  import java.util.ArrayList;
  import java.util.Map;
  import java.util.HashMap;
  import java.util.EnumMap;
  import java.util.EnumSet;
  import java.util.Collections;
  import java.util.BitSet;
  
  public class TReplicationJob
      implements org.apache.thrift.TBase<TReplicationJob, TReplicationJob._Fields>,
      java.io.Serializable, Cloneable, Comparable<TReplicationJob> {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
        new org.apache.thrift.protocol.TStruct("TReplicationJob");
  
    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC =
        new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short) 1);
    private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC =
        new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I64,
            (short) 2);
    private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC =
        new org.apache.thrift.protocol.TField("updateTime", org.apache.thrift.protocol.TType.I64,
            (short) 3);
    private static final org.apache.thrift.protocol.TField OPERATION_FIELD_DESC =
        new org.apache.thrift.protocol.TField("operation", org.apache.thrift.protocol.TType.I32,
            (short) 4);
    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC =
        new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32,
            (short) 5);
    private static final org.apache.thrift.protocol.TField SRC_PATH_FIELD_DESC =
        new org.apache.thrift.protocol.TField("srcPath", org.apache.thrift.protocol.TType.STRING,
            (short) 6);
    private static final org.apache.thrift.protocol.TField SRC_CLUSTER_FIELD_DESC =
        new org.apache.thrift.protocol.TField("srcCluster", org.apache.thrift.protocol.TType.STRING,
            (short) 7);
    private static final org.apache.thrift.protocol.TField SRC_DB_FIELD_DESC =
        new org.apache.thrift.protocol.TField("srcDb", org.apache.thrift.protocol.TType.STRING,
            (short) 8);
    private static final org.apache.thrift.protocol.TField SRC_TABLE_FIELD_DESC =
        new org.apache.thrift.protocol.TField("srcTable", org.apache.thrift.protocol.TType.STRING,
            (short) 9);
    private static final org.apache.thrift.protocol.TField SRC_PARTITIONS_FIELD_DESC =
        new org.apache.thrift.protocol.TField("srcPartitions", org.apache.thrift.protocol.TType.LIST,
            (short) 10);
    private static final org.apache.thrift.protocol.TField SRC_MODIFIED_TIME_FIELD_DESC =
        new org.apache.thrift.protocol.TField("srcModifiedTime",
            org.apache.thrift.protocol.TType.STRING, (short) 11);
    private static final org.apache.thrift.protocol.TField RENAME_TO_DB_FIELD_DESC =
        new org.apache.thrift.protocol.TField("renameToDb", org.apache.thrift.protocol.TType.STRING,
            (short) 12);
    private static final org.apache.thrift.protocol.TField RENAME_TO_TABLE_FIELD_DESC =
        new org.apache.thrift.protocol.TField("renameToTable",
            org.apache.thrift.protocol.TType.STRING, (short) 13);
    private static final org.apache.thrift.protocol.TField RENAME_TO_PATH_FIELD_DESC =
        new org.apache.thrift.protocol.TField("renameToPath", org.apache.thrift.protocol.TType.STRING,
            (short) 14);
    private static final org.apache.thrift.protocol.TField EXTRAS_FIELD_DESC =
        new org.apache.thrift.protocol.TField("extras", org.apache.thrift.protocol.TType.MAP,
            (short) 15);
    private static final org.apache.thrift.protocol.TField WAITING_ON_JOBS_FIELD_DESC =
        new org.apache.thrift.protocol.TField("waitingOnJobs", org.apache.thrift.protocol.TType.LIST,
            (short) 16);
  
    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
        new HashMap<Class<? extends IScheme>, SchemeFactory>();
  
    static {
      schemes.put(StandardScheme.class, new TReplicationJobStandardSchemeFactory());
      schemes.put(TupleScheme.class, new TReplicationJobTupleSchemeFactory());
    }
  
    public long id; // required
    public long createTime; // required
    public long updateTime; // required
    /**
     * 
     * @see TReplicationOperation
     */
    public TReplicationOperation operation; // required
    /**
     * 
     * @see TReplicationStatus
     */
    public TReplicationStatus status; // required
    public String srcPath; // required
    public String srcCluster; // required
    public String srcDb; // required
    public String srcTable; // required
    public List<String> srcPartitions; // required
    public String srcModifiedTime; // required
    public String renameToDb; // required
    public String renameToTable; // required
    public String renameToPath; // required
    public Map<String, String> extras; // required
    public List<Long> waitingOnJobs; // 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 {
      ID((short) 1, "id"), CREATE_TIME((short) 2, "createTime"), UPDATE_TIME((short) 3, "updateTime"),
      /**
       * 
       * @see TReplicationOperation
       */
      OPERATION((short) 4, "operation"),
      /**
       * 
       * @see TReplicationStatus
       */
      STATUS((short) 5, "status"), SRC_PATH((short) 6, "srcPath"), SRC_CLUSTER((short) 7,
          "srcCluster"), SRC_DB((short) 8, "srcDb"), SRC_TABLE((short) 9,
              "srcTable"), SRC_PARTITIONS((short) 10, "srcPartitions"), SRC_MODIFIED_TIME((short) 11,
                  "srcModifiedTime"), RENAME_TO_DB((short) 12, "renameToDb"), RENAME_TO_TABLE(
                      (short) 13,
                      "renameToTable"), RENAME_TO_PATH((short) 14, "renameToPath"), EXTRAS((short) 15,
                          "extras"), WAITING_ON_JOBS((short) 16, "waitingOnJobs");
  
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
  
      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }
  
      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch (fieldId) {
          case 1: // ID
            return ID;
          case 2: // CREATE_TIME
            return CREATE_TIME;
          case 3: // UPDATE_TIME
            return UPDATE_TIME;
          case 4: // OPERATION
            return OPERATION;
          case 5: // STATUS
            return STATUS;
          case 6: // SRC_PATH
            return SRC_PATH;
          case 7: // SRC_CLUSTER
            return SRC_CLUSTER;
          case 8: // SRC_DB
            return SRC_DB;
          case 9: // SRC_TABLE
            return SRC_TABLE;
          case 10: // SRC_PARTITIONS
            return SRC_PARTITIONS;
          case 11: // SRC_MODIFIED_TIME
            return SRC_MODIFIED_TIME;
          case 12: // RENAME_TO_DB
            return RENAME_TO_DB;
          case 13: // RENAME_TO_TABLE
            return RENAME_TO_TABLE;
          case 14: // RENAME_TO_PATH
            return RENAME_TO_PATH;
          case 15: // EXTRAS
            return EXTRAS;
          case 16: // WAITING_ON_JOBS
            return WAITING_ON_JOBS;
          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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }
  
      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }
  
      private final short _thriftId;
      private final String _fieldName;
  
      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }
  
      public short getThriftFieldId() {
        return _thriftId;
      }
  
      public String getFieldName() {
        return _fieldName;
      }
    }
  
    // isset id assignments
    private static final int __ID_ISSET_ID = 0;
    private static final int __CREATETIME_ISSET_ID = 1;
    private static final int __UPDATETIME_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
          new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id",
          org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime",
          org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("updateTime",
          org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.OPERATION,
          new org.apache.thrift.meta_data.FieldMetaData("operation",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM,
                  TReplicationOperation.class)));
      tmpMap.put(_Fields.STATUS,
          new org.apache.thrift.meta_data.FieldMetaData("status",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM,
                  TReplicationStatus.class)));
      tmpMap.put(_Fields.SRC_PATH,
          new org.apache.thrift.meta_data.FieldMetaData("srcPath",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SRC_CLUSTER,
          new org.apache.thrift.meta_data.FieldMetaData("srcCluster",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SRC_DB,
          new org.apache.thrift.meta_data.FieldMetaData("srcDb",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SRC_TABLE,
          new org.apache.thrift.meta_data.FieldMetaData("srcTable",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SRC_PARTITIONS,
          new org.apache.thrift.meta_data.FieldMetaData("srcPartitions",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              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.STRING))));
      tmpMap.put(_Fields.SRC_MODIFIED_TIME,
          new org.apache.thrift.meta_data.FieldMetaData("srcModifiedTime",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.RENAME_TO_DB,
          new org.apache.thrift.meta_data.FieldMetaData("renameToDb",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.RENAME_TO_TABLE,
          new org.apache.thrift.meta_data.FieldMetaData("renameToTable",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.RENAME_TO_PATH,
          new org.apache.thrift.meta_data.FieldMetaData("renameToPath",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              new org.apache.thrift.meta_data.FieldValueMetaData(
                  org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.EXTRAS,
          new org.apache.thrift.meta_data.FieldMetaData("extras",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              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.STRING),
                  new org.apache.thrift.meta_data.FieldValueMetaData(
                      org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.WAITING_ON_JOBS,
          new org.apache.thrift.meta_data.FieldMetaData("waitingOnJobs",
              org.apache.thrift.TFieldRequirementType.DEFAULT,
              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 = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TReplicationJob.class,
          metaDataMap);
    }
  
    public TReplicationJob() {}
  
    public TReplicationJob(long id, long createTime, long updateTime, TReplicationOperation operation,
        TReplicationStatus status, String srcPath, String srcCluster, String srcDb, String srcTable,
        List<String> srcPartitions, String srcModifiedTime, String renameToDb, String renameToTable,
        String renameToPath, Map<String, String> extras, List<Long> waitingOnJobs) {
      this();
      this.id = id;
      setIdIsSet(true);
      this.createTime = createTime;
      setCreateTimeIsSet(true);
      this.updateTime = updateTime;
      setUpdateTimeIsSet(true);
      this.operation = operation;
      this.status = status;
      this.srcPath = srcPath;
      this.srcCluster = srcCluster;
      this.srcDb = srcDb;
      this.srcTable = srcTable;
      this.srcPartitions = srcPartitions;
      this.srcModifiedTime = srcModifiedTime;
      this.renameToDb = renameToDb;
      this.renameToTable = renameToTable;
      this.renameToPath = renameToPath;
      this.extras = extras;
      this.waitingOnJobs = waitingOnJobs;
    }
  
    /**
     * Performs a deep copy on <i>other</i>.
     */
    public TReplicationJob(TReplicationJob other) {
      __isset_bitfield = other.__isset_bitfield;
      this.id = other.id;
      this.createTime = other.createTime;
      this.updateTime = other.updateTime;
      if (other.isSetOperation()) {
        this.operation = other.operation;
      }
      if (other.isSetStatus()) {
        this.status = other.status;
      }
      if (other.isSetSrcPath()) {
        this.srcPath = other.srcPath;
      }
      if (other.isSetSrcCluster()) {
        this.srcCluster = other.srcCluster;
      }
      if (other.isSetSrcDb()) {
        this.srcDb = other.srcDb;
      }
      if (other.isSetSrcTable()) {
        this.srcTable = other.srcTable;
      }
      if (other.isSetSrcPartitions()) {
        List<String> __this__srcPartitions = new ArrayList<String>(other.srcPartitions);
        this.srcPartitions = __this__srcPartitions;
      }
      if (other.isSetSrcModifiedTime()) {
        this.srcModifiedTime = other.srcModifiedTime;
      }
      if (other.isSetRenameToDb()) {
        this.renameToDb = other.renameToDb;
      }
      if (other.isSetRenameToTable()) {
        this.renameToTable = other.renameToTable;
      }
      if (other.isSetRenameToPath()) {
        this.renameToPath = other.renameToPath;
      }
      if (other.isSetExtras()) {
        Map<String, String> __this__extras = new HashMap<String, String>(other.extras);
        this.extras = __this__extras;
      }
      if (other.isSetWaitingOnJobs()) {
        List<Long> __this__waitingOnJobs = new ArrayList<Long>(other.waitingOnJobs);
        this.waitingOnJobs = __this__waitingOnJobs;
      }
    }
  
    public TReplicationJob deepCopy() {
      return new TReplicationJob(this);
    }
  
    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
      setCreateTimeIsSet(false);
      this.createTime = 0;
      setUpdateTimeIsSet(false);
      this.updateTime = 0;
      this.operation = null;
      this.status = null;
      this.srcPath = null;
      this.srcCluster = null;
      this.srcDb = null;
      this.srcTable = null;
      this.srcPartitions = null;
      this.srcModifiedTime = null;
      this.renameToDb = null;
      this.renameToTable = null;
      this.renameToPath = null;
      this.extras = null;
      this.waitingOnJobs = null;
    }
  
    public long getId() {
      return this.id;
    }
  
    public TReplicationJob setId(long id) {
      this.id = id;
      setIdIsSet(true);
      return this;
    }
  
    public void unsetId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
    }
  
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
    }
  
    public void setIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
    }
  
    public long getCreateTime() {
      return this.createTime;
    }
  
    public TReplicationJob setCreateTime(long createTime) {
      this.createTime = createTime;
      setCreateTimeIsSet(true);
      return this;
    }
  
    public void unsetCreateTime() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
    }
  
    /** Returns true if field createTime is set (has been assigned a value) and false otherwise */
    public boolean isSetCreateTime() {
      return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
    }
  
    public void setCreateTimeIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
    }
  
    public long getUpdateTime() {
      return this.updateTime;
    }
  
    public TReplicationJob setUpdateTime(long updateTime) {
      this.updateTime = updateTime;
      setUpdateTimeIsSet(true);
      return this;
    }
  
    public void unsetUpdateTime() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
    }
  
    /** Returns true if field updateTime is set (has been assigned a value) and false otherwise */
    public boolean isSetUpdateTime() {
      return EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
    }
  
    public void setUpdateTimeIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
    }
  
    /**
     * 
     * @see TReplicationOperation
     */
    public TReplicationOperation getOperation() {
      return this.operation;
    }
  
    /**
     * 
     * @see TReplicationOperation
     */
    public TReplicationJob setOperation(TReplicationOperation operation) {
      this.operation = operation;
      return this;
    }
  
    public void unsetOperation() {
      this.operation = null;
    }
  
    /** Returns true if field operation is set (has been assigned a value) and false otherwise */
    public boolean isSetOperation() {
      return this.operation != null;
    }
  
    public void setOperationIsSet(boolean value) {
      if (!value) {
        this.operation = null;
      }
    }
  
    /**
     * 
     * @see TReplicationStatus
     */
    public TReplicationStatus getStatus() {
      return this.status;
    }
  
    /**
     * 
     * @see TReplicationStatus
     */
    public TReplicationJob setStatus(TReplicationStatus 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 String getSrcPath() {
      return this.srcPath;
    }
  
    public TReplicationJob setSrcPath(String srcPath) {
      this.srcPath = srcPath;
      return this;
    }
  
    public void unsetSrcPath() {
      this.srcPath = null;
    }
  
    /** Returns true if field srcPath is set (has been assigned a value) and false otherwise */
    public boolean isSetSrcPath() {
      return this.srcPath != null;
    }
  
    public void setSrcPathIsSet(boolean value) {
      if (!value) {
        this.srcPath = null;
      }
    }
  
    public String getSrcCluster() {
      return this.srcCluster;
    }
  
    public TReplicationJob setSrcCluster(String srcCluster) {
      this.srcCluster = srcCluster;
      return this;
    }
  
    public void unsetSrcCluster() {
      this.srcCluster = null;
    }
  
    /** Returns true if field srcCluster is set (has been assigned a value) and false otherwise */
    public boolean isSetSrcCluster() {
      return this.srcCluster != null;
    }
  
    public void setSrcClusterIsSet(boolean value) {
      if (!value) {
        this.srcCluster = null;
      }
    }
  
    public String getSrcDb() {
      return this.srcDb;
    }
  
    public TReplicationJob setSrcDb(String srcDb) {
      this.srcDb = srcDb;
      return this;
    }
  
    public void unsetSrcDb() {
      this.srcDb = null;
    }
  
    /** Returns true if field srcDb is set (has been assigned a value) and false otherwise */
    public boolean isSetSrcDb() {
      return this.srcDb != null;
    }
  
    public void setSrcDbIsSet(boolean value) {
      if (!value) {
        this.srcDb = null;
      }
    }
  
    public String getSrcTable() {
      return this.srcTable;
    }
  
    public TReplicationJob setSrcTable(String srcTable) {
      this.srcTable = srcTable;
      return this;
    }
  
    public void unsetSrcTable() {
      this.srcTable = null;
    }
  
    /** Returns true if field srcTable is set (has been assigned a value) and false otherwise */
    public boolean isSetSrcTable() {
      return this.srcTable != null;
    }
  
    public void setSrcTableIsSet(boolean value) {
      if (!value) {
        this.srcTable = null;
      }
    }
  
    public int getSrcPartitionsSize() {
      return (this.srcPartitions == null) ? 0 : this.srcPartitions.size();
    }
  
    public java.util.Iterator<String> getSrcPartitionsIterator() {
      return (this.srcPartitions == null) ? null : this.srcPartitions.iterator();
    }
  
    public void addToSrcPartitions(String elem) {
      if (this.srcPartitions == null) {
        this.srcPartitions = new ArrayList<String>();
      }
      this.srcPartitions.add(elem);
    }
  
    public List<String> getSrcPartitions() {
      return this.srcPartitions;
    }
  
    public TReplicationJob setSrcPartitions(List<String> srcPartitions) {
      this.srcPartitions = srcPartitions;
      return this;
    }
  
    public void unsetSrcPartitions() {
      this.srcPartitions = null;
    }
  
    /** Returns true if field srcPartitions is set (has been assigned a value) and false otherwise */
    public boolean isSetSrcPartitions() {
      return this.srcPartitions != null;
    }
  
    public void setSrcPartitionsIsSet(boolean value) {
      if (!value) {
        this.srcPartitions = null;
      }
    }
  
    public String getSrcModifiedTime() {
      return this.srcModifiedTime;
    }
  
    public TReplicationJob setSrcModifiedTime(String srcModifiedTime) {
      this.srcModifiedTime = srcModifiedTime;
      return this;
    }
  
    public void unsetSrcModifiedTime() {
      this.srcModifiedTime = null;
    }
  
    /**
     * Returns true if field srcModifiedTime is set (has been assigned a value) and false otherwise
     */
    public boolean isSetSrcModifiedTime() {
      return this.srcModifiedTime != null;
    }
  
    public void setSrcModifiedTimeIsSet(boolean value) {
      if (!value) {
        this.srcModifiedTime = null;
      }
    }
  
    public String getRenameToDb() {
      return this.renameToDb;
    }
  
    public TReplicationJob setRenameToDb(String renameToDb) {
      this.renameToDb = renameToDb;
      return this;
    }
  
    public void unsetRenameToDb() {
      this.renameToDb = null;
    }
  
    /** Returns true if field renameToDb is set (has been assigned a value) and false otherwise */
    public boolean isSetRenameToDb() {
      return this.renameToDb != null;
    }
  
    public void setRenameToDbIsSet(boolean value) {
      if (!value) {
        this.renameToDb = null;
      }
    }
  
    public String getRenameToTable() {
      return this.renameToTable;
    }
  
    public TReplicationJob setRenameToTable(String renameToTable) {
      this.renameToTable = renameToTable;
      return this;
    }
  
    public void unsetRenameToTable() {
      this.renameToTable = null;
    }
  
    /** Returns true if field renameToTable is set (has been assigned a value) and false otherwise */
    public boolean isSetRenameToTable() {
      return this.renameToTable != null;
    }
  
    public void setRenameToTableIsSet(boolean value) {
      if (!value) {
        this.renameToTable = null;
      }
    }
  
    public String getRenameToPath() {
      return this.renameToPath;
    }
  
    public TReplicationJob setRenameToPath(String renameToPath) {
      this.renameToPath = renameToPath;
      return this;
    }
  
    public void unsetRenameToPath() {
      this.renameToPath = null;
    }
  
    /** Returns true if field renameToPath is set (has been assigned a value) and false otherwise */
    public boolean isSetRenameToPath() {
      return this.renameToPath != null;
    }
  
    public void setRenameToPathIsSet(boolean value) {
      if (!value) {
        this.renameToPath = null;
      }
    }
  
    public int getExtrasSize() {
      return (this.extras == null) ? 0 : this.extras.size();
    }
  
    public void putToExtras(String key, String val) {
      if (this.extras == null) {
        this.extras = new HashMap<String, String>();
      }
      this.extras.put(key, val);
    }
  
    public Map<String, String> getExtras() {
      return this.extras;
    }
  
    public TReplicationJob setExtras(Map<String, String> extras) {
      this.extras = extras;
      return this;
    }
  
    public void unsetExtras() {
      this.extras = null;
    }
  
    /** Returns true if field extras is set (has been assigned a value) and false otherwise */
    public boolean isSetExtras() {
      return this.extras != null;
    }
  
    public void setExtrasIsSet(boolean value) {
      if (!value) {
        this.extras = null;
      }
    }
  
    public int getWaitingOnJobsSize() {
      return (this.waitingOnJobs == null) ? 0 : this.waitingOnJobs.size();
    }
  
    public java.util.Iterator<Long> getWaitingOnJobsIterator() {
      return (this.waitingOnJobs == null) ? null : this.waitingOnJobs.iterator();
    }
  
    public void addToWaitingOnJobs(long elem) {
      if (this.waitingOnJobs == null) {
        this.waitingOnJobs = new ArrayList<Long>();
      }
      this.waitingOnJobs.add(elem);
    }
  
    public List<Long> getWaitingOnJobs() {
      return this.waitingOnJobs;
    }
  
    public TReplicationJob setWaitingOnJobs(List<Long> waitingOnJobs) {
      this.waitingOnJobs = waitingOnJobs;
      return this;
    }
  
    public void unsetWaitingOnJobs() {
      this.waitingOnJobs = null;
    }
  
    /** Returns true if field waitingOnJobs is set (has been assigned a value) and false otherwise */
    public boolean isSetWaitingOnJobs() {
      return this.waitingOnJobs != null;
    }
  
    public void setWaitingOnJobsIsSet(boolean value) {
      if (!value) {
        this.waitingOnJobs = null;
      }
    }
  
    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
        case ID:
          if (value == null) {
            unsetId();
          } else {
            setId((Long) value);
          }
          break;
  
        case CREATE_TIME:
          if (value == null) {
            unsetCreateTime();
          } else {
            setCreateTime((Long) value);
          }
          break;
  
        case UPDATE_TIME:
          if (value == null) {
            unsetUpdateTime();
          } else {
            setUpdateTime((Long) value);
          }
          break;
  
        case OPERATION:
          if (value == null) {
            unsetOperation();
          } else {
            setOperation((TReplicationOperation) value);
          }
          break;
  
        case STATUS:
          if (value == null) {
            unsetStatus();
          } else {
            setStatus((TReplicationStatus) value);
          }
          break;
  
        case SRC_PATH:
          if (value == null) {
            unsetSrcPath();
          } else {
            setSrcPath((String) value);
          }
          break;
  
        case SRC_CLUSTER:
          if (value == null) {
            unsetSrcCluster();
          } else {
            setSrcCluster((String) value);
          }
          break;
  
        case SRC_DB:
          if (value == null) {
            unsetSrcDb();
          } else {
            setSrcDb((String) value);
          }
          break;
  
        case SRC_TABLE:
          if (value == null) {
            unsetSrcTable();
          } else {
            setSrcTable((String) value);
          }
          break;
  
        case SRC_PARTITIONS:
          if (value == null) {
            unsetSrcPartitions();
          } else {
            setSrcPartitions((List<String>) value);
          }
          break;
  
        case SRC_MODIFIED_TIME:
          if (value == null) {
            unsetSrcModifiedTime();
          } else {
            setSrcModifiedTime((String) value);
          }
          break;
  
        case RENAME_TO_DB:
          if (value == null) {
            unsetRenameToDb();
          } else {
            setRenameToDb((String) value);
          }
          break;
  
        case RENAME_TO_TABLE:
          if (value == null) {
            unsetRenameToTable();
          } else {
            setRenameToTable((String) value);
          }
          break;
  
        case RENAME_TO_PATH:
          if (value == null) {
            unsetRenameToPath();
          } else {
            setRenameToPath((String) value);
          }
          break;
  
        case EXTRAS:
          if (value == null) {
            unsetExtras();
          } else {
            setExtras((Map<String, String>) value);
          }
          break;
  
        case WAITING_ON_JOBS:
          if (value == null) {
            unsetWaitingOnJobs();
          } else {
            setWaitingOnJobs((List<Long>) value);
          }
          break;
  
      }
    }
  
    public Object getFieldValue(_Fields field) {
      switch (field) {
        case ID:
          return Long.valueOf(getId());
  
        case CREATE_TIME:
          return Long.valueOf(getCreateTime());
  
        case UPDATE_TIME:
          return Long.valueOf(getUpdateTime());
  
        case OPERATION:
          return getOperation();
  
        case STATUS:
          return getStatus();
  
        case SRC_PATH:
          return getSrcPath();
  
        case SRC_CLUSTER:
          return getSrcCluster();
  
        case SRC_DB:
          return getSrcDb();
  
        case SRC_TABLE:
          return getSrcTable();
  
        case SRC_PARTITIONS:
          return getSrcPartitions();
  
        case SRC_MODIFIED_TIME:
          return getSrcModifiedTime();
  
        case RENAME_TO_DB:
          return getRenameToDb();
  
        case RENAME_TO_TABLE:
          return getRenameToTable();
  
        case RENAME_TO_PATH:
          return getRenameToPath();
  
        case EXTRAS:
          return getExtras();
  
        case WAITING_ON_JOBS:
          return getWaitingOnJobs();
  
      }
      throw new 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 IllegalArgumentException();
      }
  
      switch (field) {
        case ID:
          return isSetId();
        case CREATE_TIME:
          return isSetCreateTime();
        case UPDATE_TIME:
          return isSetUpdateTime();
        case OPERATION:
          return isSetOperation();
        case STATUS:
          return isSetStatus();
        case SRC_PATH:
          return isSetSrcPath();
        case SRC_CLUSTER:
          return isSetSrcCluster();
        case SRC_DB:
          return isSetSrcDb();
        case SRC_TABLE:
          return isSetSrcTable();
        case SRC_PARTITIONS:
          return isSetSrcPartitions();
        case SRC_MODIFIED_TIME:
          return isSetSrcModifiedTime();
        case RENAME_TO_DB:
          return isSetRenameToDb();
        case RENAME_TO_TABLE:
          return isSetRenameToTable();
        case RENAME_TO_PATH:
          return isSetRenameToPath();
        case EXTRAS:
          return isSetExtras();
        case WAITING_ON_JOBS:
          return isSetWaitingOnJobs();
      }
      throw new IllegalStateException();
    }
  
    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof TReplicationJob)
        return this.equals((TReplicationJob) that);
      return false;
    }
  
    public boolean equals(TReplicationJob that) {
      if (that == null)
        return false;
  
      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }
  
      boolean this_present_createTime = true;
      boolean that_present_createTime = true;
      if (this_present_createTime || that_present_createTime) {
        if (!(this_present_createTime && that_present_createTime))
          return false;
        if (this.createTime != that.createTime)
          return false;
      }
  
      boolean this_present_updateTime = true;
      boolean that_present_updateTime = true;
      if (this_present_updateTime || that_present_updateTime) {
        if (!(this_present_updateTime && that_present_updateTime))
          return false;
        if (this.updateTime != that.updateTime)
          return false;
      }
  
      boolean this_present_operation = true && this.isSetOperation();
      boolean that_present_operation = true && that.isSetOperation();
      if (this_present_operation || that_present_operation) {
        if (!(this_present_operation && that_present_operation))
          return false;
        if (!this.operation.equals(that.operation))
          return false;
      }
  
      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_srcPath = true && this.isSetSrcPath();
      boolean that_present_srcPath = true && that.isSetSrcPath();
      if (this_present_srcPath || that_present_srcPath) {
        if (!(this_present_srcPath && that_present_srcPath))
          return false;
        if (!this.srcPath.equals(that.srcPath))
          return false;
      }
  
      boolean this_present_srcCluster = true && this.isSetSrcCluster();
      boolean that_present_srcCluster = true && that.isSetSrcCluster();
      if (this_present_srcCluster || that_present_srcCluster) {
        if (!(this_present_srcCluster && that_present_srcCluster))
          return false;
        if (!this.srcCluster.equals(that.srcCluster))
          return false;
      }
  
      boolean this_present_srcDb = true && this.isSetSrcDb();
      boolean that_present_srcDb = true && that.isSetSrcDb();
      if (this_present_srcDb || that_present_srcDb) {
        if (!(this_present_srcDb && that_present_srcDb))
          return false;
        if (!this.srcDb.equals(that.srcDb))
          return false;
      }
  
      boolean this_present_srcTable = true && this.isSetSrcTable();
      boolean that_present_srcTable = true && that.isSetSrcTable();
      if (this_present_srcTable || that_present_srcTable) {
        if (!(this_present_srcTable && that_present_srcTable))
          return false;
        if (!this.srcTable.equals(that.srcTable))
          return false;
      }
  
      boolean this_present_srcPartitions = true && this.isSetSrcPartitions();
      boolean that_present_srcPartitions = true && that.isSetSrcPartitions();
      if (this_present_srcPartitions || that_present_srcPartitions) {
        if (!(this_present_srcPartitions && that_present_srcPartitions))
          return false;
        if (!this.srcPartitions.equals(that.srcPartitions))
          return false;
      }
  
      boolean this_present_srcModifiedTime = true && this.isSetSrcModifiedTime();
      boolean that_present_srcModifiedTime = true && that.isSetSrcModifiedTime();
      if (this_present_srcModifiedTime || that_present_srcModifiedTime) {
        if (!(this_present_srcModifiedTime && that_present_srcModifiedTime))
          return false;
        if (!this.srcModifiedTime.equals(that.srcModifiedTime))
          return false;
      }
  
      boolean this_present_renameToDb = true && this.isSetRenameToDb();
      boolean that_present_renameToDb = true && that.isSetRenameToDb();
      if (this_present_renameToDb || that_present_renameToDb) {
        if (!(this_present_renameToDb && that_present_renameToDb))
          return false;
        if (!this.renameToDb.equals(that.renameToDb))
          return false;
      }
  
      boolean this_present_renameToTable = true && this.isSetRenameToTable();
      boolean that_present_renameToTable = true && that.isSetRenameToTable();
      if (this_present_renameToTable || that_present_renameToTable) {
        if (!(this_present_renameToTable && that_present_renameToTable))
          return false;
        if (!this.renameToTable.equals(that.renameToTable))
          return false;
      }
  
      boolean this_present_renameToPath = true && this.isSetRenameToPath();
      boolean that_present_renameToPath = true && that.isSetRenameToPath();
      if (this_present_renameToPath || that_present_renameToPath) {
        if (!(this_present_renameToPath && that_present_renameToPath))
          return false;
        if (!this.renameToPath.equals(that.renameToPath))
          return false;
      }
  
      boolean this_present_extras = true && this.isSetExtras();
      boolean that_present_extras = true && that.isSetExtras();
      if (this_present_extras || that_present_extras) {
        if (!(this_present_extras && that_present_extras))
          return false;
        if (!this.extras.equals(that.extras))
          return false;
      }
  
      boolean this_present_waitingOnJobs = true && this.isSetWaitingOnJobs();
      boolean that_present_waitingOnJobs = true && that.isSetWaitingOnJobs();
      if (this_present_waitingOnJobs || that_present_waitingOnJobs) {
        if (!(this_present_waitingOnJobs && that_present_waitingOnJobs))
          return false;
        if (!this.waitingOnJobs.equals(that.waitingOnJobs))
          return false;
      }
  
      return true;
    }
  
    @Override
    public int hashCode() {
      return 0;
    }
  
    @Override
    public int compareTo(TReplicationJob other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }
  
      int lastComparison = 0;
  
      lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCreateTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUpdateTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOperation()).compareTo(other.isSetOperation());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOperation()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operation, other.operation);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(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 = Boolean.valueOf(isSetSrcPath()).compareTo(other.isSetSrcPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSrcPath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcPath, other.srcPath);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSrcCluster()).compareTo(other.isSetSrcCluster());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSrcCluster()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcCluster, other.srcCluster);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSrcDb()).compareTo(other.isSetSrcDb());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSrcDb()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcDb, other.srcDb);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSrcTable()).compareTo(other.isSetSrcTable());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSrcTable()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.srcTable, other.srcTable);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSrcPartitions()).compareTo(other.isSetSrcPartitions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSrcPartitions()) {
        lastComparison =
            org.apache.thrift.TBaseHelper.compareTo(this.srcPartitions, other.srcPartitions);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison =
          Boolean.valueOf(isSetSrcModifiedTime()).compareTo(other.isSetSrcModifiedTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSrcModifiedTime()) {
        lastComparison =
            org.apache.thrift.TBaseHelper.compareTo(this.srcModifiedTime, other.srcModifiedTime);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRenameToDb()).compareTo(other.isSetRenameToDb());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRenameToDb()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renameToDb, other.renameToDb);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRenameToTable()).compareTo(other.isSetRenameToTable());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRenameToTable()) {
        lastComparison =
            org.apache.thrift.TBaseHelper.compareTo(this.renameToTable, other.renameToTable);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRenameToPath()).compareTo(other.isSetRenameToPath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRenameToPath()) {
        lastComparison =
            org.apache.thrift.TBaseHelper.compareTo(this.renameToPath, other.renameToPath);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExtras()).compareTo(other.isSetExtras());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExtras()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extras, other.extras);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWaitingOnJobs()).compareTo(other.isSetWaitingOnJobs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWaitingOnJobs()) {
        lastComparison =
            org.apache.thrift.TBaseHelper.compareTo(this.waitingOnJobs, other.waitingOnJobs);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }
  
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }
  
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }
  
    public void write(org.apache.thrift.protocol.TProtocol oprot)
        throws org.apache.thrift.TException {
      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
    }
  
    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("TReplicationJob(");
      boolean first = true;
  
      sb.append("id:");
      sb.append(this.id);
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("createTime:");
      sb.append(this.createTime);
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("updateTime:");
      sb.append(this.updateTime);
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("operation:");
      if (this.operation == null) {
        sb.append("null");
      } else {
        sb.append(this.operation);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("status:");
      if (this.status == null) {
        sb.append("null");
      } else {
        sb.append(this.status);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("srcPath:");
      if (this.srcPath == null) {
        sb.append("null");
      } else {
        sb.append(this.srcPath);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("srcCluster:");
      if (this.srcCluster == null) {
        sb.append("null");
      } else {
        sb.append(this.srcCluster);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("srcDb:");
      if (this.srcDb == null) {
        sb.append("null");
      } else {
        sb.append(this.srcDb);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("srcTable:");
      if (this.srcTable == null) {
        sb.append("null");
      } else {
        sb.append(this.srcTable);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("srcPartitions:");
      if (this.srcPartitions == null) {
        sb.append("null");
      } else {
        sb.append(this.srcPartitions);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("srcModifiedTime:");
      if (this.srcModifiedTime == null) {
        sb.append("null");
      } else {
        sb.append(this.srcModifiedTime);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("renameToDb:");
      if (this.renameToDb == null) {
        sb.append("null");
      } else {
        sb.append(this.renameToDb);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("renameToTable:");
      if (this.renameToTable == null) {
        sb.append("null");
      } else {
        sb.append(this.renameToTable);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("renameToPath:");
      if (this.renameToPath == null) {
        sb.append("null");
      } else {
        sb.append(this.renameToPath);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("extras:");
      if (this.extras == null) {
        sb.append("null");
      } else {
        sb.append(this.extras);
      }
      first = false;
      if (!first)
        sb.append(", ");
      sb.append("waitingOnJobs:");
      if (this.waitingOnJobs == null) {
        sb.append("null");
      } else {
        sb.append(this.waitingOnJobs);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }
  
    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // 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, 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 TReplicationJobStandardSchemeFactory implements SchemeFactory {
      public TReplicationJobStandardScheme getScheme() {
        return new TReplicationJobStandardScheme();
      }
    }
  
    private static class TReplicationJobStandardScheme extends StandardScheme<TReplicationJob> {
  
      public void read(org.apache.thrift.protocol.TProtocol iprot, TReplicationJob 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: // ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.id = iprot.readI64();
                struct.setIdIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // CREATE_TIME
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.createTime = iprot.readI64();
                struct.setCreateTimeIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // UPDATE_TIME
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.updateTime = iprot.readI64();
                struct.setUpdateTimeIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // OPERATION
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.operation = TReplicationOperation.findByValue(iprot.readI32());
                struct.setOperationIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // STATUS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.status = TReplicationStatus.findByValue(iprot.readI32());
                struct.setStatusIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 6: // SRC_PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.srcPath = iprot.readString();
                struct.setSrcPathIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 7: // SRC_CLUSTER
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.srcCluster = iprot.readString();
                struct.setSrcClusterIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 8: // SRC_DB
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.srcDb = iprot.readString();
                struct.setSrcDbIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 9: // SRC_TABLE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.srcTable = iprot.readString();
                struct.setSrcTableIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 10: // SRC_PARTITIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                  struct.srcPartitions = new ArrayList<String>(_list0.size);
                  for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
                    String _elem2;
                    _elem2 = iprot.readString();
                    struct.srcPartitions.add(_elem2);
                  }
                  iprot.readListEnd();
                }
                struct.setSrcPartitionsIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 11: // SRC_MODIFIED_TIME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.srcModifiedTime = iprot.readString();
                struct.setSrcModifiedTimeIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 12: // RENAME_TO_DB
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.renameToDb = iprot.readString();
                struct.setRenameToDbIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 13: // RENAME_TO_TABLE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.renameToTable = iprot.readString();
                struct.setRenameToTableIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 14: // RENAME_TO_PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.renameToPath = iprot.readString();
                struct.setRenameToPathIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 15: // EXTRAS
              if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                {
                  org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
                  struct.extras = new HashMap<String, String>(2 * _map3.size);
                  for (int _i4 = 0; _i4 < _map3.size; ++_i4) {
                    String _key5;
                    String _val6;
                    _key5 = iprot.readString();
                    _val6 = iprot.readString();
                    struct.extras.put(_key5, _val6);
                  }
                  iprot.readMapEnd();
                }
                struct.setExtrasIsSet(true);
              } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 16: // WAITING_ON_JOBS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list7 = iprot.readListBegin();
                  struct.waitingOnJobs = new ArrayList<Long>(_list7.size);
                  for (int _i8 = 0; _i8 < _list7.size; ++_i8) {
                    long _elem9;
                    _elem9 = iprot.readI64();
                    struct.waitingOnJobs.add(_elem9);
                  }
                  iprot.readListEnd();
                }
                struct.setWaitingOnJobsIsSet(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, TReplicationJob struct)
          throws org.apache.thrift.TException {
        struct.validate();
  
        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(ID_FIELD_DESC);
        oprot.writeI64(struct.id);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
        oprot.writeI64(struct.createTime);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
        oprot.writeI64(struct.updateTime);
        oprot.writeFieldEnd();
        if (struct.operation != null) {
          oprot.writeFieldBegin(OPERATION_FIELD_DESC);
          oprot.writeI32(struct.operation.getValue());
          oprot.writeFieldEnd();
        }
        if (struct.status != null) {
          oprot.writeFieldBegin(STATUS_FIELD_DESC);
          oprot.writeI32(struct.status.getValue());
          oprot.writeFieldEnd();
        }
        if (struct.srcPath != null) {
          oprot.writeFieldBegin(SRC_PATH_FIELD_DESC);
          oprot.writeString(struct.srcPath);
          oprot.writeFieldEnd();
        }
        if (struct.srcCluster != null) {
          oprot.writeFieldBegin(SRC_CLUSTER_FIELD_DESC);
          oprot.writeString(struct.srcCluster);
          oprot.writeFieldEnd();
        }
        if (struct.srcDb != null) {
          oprot.writeFieldBegin(SRC_DB_FIELD_DESC);
          oprot.writeString(struct.srcDb);
          oprot.writeFieldEnd();
        }
        if (struct.srcTable != null) {
          oprot.writeFieldBegin(SRC_TABLE_FIELD_DESC);
          oprot.writeString(struct.srcTable);
          oprot.writeFieldEnd();
        }
        if (struct.srcPartitions != null) {
          oprot.writeFieldBegin(SRC_PARTITIONS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(
                org.apache.thrift.protocol.TType.STRING, struct.srcPartitions.size()));
            for (String _iter10 : struct.srcPartitions) {
              oprot.writeString(_iter10);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.srcModifiedTime != null) {
          oprot.writeFieldBegin(SRC_MODIFIED_TIME_FIELD_DESC);
          oprot.writeString(struct.srcModifiedTime);
          oprot.writeFieldEnd();
        }
        if (struct.renameToDb != null) {
          oprot.writeFieldBegin(RENAME_TO_DB_FIELD_DESC);
          oprot.writeString(struct.renameToDb);
          oprot.writeFieldEnd();
        }
        if (struct.renameToTable != null) {
          oprot.writeFieldBegin(RENAME_TO_TABLE_FIELD_DESC);
          oprot.writeString(struct.renameToTable);
          oprot.writeFieldEnd();
        }
        if (struct.renameToPath != null) {
          oprot.writeFieldBegin(RENAME_TO_PATH_FIELD_DESC);
          oprot.writeString(struct.renameToPath);
          oprot.writeFieldEnd();
        }
        if (struct.extras != null) {
          oprot.writeFieldBegin(EXTRAS_FIELD_DESC);
          {
            oprot.writeMapBegin(
                new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
                    org.apache.thrift.protocol.TType.STRING, struct.extras.size()));
            for (Map.Entry<String, String> _iter11 : struct.extras.entrySet()) {
              oprot.writeString(_iter11.getKey());
              oprot.writeString(_iter11.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.waitingOnJobs != null) {
          oprot.writeFieldBegin(WAITING_ON_JOBS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(
                org.apache.thrift.protocol.TType.I64, struct.waitingOnJobs.size()));
            for (long _iter12 : struct.waitingOnJobs) {
              oprot.writeI64(_iter12);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }
  
    }
  
    private static class TReplicationJobTupleSchemeFactory implements SchemeFactory {
      public TReplicationJobTupleScheme getScheme() {
        return new TReplicationJobTupleScheme();
      }
    }
  
    private static class TReplicationJobTupleScheme extends TupleScheme<TReplicationJob> {
  
      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, TReplicationJob struct)
          throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetId()) {
          optionals.set(0);
        }
        if (struct.isSetCreateTime()) {
          optionals.set(1);
        }
        if (struct.isSetUpdateTime()) {
          optionals.set(2);
        }
        if (struct.isSetOperation()) {
          optionals.set(3);
        }
        if (struct.isSetStatus()) {
          optionals.set(4);
        }
        if (struct.isSetSrcPath()) {
          optionals.set(5);
        }
        if (struct.isSetSrcCluster()) {
          optionals.set(6);
        }
        if (struct.isSetSrcDb()) {
          optionals.set(7);
        }
        if (struct.isSetSrcTable()) {
          optionals.set(8);
        }
        if (struct.isSetSrcPartitions()) {
          optionals.set(9);
        }
        if (struct.isSetSrcModifiedTime()) {
          optionals.set(10);
        }
        if (struct.isSetRenameToDb()) {
          optionals.set(11);
        }
        if (struct.isSetRenameToTable()) {
          optionals.set(12);
        }
        if (struct.isSetRenameToPath()) {
          optionals.set(13);
        }
        if (struct.isSetExtras()) {
          optionals.set(14);
        }
        if (struct.isSetWaitingOnJobs()) {
          optionals.set(15);
        }
        oprot.writeBitSet(optionals, 16);
        if (struct.isSetId()) {
          oprot.writeI64(struct.id);
        }
        if (struct.isSetCreateTime()) {
          oprot.writeI64(struct.createTime);
        }
        if (struct.isSetUpdateTime()) {
          oprot.writeI64(struct.updateTime);
        }
        if (struct.isSetOperation()) {
          oprot.writeI32(struct.operation.getValue());
        }
        if (struct.isSetStatus()) {
          oprot.writeI32(struct.status.getValue());
        }
        if (struct.isSetSrcPath()) {
          oprot.writeString(struct.srcPath);
        }
        if (struct.isSetSrcCluster()) {
          oprot.writeString(struct.srcCluster);
        }
        if (struct.isSetSrcDb()) {
          oprot.writeString(struct.srcDb);
        }
        if (struct.isSetSrcTable()) {
          oprot.writeString(struct.srcTable);
        }
        if (struct.isSetSrcPartitions()) {
          {
            oprot.writeI32(struct.srcPartitions.size());
            for (String _iter13 : struct.srcPartitions) {
              oprot.writeString(_iter13);
            }
          }
        }
        if (struct.isSetSrcModifiedTime()) {
          oprot.writeString(struct.srcModifiedTime);
        }
        if (struct.isSetRenameToDb()) {
          oprot.writeString(struct.renameToDb);
        }
        if (struct.isSetRenameToTable()) {
          oprot.writeString(struct.renameToTable);
        }
        if (struct.isSetRenameToPath()) {
          oprot.writeString(struct.renameToPath);
        }
        if (struct.isSetExtras()) {
          {
            oprot.writeI32(struct.extras.size());
            for (Map.Entry<String, String> _iter14 : struct.extras.entrySet()) {
              oprot.writeString(_iter14.getKey());
              oprot.writeString(_iter14.getValue());
            }
          }
        }
        if (struct.isSetWaitingOnJobs()) {
          {
            oprot.writeI32(struct.waitingOnJobs.size());
            for (long _iter15 : struct.waitingOnJobs) {
              oprot.writeI64(_iter15);
            }
          }
        }
      }
  
      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, TReplicationJob struct)
          throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(16);
        if (incoming.get(0)) {
          struct.id = iprot.readI64();
          struct.setIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.createTime = iprot.readI64();
          struct.setCreateTimeIsSet(true);
        }
        if (incoming.get(2)) {
          struct.updateTime = iprot.readI64();
          struct.setUpdateTimeIsSet(true);
        }
        if (incoming.get(3)) {
          struct.operation = TReplicationOperation.findByValue(iprot.readI32());
          struct.setOperationIsSet(true);
        }
        if (incoming.get(4)) {
          struct.status = TReplicationStatus.findByValue(iprot.readI32());
          struct.setStatusIsSet(true);
        }
        if (incoming.get(5)) {
          struct.srcPath = iprot.readString();
          struct.setSrcPathIsSet(true);
        }
        if (incoming.get(6)) {
          struct.srcCluster = iprot.readString();
          struct.setSrcClusterIsSet(true);
        }
        if (incoming.get(7)) {
          struct.srcDb = iprot.readString();
          struct.setSrcDbIsSet(true);
        }
        if (incoming.get(8)) {
          struct.srcTable = iprot.readString();
          struct.setSrcTableIsSet(true);
        }
        if (incoming.get(9)) {
          {
            org.apache.thrift.protocol.TList _list16 = new org.apache.thrift.protocol.TList(
                org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.srcPartitions = new ArrayList<String>(_list16.size);
            for (int _i17 = 0; _i17 < _list16.size; ++_i17) {
              String _elem18;
              _elem18 = iprot.readString();
              struct.srcPartitions.add(_elem18);
            }
          }
          struct.setSrcPartitionsIsSet(true);
        }
        if (incoming.get(10)) {
          struct.srcModifiedTime = iprot.readString();
          struct.setSrcModifiedTimeIsSet(true);
        }
        if (incoming.get(11)) {
          struct.renameToDb = iprot.readString();
          struct.setRenameToDbIsSet(true);
        }
        if (incoming.get(12)) {
          struct.renameToTable = iprot.readString();
          struct.setRenameToTableIsSet(true);
        }
        if (incoming.get(13)) {
          struct.renameToPath = iprot.readString();
          struct.setRenameToPathIsSet(true);
        }
        if (incoming.get(14)) {
          {
            org.apache.thrift.protocol.TMap _map19 =
                new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
                    org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.extras = new HashMap<String, String>(2 * _map19.size);
            for (int _i20 = 0; _i20 < _map19.size; ++_i20) {
              String _key21;
              String _val22;
              _key21 = iprot.readString();
              _val22 = iprot.readString();
              struct.extras.put(_key21, _val22);
            }
          }
          struct.setExtrasIsSet(true);
        }
        if (incoming.get(15)) {
          {
            org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(
                org.apache.thrift.protocol.TType.I64, iprot.readI32());
            struct.waitingOnJobs = new ArrayList<Long>(_list23.size);
            for (int _i24 = 0; _i24 < _list23.size; ++_i24) {
              long _elem25;
              _elem25 = iprot.readI64();
              struct.waitingOnJobs.add(_elem25);
            }
          }
          struct.setWaitingOnJobsIsSet(true);
        }
      }
    }
  
  }
  
  