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

  private static final org.apache.thrift.protocol.TField CLUSTER_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField LABEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("label_name", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField REPO_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("repo_name", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField TABLE_REFS_FIELD_DESC = new org.apache.thrift.protocol.TField("table_refs", org.apache.thrift.protocol.TType.LIST, (short)9);
  private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)10);
  private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField JOB_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("job_info", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField CLEAN_TABLES_FIELD_DESC = new org.apache.thrift.protocol.TField("clean_tables", org.apache.thrift.protocol.TType.BOOL, (short)13);
  private static final org.apache.thrift.protocol.TField CLEAN_PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("clean_partitions", org.apache.thrift.protocol.TType.BOOL, (short)14);
  private static final org.apache.thrift.protocol.TField ATOMIC_RESTORE_FIELD_DESC = new org.apache.thrift.protocol.TField("atomic_restore", org.apache.thrift.protocol.TType.BOOL, (short)15);
  private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)16);
  private static final org.apache.thrift.protocol.TField FORCE_REPLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("force_replace", org.apache.thrift.protocol.TType.BOOL, (short)17);

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

  public @org.apache.thrift.annotation.Nullable java.lang.String cluster; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String user; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String db; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String table; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String token; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String label_name; // optional
  public @org.apache.thrift.annotation.Nullable java.lang.String repo_name; // optional
  public @org.apache.thrift.annotation.Nullable java.util.List<TTableRef> table_refs; // optional
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> properties; // optional
  public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta; // optional
  public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer job_info; // optional
  public boolean clean_tables; // optional
  public boolean clean_partitions; // optional
  public boolean atomic_restore; // optional
  public boolean compressed; // optional
  public boolean force_replace; // 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 {
    CLUSTER((short)1, "cluster"),
    USER((short)2, "user"),
    PASSWD((short)3, "passwd"),
    DB((short)4, "db"),
    TABLE((short)5, "table"),
    TOKEN((short)6, "token"),
    LABEL_NAME((short)7, "label_name"),
    REPO_NAME((short)8, "repo_name"),
    TABLE_REFS((short)9, "table_refs"),
    PROPERTIES((short)10, "properties"),
    META((short)11, "meta"),
    JOB_INFO((short)12, "job_info"),
    CLEAN_TABLES((short)13, "clean_tables"),
    CLEAN_PARTITIONS((short)14, "clean_partitions"),
    ATOMIC_RESTORE((short)15, "atomic_restore"),
    COMPRESSED((short)16, "compressed"),
    FORCE_REPLACE((short)17, "force_replace");

    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: // CLUSTER
          return CLUSTER;
        case 2: // USER
          return USER;
        case 3: // PASSWD
          return PASSWD;
        case 4: // DB
          return DB;
        case 5: // TABLE
          return TABLE;
        case 6: // TOKEN
          return TOKEN;
        case 7: // LABEL_NAME
          return LABEL_NAME;
        case 8: // REPO_NAME
          return REPO_NAME;
        case 9: // TABLE_REFS
          return TABLE_REFS;
        case 10: // PROPERTIES
          return PROPERTIES;
        case 11: // META
          return META;
        case 12: // JOB_INFO
          return JOB_INFO;
        case 13: // CLEAN_TABLES
          return CLEAN_TABLES;
        case 14: // CLEAN_PARTITIONS
          return CLEAN_PARTITIONS;
        case 15: // ATOMIC_RESTORE
          return ATOMIC_RESTORE;
        case 16: // COMPRESSED
          return COMPRESSED;
        case 17: // FORCE_REPLACE
          return FORCE_REPLACE;
        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 __CLEAN_TABLES_ISSET_ID = 0;
  private static final int __CLEAN_PARTITIONS_ISSET_ID = 1;
  private static final int __ATOMIC_RESTORE_ISSET_ID = 2;
  private static final int __COMPRESSED_ISSET_ID = 3;
  private static final int __FORCE_REPLACE_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.CLUSTER,_Fields.USER,_Fields.PASSWD,_Fields.DB,_Fields.TABLE,_Fields.TOKEN,_Fields.LABEL_NAME,_Fields.REPO_NAME,_Fields.TABLE_REFS,_Fields.PROPERTIES,_Fields.META,_Fields.JOB_INFO,_Fields.CLEAN_TABLES,_Fields.CLEAN_PARTITIONS,_Fields.ATOMIC_RESTORE,_Fields.COMPRESSED,_Fields.FORCE_REPLACE};
  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.CLUSTER, new org.apache.thrift.meta_data.FieldMetaData("cluster", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LABEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("label_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.REPO_NAME, new org.apache.thrift.meta_data.FieldMetaData("repo_name", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.TABLE_REFS, new org.apache.thrift.meta_data.FieldMetaData("table_refs", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableRef.class))));
    tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.META, new org.apache.thrift.meta_data.FieldMetaData("meta", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
    tmpMap.put(_Fields.JOB_INFO, new org.apache.thrift.meta_data.FieldMetaData("job_info", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , true)));
    tmpMap.put(_Fields.CLEAN_TABLES, new org.apache.thrift.meta_data.FieldMetaData("clean_tables", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.CLEAN_PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("clean_partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.ATOMIC_RESTORE, new org.apache.thrift.meta_data.FieldMetaData("atomic_restore", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.FORCE_REPLACE, new org.apache.thrift.meta_data.FieldMetaData("force_replace", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRestoreSnapshotRequest.class, metaDataMap);
  }

  public TRestoreSnapshotRequest() {
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TRestoreSnapshotRequest(TRestoreSnapshotRequest other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetCluster()) {
      this.cluster = other.cluster;
    }
    if (other.isSetUser()) {
      this.user = other.user;
    }
    if (other.isSetPasswd()) {
      this.passwd = other.passwd;
    }
    if (other.isSetDb()) {
      this.db = other.db;
    }
    if (other.isSetTable()) {
      this.table = other.table;
    }
    if (other.isSetToken()) {
      this.token = other.token;
    }
    if (other.isSetLabelName()) {
      this.label_name = other.label_name;
    }
    if (other.isSetRepoName()) {
      this.repo_name = other.repo_name;
    }
    if (other.isSetTableRefs()) {
      java.util.List<TTableRef> __this__table_refs = new java.util.ArrayList<TTableRef>(other.table_refs.size());
      for (TTableRef other_element : other.table_refs) {
        __this__table_refs.add(new TTableRef(other_element));
      }
      this.table_refs = __this__table_refs;
    }
    if (other.isSetProperties()) {
      java.util.Map<java.lang.String,java.lang.String> __this__properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.properties);
      this.properties = __this__properties;
    }
    if (other.isSetMeta()) {
      this.meta = org.apache.thrift.TBaseHelper.copyBinary(other.meta);
    }
    if (other.isSetJobInfo()) {
      this.job_info = org.apache.thrift.TBaseHelper.copyBinary(other.job_info);
    }
    this.clean_tables = other.clean_tables;
    this.clean_partitions = other.clean_partitions;
    this.atomic_restore = other.atomic_restore;
    this.compressed = other.compressed;
    this.force_replace = other.force_replace;
  }

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

  @Override
  public void clear() {
    this.cluster = null;
    this.user = null;
    this.passwd = null;
    this.db = null;
    this.table = null;
    this.token = null;
    this.label_name = null;
    this.repo_name = null;
    this.table_refs = null;
    this.properties = null;
    this.meta = null;
    this.job_info = null;
    setCleanTablesIsSet(false);
    this.clean_tables = false;
    setCleanPartitionsIsSet(false);
    this.clean_partitions = false;
    setAtomicRestoreIsSet(false);
    this.atomic_restore = false;
    setCompressedIsSet(false);
    this.compressed = false;
    setForceReplaceIsSet(false);
    this.force_replace = false;
  }

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

  public TRestoreSnapshotRequest setCluster(@org.apache.thrift.annotation.Nullable java.lang.String cluster) {
    this.cluster = cluster;
    return this;
  }

  public void unsetCluster() {
    this.cluster = null;
  }

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

  public void setClusterIsSet(boolean value) {
    if (!value) {
      this.cluster = null;
    }
  }

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

  public TRestoreSnapshotRequest setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) {
    this.user = user;
    return this;
  }

  public void unsetUser() {
    this.user = null;
  }

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

  public void setUserIsSet(boolean value) {
    if (!value) {
      this.user = null;
    }
  }

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

  public TRestoreSnapshotRequest setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) {
    this.passwd = passwd;
    return this;
  }

  public void unsetPasswd() {
    this.passwd = null;
  }

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

  public void setPasswdIsSet(boolean value) {
    if (!value) {
      this.passwd = null;
    }
  }

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

  public TRestoreSnapshotRequest setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
    this.db = db;
    return this;
  }

  public void unsetDb() {
    this.db = null;
  }

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

  public void setDbIsSet(boolean value) {
    if (!value) {
      this.db = null;
    }
  }

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

  public TRestoreSnapshotRequest setTable(@org.apache.thrift.annotation.Nullable java.lang.String table) {
    this.table = table;
    return this;
  }

  public void unsetTable() {
    this.table = null;
  }

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

  public void setTableIsSet(boolean value) {
    if (!value) {
      this.table = null;
    }
  }

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

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

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

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

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

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

  public TRestoreSnapshotRequest setLabelName(@org.apache.thrift.annotation.Nullable java.lang.String label_name) {
    this.label_name = label_name;
    return this;
  }

  public void unsetLabelName() {
    this.label_name = null;
  }

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

  public void setLabelNameIsSet(boolean value) {
    if (!value) {
      this.label_name = null;
    }
  }

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

  public TRestoreSnapshotRequest setRepoName(@org.apache.thrift.annotation.Nullable java.lang.String repo_name) {
    this.repo_name = repo_name;
    return this;
  }

  public void unsetRepoName() {
    this.repo_name = null;
  }

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

  public void setRepoNameIsSet(boolean value) {
    if (!value) {
      this.repo_name = null;
    }
  }

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

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<TTableRef> getTableRefsIterator() {
    return (this.table_refs == null) ? null : this.table_refs.iterator();
  }

  public void addToTableRefs(TTableRef elem) {
    if (this.table_refs == null) {
      this.table_refs = new java.util.ArrayList<TTableRef>();
    }
    this.table_refs.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<TTableRef> getTableRefs() {
    return this.table_refs;
  }

  public TRestoreSnapshotRequest setTableRefs(@org.apache.thrift.annotation.Nullable java.util.List<TTableRef> table_refs) {
    this.table_refs = table_refs;
    return this;
  }

  public void unsetTableRefs() {
    this.table_refs = null;
  }

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

  public void setTableRefsIsSet(boolean value) {
    if (!value) {
      this.table_refs = null;
    }
  }

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

  public void putToProperties(java.lang.String key, java.lang.String val) {
    if (this.properties == null) {
      this.properties = new java.util.HashMap<java.lang.String,java.lang.String>();
    }
    this.properties.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,java.lang.String> getProperties() {
    return this.properties;
  }

  public TRestoreSnapshotRequest setProperties(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> properties) {
    this.properties = properties;
    return this;
  }

  public void unsetProperties() {
    this.properties = null;
  }

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

  public void setPropertiesIsSet(boolean value) {
    if (!value) {
      this.properties = null;
    }
  }

  public byte[] getMeta() {
    setMeta(org.apache.thrift.TBaseHelper.rightSize(meta));
    return meta == null ? null : meta.array();
  }

  public java.nio.ByteBuffer bufferForMeta() {
    return org.apache.thrift.TBaseHelper.copyBinary(meta);
  }

  public TRestoreSnapshotRequest setMeta(byte[] meta) {
    this.meta = meta == null ? (java.nio.ByteBuffer)null   : java.nio.ByteBuffer.wrap(meta.clone());
    return this;
  }

  public TRestoreSnapshotRequest setMeta(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta) {
    this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta);
    return this;
  }

  public void unsetMeta() {
    this.meta = null;
  }

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

  public void setMetaIsSet(boolean value) {
    if (!value) {
      this.meta = null;
    }
  }

  public byte[] getJobInfo() {
    setJobInfo(org.apache.thrift.TBaseHelper.rightSize(job_info));
    return job_info == null ? null : job_info.array();
  }

  public java.nio.ByteBuffer bufferForJobInfo() {
    return org.apache.thrift.TBaseHelper.copyBinary(job_info);
  }

  public TRestoreSnapshotRequest setJobInfo(byte[] job_info) {
    this.job_info = job_info == null ? (java.nio.ByteBuffer)null   : java.nio.ByteBuffer.wrap(job_info.clone());
    return this;
  }

  public TRestoreSnapshotRequest setJobInfo(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer job_info) {
    this.job_info = org.apache.thrift.TBaseHelper.copyBinary(job_info);
    return this;
  }

  public void unsetJobInfo() {
    this.job_info = null;
  }

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

  public void setJobInfoIsSet(boolean value) {
    if (!value) {
      this.job_info = null;
    }
  }

  public boolean isCleanTables() {
    return this.clean_tables;
  }

  public TRestoreSnapshotRequest setCleanTables(boolean clean_tables) {
    this.clean_tables = clean_tables;
    setCleanTablesIsSet(true);
    return this;
  }

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

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

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

  public boolean isCleanPartitions() {
    return this.clean_partitions;
  }

  public TRestoreSnapshotRequest setCleanPartitions(boolean clean_partitions) {
    this.clean_partitions = clean_partitions;
    setCleanPartitionsIsSet(true);
    return this;
  }

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

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

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

  public boolean isAtomicRestore() {
    return this.atomic_restore;
  }

  public TRestoreSnapshotRequest setAtomicRestore(boolean atomic_restore) {
    this.atomic_restore = atomic_restore;
    setAtomicRestoreIsSet(true);
    return this;
  }

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

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

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

  public boolean isCompressed() {
    return this.compressed;
  }

  public TRestoreSnapshotRequest setCompressed(boolean compressed) {
    this.compressed = compressed;
    setCompressedIsSet(true);
    return this;
  }

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

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

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

  public boolean isForceReplace() {
    return this.force_replace;
  }

  public TRestoreSnapshotRequest setForceReplace(boolean force_replace) {
    this.force_replace = force_replace;
    setForceReplaceIsSet(true);
    return this;
  }

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

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

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

  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case CLUSTER:
      if (value == null) {
        unsetCluster();
      } else {
        setCluster((java.lang.String)value);
      }
      break;

    case USER:
      if (value == null) {
        unsetUser();
      } else {
        setUser((java.lang.String)value);
      }
      break;

    case PASSWD:
      if (value == null) {
        unsetPasswd();
      } else {
        setPasswd((java.lang.String)value);
      }
      break;

    case DB:
      if (value == null) {
        unsetDb();
      } else {
        setDb((java.lang.String)value);
      }
      break;

    case TABLE:
      if (value == null) {
        unsetTable();
      } else {
        setTable((java.lang.String)value);
      }
      break;

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

    case LABEL_NAME:
      if (value == null) {
        unsetLabelName();
      } else {
        setLabelName((java.lang.String)value);
      }
      break;

    case REPO_NAME:
      if (value == null) {
        unsetRepoName();
      } else {
        setRepoName((java.lang.String)value);
      }
      break;

    case TABLE_REFS:
      if (value == null) {
        unsetTableRefs();
      } else {
        setTableRefs((java.util.List<TTableRef>)value);
      }
      break;

    case PROPERTIES:
      if (value == null) {
        unsetProperties();
      } else {
        setProperties((java.util.Map<java.lang.String,java.lang.String>)value);
      }
      break;

    case META:
      if (value == null) {
        unsetMeta();
      } else {
        if (value instanceof byte[]) {
          setMeta((byte[])value);
        } else {
          setMeta((java.nio.ByteBuffer)value);
        }
      }
      break;

    case JOB_INFO:
      if (value == null) {
        unsetJobInfo();
      } else {
        if (value instanceof byte[]) {
          setJobInfo((byte[])value);
        } else {
          setJobInfo((java.nio.ByteBuffer)value);
        }
      }
      break;

    case CLEAN_TABLES:
      if (value == null) {
        unsetCleanTables();
      } else {
        setCleanTables((java.lang.Boolean)value);
      }
      break;

    case CLEAN_PARTITIONS:
      if (value == null) {
        unsetCleanPartitions();
      } else {
        setCleanPartitions((java.lang.Boolean)value);
      }
      break;

    case ATOMIC_RESTORE:
      if (value == null) {
        unsetAtomicRestore();
      } else {
        setAtomicRestore((java.lang.Boolean)value);
      }
      break;

    case COMPRESSED:
      if (value == null) {
        unsetCompressed();
      } else {
        setCompressed((java.lang.Boolean)value);
      }
      break;

    case FORCE_REPLACE:
      if (value == null) {
        unsetForceReplace();
      } else {
        setForceReplace((java.lang.Boolean)value);
      }
      break;

    }
  }

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

    case USER:
      return getUser();

    case PASSWD:
      return getPasswd();

    case DB:
      return getDb();

    case TABLE:
      return getTable();

    case TOKEN:
      return getToken();

    case LABEL_NAME:
      return getLabelName();

    case REPO_NAME:
      return getRepoName();

    case TABLE_REFS:
      return getTableRefs();

    case PROPERTIES:
      return getProperties();

    case META:
      return getMeta();

    case JOB_INFO:
      return getJobInfo();

    case CLEAN_TABLES:
      return isCleanTables();

    case CLEAN_PARTITIONS:
      return isCleanPartitions();

    case ATOMIC_RESTORE:
      return isAtomicRestore();

    case COMPRESSED:
      return isCompressed();

    case FORCE_REPLACE:
      return isForceReplace();

    }
    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 CLUSTER:
      return isSetCluster();
    case USER:
      return isSetUser();
    case PASSWD:
      return isSetPasswd();
    case DB:
      return isSetDb();
    case TABLE:
      return isSetTable();
    case TOKEN:
      return isSetToken();
    case LABEL_NAME:
      return isSetLabelName();
    case REPO_NAME:
      return isSetRepoName();
    case TABLE_REFS:
      return isSetTableRefs();
    case PROPERTIES:
      return isSetProperties();
    case META:
      return isSetMeta();
    case JOB_INFO:
      return isSetJobInfo();
    case CLEAN_TABLES:
      return isSetCleanTables();
    case CLEAN_PARTITIONS:
      return isSetCleanPartitions();
    case ATOMIC_RESTORE:
      return isSetAtomicRestore();
    case COMPRESSED:
      return isSetCompressed();
    case FORCE_REPLACE:
      return isSetForceReplace();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_cluster = true && this.isSetCluster();
    boolean that_present_cluster = true && that.isSetCluster();
    if (this_present_cluster || that_present_cluster) {
      if (!(this_present_cluster && that_present_cluster))
        return false;
      if (!this.cluster.equals(that.cluster))
        return false;
    }

    boolean this_present_user = true && this.isSetUser();
    boolean that_present_user = true && that.isSetUser();
    if (this_present_user || that_present_user) {
      if (!(this_present_user && that_present_user))
        return false;
      if (!this.user.equals(that.user))
        return false;
    }

    boolean this_present_passwd = true && this.isSetPasswd();
    boolean that_present_passwd = true && that.isSetPasswd();
    if (this_present_passwd || that_present_passwd) {
      if (!(this_present_passwd && that_present_passwd))
        return false;
      if (!this.passwd.equals(that.passwd))
        return false;
    }

    boolean this_present_db = true && this.isSetDb();
    boolean that_present_db = true && that.isSetDb();
    if (this_present_db || that_present_db) {
      if (!(this_present_db && that_present_db))
        return false;
      if (!this.db.equals(that.db))
        return false;
    }

    boolean this_present_table = true && this.isSetTable();
    boolean that_present_table = true && that.isSetTable();
    if (this_present_table || that_present_table) {
      if (!(this_present_table && that_present_table))
        return false;
      if (!this.table.equals(that.table))
        return false;
    }

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

    boolean this_present_label_name = true && this.isSetLabelName();
    boolean that_present_label_name = true && that.isSetLabelName();
    if (this_present_label_name || that_present_label_name) {
      if (!(this_present_label_name && that_present_label_name))
        return false;
      if (!this.label_name.equals(that.label_name))
        return false;
    }

    boolean this_present_repo_name = true && this.isSetRepoName();
    boolean that_present_repo_name = true && that.isSetRepoName();
    if (this_present_repo_name || that_present_repo_name) {
      if (!(this_present_repo_name && that_present_repo_name))
        return false;
      if (!this.repo_name.equals(that.repo_name))
        return false;
    }

    boolean this_present_table_refs = true && this.isSetTableRefs();
    boolean that_present_table_refs = true && that.isSetTableRefs();
    if (this_present_table_refs || that_present_table_refs) {
      if (!(this_present_table_refs && that_present_table_refs))
        return false;
      if (!this.table_refs.equals(that.table_refs))
        return false;
    }

    boolean this_present_properties = true && this.isSetProperties();
    boolean that_present_properties = true && that.isSetProperties();
    if (this_present_properties || that_present_properties) {
      if (!(this_present_properties && that_present_properties))
        return false;
      if (!this.properties.equals(that.properties))
        return false;
    }

    boolean this_present_meta = true && this.isSetMeta();
    boolean that_present_meta = true && that.isSetMeta();
    if (this_present_meta || that_present_meta) {
      if (!(this_present_meta && that_present_meta))
        return false;
      if (!this.meta.equals(that.meta))
        return false;
    }

    boolean this_present_job_info = true && this.isSetJobInfo();
    boolean that_present_job_info = true && that.isSetJobInfo();
    if (this_present_job_info || that_present_job_info) {
      if (!(this_present_job_info && that_present_job_info))
        return false;
      if (!this.job_info.equals(that.job_info))
        return false;
    }

    boolean this_present_clean_tables = true && this.isSetCleanTables();
    boolean that_present_clean_tables = true && that.isSetCleanTables();
    if (this_present_clean_tables || that_present_clean_tables) {
      if (!(this_present_clean_tables && that_present_clean_tables))
        return false;
      if (this.clean_tables != that.clean_tables)
        return false;
    }

    boolean this_present_clean_partitions = true && this.isSetCleanPartitions();
    boolean that_present_clean_partitions = true && that.isSetCleanPartitions();
    if (this_present_clean_partitions || that_present_clean_partitions) {
      if (!(this_present_clean_partitions && that_present_clean_partitions))
        return false;
      if (this.clean_partitions != that.clean_partitions)
        return false;
    }

    boolean this_present_atomic_restore = true && this.isSetAtomicRestore();
    boolean that_present_atomic_restore = true && that.isSetAtomicRestore();
    if (this_present_atomic_restore || that_present_atomic_restore) {
      if (!(this_present_atomic_restore && that_present_atomic_restore))
        return false;
      if (this.atomic_restore != that.atomic_restore)
        return false;
    }

    boolean this_present_compressed = true && this.isSetCompressed();
    boolean that_present_compressed = true && that.isSetCompressed();
    if (this_present_compressed || that_present_compressed) {
      if (!(this_present_compressed && that_present_compressed))
        return false;
      if (this.compressed != that.compressed)
        return false;
    }

    boolean this_present_force_replace = true && this.isSetForceReplace();
    boolean that_present_force_replace = true && that.isSetForceReplace();
    if (this_present_force_replace || that_present_force_replace) {
      if (!(this_present_force_replace && that_present_force_replace))
        return false;
      if (this.force_replace != that.force_replace)
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetCluster()) ? 131071 : 524287);
    if (isSetCluster())
      hashCode = hashCode * 8191 + cluster.hashCode();

    hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
    if (isSetUser())
      hashCode = hashCode * 8191 + user.hashCode();

    hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287);
    if (isSetPasswd())
      hashCode = hashCode * 8191 + passwd.hashCode();

    hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
    if (isSetDb())
      hashCode = hashCode * 8191 + db.hashCode();

    hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
    if (isSetTable())
      hashCode = hashCode * 8191 + table.hashCode();

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

    hashCode = hashCode * 8191 + ((isSetLabelName()) ? 131071 : 524287);
    if (isSetLabelName())
      hashCode = hashCode * 8191 + label_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetRepoName()) ? 131071 : 524287);
    if (isSetRepoName())
      hashCode = hashCode * 8191 + repo_name.hashCode();

    hashCode = hashCode * 8191 + ((isSetTableRefs()) ? 131071 : 524287);
    if (isSetTableRefs())
      hashCode = hashCode * 8191 + table_refs.hashCode();

    hashCode = hashCode * 8191 + ((isSetProperties()) ? 131071 : 524287);
    if (isSetProperties())
      hashCode = hashCode * 8191 + properties.hashCode();

    hashCode = hashCode * 8191 + ((isSetMeta()) ? 131071 : 524287);
    if (isSetMeta())
      hashCode = hashCode * 8191 + meta.hashCode();

    hashCode = hashCode * 8191 + ((isSetJobInfo()) ? 131071 : 524287);
    if (isSetJobInfo())
      hashCode = hashCode * 8191 + job_info.hashCode();

    hashCode = hashCode * 8191 + ((isSetCleanTables()) ? 131071 : 524287);
    if (isSetCleanTables())
      hashCode = hashCode * 8191 + ((clean_tables) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetCleanPartitions()) ? 131071 : 524287);
    if (isSetCleanPartitions())
      hashCode = hashCode * 8191 + ((clean_partitions) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetAtomicRestore()) ? 131071 : 524287);
    if (isSetAtomicRestore())
      hashCode = hashCode * 8191 + ((atomic_restore) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetCompressed()) ? 131071 : 524287);
    if (isSetCompressed())
      hashCode = hashCode * 8191 + ((compressed) ? 131071 : 524287);

    hashCode = hashCode * 8191 + ((isSetForceReplace()) ? 131071 : 524287);
    if (isSetForceReplace())
      hashCode = hashCode * 8191 + ((force_replace) ? 131071 : 524287);

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetCluster(), other.isSetCluster());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCluster()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster, other.cluster);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUser()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPasswd()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDb()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTable(), other.isSetTable());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTable()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetToken()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetLabelName(), other.isSetLabelName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLabelName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.label_name, other.label_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetRepoName(), other.isSetRepoName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRepoName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.repo_name, other.repo_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTableRefs(), other.isSetTableRefs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableRefs()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_refs, other.table_refs);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetProperties(), other.isSetProperties());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProperties()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetMeta(), other.isSetMeta());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMeta()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.meta, other.meta);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetJobInfo(), other.isSetJobInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJobInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job_info, other.job_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCleanTables(), other.isSetCleanTables());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCleanTables()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clean_tables, other.clean_tables);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCleanPartitions(), other.isSetCleanPartitions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCleanPartitions()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clean_partitions, other.clean_partitions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetAtomicRestore(), other.isSetAtomicRestore());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAtomicRestore()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.atomic_restore, other.atomic_restore);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetCompressed(), other.isSetCompressed());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCompressed()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressed, other.compressed);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetForceReplace(), other.isSetForceReplace());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetForceReplace()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.force_replace, other.force_replace);
      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("TRestoreSnapshotRequest(");
    boolean first = true;

    if (isSetCluster()) {
      sb.append("cluster:");
      if (this.cluster == null) {
        sb.append("null");
      } else {
        sb.append(this.cluster);
      }
      first = false;
    }
    if (isSetUser()) {
      if (!first) sb.append(", ");
      sb.append("user:");
      if (this.user == null) {
        sb.append("null");
      } else {
        sb.append(this.user);
      }
      first = false;
    }
    if (isSetPasswd()) {
      if (!first) sb.append(", ");
      sb.append("passwd:");
      if (this.passwd == null) {
        sb.append("null");
      } else {
        sb.append(this.passwd);
      }
      first = false;
    }
    if (isSetDb()) {
      if (!first) sb.append(", ");
      sb.append("db:");
      if (this.db == null) {
        sb.append("null");
      } else {
        sb.append(this.db);
      }
      first = false;
    }
    if (isSetTable()) {
      if (!first) sb.append(", ");
      sb.append("table:");
      if (this.table == null) {
        sb.append("null");
      } else {
        sb.append(this.table);
      }
      first = false;
    }
    if (isSetToken()) {
      if (!first) sb.append(", ");
      sb.append("token:");
      if (this.token == null) {
        sb.append("null");
      } else {
        sb.append(this.token);
      }
      first = false;
    }
    if (isSetLabelName()) {
      if (!first) sb.append(", ");
      sb.append("label_name:");
      if (this.label_name == null) {
        sb.append("null");
      } else {
        sb.append(this.label_name);
      }
      first = false;
    }
    if (isSetRepoName()) {
      if (!first) sb.append(", ");
      sb.append("repo_name:");
      if (this.repo_name == null) {
        sb.append("null");
      } else {
        sb.append(this.repo_name);
      }
      first = false;
    }
    if (isSetTableRefs()) {
      if (!first) sb.append(", ");
      sb.append("table_refs:");
      if (this.table_refs == null) {
        sb.append("null");
      } else {
        sb.append(this.table_refs);
      }
      first = false;
    }
    if (isSetProperties()) {
      if (!first) sb.append(", ");
      sb.append("properties:");
      if (this.properties == null) {
        sb.append("null");
      } else {
        sb.append(this.properties);
      }
      first = false;
    }
    if (isSetMeta()) {
      if (!first) sb.append(", ");
      sb.append("meta:");
      if (this.meta == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.meta, sb);
      }
      first = false;
    }
    if (isSetJobInfo()) {
      if (!first) sb.append(", ");
      sb.append("job_info:");
      if (this.job_info == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.job_info, sb);
      }
      first = false;
    }
    if (isSetCleanTables()) {
      if (!first) sb.append(", ");
      sb.append("clean_tables:");
      sb.append(this.clean_tables);
      first = false;
    }
    if (isSetCleanPartitions()) {
      if (!first) sb.append(", ");
      sb.append("clean_partitions:");
      sb.append(this.clean_partitions);
      first = false;
    }
    if (isSetAtomicRestore()) {
      if (!first) sb.append(", ");
      sb.append("atomic_restore:");
      sb.append(this.atomic_restore);
      first = false;
    }
    if (isSetCompressed()) {
      if (!first) sb.append(", ");
      sb.append("compressed:");
      sb.append(this.compressed);
      first = false;
    }
    if (isSetForceReplace()) {
      if (!first) sb.append(", ");
      sb.append("force_replace:");
      sb.append(this.force_replace);
      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, 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 TRestoreSnapshotRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public TRestoreSnapshotRequestStandardScheme getScheme() {
      return new TRestoreSnapshotRequestStandardScheme();
    }
  }

  private static class TRestoreSnapshotRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRestoreSnapshotRequest> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TRestoreSnapshotRequest 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: // CLUSTER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.cluster = iprot.readString();
              struct.setClusterIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // USER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.user = iprot.readString();
              struct.setUserIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PASSWD
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.passwd = iprot.readString();
              struct.setPasswdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // DB
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.db = iprot.readString();
              struct.setDbIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // TABLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.table = iprot.readString();
              struct.setTableIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // TOKEN
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.token = iprot.readString();
              struct.setTokenIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // LABEL_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.label_name = iprot.readString();
              struct.setLabelNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // REPO_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.repo_name = iprot.readString();
              struct.setRepoNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // TABLE_REFS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list608 = iprot.readListBegin();
                struct.table_refs = new java.util.ArrayList<TTableRef>(_list608.size);
                @org.apache.thrift.annotation.Nullable TTableRef _elem609;
                for (int _i610 = 0; _i610 < _list608.size; ++_i610)
                {
                  _elem609 = new TTableRef();
                  _elem609.read(iprot);
                  struct.table_refs.add(_elem609);
                }
                iprot.readListEnd();
              }
              struct.setTableRefsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // PROPERTIES
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map611 = iprot.readMapBegin();
                struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map611.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key612;
                @org.apache.thrift.annotation.Nullable java.lang.String _val613;
                for (int _i614 = 0; _i614 < _map611.size; ++_i614)
                {
                  _key612 = iprot.readString();
                  _val613 = iprot.readString();
                  struct.properties.put(_key612, _val613);
                }
                iprot.readMapEnd();
              }
              struct.setPropertiesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // META
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.meta = iprot.readBinary();
              struct.setMetaIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // JOB_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.job_info = iprot.readBinary();
              struct.setJobInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // CLEAN_TABLES
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.clean_tables = iprot.readBool();
              struct.setCleanTablesIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // CLEAN_PARTITIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.clean_partitions = iprot.readBool();
              struct.setCleanPartitionsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // ATOMIC_RESTORE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.atomic_restore = iprot.readBool();
              struct.setAtomicRestoreIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 16: // COMPRESSED
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.compressed = iprot.readBool();
              struct.setCompressedIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 17: // FORCE_REPLACE
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.force_replace = iprot.readBool();
              struct.setForceReplaceIsSet(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, TRestoreSnapshotRequest struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.cluster != null) {
        if (struct.isSetCluster()) {
          oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
          oprot.writeString(struct.cluster);
          oprot.writeFieldEnd();
        }
      }
      if (struct.user != null) {
        if (struct.isSetUser()) {
          oprot.writeFieldBegin(USER_FIELD_DESC);
          oprot.writeString(struct.user);
          oprot.writeFieldEnd();
        }
      }
      if (struct.passwd != null) {
        if (struct.isSetPasswd()) {
          oprot.writeFieldBegin(PASSWD_FIELD_DESC);
          oprot.writeString(struct.passwd);
          oprot.writeFieldEnd();
        }
      }
      if (struct.db != null) {
        if (struct.isSetDb()) {
          oprot.writeFieldBegin(DB_FIELD_DESC);
          oprot.writeString(struct.db);
          oprot.writeFieldEnd();
        }
      }
      if (struct.table != null) {
        if (struct.isSetTable()) {
          oprot.writeFieldBegin(TABLE_FIELD_DESC);
          oprot.writeString(struct.table);
          oprot.writeFieldEnd();
        }
      }
      if (struct.token != null) {
        if (struct.isSetToken()) {
          oprot.writeFieldBegin(TOKEN_FIELD_DESC);
          oprot.writeString(struct.token);
          oprot.writeFieldEnd();
        }
      }
      if (struct.label_name != null) {
        if (struct.isSetLabelName()) {
          oprot.writeFieldBegin(LABEL_NAME_FIELD_DESC);
          oprot.writeString(struct.label_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.repo_name != null) {
        if (struct.isSetRepoName()) {
          oprot.writeFieldBegin(REPO_NAME_FIELD_DESC);
          oprot.writeString(struct.repo_name);
          oprot.writeFieldEnd();
        }
      }
      if (struct.table_refs != null) {
        if (struct.isSetTableRefs()) {
          oprot.writeFieldBegin(TABLE_REFS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.table_refs.size()));
            for (TTableRef _iter615 : struct.table_refs)
            {
              _iter615.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.properties != null) {
        if (struct.isSetProperties()) {
          oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
          {
            oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
            for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter616 : struct.properties.entrySet())
            {
              oprot.writeString(_iter616.getKey());
              oprot.writeString(_iter616.getValue());
            }
            oprot.writeMapEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.meta != null) {
        if (struct.isSetMeta()) {
          oprot.writeFieldBegin(META_FIELD_DESC);
          oprot.writeBinary(struct.meta);
          oprot.writeFieldEnd();
        }
      }
      if (struct.job_info != null) {
        if (struct.isSetJobInfo()) {
          oprot.writeFieldBegin(JOB_INFO_FIELD_DESC);
          oprot.writeBinary(struct.job_info);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetCleanTables()) {
        oprot.writeFieldBegin(CLEAN_TABLES_FIELD_DESC);
        oprot.writeBool(struct.clean_tables);
        oprot.writeFieldEnd();
      }
      if (struct.isSetCleanPartitions()) {
        oprot.writeFieldBegin(CLEAN_PARTITIONS_FIELD_DESC);
        oprot.writeBool(struct.clean_partitions);
        oprot.writeFieldEnd();
      }
      if (struct.isSetAtomicRestore()) {
        oprot.writeFieldBegin(ATOMIC_RESTORE_FIELD_DESC);
        oprot.writeBool(struct.atomic_restore);
        oprot.writeFieldEnd();
      }
      if (struct.isSetCompressed()) {
        oprot.writeFieldBegin(COMPRESSED_FIELD_DESC);
        oprot.writeBool(struct.compressed);
        oprot.writeFieldEnd();
      }
      if (struct.isSetForceReplace()) {
        oprot.writeFieldBegin(FORCE_REPLACE_FIELD_DESC);
        oprot.writeBool(struct.force_replace);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class TRestoreSnapshotRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRestoreSnapshotRequest> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TRestoreSnapshotRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetCluster()) {
        optionals.set(0);
      }
      if (struct.isSetUser()) {
        optionals.set(1);
      }
      if (struct.isSetPasswd()) {
        optionals.set(2);
      }
      if (struct.isSetDb()) {
        optionals.set(3);
      }
      if (struct.isSetTable()) {
        optionals.set(4);
      }
      if (struct.isSetToken()) {
        optionals.set(5);
      }
      if (struct.isSetLabelName()) {
        optionals.set(6);
      }
      if (struct.isSetRepoName()) {
        optionals.set(7);
      }
      if (struct.isSetTableRefs()) {
        optionals.set(8);
      }
      if (struct.isSetProperties()) {
        optionals.set(9);
      }
      if (struct.isSetMeta()) {
        optionals.set(10);
      }
      if (struct.isSetJobInfo()) {
        optionals.set(11);
      }
      if (struct.isSetCleanTables()) {
        optionals.set(12);
      }
      if (struct.isSetCleanPartitions()) {
        optionals.set(13);
      }
      if (struct.isSetAtomicRestore()) {
        optionals.set(14);
      }
      if (struct.isSetCompressed()) {
        optionals.set(15);
      }
      if (struct.isSetForceReplace()) {
        optionals.set(16);
      }
      oprot.writeBitSet(optionals, 17);
      if (struct.isSetCluster()) {
        oprot.writeString(struct.cluster);
      }
      if (struct.isSetUser()) {
        oprot.writeString(struct.user);
      }
      if (struct.isSetPasswd()) {
        oprot.writeString(struct.passwd);
      }
      if (struct.isSetDb()) {
        oprot.writeString(struct.db);
      }
      if (struct.isSetTable()) {
        oprot.writeString(struct.table);
      }
      if (struct.isSetToken()) {
        oprot.writeString(struct.token);
      }
      if (struct.isSetLabelName()) {
        oprot.writeString(struct.label_name);
      }
      if (struct.isSetRepoName()) {
        oprot.writeString(struct.repo_name);
      }
      if (struct.isSetTableRefs()) {
        {
          oprot.writeI32(struct.table_refs.size());
          for (TTableRef _iter617 : struct.table_refs)
          {
            _iter617.write(oprot);
          }
        }
      }
      if (struct.isSetProperties()) {
        {
          oprot.writeI32(struct.properties.size());
          for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter618 : struct.properties.entrySet())
          {
            oprot.writeString(_iter618.getKey());
            oprot.writeString(_iter618.getValue());
          }
        }
      }
      if (struct.isSetMeta()) {
        oprot.writeBinary(struct.meta);
      }
      if (struct.isSetJobInfo()) {
        oprot.writeBinary(struct.job_info);
      }
      if (struct.isSetCleanTables()) {
        oprot.writeBool(struct.clean_tables);
      }
      if (struct.isSetCleanPartitions()) {
        oprot.writeBool(struct.clean_partitions);
      }
      if (struct.isSetAtomicRestore()) {
        oprot.writeBool(struct.atomic_restore);
      }
      if (struct.isSetCompressed()) {
        oprot.writeBool(struct.compressed);
      }
      if (struct.isSetForceReplace()) {
        oprot.writeBool(struct.force_replace);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TRestoreSnapshotRequest struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(17);
      if (incoming.get(0)) {
        struct.cluster = iprot.readString();
        struct.setClusterIsSet(true);
      }
      if (incoming.get(1)) {
        struct.user = iprot.readString();
        struct.setUserIsSet(true);
      }
      if (incoming.get(2)) {
        struct.passwd = iprot.readString();
        struct.setPasswdIsSet(true);
      }
      if (incoming.get(3)) {
        struct.db = iprot.readString();
        struct.setDbIsSet(true);
      }
      if (incoming.get(4)) {
        struct.table = iprot.readString();
        struct.setTableIsSet(true);
      }
      if (incoming.get(5)) {
        struct.token = iprot.readString();
        struct.setTokenIsSet(true);
      }
      if (incoming.get(6)) {
        struct.label_name = iprot.readString();
        struct.setLabelNameIsSet(true);
      }
      if (incoming.get(7)) {
        struct.repo_name = iprot.readString();
        struct.setRepoNameIsSet(true);
      }
      if (incoming.get(8)) {
        {
          org.apache.thrift.protocol.TList _list619 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.table_refs = new java.util.ArrayList<TTableRef>(_list619.size);
          @org.apache.thrift.annotation.Nullable TTableRef _elem620;
          for (int _i621 = 0; _i621 < _list619.size; ++_i621)
          {
            _elem620 = new TTableRef();
            _elem620.read(iprot);
            struct.table_refs.add(_elem620);
          }
        }
        struct.setTableRefsIsSet(true);
      }
      if (incoming.get(9)) {
        {
          org.apache.thrift.protocol.TMap _map622 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); 
          struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map622.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key623;
          @org.apache.thrift.annotation.Nullable java.lang.String _val624;
          for (int _i625 = 0; _i625 < _map622.size; ++_i625)
          {
            _key623 = iprot.readString();
            _val624 = iprot.readString();
            struct.properties.put(_key623, _val624);
          }
        }
        struct.setPropertiesIsSet(true);
      }
      if (incoming.get(10)) {
        struct.meta = iprot.readBinary();
        struct.setMetaIsSet(true);
      }
      if (incoming.get(11)) {
        struct.job_info = iprot.readBinary();
        struct.setJobInfoIsSet(true);
      }
      if (incoming.get(12)) {
        struct.clean_tables = iprot.readBool();
        struct.setCleanTablesIsSet(true);
      }
      if (incoming.get(13)) {
        struct.clean_partitions = iprot.readBool();
        struct.setCleanPartitionsIsSet(true);
      }
      if (incoming.get(14)) {
        struct.atomic_restore = iprot.readBool();
        struct.setAtomicRestoreIsSet(true);
      }
      if (incoming.get(15)) {
        struct.compressed = iprot.readBool();
        struct.setCompressedIsSet(true);
      }
      if (incoming.get(16)) {
        struct.force_replace = iprot.readBool();
        struct.setForceReplaceIsSet(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();
  }
}