/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package ytx;

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.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-3-30")
public class CSRInfo implements org.apache.thrift.TBase<CSRInfo, CSRInfo._Fields>, java.io.Serializable, Cloneable, Comparable<CSRInfo> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CSRInfo");

  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField JOB_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("jobNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField MEMO_FIELD_DESC = new org.apache.thrift.protocol.TField("memo", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField MAXIM_FIELD_DESC = new org.apache.thrift.protocol.TField("maxim", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField AVATAR_FIELD_DESC = new org.apache.thrift.protocol.TField("avatar", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField PHOTO_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("photoList", org.apache.thrift.protocol.TType.LIST, (short)7);
  private static final org.apache.thrift.protocol.TField CRM_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("crm_status", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField DEPARTMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("department", org.apache.thrift.protocol.TType.STRING, (short)10);
  private static final org.apache.thrift.protocol.TField GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("group", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.I32, (short)12);
  private static final org.apache.thrift.protocol.TField IS_RECOMMEND_FIELD_DESC = new org.apache.thrift.protocol.TField("isRecommend", org.apache.thrift.protocol.TType.BOOL, (short)13);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new CSRInfoStandardSchemeFactory());
    schemes.put(TupleScheme.class, new CSRInfoTupleSchemeFactory());
  }

  public int id; // required
  public String jobNumber; // required
  public String name; // required
  public String memo; // required
  public String maxim; // required
  public String avatar; // optional
  public List<String> photoList; // required
  public int crm_status; // required
  public int role; // required
  public String department; // required
  public String group; // optional
  public int level; // required
  public boolean isRecommend; // 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"),
    JOB_NUMBER((short)2, "jobNumber"),
    NAME((short)3, "name"),
    MEMO((short)4, "memo"),
    MAXIM((short)5, "maxim"),
    AVATAR((short)6, "avatar"),
    PHOTO_LIST((short)7, "photoList"),
    CRM_STATUS((short)8, "crm_status"),
    ROLE((short)9, "role"),
    DEPARTMENT((short)10, "department"),
    GROUP((short)11, "group"),
    LEVEL((short)12, "level"),
    IS_RECOMMEND((short)13, "isRecommend");

    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: // JOB_NUMBER
          return JOB_NUMBER;
        case 3: // NAME
          return NAME;
        case 4: // MEMO
          return MEMO;
        case 5: // MAXIM
          return MAXIM;
        case 6: // AVATAR
          return AVATAR;
        case 7: // PHOTO_LIST
          return PHOTO_LIST;
        case 8: // CRM_STATUS
          return CRM_STATUS;
        case 9: // ROLE
          return ROLE;
        case 10: // DEPARTMENT
          return DEPARTMENT;
        case 11: // GROUP
          return GROUP;
        case 12: // LEVEL
          return LEVEL;
        case 13: // IS_RECOMMEND
          return IS_RECOMMEND;
        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 __CRM_STATUS_ISSET_ID = 1;
  private static final int __ROLE_ISSET_ID = 2;
  private static final int __LEVEL_ISSET_ID = 3;
  private static final int __ISRECOMMEND_ISSET_ID = 4;
  private byte __isset_bitfield = 0;
  private static final _Fields optionals[] = {_Fields.AVATAR,_Fields.GROUP};
  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.I32)));
    tmpMap.put(_Fields.JOB_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("jobNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MEMO, new org.apache.thrift.meta_data.FieldMetaData("memo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MAXIM, new org.apache.thrift.meta_data.FieldMetaData("maxim", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.AVATAR, new org.apache.thrift.meta_data.FieldMetaData("avatar", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PHOTO_LIST, new org.apache.thrift.meta_data.FieldMetaData("photoList", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST        , "PhotoList")));
    tmpMap.put(_Fields.CRM_STATUS, new org.apache.thrift.meta_data.FieldMetaData("crm_status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.DEPARTMENT, new org.apache.thrift.meta_data.FieldMetaData("department", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.GROUP, new org.apache.thrift.meta_data.FieldMetaData("group", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.IS_RECOMMEND, new org.apache.thrift.meta_data.FieldMetaData("isRecommend", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CSRInfo.class, metaDataMap);
  }

  public CSRInfo() {
  }

  public CSRInfo(
    int id,
    String jobNumber,
    String name,
    String memo,
    String maxim,
    List<String> photoList,
    int crm_status,
    int role,
    String department,
    int level,
    boolean isRecommend)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.jobNumber = jobNumber;
    this.name = name;
    this.memo = memo;
    this.maxim = maxim;
    this.photoList = photoList;
    this.crm_status = crm_status;
    setCrm_statusIsSet(true);
    this.role = role;
    setRoleIsSet(true);
    this.department = department;
    this.level = level;
    setLevelIsSet(true);
    this.isRecommend = isRecommend;
    setIsRecommendIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public CSRInfo(CSRInfo other) {
    __isset_bitfield = other.__isset_bitfield;
    this.id = other.id;
    if (other.isSetJobNumber()) {
      this.jobNumber = other.jobNumber;
    }
    if (other.isSetName()) {
      this.name = other.name;
    }
    if (other.isSetMemo()) {
      this.memo = other.memo;
    }
    if (other.isSetMaxim()) {
      this.maxim = other.maxim;
    }
    if (other.isSetAvatar()) {
      this.avatar = other.avatar;
    }
    if (other.isSetPhotoList()) {
      this.photoList = other.photoList;
    }
    this.crm_status = other.crm_status;
    this.role = other.role;
    if (other.isSetDepartment()) {
      this.department = other.department;
    }
    if (other.isSetGroup()) {
      this.group = other.group;
    }
    this.level = other.level;
    this.isRecommend = other.isRecommend;
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.jobNumber = null;
    this.name = null;
    this.memo = null;
    this.maxim = null;
    this.avatar = null;
    this.photoList = null;
    setCrm_statusIsSet(false);
    this.crm_status = 0;
    setRoleIsSet(false);
    this.role = 0;
    this.department = null;
    this.group = null;
    setLevelIsSet(false);
    this.level = 0;
    setIsRecommendIsSet(false);
    this.isRecommend = false;
  }

  public int getId() {
    return this.id;
  }

  public CSRInfo setId(int 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 String getJobNumber() {
    return this.jobNumber;
  }

  public CSRInfo setJobNumber(String jobNumber) {
    this.jobNumber = jobNumber;
    return this;
  }

  public void unsetJobNumber() {
    this.jobNumber = null;
  }

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

  public void setJobNumberIsSet(boolean value) {
    if (!value) {
      this.jobNumber = null;
    }
  }

  public String getName() {
    return this.name;
  }

  public CSRInfo setName(String name) {
    this.name = name;
    return this;
  }

  public void unsetName() {
    this.name = null;
  }

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

  public void setNameIsSet(boolean value) {
    if (!value) {
      this.name = null;
    }
  }

  public String getMemo() {
    return this.memo;
  }

  public CSRInfo setMemo(String memo) {
    this.memo = memo;
    return this;
  }

  public void unsetMemo() {
    this.memo = null;
  }

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

  public void setMemoIsSet(boolean value) {
    if (!value) {
      this.memo = null;
    }
  }

  public String getMaxim() {
    return this.maxim;
  }

  public CSRInfo setMaxim(String maxim) {
    this.maxim = maxim;
    return this;
  }

  public void unsetMaxim() {
    this.maxim = null;
  }

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

  public void setMaximIsSet(boolean value) {
    if (!value) {
      this.maxim = null;
    }
  }

  public String getAvatar() {
    return this.avatar;
  }

  public CSRInfo setAvatar(String avatar) {
    this.avatar = avatar;
    return this;
  }

  public void unsetAvatar() {
    this.avatar = null;
  }

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

  public void setAvatarIsSet(boolean value) {
    if (!value) {
      this.avatar = null;
    }
  }

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

  public java.util.Iterator<String> getPhotoListIterator() {
    return (this.photoList == null) ? null : this.photoList.iterator();
  }

  public void addToPhotoList(String elem) {
    if (this.photoList == null) {
      this.photoList = new ArrayList<String>();
    }
    this.photoList.add(elem);
  }

  public List<String> getPhotoList() {
    return this.photoList;
  }

  public CSRInfo setPhotoList(List<String> photoList) {
    this.photoList = photoList;
    return this;
  }

  public void unsetPhotoList() {
    this.photoList = null;
  }

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

  public void setPhotoListIsSet(boolean value) {
    if (!value) {
      this.photoList = null;
    }
  }

  public int getCrm_status() {
    return this.crm_status;
  }

  public CSRInfo setCrm_status(int crm_status) {
    this.crm_status = crm_status;
    setCrm_statusIsSet(true);
    return this;
  }

  public void unsetCrm_status() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CRM_STATUS_ISSET_ID);
  }

  /** Returns true if field crm_status is set (has been assigned a value) and false otherwise */
  public boolean isSetCrm_status() {
    return EncodingUtils.testBit(__isset_bitfield, __CRM_STATUS_ISSET_ID);
  }

  public void setCrm_statusIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CRM_STATUS_ISSET_ID, value);
  }

  public int getRole() {
    return this.role;
  }

  public CSRInfo setRole(int role) {
    this.role = role;
    setRoleIsSet(true);
    return this;
  }

  public void unsetRole() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ROLE_ISSET_ID);
  }

  /** Returns true if field role is set (has been assigned a value) and false otherwise */
  public boolean isSetRole() {
    return EncodingUtils.testBit(__isset_bitfield, __ROLE_ISSET_ID);
  }

  public void setRoleIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ROLE_ISSET_ID, value);
  }

  public String getDepartment() {
    return this.department;
  }

  public CSRInfo setDepartment(String department) {
    this.department = department;
    return this;
  }

  public void unsetDepartment() {
    this.department = null;
  }

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

  public void setDepartmentIsSet(boolean value) {
    if (!value) {
      this.department = null;
    }
  }

  public String getGroup() {
    return this.group;
  }

  public CSRInfo setGroup(String group) {
    this.group = group;
    return this;
  }

  public void unsetGroup() {
    this.group = null;
  }

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

  public void setGroupIsSet(boolean value) {
    if (!value) {
      this.group = null;
    }
  }

  public int getLevel() {
    return this.level;
  }

  public CSRInfo setLevel(int level) {
    this.level = level;
    setLevelIsSet(true);
    return this;
  }

  public void unsetLevel() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LEVEL_ISSET_ID);
  }

  /** Returns true if field level is set (has been assigned a value) and false otherwise */
  public boolean isSetLevel() {
    return EncodingUtils.testBit(__isset_bitfield, __LEVEL_ISSET_ID);
  }

  public void setLevelIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LEVEL_ISSET_ID, value);
  }

  public boolean isIsRecommend() {
    return this.isRecommend;
  }

  public CSRInfo setIsRecommend(boolean isRecommend) {
    this.isRecommend = isRecommend;
    setIsRecommendIsSet(true);
    return this;
  }

  public void unsetIsRecommend() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRECOMMEND_ISSET_ID);
  }

  /** Returns true if field isRecommend is set (has been assigned a value) and false otherwise */
  public boolean isSetIsRecommend() {
    return EncodingUtils.testBit(__isset_bitfield, __ISRECOMMEND_ISSET_ID);
  }

  public void setIsRecommendIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRECOMMEND_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((Integer)value);
      }
      break;

    case JOB_NUMBER:
      if (value == null) {
        unsetJobNumber();
      } else {
        setJobNumber((String)value);
      }
      break;

    case NAME:
      if (value == null) {
        unsetName();
      } else {
        setName((String)value);
      }
      break;

    case MEMO:
      if (value == null) {
        unsetMemo();
      } else {
        setMemo((String)value);
      }
      break;

    case MAXIM:
      if (value == null) {
        unsetMaxim();
      } else {
        setMaxim((String)value);
      }
      break;

    case AVATAR:
      if (value == null) {
        unsetAvatar();
      } else {
        setAvatar((String)value);
      }
      break;

    case PHOTO_LIST:
      if (value == null) {
        unsetPhotoList();
      } else {
        setPhotoList((List<String>)value);
      }
      break;

    case CRM_STATUS:
      if (value == null) {
        unsetCrm_status();
      } else {
        setCrm_status((Integer)value);
      }
      break;

    case ROLE:
      if (value == null) {
        unsetRole();
      } else {
        setRole((Integer)value);
      }
      break;

    case DEPARTMENT:
      if (value == null) {
        unsetDepartment();
      } else {
        setDepartment((String)value);
      }
      break;

    case GROUP:
      if (value == null) {
        unsetGroup();
      } else {
        setGroup((String)value);
      }
      break;

    case LEVEL:
      if (value == null) {
        unsetLevel();
      } else {
        setLevel((Integer)value);
      }
      break;

    case IS_RECOMMEND:
      if (value == null) {
        unsetIsRecommend();
      } else {
        setIsRecommend((Boolean)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case ID:
      return Integer.valueOf(getId());

    case JOB_NUMBER:
      return getJobNumber();

    case NAME:
      return getName();

    case MEMO:
      return getMemo();

    case MAXIM:
      return getMaxim();

    case AVATAR:
      return getAvatar();

    case PHOTO_LIST:
      return getPhotoList();

    case CRM_STATUS:
      return Integer.valueOf(getCrm_status());

    case ROLE:
      return Integer.valueOf(getRole());

    case DEPARTMENT:
      return getDepartment();

    case GROUP:
      return getGroup();

    case LEVEL:
      return Integer.valueOf(getLevel());

    case IS_RECOMMEND:
      return Boolean.valueOf(isIsRecommend());

    }
    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 JOB_NUMBER:
      return isSetJobNumber();
    case NAME:
      return isSetName();
    case MEMO:
      return isSetMemo();
    case MAXIM:
      return isSetMaxim();
    case AVATAR:
      return isSetAvatar();
    case PHOTO_LIST:
      return isSetPhotoList();
    case CRM_STATUS:
      return isSetCrm_status();
    case ROLE:
      return isSetRole();
    case DEPARTMENT:
      return isSetDepartment();
    case GROUP:
      return isSetGroup();
    case LEVEL:
      return isSetLevel();
    case IS_RECOMMEND:
      return isSetIsRecommend();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof CSRInfo)
      return this.equals((CSRInfo)that);
    return false;
  }

  public boolean equals(CSRInfo 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_jobNumber = true && this.isSetJobNumber();
    boolean that_present_jobNumber = true && that.isSetJobNumber();
    if (this_present_jobNumber || that_present_jobNumber) {
      if (!(this_present_jobNumber && that_present_jobNumber))
        return false;
      if (!this.jobNumber.equals(that.jobNumber))
        return false;
    }

    boolean this_present_name = true && this.isSetName();
    boolean that_present_name = true && that.isSetName();
    if (this_present_name || that_present_name) {
      if (!(this_present_name && that_present_name))
        return false;
      if (!this.name.equals(that.name))
        return false;
    }

    boolean this_present_memo = true && this.isSetMemo();
    boolean that_present_memo = true && that.isSetMemo();
    if (this_present_memo || that_present_memo) {
      if (!(this_present_memo && that_present_memo))
        return false;
      if (!this.memo.equals(that.memo))
        return false;
    }

    boolean this_present_maxim = true && this.isSetMaxim();
    boolean that_present_maxim = true && that.isSetMaxim();
    if (this_present_maxim || that_present_maxim) {
      if (!(this_present_maxim && that_present_maxim))
        return false;
      if (!this.maxim.equals(that.maxim))
        return false;
    }

    boolean this_present_avatar = true && this.isSetAvatar();
    boolean that_present_avatar = true && that.isSetAvatar();
    if (this_present_avatar || that_present_avatar) {
      if (!(this_present_avatar && that_present_avatar))
        return false;
      if (!this.avatar.equals(that.avatar))
        return false;
    }

    boolean this_present_photoList = true && this.isSetPhotoList();
    boolean that_present_photoList = true && that.isSetPhotoList();
    if (this_present_photoList || that_present_photoList) {
      if (!(this_present_photoList && that_present_photoList))
        return false;
      if (!this.photoList.equals(that.photoList))
        return false;
    }

    boolean this_present_crm_status = true;
    boolean that_present_crm_status = true;
    if (this_present_crm_status || that_present_crm_status) {
      if (!(this_present_crm_status && that_present_crm_status))
        return false;
      if (this.crm_status != that.crm_status)
        return false;
    }

    boolean this_present_role = true;
    boolean that_present_role = true;
    if (this_present_role || that_present_role) {
      if (!(this_present_role && that_present_role))
        return false;
      if (this.role != that.role)
        return false;
    }

    boolean this_present_department = true && this.isSetDepartment();
    boolean that_present_department = true && that.isSetDepartment();
    if (this_present_department || that_present_department) {
      if (!(this_present_department && that_present_department))
        return false;
      if (!this.department.equals(that.department))
        return false;
    }

    boolean this_present_group = true && this.isSetGroup();
    boolean that_present_group = true && that.isSetGroup();
    if (this_present_group || that_present_group) {
      if (!(this_present_group && that_present_group))
        return false;
      if (!this.group.equals(that.group))
        return false;
    }

    boolean this_present_level = true;
    boolean that_present_level = true;
    if (this_present_level || that_present_level) {
      if (!(this_present_level && that_present_level))
        return false;
      if (this.level != that.level)
        return false;
    }

    boolean this_present_isRecommend = true;
    boolean that_present_isRecommend = true;
    if (this_present_isRecommend || that_present_isRecommend) {
      if (!(this_present_isRecommend && that_present_isRecommend))
        return false;
      if (this.isRecommend != that.isRecommend)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List<Object> list = new ArrayList<Object>();

    boolean present_id = true;
    list.add(present_id);
    if (present_id)
      list.add(id);

    boolean present_jobNumber = true && (isSetJobNumber());
    list.add(present_jobNumber);
    if (present_jobNumber)
      list.add(jobNumber);

    boolean present_name = true && (isSetName());
    list.add(present_name);
    if (present_name)
      list.add(name);

    boolean present_memo = true && (isSetMemo());
    list.add(present_memo);
    if (present_memo)
      list.add(memo);

    boolean present_maxim = true && (isSetMaxim());
    list.add(present_maxim);
    if (present_maxim)
      list.add(maxim);

    boolean present_avatar = true && (isSetAvatar());
    list.add(present_avatar);
    if (present_avatar)
      list.add(avatar);

    boolean present_photoList = true && (isSetPhotoList());
    list.add(present_photoList);
    if (present_photoList)
      list.add(photoList);

    boolean present_crm_status = true;
    list.add(present_crm_status);
    if (present_crm_status)
      list.add(crm_status);

    boolean present_role = true;
    list.add(present_role);
    if (present_role)
      list.add(role);

    boolean present_department = true && (isSetDepartment());
    list.add(present_department);
    if (present_department)
      list.add(department);

    boolean present_group = true && (isSetGroup());
    list.add(present_group);
    if (present_group)
      list.add(group);

    boolean present_level = true;
    list.add(present_level);
    if (present_level)
      list.add(level);

    boolean present_isRecommend = true;
    list.add(present_isRecommend);
    if (present_isRecommend)
      list.add(isRecommend);

    return list.hashCode();
  }

  @Override
  public int compareTo(CSRInfo 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(isSetJobNumber()).compareTo(other.isSetJobNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetJobNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobNumber, other.jobNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMemo()).compareTo(other.isSetMemo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMemo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.memo, other.memo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxim()).compareTo(other.isSetMaxim());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxim()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxim, other.maxim);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAvatar()).compareTo(other.isSetAvatar());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAvatar()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avatar, other.avatar);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPhotoList()).compareTo(other.isSetPhotoList());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPhotoList()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.photoList, other.photoList);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCrm_status()).compareTo(other.isSetCrm_status());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCrm_status()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crm_status, other.crm_status);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRole()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDepartment()).compareTo(other.isSetDepartment());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDepartment()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.department, other.department);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGroup()).compareTo(other.isSetGroup());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGroup()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.group, other.group);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLevel()).compareTo(other.isSetLevel());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLevel()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, other.level);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsRecommend()).compareTo(other.isSetIsRecommend());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsRecommend()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isRecommend, other.isRecommend);
      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("CSRInfo(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("jobNumber:");
    if (this.jobNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.jobNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("name:");
    if (this.name == null) {
      sb.append("null");
    } else {
      sb.append(this.name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("memo:");
    if (this.memo == null) {
      sb.append("null");
    } else {
      sb.append(this.memo);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("maxim:");
    if (this.maxim == null) {
      sb.append("null");
    } else {
      sb.append(this.maxim);
    }
    first = false;
    if (isSetAvatar()) {
      if (!first) sb.append(", ");
      sb.append("avatar:");
      if (this.avatar == null) {
        sb.append("null");
      } else {
        sb.append(this.avatar);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("photoList:");
    if (this.photoList == null) {
      sb.append("null");
    } else {
      sb.append(this.photoList);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("crm_status:");
    sb.append(this.crm_status);
    first = false;
    if (!first) sb.append(", ");
    sb.append("role:");
    sb.append(this.role);
    first = false;
    if (!first) sb.append(", ");
    sb.append("department:");
    if (this.department == null) {
      sb.append("null");
    } else {
      sb.append(this.department);
    }
    first = false;
    if (isSetGroup()) {
      if (!first) sb.append(", ");
      sb.append("group:");
      if (this.group == null) {
        sb.append("null");
      } else {
        sb.append(this.group);
      }
      first = false;
    }
    if (!first) sb.append(", ");
    sb.append("level:");
    sb.append(this.level);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isRecommend:");
    sb.append(this.isRecommend);
    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 CSRInfoStandardSchemeFactory implements SchemeFactory {
    public CSRInfoStandardScheme getScheme() {
      return new CSRInfoStandardScheme();
    }
  }

  private static class CSRInfoStandardScheme extends StandardScheme<CSRInfo> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, CSRInfo 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.I32) {
              struct.id = iprot.readI32();
              struct.setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // JOB_NUMBER
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.jobNumber = iprot.readString();
              struct.setJobNumberIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.name = iprot.readString();
              struct.setNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // MEMO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.memo = iprot.readString();
              struct.setMemoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // MAXIM
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.maxim = iprot.readString();
              struct.setMaximIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // AVATAR
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.avatar = iprot.readString();
              struct.setAvatarIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // PHOTO_LIST
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                struct.photoList = new ArrayList<String>(_list0.size);
                String _elem1;
                for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                {
                  _elem1 = iprot.readString();
                  struct.photoList.add(_elem1);
                }
                iprot.readListEnd();
              }
              struct.setPhotoListIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // CRM_STATUS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.crm_status = iprot.readI32();
              struct.setCrm_statusIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // ROLE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.role = iprot.readI32();
              struct.setRoleIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // DEPARTMENT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.department = iprot.readString();
              struct.setDepartmentIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // GROUP
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.group = iprot.readString();
              struct.setGroupIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // LEVEL
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.level = iprot.readI32();
              struct.setLevelIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // IS_RECOMMEND
            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
              struct.isRecommend = iprot.readBool();
              struct.setIsRecommendIsSet(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, CSRInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI32(struct.id);
      oprot.writeFieldEnd();
      if (struct.jobNumber != null) {
        oprot.writeFieldBegin(JOB_NUMBER_FIELD_DESC);
        oprot.writeString(struct.jobNumber);
        oprot.writeFieldEnd();
      }
      if (struct.name != null) {
        oprot.writeFieldBegin(NAME_FIELD_DESC);
        oprot.writeString(struct.name);
        oprot.writeFieldEnd();
      }
      if (struct.memo != null) {
        oprot.writeFieldBegin(MEMO_FIELD_DESC);
        oprot.writeString(struct.memo);
        oprot.writeFieldEnd();
      }
      if (struct.maxim != null) {
        oprot.writeFieldBegin(MAXIM_FIELD_DESC);
        oprot.writeString(struct.maxim);
        oprot.writeFieldEnd();
      }
      if (struct.avatar != null) {
        if (struct.isSetAvatar()) {
          oprot.writeFieldBegin(AVATAR_FIELD_DESC);
          oprot.writeString(struct.avatar);
          oprot.writeFieldEnd();
        }
      }
      if (struct.photoList != null) {
        oprot.writeFieldBegin(PHOTO_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.photoList.size()));
          for (String _iter3 : struct.photoList)
          {
            oprot.writeString(_iter3);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(CRM_STATUS_FIELD_DESC);
      oprot.writeI32(struct.crm_status);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ROLE_FIELD_DESC);
      oprot.writeI32(struct.role);
      oprot.writeFieldEnd();
      if (struct.department != null) {
        oprot.writeFieldBegin(DEPARTMENT_FIELD_DESC);
        oprot.writeString(struct.department);
        oprot.writeFieldEnd();
      }
      if (struct.group != null) {
        if (struct.isSetGroup()) {
          oprot.writeFieldBegin(GROUP_FIELD_DESC);
          oprot.writeString(struct.group);
          oprot.writeFieldEnd();
        }
      }
      oprot.writeFieldBegin(LEVEL_FIELD_DESC);
      oprot.writeI32(struct.level);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IS_RECOMMEND_FIELD_DESC);
      oprot.writeBool(struct.isRecommend);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class CSRInfoTupleSchemeFactory implements SchemeFactory {
    public CSRInfoTupleScheme getScheme() {
      return new CSRInfoTupleScheme();
    }
  }

  private static class CSRInfoTupleScheme extends TupleScheme<CSRInfo> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, CSRInfo struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetId()) {
        optionals.set(0);
      }
      if (struct.isSetJobNumber()) {
        optionals.set(1);
      }
      if (struct.isSetName()) {
        optionals.set(2);
      }
      if (struct.isSetMemo()) {
        optionals.set(3);
      }
      if (struct.isSetMaxim()) {
        optionals.set(4);
      }
      if (struct.isSetAvatar()) {
        optionals.set(5);
      }
      if (struct.isSetPhotoList()) {
        optionals.set(6);
      }
      if (struct.isSetCrm_status()) {
        optionals.set(7);
      }
      if (struct.isSetRole()) {
        optionals.set(8);
      }
      if (struct.isSetDepartment()) {
        optionals.set(9);
      }
      if (struct.isSetGroup()) {
        optionals.set(10);
      }
      if (struct.isSetLevel()) {
        optionals.set(11);
      }
      if (struct.isSetIsRecommend()) {
        optionals.set(12);
      }
      oprot.writeBitSet(optionals, 13);
      if (struct.isSetId()) {
        oprot.writeI32(struct.id);
      }
      if (struct.isSetJobNumber()) {
        oprot.writeString(struct.jobNumber);
      }
      if (struct.isSetName()) {
        oprot.writeString(struct.name);
      }
      if (struct.isSetMemo()) {
        oprot.writeString(struct.memo);
      }
      if (struct.isSetMaxim()) {
        oprot.writeString(struct.maxim);
      }
      if (struct.isSetAvatar()) {
        oprot.writeString(struct.avatar);
      }
      if (struct.isSetPhotoList()) {
        {
          oprot.writeI32(struct.photoList.size());
          for (String _iter4 : struct.photoList)
          {
            oprot.writeString(_iter4);
          }
        }
      }
      if (struct.isSetCrm_status()) {
        oprot.writeI32(struct.crm_status);
      }
      if (struct.isSetRole()) {
        oprot.writeI32(struct.role);
      }
      if (struct.isSetDepartment()) {
        oprot.writeString(struct.department);
      }
      if (struct.isSetGroup()) {
        oprot.writeString(struct.group);
      }
      if (struct.isSetLevel()) {
        oprot.writeI32(struct.level);
      }
      if (struct.isSetIsRecommend()) {
        oprot.writeBool(struct.isRecommend);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, CSRInfo struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(13);
      if (incoming.get(0)) {
        struct.id = iprot.readI32();
        struct.setIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.jobNumber = iprot.readString();
        struct.setJobNumberIsSet(true);
      }
      if (incoming.get(2)) {
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
      if (incoming.get(3)) {
        struct.memo = iprot.readString();
        struct.setMemoIsSet(true);
      }
      if (incoming.get(4)) {
        struct.maxim = iprot.readString();
        struct.setMaximIsSet(true);
      }
      if (incoming.get(5)) {
        struct.avatar = iprot.readString();
        struct.setAvatarIsSet(true);
      }
      if (incoming.get(6)) {
        {
          org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.photoList = new ArrayList<String>(_list5.size);
          String _elem6;
          for (int _i7 = 0; _i7 < _list5.size; ++_i7)
          {
            _elem6 = iprot.readString();
            struct.photoList.add(_elem6);
          }
        }
        struct.setPhotoListIsSet(true);
      }
      if (incoming.get(7)) {
        struct.crm_status = iprot.readI32();
        struct.setCrm_statusIsSet(true);
      }
      if (incoming.get(8)) {
        struct.role = iprot.readI32();
        struct.setRoleIsSet(true);
      }
      if (incoming.get(9)) {
        struct.department = iprot.readString();
        struct.setDepartmentIsSet(true);
      }
      if (incoming.get(10)) {
        struct.group = iprot.readString();
        struct.setGroupIsSet(true);
      }
      if (incoming.get(11)) {
        struct.level = iprot.readI32();
        struct.setLevelIsSet(true);
      }
      if (incoming.get(12)) {
        struct.isRecommend = iprot.readBool();
        struct.setIsRecommendIsSet(true);
      }
    }
  }

}

