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

cicada.departdriver.config.EnterpriseInfo 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 EnterpriseInfo 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("EnterpriseInfo");

  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)1);
  private static final org.apache.thrift.protocol.TField ENTERPRISE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("EnterpriseName", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField PROVINCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("ProvinceID", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField PROVINCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ProvinceName", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField CITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("CityID", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField CITY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("CityName", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField ENTERPRISE_LOGO_FIELD_DESC = new org.apache.thrift.protocol.TField("EnterpriseLogo", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField ADMIN_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("AdminUserID", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField ADMIN_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("AdminUserName", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField APPROVAL_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("ApprovalStatus", org.apache.thrift.protocol.TType.I32, (short)10);

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

  public java.lang.String EnterpriseID; // required
  public java.lang.String EnterpriseName; // required
  public java.lang.String ProvinceID; // required
  public java.lang.String ProvinceName; // required
  public java.lang.String CityID; // required
  public java.lang.String CityName; // required
  public java.lang.String EnterpriseLogo; // required
  public java.lang.String AdminUserID; // required
  public java.lang.String AdminUserName; // required
  public int ApprovalStatus; // 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 {
    ENTERPRISE_ID((short)1, "EnterpriseID"),
    ENTERPRISE_NAME((short)2, "EnterpriseName"),
    PROVINCE_ID((short)3, "ProvinceID"),
    PROVINCE_NAME((short)4, "ProvinceName"),
    CITY_ID((short)5, "CityID"),
    CITY_NAME((short)6, "CityName"),
    ENTERPRISE_LOGO((short)7, "EnterpriseLogo"),
    ADMIN_USER_ID((short)8, "AdminUserID"),
    ADMIN_USER_NAME((short)9, "AdminUserName"),
    APPROVAL_STATUS((short)10, "ApprovalStatus");

    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: // ENTERPRISE_ID
          return ENTERPRISE_ID;
        case 2: // ENTERPRISE_NAME
          return ENTERPRISE_NAME;
        case 3: // PROVINCE_ID
          return PROVINCE_ID;
        case 4: // PROVINCE_NAME
          return PROVINCE_NAME;
        case 5: // CITY_ID
          return CITY_ID;
        case 6: // CITY_NAME
          return CITY_NAME;
        case 7: // ENTERPRISE_LOGO
          return ENTERPRISE_LOGO;
        case 8: // ADMIN_USER_ID
          return ADMIN_USER_ID;
        case 9: // ADMIN_USER_NAME
          return ADMIN_USER_NAME;
        case 10: // APPROVAL_STATUS
          return APPROVAL_STATUS;
        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
  private static final int __APPROVALSTATUS_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  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.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.ENTERPRISE_NAME, new org.apache.thrift.meta_data.FieldMetaData("EnterpriseName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PROVINCE_ID, new org.apache.thrift.meta_data.FieldMetaData("ProvinceID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PROVINCE_NAME, new org.apache.thrift.meta_data.FieldMetaData("ProvinceName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CITY_ID, new org.apache.thrift.meta_data.FieldMetaData("CityID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CITY_NAME, new org.apache.thrift.meta_data.FieldMetaData("CityName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ENTERPRISE_LOGO, new org.apache.thrift.meta_data.FieldMetaData("EnterpriseLogo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ADMIN_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("AdminUserID", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ADMIN_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("AdminUserName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.APPROVAL_STATUS, new org.apache.thrift.meta_data.FieldMetaData("ApprovalStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EnterpriseInfo.class, metaDataMap);
  }

  public EnterpriseInfo() {
  }

  public EnterpriseInfo(
    java.lang.String EnterpriseID,
    java.lang.String EnterpriseName,
    java.lang.String ProvinceID,
    java.lang.String ProvinceName,
    java.lang.String CityID,
    java.lang.String CityName,
    java.lang.String EnterpriseLogo,
    java.lang.String AdminUserID,
    java.lang.String AdminUserName,
    int ApprovalStatus)
  {
    this();
    this.EnterpriseID = EnterpriseID;
    this.EnterpriseName = EnterpriseName;
    this.ProvinceID = ProvinceID;
    this.ProvinceName = ProvinceName;
    this.CityID = CityID;
    this.CityName = CityName;
    this.EnterpriseLogo = EnterpriseLogo;
    this.AdminUserID = AdminUserID;
    this.AdminUserName = AdminUserName;
    this.ApprovalStatus = ApprovalStatus;
    setApprovalStatusIsSet(true);
  }

  /**
   * Performs a deep copy on other.
   */
  public EnterpriseInfo(EnterpriseInfo other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetEnterpriseID()) {
      this.EnterpriseID = other.EnterpriseID;
    }
    if (other.isSetEnterpriseName()) {
      this.EnterpriseName = other.EnterpriseName;
    }
    if (other.isSetProvinceID()) {
      this.ProvinceID = other.ProvinceID;
    }
    if (other.isSetProvinceName()) {
      this.ProvinceName = other.ProvinceName;
    }
    if (other.isSetCityID()) {
      this.CityID = other.CityID;
    }
    if (other.isSetCityName()) {
      this.CityName = other.CityName;
    }
    if (other.isSetEnterpriseLogo()) {
      this.EnterpriseLogo = other.EnterpriseLogo;
    }
    if (other.isSetAdminUserID()) {
      this.AdminUserID = other.AdminUserID;
    }
    if (other.isSetAdminUserName()) {
      this.AdminUserName = other.AdminUserName;
    }
    this.ApprovalStatus = other.ApprovalStatus;
  }

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

  @Override
  public void clear() {
    this.EnterpriseID = null;
    this.EnterpriseName = null;
    this.ProvinceID = null;
    this.ProvinceName = null;
    this.CityID = null;
    this.CityName = null;
    this.EnterpriseLogo = null;
    this.AdminUserID = null;
    this.AdminUserName = null;
    setApprovalStatusIsSet(false);
    this.ApprovalStatus = 0;
  }

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

  public EnterpriseInfo 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 getEnterpriseName() {
    return this.EnterpriseName;
  }

  public EnterpriseInfo setEnterpriseName(java.lang.String EnterpriseName) {
    this.EnterpriseName = EnterpriseName;
    return this;
  }

  public void unsetEnterpriseName() {
    this.EnterpriseName = null;
  }

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

  public void setEnterpriseNameIsSet(boolean value) {
    if (!value) {
      this.EnterpriseName = null;
    }
  }

  public java.lang.String getProvinceID() {
    return this.ProvinceID;
  }

  public EnterpriseInfo setProvinceID(java.lang.String ProvinceID) {
    this.ProvinceID = ProvinceID;
    return this;
  }

  public void unsetProvinceID() {
    this.ProvinceID = null;
  }

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

  public void setProvinceIDIsSet(boolean value) {
    if (!value) {
      this.ProvinceID = null;
    }
  }

  public java.lang.String getProvinceName() {
    return this.ProvinceName;
  }

  public EnterpriseInfo setProvinceName(java.lang.String ProvinceName) {
    this.ProvinceName = ProvinceName;
    return this;
  }

  public void unsetProvinceName() {
    this.ProvinceName = null;
  }

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

  public void setProvinceNameIsSet(boolean value) {
    if (!value) {
      this.ProvinceName = null;
    }
  }

  public java.lang.String getCityID() {
    return this.CityID;
  }

  public EnterpriseInfo setCityID(java.lang.String CityID) {
    this.CityID = CityID;
    return this;
  }

  public void unsetCityID() {
    this.CityID = null;
  }

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

  public void setCityIDIsSet(boolean value) {
    if (!value) {
      this.CityID = null;
    }
  }

  public java.lang.String getCityName() {
    return this.CityName;
  }

  public EnterpriseInfo setCityName(java.lang.String CityName) {
    this.CityName = CityName;
    return this;
  }

  public void unsetCityName() {
    this.CityName = null;
  }

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

  public void setCityNameIsSet(boolean value) {
    if (!value) {
      this.CityName = null;
    }
  }

  public java.lang.String getEnterpriseLogo() {
    return this.EnterpriseLogo;
  }

  public EnterpriseInfo setEnterpriseLogo(java.lang.String EnterpriseLogo) {
    this.EnterpriseLogo = EnterpriseLogo;
    return this;
  }

  public void unsetEnterpriseLogo() {
    this.EnterpriseLogo = null;
  }

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

  public void setEnterpriseLogoIsSet(boolean value) {
    if (!value) {
      this.EnterpriseLogo = null;
    }
  }

  public java.lang.String getAdminUserID() {
    return this.AdminUserID;
  }

  public EnterpriseInfo setAdminUserID(java.lang.String AdminUserID) {
    this.AdminUserID = AdminUserID;
    return this;
  }

  public void unsetAdminUserID() {
    this.AdminUserID = null;
  }

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

  public void setAdminUserIDIsSet(boolean value) {
    if (!value) {
      this.AdminUserID = null;
    }
  }

  public java.lang.String getAdminUserName() {
    return this.AdminUserName;
  }

  public EnterpriseInfo setAdminUserName(java.lang.String AdminUserName) {
    this.AdminUserName = AdminUserName;
    return this;
  }

  public void unsetAdminUserName() {
    this.AdminUserName = null;
  }

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

  public void setAdminUserNameIsSet(boolean value) {
    if (!value) {
      this.AdminUserName = null;
    }
  }

  public int getApprovalStatus() {
    return this.ApprovalStatus;
  }

  public EnterpriseInfo setApprovalStatus(int ApprovalStatus) {
    this.ApprovalStatus = ApprovalStatus;
    setApprovalStatusIsSet(true);
    return this;
  }

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

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

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

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

    case ENTERPRISE_NAME:
      if (value == null) {
        unsetEnterpriseName();
      } else {
        setEnterpriseName((java.lang.String)value);
      }
      break;

    case PROVINCE_ID:
      if (value == null) {
        unsetProvinceID();
      } else {
        setProvinceID((java.lang.String)value);
      }
      break;

    case PROVINCE_NAME:
      if (value == null) {
        unsetProvinceName();
      } else {
        setProvinceName((java.lang.String)value);
      }
      break;

    case CITY_ID:
      if (value == null) {
        unsetCityID();
      } else {
        setCityID((java.lang.String)value);
      }
      break;

    case CITY_NAME:
      if (value == null) {
        unsetCityName();
      } else {
        setCityName((java.lang.String)value);
      }
      break;

    case ENTERPRISE_LOGO:
      if (value == null) {
        unsetEnterpriseLogo();
      } else {
        setEnterpriseLogo((java.lang.String)value);
      }
      break;

    case ADMIN_USER_ID:
      if (value == null) {
        unsetAdminUserID();
      } else {
        setAdminUserID((java.lang.String)value);
      }
      break;

    case ADMIN_USER_NAME:
      if (value == null) {
        unsetAdminUserName();
      } else {
        setAdminUserName((java.lang.String)value);
      }
      break;

    case APPROVAL_STATUS:
      if (value == null) {
        unsetApprovalStatus();
      } else {
        setApprovalStatus((java.lang.Integer)value);
      }
      break;

    }
  }

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

    case ENTERPRISE_NAME:
      return getEnterpriseName();

    case PROVINCE_ID:
      return getProvinceID();

    case PROVINCE_NAME:
      return getProvinceName();

    case CITY_ID:
      return getCityID();

    case CITY_NAME:
      return getCityName();

    case ENTERPRISE_LOGO:
      return getEnterpriseLogo();

    case ADMIN_USER_ID:
      return getAdminUserID();

    case ADMIN_USER_NAME:
      return getAdminUserName();

    case APPROVAL_STATUS:
      return getApprovalStatus();

    }
    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 ENTERPRISE_ID:
      return isSetEnterpriseID();
    case ENTERPRISE_NAME:
      return isSetEnterpriseName();
    case PROVINCE_ID:
      return isSetProvinceID();
    case PROVINCE_NAME:
      return isSetProvinceName();
    case CITY_ID:
      return isSetCityID();
    case CITY_NAME:
      return isSetCityName();
    case ENTERPRISE_LOGO:
      return isSetEnterpriseLogo();
    case ADMIN_USER_ID:
      return isSetAdminUserID();
    case ADMIN_USER_NAME:
      return isSetAdminUserName();
    case APPROVAL_STATUS:
      return isSetApprovalStatus();
    }
    throw new java.lang.IllegalStateException();
  }

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

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

    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_EnterpriseName = true && this.isSetEnterpriseName();
    boolean that_present_EnterpriseName = true && that.isSetEnterpriseName();
    if (this_present_EnterpriseName || that_present_EnterpriseName) {
      if (!(this_present_EnterpriseName && that_present_EnterpriseName))
        return false;
      if (!this.EnterpriseName.equals(that.EnterpriseName))
        return false;
    }

    boolean this_present_ProvinceID = true && this.isSetProvinceID();
    boolean that_present_ProvinceID = true && that.isSetProvinceID();
    if (this_present_ProvinceID || that_present_ProvinceID) {
      if (!(this_present_ProvinceID && that_present_ProvinceID))
        return false;
      if (!this.ProvinceID.equals(that.ProvinceID))
        return false;
    }

    boolean this_present_ProvinceName = true && this.isSetProvinceName();
    boolean that_present_ProvinceName = true && that.isSetProvinceName();
    if (this_present_ProvinceName || that_present_ProvinceName) {
      if (!(this_present_ProvinceName && that_present_ProvinceName))
        return false;
      if (!this.ProvinceName.equals(that.ProvinceName))
        return false;
    }

    boolean this_present_CityID = true && this.isSetCityID();
    boolean that_present_CityID = true && that.isSetCityID();
    if (this_present_CityID || that_present_CityID) {
      if (!(this_present_CityID && that_present_CityID))
        return false;
      if (!this.CityID.equals(that.CityID))
        return false;
    }

    boolean this_present_CityName = true && this.isSetCityName();
    boolean that_present_CityName = true && that.isSetCityName();
    if (this_present_CityName || that_present_CityName) {
      if (!(this_present_CityName && that_present_CityName))
        return false;
      if (!this.CityName.equals(that.CityName))
        return false;
    }

    boolean this_present_EnterpriseLogo = true && this.isSetEnterpriseLogo();
    boolean that_present_EnterpriseLogo = true && that.isSetEnterpriseLogo();
    if (this_present_EnterpriseLogo || that_present_EnterpriseLogo) {
      if (!(this_present_EnterpriseLogo && that_present_EnterpriseLogo))
        return false;
      if (!this.EnterpriseLogo.equals(that.EnterpriseLogo))
        return false;
    }

    boolean this_present_AdminUserID = true && this.isSetAdminUserID();
    boolean that_present_AdminUserID = true && that.isSetAdminUserID();
    if (this_present_AdminUserID || that_present_AdminUserID) {
      if (!(this_present_AdminUserID && that_present_AdminUserID))
        return false;
      if (!this.AdminUserID.equals(that.AdminUserID))
        return false;
    }

    boolean this_present_AdminUserName = true && this.isSetAdminUserName();
    boolean that_present_AdminUserName = true && that.isSetAdminUserName();
    if (this_present_AdminUserName || that_present_AdminUserName) {
      if (!(this_present_AdminUserName && that_present_AdminUserName))
        return false;
      if (!this.AdminUserName.equals(that.AdminUserName))
        return false;
    }

    boolean this_present_ApprovalStatus = true;
    boolean that_present_ApprovalStatus = true;
    if (this_present_ApprovalStatus || that_present_ApprovalStatus) {
      if (!(this_present_ApprovalStatus && that_present_ApprovalStatus))
        return false;
      if (this.ApprovalStatus != that.ApprovalStatus)
        return false;
    }

    return true;
  }

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

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

    hashCode = hashCode * 8191 + ((isSetEnterpriseName()) ? 131071 : 524287);
    if (isSetEnterpriseName())
      hashCode = hashCode * 8191 + EnterpriseName.hashCode();

    hashCode = hashCode * 8191 + ((isSetProvinceID()) ? 131071 : 524287);
    if (isSetProvinceID())
      hashCode = hashCode * 8191 + ProvinceID.hashCode();

    hashCode = hashCode * 8191 + ((isSetProvinceName()) ? 131071 : 524287);
    if (isSetProvinceName())
      hashCode = hashCode * 8191 + ProvinceName.hashCode();

    hashCode = hashCode * 8191 + ((isSetCityID()) ? 131071 : 524287);
    if (isSetCityID())
      hashCode = hashCode * 8191 + CityID.hashCode();

    hashCode = hashCode * 8191 + ((isSetCityName()) ? 131071 : 524287);
    if (isSetCityName())
      hashCode = hashCode * 8191 + CityName.hashCode();

    hashCode = hashCode * 8191 + ((isSetEnterpriseLogo()) ? 131071 : 524287);
    if (isSetEnterpriseLogo())
      hashCode = hashCode * 8191 + EnterpriseLogo.hashCode();

    hashCode = hashCode * 8191 + ((isSetAdminUserID()) ? 131071 : 524287);
    if (isSetAdminUserID())
      hashCode = hashCode * 8191 + AdminUserID.hashCode();

    hashCode = hashCode * 8191 + ((isSetAdminUserName()) ? 131071 : 524287);
    if (isSetAdminUserName())
      hashCode = hashCode * 8191 + AdminUserName.hashCode();

    hashCode = hashCode * 8191 + ApprovalStatus;

    return hashCode;
  }

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

    int lastComparison = 0;

    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(isSetEnterpriseName()).compareTo(other.isSetEnterpriseName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnterpriseName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.EnterpriseName, other.EnterpriseName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetProvinceID()).compareTo(other.isSetProvinceID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProvinceID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ProvinceID, other.ProvinceID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetProvinceName()).compareTo(other.isSetProvinceName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProvinceName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ProvinceName, other.ProvinceName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetCityID()).compareTo(other.isSetCityID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCityID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.CityID, other.CityID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetCityName()).compareTo(other.isSetCityName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCityName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.CityName, other.CityName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetEnterpriseLogo()).compareTo(other.isSetEnterpriseLogo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEnterpriseLogo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.EnterpriseLogo, other.EnterpriseLogo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetAdminUserID()).compareTo(other.isSetAdminUserID());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAdminUserID()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.AdminUserID, other.AdminUserID);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetAdminUserName()).compareTo(other.isSetAdminUserName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAdminUserName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.AdminUserName, other.AdminUserName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.valueOf(isSetApprovalStatus()).compareTo(other.isSetApprovalStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetApprovalStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ApprovalStatus, other.ApprovalStatus);
      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("EnterpriseInfo(");
    boolean first = true;

    sb.append("EnterpriseID:");
    if (this.EnterpriseID == null) {
      sb.append("null");
    } else {
      sb.append(this.EnterpriseID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("EnterpriseName:");
    if (this.EnterpriseName == null) {
      sb.append("null");
    } else {
      sb.append(this.EnterpriseName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ProvinceID:");
    if (this.ProvinceID == null) {
      sb.append("null");
    } else {
      sb.append(this.ProvinceID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ProvinceName:");
    if (this.ProvinceName == null) {
      sb.append("null");
    } else {
      sb.append(this.ProvinceName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("CityID:");
    if (this.CityID == null) {
      sb.append("null");
    } else {
      sb.append(this.CityID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("CityName:");
    if (this.CityName == null) {
      sb.append("null");
    } else {
      sb.append(this.CityName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("EnterpriseLogo:");
    if (this.EnterpriseLogo == null) {
      sb.append("null");
    } else {
      sb.append(this.EnterpriseLogo);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("AdminUserID:");
    if (this.AdminUserID == null) {
      sb.append("null");
    } else {
      sb.append(this.AdminUserID);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("AdminUserName:");
    if (this.AdminUserName == null) {
      sb.append("null");
    } else {
      sb.append(this.AdminUserName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("ApprovalStatus:");
    sb.append(this.ApprovalStatus);
    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 EnterpriseInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public EnterpriseInfoStandardScheme getScheme() {
      return new EnterpriseInfoStandardScheme();
    }
  }

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

    public void read(org.apache.thrift.protocol.TProtocol iprot, EnterpriseInfo 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: // 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 2: // ENTERPRISE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.EnterpriseName = iprot.readString();
              struct.setEnterpriseNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // PROVINCE_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ProvinceID = iprot.readString();
              struct.setProvinceIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // PROVINCE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.ProvinceName = iprot.readString();
              struct.setProvinceNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // CITY_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.CityID = iprot.readString();
              struct.setCityIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // CITY_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.CityName = iprot.readString();
              struct.setCityNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // ENTERPRISE_LOGO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.EnterpriseLogo = iprot.readString();
              struct.setEnterpriseLogoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // ADMIN_USER_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.AdminUserID = iprot.readString();
              struct.setAdminUserIDIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // ADMIN_USER_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.AdminUserName = iprot.readString();
              struct.setAdminUserNameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // APPROVAL_STATUS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.ApprovalStatus = iprot.readI32();
              struct.setApprovalStatusIsSet(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, EnterpriseInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.EnterpriseID != null) {
        oprot.writeFieldBegin(ENTERPRISE_ID_FIELD_DESC);
        oprot.writeString(struct.EnterpriseID);
        oprot.writeFieldEnd();
      }
      if (struct.EnterpriseName != null) {
        oprot.writeFieldBegin(ENTERPRISE_NAME_FIELD_DESC);
        oprot.writeString(struct.EnterpriseName);
        oprot.writeFieldEnd();
      }
      if (struct.ProvinceID != null) {
        oprot.writeFieldBegin(PROVINCE_ID_FIELD_DESC);
        oprot.writeString(struct.ProvinceID);
        oprot.writeFieldEnd();
      }
      if (struct.ProvinceName != null) {
        oprot.writeFieldBegin(PROVINCE_NAME_FIELD_DESC);
        oprot.writeString(struct.ProvinceName);
        oprot.writeFieldEnd();
      }
      if (struct.CityID != null) {
        oprot.writeFieldBegin(CITY_ID_FIELD_DESC);
        oprot.writeString(struct.CityID);
        oprot.writeFieldEnd();
      }
      if (struct.CityName != null) {
        oprot.writeFieldBegin(CITY_NAME_FIELD_DESC);
        oprot.writeString(struct.CityName);
        oprot.writeFieldEnd();
      }
      if (struct.EnterpriseLogo != null) {
        oprot.writeFieldBegin(ENTERPRISE_LOGO_FIELD_DESC);
        oprot.writeString(struct.EnterpriseLogo);
        oprot.writeFieldEnd();
      }
      if (struct.AdminUserID != null) {
        oprot.writeFieldBegin(ADMIN_USER_ID_FIELD_DESC);
        oprot.writeString(struct.AdminUserID);
        oprot.writeFieldEnd();
      }
      if (struct.AdminUserName != null) {
        oprot.writeFieldBegin(ADMIN_USER_NAME_FIELD_DESC);
        oprot.writeString(struct.AdminUserName);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(APPROVAL_STATUS_FIELD_DESC);
      oprot.writeI32(struct.ApprovalStatus);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

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

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

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, EnterpriseInfo 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.isSetEnterpriseID()) {
        optionals.set(0);
      }
      if (struct.isSetEnterpriseName()) {
        optionals.set(1);
      }
      if (struct.isSetProvinceID()) {
        optionals.set(2);
      }
      if (struct.isSetProvinceName()) {
        optionals.set(3);
      }
      if (struct.isSetCityID()) {
        optionals.set(4);
      }
      if (struct.isSetCityName()) {
        optionals.set(5);
      }
      if (struct.isSetEnterpriseLogo()) {
        optionals.set(6);
      }
      if (struct.isSetAdminUserID()) {
        optionals.set(7);
      }
      if (struct.isSetAdminUserName()) {
        optionals.set(8);
      }
      if (struct.isSetApprovalStatus()) {
        optionals.set(9);
      }
      oprot.writeBitSet(optionals, 10);
      if (struct.isSetEnterpriseID()) {
        oprot.writeString(struct.EnterpriseID);
      }
      if (struct.isSetEnterpriseName()) {
        oprot.writeString(struct.EnterpriseName);
      }
      if (struct.isSetProvinceID()) {
        oprot.writeString(struct.ProvinceID);
      }
      if (struct.isSetProvinceName()) {
        oprot.writeString(struct.ProvinceName);
      }
      if (struct.isSetCityID()) {
        oprot.writeString(struct.CityID);
      }
      if (struct.isSetCityName()) {
        oprot.writeString(struct.CityName);
      }
      if (struct.isSetEnterpriseLogo()) {
        oprot.writeString(struct.EnterpriseLogo);
      }
      if (struct.isSetAdminUserID()) {
        oprot.writeString(struct.AdminUserID);
      }
      if (struct.isSetAdminUserName()) {
        oprot.writeString(struct.AdminUserName);
      }
      if (struct.isSetApprovalStatus()) {
        oprot.writeI32(struct.ApprovalStatus);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, EnterpriseInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(10);
      if (incoming.get(0)) {
        struct.EnterpriseID = iprot.readString();
        struct.setEnterpriseIDIsSet(true);
      }
      if (incoming.get(1)) {
        struct.EnterpriseName = iprot.readString();
        struct.setEnterpriseNameIsSet(true);
      }
      if (incoming.get(2)) {
        struct.ProvinceID = iprot.readString();
        struct.setProvinceIDIsSet(true);
      }
      if (incoming.get(3)) {
        struct.ProvinceName = iprot.readString();
        struct.setProvinceNameIsSet(true);
      }
      if (incoming.get(4)) {
        struct.CityID = iprot.readString();
        struct.setCityIDIsSet(true);
      }
      if (incoming.get(5)) {
        struct.CityName = iprot.readString();
        struct.setCityNameIsSet(true);
      }
      if (incoming.get(6)) {
        struct.EnterpriseLogo = iprot.readString();
        struct.setEnterpriseLogoIsSet(true);
      }
      if (incoming.get(7)) {
        struct.AdminUserID = iprot.readString();
        struct.setAdminUserIDIsSet(true);
      }
      if (incoming.get(8)) {
        struct.AdminUserName = iprot.readString();
        struct.setAdminUserNameIsSet(true);
      }
      if (incoming.get(9)) {
        struct.ApprovalStatus = iprot.readI32();
        struct.setApprovalStatusIsSet(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