All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cicada.departdriver.config.MemberUserInfo Maven / Gradle / Ivy

There is a newer version: 1.0.0.7
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.10.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package cicada.departdriver.config;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)", date = "2017-06-19")
public class MemberUserInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MemberUserInfo");

  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("UserID", org.apache.thrift.protocol.TType.STRING, (short)1);
  private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("UserName", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField MOBILE_FIELD_DESC = new org.apache.thrift.protocol.TField("Mobile", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField ENTERPRISE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("EnterpriseID", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField DEPARTMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("DepartmentID", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField DEPARTMENT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("DepartmentName", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField USER_IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("UserImage", org.apache.thrift.protocol.TType.STRING, (short)7);

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

  public java.lang.String UserID; // required
  public java.lang.String UserName; // required
  public java.lang.String Mobile; // required
  public java.lang.String EnterpriseID; // required
  public java.lang.String DepartmentID; // required
  public java.lang.String DepartmentName; // required
  public java.lang.String UserImage; // 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 {
    USER_ID((short)1, "UserID"),
    USER_NAME((short)2, "UserName"),
    MOBILE((short)3, "Mobile"),
    ENTERPRISE_ID((short)4, "EnterpriseID"),
    DEPARTMENT_ID((short)5, "DepartmentID"),
    DEPARTMENT_NAME((short)6, "DepartmentName"),
    USER_IMAGE((short)7, "UserImage");

    private static final java.util.Map byName = new java.util.HashMap();

    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.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // USER_ID
          return USER_ID;
        case 2: // USER_NAME
          return USER_NAME;
        case 3: // MOBILE
          return MOBILE;
        case 4: // ENTERPRISE_ID
          return ENTERPRISE_ID;
        case 5: // DEPARTMENT_ID
          return DEPARTMENT_ID;
        case 6: // DEPARTMENT_NAME
          return DEPARTMENT_NAME;
        case 7: // USER_IMAGE
          return USER_IMAGE;
        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.
     */
    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
  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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("UserID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("UserName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.MOBILE, new org.apache.thrift.meta_data.FieldMetaData("Mobile", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ENTERPRISE_ID, new org.apache.thrift.meta_data.FieldMetaData("EnterpriseID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DEPARTMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("DepartmentID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DEPARTMENT_NAME, new org.apache.thrift.meta_data.FieldMetaData("DepartmentName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.USER_IMAGE, new org.apache.thrift.meta_data.FieldMetaData("UserImage", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MemberUserInfo.class, metaDataMap);
  }

  public MemberUserInfo() {
  }

  public MemberUserInfo(
    java.lang.String UserID,
    java.lang.String UserName,
    java.lang.String Mobile,
    java.lang.String EnterpriseID,
    java.lang.String DepartmentID,
    java.lang.String DepartmentName,
    java.lang.String UserImage)
  {
    this();
    this.UserID = UserID;
    this.UserName = UserName;
    this.Mobile = Mobile;
    this.EnterpriseID = EnterpriseID;
    this.DepartmentID = DepartmentID;
    this.DepartmentName = DepartmentName;
    this.UserImage = UserImage;
  }

  /**
   * Performs a deep copy on other.
   */
  public MemberUserInfo(MemberUserInfo other) {
    if (other.isSetUserID()) {
      this.UserID = other.UserID;
    }
    if (other.isSetUserName()) {
      this.UserName = other.UserName;
    }
    if (other.isSetMobile()) {
      this.Mobile = other.Mobile;
    }
    if (other.isSetEnterpriseID()) {
      this.EnterpriseID = other.EnterpriseID;
    }
    if (other.isSetDepartmentID()) {
      this.DepartmentID = other.DepartmentID;
    }
    if (other.isSetDepartmentName()) {
      this.DepartmentName = other.DepartmentName;
    }
    if (other.isSetUserImage()) {
      this.UserImage = other.UserImage;
    }
  }

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

  @Override
  public void clear() {
    this.UserID = null;
    this.UserName = null;
    this.Mobile = null;
    this.EnterpriseID = null;
    this.DepartmentID = null;
    this.DepartmentName = null;
    this.UserImage = null;
  }

  public java.lang.String getUserID() {
    return this.UserID;
  }

  public MemberUserInfo setUserID(java.lang.String UserID) {
    this.UserID = UserID;
    return this;
  }

  public void unsetUserID() {
    this.UserID = null;
  }

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

  public void setUserIDIsSet(boolean value) {
    if (!value) {
      this.UserID = null;
    }
  }

  public java.lang.String getUserName() {
    return this.UserName;
  }

  public MemberUserInfo setUserName(java.lang.String UserName) {
    this.UserName = UserName;
    return this;
  }

  public void unsetUserName() {
    this.UserName = null;
  }

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

  public void setUserNameIsSet(boolean value) {
    if (!value) {
      this.UserName = null;
    }
  }

  public java.lang.String getMobile() {
    return this.Mobile;
  }

  public MemberUserInfo setMobile(java.lang.String Mobile) {
    this.Mobile = Mobile;
    return this;
  }

  public void unsetMobile() {
    this.Mobile = null;
  }

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

  public void setMobileIsSet(boolean value) {
    if (!value) {
      this.Mobile = null;
    }
  }

  public java.lang.String getEnterpriseID() {
    return this.EnterpriseID;
  }

  public MemberUserInfo setEnterpriseID(java.lang.String EnterpriseID) {
    this.EnterpriseID = EnterpriseID;
    return this;
  }

  public void unsetEnterpriseID() {
    this.EnterpriseID = null;
  }

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

  public void setEnterpriseIDIsSet(boolean value) {
    if (!value) {
      this.EnterpriseID = null;
    }
  }

  public java.lang.String getDepartmentID() {
    return this.DepartmentID;
  }

  public MemberUserInfo setDepartmentID(java.lang.String DepartmentID) {
    this.DepartmentID = DepartmentID;
    return this;
  }

  public void unsetDepartmentID() {
    this.DepartmentID = null;
  }

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

  public void setDepartmentIDIsSet(boolean value) {
    if (!value) {
      this.DepartmentID = null;
    }
  }

  public java.lang.String getDepartmentName() {
    return this.DepartmentName;
  }

  public MemberUserInfo setDepartmentName(java.lang.String DepartmentName) {
    this.DepartmentName = DepartmentName;
    return this;
  }

  public void unsetDepartmentName() {
    this.DepartmentName = null;
  }

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

  public void setDepartmentNameIsSet(boolean value) {
    if (!value) {
      this.DepartmentName = null;
    }
  }

  public java.lang.String getUserImage() {
    return this.UserImage;
  }

  public MemberUserInfo setUserImage(java.lang.String UserImage) {
    this.UserImage = UserImage;
    return this;
  }

  public void unsetUserImage() {
    this.UserImage = null;
  }

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

  public void setUserImageIsSet(boolean value) {
    if (!value) {
      this.UserImage = null;
    }
  }

  public void setFieldValue(_Fields field, java.lang.Object value) {
    switch (field) {
    case USER_ID:
      if (value == null) {
        unsetUserID();
      } else {
        setUserID((java.lang.String)value);
      }
      break;

    case USER_NAME:
      if (value == null) {
        unsetUserName();
      } else {
        setUserName((java.lang.String)value);
      }
      break;

    case MOBILE:
      if (value == null) {
        unsetMobile();
      } else {
        setMobile((java.lang.String)value);
      }
      break;

    case ENTERPRISE_ID:
      if (value == null) {
        unsetEnterpriseID();
      } else {
        setEnterpriseID((java.lang.String)value);
      }
      break;

    case DEPARTMENT_ID:
      if (value == null) {
        unsetDepartmentID();
      } else {
        setDepartmentID((java.lang.String)value);
      }
      break;

    case DEPARTMENT_NAME:
      if (value == null) {
        unsetDepartmentName();
      } else {
        setDepartmentName((java.lang.String)value);
      }
      break;

    case USER_IMAGE:
      if (value == null) {
        unsetUserImage();
      } else {
        setUserImage((java.lang.String)value);
      }
      break;

    }
  }

  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case USER_ID:
      return getUserID();

    case USER_NAME:
      return getUserName();

    case MOBILE:
      return getMobile();

    case ENTERPRISE_ID:
      return getEnterpriseID();

    case DEPARTMENT_ID:
      return getDepartmentID();

    case DEPARTMENT_NAME:
      return getDepartmentName();

    case USER_IMAGE:
      return getUserImage();

    }
    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 USER_ID:
      return isSetUserID();
    case USER_NAME:
      return isSetUserName();
    case MOBILE:
      return isSetMobile();
    case ENTERPRISE_ID:
      return isSetEnterpriseID();
    case DEPARTMENT_ID:
      return isSetDepartmentID();
    case DEPARTMENT_NAME:
      return isSetDepartmentName();
    case USER_IMAGE:
      return isSetUserImage();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    boolean this_present_UserID = true && this.isSetUserID();
    boolean that_present_UserID = true && that.isSetUserID();
    if (this_present_UserID || that_present_UserID) {
      if (!(this_present_UserID && that_present_UserID))
        return false;
      if (!this.UserID.equals(that.UserID))
        return false;
    }

    boolean this_present_UserName = true && this.isSetUserName();
    boolean that_present_UserName = true && that.isSetUserName();
    if (this_present_UserName || that_present_UserName) {
      if (!(this_present_UserName && that_present_UserName))
        return false;
      if (!this.UserName.equals(that.UserName))
        return false;
    }

    boolean this_present_Mobile = true && this.isSetMobile();
    boolean that_present_Mobile = true && that.isSetMobile();
    if (this_present_Mobile || that_present_Mobile) {
      if (!(this_present_Mobile && that_present_Mobile))
        return false;
      if (!this.Mobile.equals(that.Mobile))
        return false;
    }

    boolean this_present_EnterpriseID = true && this.isSetEnterpriseID();
    boolean that_present_EnterpriseID = true && that.isSetEnterpriseID();
    if (this_present_EnterpriseID || that_present_EnterpriseID) {
      if (!(this_present_EnterpriseID && that_present_EnterpriseID))
        return false;
      if (!this.EnterpriseID.equals(that.EnterpriseID))
        return false;
    }

    boolean this_present_DepartmentID = true && this.isSetDepartmentID();
    boolean that_present_DepartmentID = true && that.isSetDepartmentID();
    if (this_present_DepartmentID || that_present_DepartmentID) {
      if (!(this_present_DepartmentID && that_present_DepartmentID))
        return false;
      if (!this.DepartmentID.equals(that.DepartmentID))
        return false;
    }

    boolean this_present_DepartmentName = true && this.isSetDepartmentName();
    boolean that_present_DepartmentName = true && that.isSetDepartmentName();
    if (this_present_DepartmentName || that_present_DepartmentName) {
      if (!(this_present_DepartmentName && that_present_DepartmentName))
        return false;
      if (!this.DepartmentName.equals(that.DepartmentName))
        return false;
    }

    boolean this_present_UserImage = true && this.isSetUserImage();
    boolean that_present_UserImage = true && that.isSetUserImage();
    if (this_present_UserImage || that_present_UserImage) {
      if (!(this_present_UserImage && that_present_UserImage))
        return false;
      if (!this.UserImage.equals(that.UserImage))
        return false;
    }

    return true;
  }

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

    hashCode = hashCode * 8191 + ((isSetUserID()) ? 131071 : 524287);
    if (isSetUserID())
      hashCode = hashCode * 8191 + UserID.hashCode();

    hashCode = hashCode * 8191 + ((isSetUserName()) ? 131071 : 524287);
    if (isSetUserName())
      hashCode = hashCode * 8191 + UserName.hashCode();

    hashCode = hashCode * 8191 + ((isSetMobile()) ? 131071 : 524287);
    if (isSetMobile())
      hashCode = hashCode * 8191 + Mobile.hashCode();

    hashCode = hashCode * 8191 + ((isSetEnterpriseID()) ? 131071 : 524287);
    if (isSetEnterpriseID())
      hashCode = hashCode * 8191 + EnterpriseID.hashCode();

    hashCode = hashCode * 8191 + ((isSetDepartmentID()) ? 131071 : 524287);
    if (isSetDepartmentID())
      hashCode = hashCode * 8191 + DepartmentID.hashCode();

    hashCode = hashCode * 8191 + ((isSetDepartmentName()) ? 131071 : 524287);
    if (isSetDepartmentName())
      hashCode = hashCode * 8191 + DepartmentName.hashCode();

    hashCode = hashCode * 8191 + ((isSetUserImage()) ? 131071 : 524287);
    if (isSetUserImage())
      hashCode = hashCode * 8191 + UserImage.hashCode();

    return hashCode;
  }

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

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.valueOf(isSetUserID()).compareTo(other.isSetUserID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.UserID, other.UserID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.UserName, other.UserName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetMobile()).compareTo(other.isSetMobile());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMobile()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.Mobile, other.Mobile);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetEnterpriseID()).compareTo(other.isSetEnterpriseID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnterpriseID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.EnterpriseID, other.EnterpriseID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetDepartmentID()).compareTo(other.isSetDepartmentID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDepartmentID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.DepartmentID, other.DepartmentID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetDepartmentName()).compareTo(other.isSetDepartmentName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDepartmentName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.DepartmentName, other.DepartmentName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetUserImage()).compareTo(other.isSetUserImage());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUserImage()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.UserImage, other.UserImage);
      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 {
    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("MemberUserInfo(");
    boolean first = true;

    sb.append("UserID:");
    if (this.UserID == null) {
      sb.append("null");
    } else {
      sb.append(this.UserID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("UserName:");
    if (this.UserName == null) {
      sb.append("null");
    } else {
      sb.append(this.UserName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("Mobile:");
    if (this.Mobile == null) {
      sb.append("null");
    } else {
      sb.append(this.Mobile);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("EnterpriseID:");
    if (this.EnterpriseID == null) {
      sb.append("null");
    } else {
      sb.append(this.EnterpriseID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("DepartmentID:");
    if (this.DepartmentID == null) {
      sb.append("null");
    } else {
      sb.append(this.DepartmentID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("DepartmentName:");
    if (this.DepartmentName == null) {
      sb.append("null");
    } else {
      sb.append(this.DepartmentName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("UserImage:");
    if (this.UserImage == null) {
      sb.append("null");
    } else {
      sb.append(this.UserImage);
    }
    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 {
      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 MemberUserInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public MemberUserInfoStandardScheme getScheme() {
      return new MemberUserInfoStandardScheme();
    }
  }

  private static class MemberUserInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, MemberUserInfo 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: // USER_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.UserID = iprot.readString();
              struct.setUserIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // USER_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.UserName = iprot.readString();
              struct.setUserNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // MOBILE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.Mobile = iprot.readString();
              struct.setMobileIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // ENTERPRISE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.EnterpriseID = iprot.readString();
              struct.setEnterpriseIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // DEPARTMENT_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.DepartmentID = iprot.readString();
              struct.setDepartmentIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // DEPARTMENT_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.DepartmentName = iprot.readString();
              struct.setDepartmentNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // USER_IMAGE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.UserImage = iprot.readString();
              struct.setUserImageIsSet(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, MemberUserInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.UserID != null) {
        oprot.writeFieldBegin(USER_ID_FIELD_DESC);
        oprot.writeString(struct.UserID);
        oprot.writeFieldEnd();
      }
      if (struct.UserName != null) {
        oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
        oprot.writeString(struct.UserName);
        oprot.writeFieldEnd();
      }
      if (struct.Mobile != null) {
        oprot.writeFieldBegin(MOBILE_FIELD_DESC);
        oprot.writeString(struct.Mobile);
        oprot.writeFieldEnd();
      }
      if (struct.EnterpriseID != null) {
        oprot.writeFieldBegin(ENTERPRISE_ID_FIELD_DESC);
        oprot.writeString(struct.EnterpriseID);
        oprot.writeFieldEnd();
      }
      if (struct.DepartmentID != null) {
        oprot.writeFieldBegin(DEPARTMENT_ID_FIELD_DESC);
        oprot.writeString(struct.DepartmentID);
        oprot.writeFieldEnd();
      }
      if (struct.DepartmentName != null) {
        oprot.writeFieldBegin(DEPARTMENT_NAME_FIELD_DESC);
        oprot.writeString(struct.DepartmentName);
        oprot.writeFieldEnd();
      }
      if (struct.UserImage != null) {
        oprot.writeFieldBegin(USER_IMAGE_FIELD_DESC);
        oprot.writeString(struct.UserImage);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

  private static class MemberUserInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, MemberUserInfo 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.isSetUserID()) {
        optionals.set(0);
      }
      if (struct.isSetUserName()) {
        optionals.set(1);
      }
      if (struct.isSetMobile()) {
        optionals.set(2);
      }
      if (struct.isSetEnterpriseID()) {
        optionals.set(3);
      }
      if (struct.isSetDepartmentID()) {
        optionals.set(4);
      }
      if (struct.isSetDepartmentName()) {
        optionals.set(5);
      }
      if (struct.isSetUserImage()) {
        optionals.set(6);
      }
      oprot.writeBitSet(optionals, 7);
      if (struct.isSetUserID()) {
        oprot.writeString(struct.UserID);
      }
      if (struct.isSetUserName()) {
        oprot.writeString(struct.UserName);
      }
      if (struct.isSetMobile()) {
        oprot.writeString(struct.Mobile);
      }
      if (struct.isSetEnterpriseID()) {
        oprot.writeString(struct.EnterpriseID);
      }
      if (struct.isSetDepartmentID()) {
        oprot.writeString(struct.DepartmentID);
      }
      if (struct.isSetDepartmentName()) {
        oprot.writeString(struct.DepartmentName);
      }
      if (struct.isSetUserImage()) {
        oprot.writeString(struct.UserImage);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, MemberUserInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(7);
      if (incoming.get(0)) {
        struct.UserID = iprot.readString();
        struct.setUserIDIsSet(true);
      }
      if (incoming.get(1)) {
        struct.UserName = iprot.readString();
        struct.setUserNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.Mobile = iprot.readString();
        struct.setMobileIsSet(true);
      }
      if (incoming.get(3)) {
        struct.EnterpriseID = iprot.readString();
        struct.setEnterpriseIDIsSet(true);
      }
      if (incoming.get(4)) {
        struct.DepartmentID = iprot.readString();
        struct.setDepartmentIDIsSet(true);
      }
      if (incoming.get(5)) {
        struct.DepartmentName = iprot.readString();
        struct.setDepartmentNameIsSet(true);
      }
      if (incoming.get(6)) {
        struct.UserImage = iprot.readString();
        struct.setUserImageIsSet(true);
      }
    }
  }

  private static  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();
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy