Subversion Repositories SmartDukaan

Rev

Rev 7096 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.model.v1.order;

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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HotspotStore implements org.apache.thrift.TBase<HotspotStore, HotspotStore._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HotspotStore");

  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField HOTSPOT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hotspotId", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField COMPANY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("companyId", org.apache.thrift.protocol.TType.I64, (short)3);
  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)4);
  private static final org.apache.thrift.protocol.TField CITY_FIELD_DESC = new org.apache.thrift.protocol.TField("city", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField COLLECTED_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("collectedAmount", org.apache.thrift.protocol.TType.I64, (short)6);
  private static final org.apache.thrift.protocol.TField AVAILABLE_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("availableLimit", org.apache.thrift.protocol.TType.I64, (short)7);
  private static final org.apache.thrift.protocol.TField CREDIT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("creditLimit", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField SALT_FIELD_DESC = new org.apache.thrift.protocol.TField("salt", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)10);
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)11);
  private static final org.apache.thrift.protocol.TField CIRCLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("circleId", org.apache.thrift.protocol.TType.I64, (short)12);
  private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)13);

  private long id; // required
  private String hotspotId; // required
  private long companyId; // required
  private String name; // required
  private String city; // required
  private long collectedAmount; // required
  private long availableLimit; // required
  private long creditLimit; // required
  private String salt; // required
  private String password; // required
  private boolean isActive; // required
  private long circleId; // required
  private String email; // 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"),
    HOTSPOT_ID((short)2, "hotspotId"),
    COMPANY_ID((short)3, "companyId"),
    NAME((short)4, "name"),
    CITY((short)5, "city"),
    COLLECTED_AMOUNT((short)6, "collectedAmount"),
    AVAILABLE_LIMIT((short)7, "availableLimit"),
    CREDIT_LIMIT((short)8, "creditLimit"),
    SALT((short)9, "salt"),
    PASSWORD((short)10, "password"),
    IS_ACTIVE((short)11, "isActive"),
    CIRCLE_ID((short)12, "circleId"),
    EMAIL((short)13, "email");

    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: // HOTSPOT_ID
          return HOTSPOT_ID;
        case 3: // COMPANY_ID
          return COMPANY_ID;
        case 4: // NAME
          return NAME;
        case 5: // CITY
          return CITY;
        case 6: // COLLECTED_AMOUNT
          return COLLECTED_AMOUNT;
        case 7: // AVAILABLE_LIMIT
          return AVAILABLE_LIMIT;
        case 8: // CREDIT_LIMIT
          return CREDIT_LIMIT;
        case 9: // SALT
          return SALT;
        case 10: // PASSWORD
          return PASSWORD;
        case 11: // IS_ACTIVE
          return IS_ACTIVE;
        case 12: // CIRCLE_ID
          return CIRCLE_ID;
        case 13: // EMAIL
          return EMAIL;
        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 __COMPANYID_ISSET_ID = 1;
  private static final int __COLLECTEDAMOUNT_ISSET_ID = 2;
  private static final int __AVAILABLELIMIT_ISSET_ID = 3;
  private static final int __CREDITLIMIT_ISSET_ID = 4;
  private static final int __ISACTIVE_ISSET_ID = 5;
  private static final int __CIRCLEID_ISSET_ID = 6;
  private BitSet __isset_bit_vector = new BitSet(7);

  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.HOTSPOT_ID, new org.apache.thrift.meta_data.FieldMetaData("hotspotId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.COMPANY_ID, new org.apache.thrift.meta_data.FieldMetaData("companyId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    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.CITY, new org.apache.thrift.meta_data.FieldMetaData("city", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.COLLECTED_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("collectedAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.AVAILABLE_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("availableLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CREDIT_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("creditLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SALT, new org.apache.thrift.meta_data.FieldMetaData("salt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.CIRCLE_ID, new org.apache.thrift.meta_data.FieldMetaData("circleId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HotspotStore.class, metaDataMap);
  }

  public HotspotStore() {
  }

  public HotspotStore(
    long id,
    String hotspotId,
    long companyId,
    String name,
    String city,
    long collectedAmount,
    long availableLimit,
    long creditLimit,
    String salt,
    String password,
    boolean isActive,
    long circleId,
    String email)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.hotspotId = hotspotId;
    this.companyId = companyId;
    setCompanyIdIsSet(true);
    this.name = name;
    this.city = city;
    this.collectedAmount = collectedAmount;
    setCollectedAmountIsSet(true);
    this.availableLimit = availableLimit;
    setAvailableLimitIsSet(true);
    this.creditLimit = creditLimit;
    setCreditLimitIsSet(true);
    this.salt = salt;
    this.password = password;
    this.isActive = isActive;
    setIsActiveIsSet(true);
    this.circleId = circleId;
    setCircleIdIsSet(true);
    this.email = email;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public HotspotStore(HotspotStore other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetHotspotId()) {
      this.hotspotId = other.hotspotId;
    }
    this.companyId = other.companyId;
    if (other.isSetName()) {
      this.name = other.name;
    }
    if (other.isSetCity()) {
      this.city = other.city;
    }
    this.collectedAmount = other.collectedAmount;
    this.availableLimit = other.availableLimit;
    this.creditLimit = other.creditLimit;
    if (other.isSetSalt()) {
      this.salt = other.salt;
    }
    if (other.isSetPassword()) {
      this.password = other.password;
    }
    this.isActive = other.isActive;
    this.circleId = other.circleId;
    if (other.isSetEmail()) {
      this.email = other.email;
    }
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.hotspotId = null;
    setCompanyIdIsSet(false);
    this.companyId = 0;
    this.name = null;
    this.city = null;
    setCollectedAmountIsSet(false);
    this.collectedAmount = 0;
    setAvailableLimitIsSet(false);
    this.availableLimit = 0;
    setCreditLimitIsSet(false);
    this.creditLimit = 0;
    this.salt = null;
    this.password = null;
    setIsActiveIsSet(false);
    this.isActive = false;
    setCircleIdIsSet(false);
    this.circleId = 0;
    this.email = null;
  }

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

  public void setId(long id) {
    this.id = id;
    setIdIsSet(true);
  }

  public void unsetId() {
    __isset_bit_vector.clear(__ID_ISSET_ID);
  }

  /** Returns true if field id is set (has been assigned a value) and false otherwise */
  public boolean isSetId() {
    return __isset_bit_vector.get(__ID_ISSET_ID);
  }

  public void setIdIsSet(boolean value) {
    __isset_bit_vector.set(__ID_ISSET_ID, value);
  }

  public String getHotspotId() {
    return this.hotspotId;
  }

  public void setHotspotId(String hotspotId) {
    this.hotspotId = hotspotId;
  }

  public void unsetHotspotId() {
    this.hotspotId = null;
  }

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

  public void setHotspotIdIsSet(boolean value) {
    if (!value) {
      this.hotspotId = null;
    }
  }

  public long getCompanyId() {
    return this.companyId;
  }

  public void setCompanyId(long companyId) {
    this.companyId = companyId;
    setCompanyIdIsSet(true);
  }

  public void unsetCompanyId() {
    __isset_bit_vector.clear(__COMPANYID_ISSET_ID);
  }

  /** Returns true if field companyId is set (has been assigned a value) and false otherwise */
  public boolean isSetCompanyId() {
    return __isset_bit_vector.get(__COMPANYID_ISSET_ID);
  }

  public void setCompanyIdIsSet(boolean value) {
    __isset_bit_vector.set(__COMPANYID_ISSET_ID, value);
  }

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

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

  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 getCity() {
    return this.city;
  }

  public void setCity(String city) {
    this.city = city;
  }

  public void unsetCity() {
    this.city = null;
  }

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

  public void setCityIsSet(boolean value) {
    if (!value) {
      this.city = null;
    }
  }

  public long getCollectedAmount() {
    return this.collectedAmount;
  }

  public void setCollectedAmount(long collectedAmount) {
    this.collectedAmount = collectedAmount;
    setCollectedAmountIsSet(true);
  }

  public void unsetCollectedAmount() {
    __isset_bit_vector.clear(__COLLECTEDAMOUNT_ISSET_ID);
  }

  /** Returns true if field collectedAmount is set (has been assigned a value) and false otherwise */
  public boolean isSetCollectedAmount() {
    return __isset_bit_vector.get(__COLLECTEDAMOUNT_ISSET_ID);
  }

  public void setCollectedAmountIsSet(boolean value) {
    __isset_bit_vector.set(__COLLECTEDAMOUNT_ISSET_ID, value);
  }

  public long getAvailableLimit() {
    return this.availableLimit;
  }

  public void setAvailableLimit(long availableLimit) {
    this.availableLimit = availableLimit;
    setAvailableLimitIsSet(true);
  }

  public void unsetAvailableLimit() {
    __isset_bit_vector.clear(__AVAILABLELIMIT_ISSET_ID);
  }

  /** Returns true if field availableLimit is set (has been assigned a value) and false otherwise */
  public boolean isSetAvailableLimit() {
    return __isset_bit_vector.get(__AVAILABLELIMIT_ISSET_ID);
  }

  public void setAvailableLimitIsSet(boolean value) {
    __isset_bit_vector.set(__AVAILABLELIMIT_ISSET_ID, value);
  }

  public long getCreditLimit() {
    return this.creditLimit;
  }

  public void setCreditLimit(long creditLimit) {
    this.creditLimit = creditLimit;
    setCreditLimitIsSet(true);
  }

  public void unsetCreditLimit() {
    __isset_bit_vector.clear(__CREDITLIMIT_ISSET_ID);
  }

  /** Returns true if field creditLimit is set (has been assigned a value) and false otherwise */
  public boolean isSetCreditLimit() {
    return __isset_bit_vector.get(__CREDITLIMIT_ISSET_ID);
  }

  public void setCreditLimitIsSet(boolean value) {
    __isset_bit_vector.set(__CREDITLIMIT_ISSET_ID, value);
  }

  public String getSalt() {
    return this.salt;
  }

  public void setSalt(String salt) {
    this.salt = salt;
  }

  public void unsetSalt() {
    this.salt = null;
  }

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

  public void setSaltIsSet(boolean value) {
    if (!value) {
      this.salt = null;
    }
  }

  public String getPassword() {
    return this.password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public void unsetPassword() {
    this.password = null;
  }

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

  public void setPasswordIsSet(boolean value) {
    if (!value) {
      this.password = null;
    }
  }

  public boolean isIsActive() {
    return this.isActive;
  }

  public void setIsActive(boolean isActive) {
    this.isActive = isActive;
    setIsActiveIsSet(true);
  }

  public void unsetIsActive() {
    __isset_bit_vector.clear(__ISACTIVE_ISSET_ID);
  }

  /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
  public boolean isSetIsActive() {
    return __isset_bit_vector.get(__ISACTIVE_ISSET_ID);
  }

  public void setIsActiveIsSet(boolean value) {
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
  }

  public long getCircleId() {
    return this.circleId;
  }

  public void setCircleId(long circleId) {
    this.circleId = circleId;
    setCircleIdIsSet(true);
  }

  public void unsetCircleId() {
    __isset_bit_vector.clear(__CIRCLEID_ISSET_ID);
  }

  /** Returns true if field circleId is set (has been assigned a value) and false otherwise */
  public boolean isSetCircleId() {
    return __isset_bit_vector.get(__CIRCLEID_ISSET_ID);
  }

  public void setCircleIdIsSet(boolean value) {
    __isset_bit_vector.set(__CIRCLEID_ISSET_ID, value);
  }

  public String getEmail() {
    return this.email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public void unsetEmail() {
    this.email = null;
  }

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

  public void setEmailIsSet(boolean value) {
    if (!value) {
      this.email = null;
    }
  }

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

    case HOTSPOT_ID:
      if (value == null) {
        unsetHotspotId();
      } else {
        setHotspotId((String)value);
      }
      break;

    case COMPANY_ID:
      if (value == null) {
        unsetCompanyId();
      } else {
        setCompanyId((Long)value);
      }
      break;

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

    case CITY:
      if (value == null) {
        unsetCity();
      } else {
        setCity((String)value);
      }
      break;

    case COLLECTED_AMOUNT:
      if (value == null) {
        unsetCollectedAmount();
      } else {
        setCollectedAmount((Long)value);
      }
      break;

    case AVAILABLE_LIMIT:
      if (value == null) {
        unsetAvailableLimit();
      } else {
        setAvailableLimit((Long)value);
      }
      break;

    case CREDIT_LIMIT:
      if (value == null) {
        unsetCreditLimit();
      } else {
        setCreditLimit((Long)value);
      }
      break;

    case SALT:
      if (value == null) {
        unsetSalt();
      } else {
        setSalt((String)value);
      }
      break;

    case PASSWORD:
      if (value == null) {
        unsetPassword();
      } else {
        setPassword((String)value);
      }
      break;

    case IS_ACTIVE:
      if (value == null) {
        unsetIsActive();
      } else {
        setIsActive((Boolean)value);
      }
      break;

    case CIRCLE_ID:
      if (value == null) {
        unsetCircleId();
      } else {
        setCircleId((Long)value);
      }
      break;

    case EMAIL:
      if (value == null) {
        unsetEmail();
      } else {
        setEmail((String)value);
      }
      break;

    }
  }

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

    case HOTSPOT_ID:
      return getHotspotId();

    case COMPANY_ID:
      return Long.valueOf(getCompanyId());

    case NAME:
      return getName();

    case CITY:
      return getCity();

    case COLLECTED_AMOUNT:
      return Long.valueOf(getCollectedAmount());

    case AVAILABLE_LIMIT:
      return Long.valueOf(getAvailableLimit());

    case CREDIT_LIMIT:
      return Long.valueOf(getCreditLimit());

    case SALT:
      return getSalt();

    case PASSWORD:
      return getPassword();

    case IS_ACTIVE:
      return Boolean.valueOf(isIsActive());

    case CIRCLE_ID:
      return Long.valueOf(getCircleId());

    case EMAIL:
      return getEmail();

    }
    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 HOTSPOT_ID:
      return isSetHotspotId();
    case COMPANY_ID:
      return isSetCompanyId();
    case NAME:
      return isSetName();
    case CITY:
      return isSetCity();
    case COLLECTED_AMOUNT:
      return isSetCollectedAmount();
    case AVAILABLE_LIMIT:
      return isSetAvailableLimit();
    case CREDIT_LIMIT:
      return isSetCreditLimit();
    case SALT:
      return isSetSalt();
    case PASSWORD:
      return isSetPassword();
    case IS_ACTIVE:
      return isSetIsActive();
    case CIRCLE_ID:
      return isSetCircleId();
    case EMAIL:
      return isSetEmail();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(HotspotStore 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_hotspotId = true && this.isSetHotspotId();
    boolean that_present_hotspotId = true && that.isSetHotspotId();
    if (this_present_hotspotId || that_present_hotspotId) {
      if (!(this_present_hotspotId && that_present_hotspotId))
        return false;
      if (!this.hotspotId.equals(that.hotspotId))
        return false;
    }

    boolean this_present_companyId = true;
    boolean that_present_companyId = true;
    if (this_present_companyId || that_present_companyId) {
      if (!(this_present_companyId && that_present_companyId))
        return false;
      if (this.companyId != that.companyId)
        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_city = true && this.isSetCity();
    boolean that_present_city = true && that.isSetCity();
    if (this_present_city || that_present_city) {
      if (!(this_present_city && that_present_city))
        return false;
      if (!this.city.equals(that.city))
        return false;
    }

    boolean this_present_collectedAmount = true;
    boolean that_present_collectedAmount = true;
    if (this_present_collectedAmount || that_present_collectedAmount) {
      if (!(this_present_collectedAmount && that_present_collectedAmount))
        return false;
      if (this.collectedAmount != that.collectedAmount)
        return false;
    }

    boolean this_present_availableLimit = true;
    boolean that_present_availableLimit = true;
    if (this_present_availableLimit || that_present_availableLimit) {
      if (!(this_present_availableLimit && that_present_availableLimit))
        return false;
      if (this.availableLimit != that.availableLimit)
        return false;
    }

    boolean this_present_creditLimit = true;
    boolean that_present_creditLimit = true;
    if (this_present_creditLimit || that_present_creditLimit) {
      if (!(this_present_creditLimit && that_present_creditLimit))
        return false;
      if (this.creditLimit != that.creditLimit)
        return false;
    }

    boolean this_present_salt = true && this.isSetSalt();
    boolean that_present_salt = true && that.isSetSalt();
    if (this_present_salt || that_present_salt) {
      if (!(this_present_salt && that_present_salt))
        return false;
      if (!this.salt.equals(that.salt))
        return false;
    }

    boolean this_present_password = true && this.isSetPassword();
    boolean that_present_password = true && that.isSetPassword();
    if (this_present_password || that_present_password) {
      if (!(this_present_password && that_present_password))
        return false;
      if (!this.password.equals(that.password))
        return false;
    }

    boolean this_present_isActive = true;
    boolean that_present_isActive = true;
    if (this_present_isActive || that_present_isActive) {
      if (!(this_present_isActive && that_present_isActive))
        return false;
      if (this.isActive != that.isActive)
        return false;
    }

    boolean this_present_circleId = true;
    boolean that_present_circleId = true;
    if (this_present_circleId || that_present_circleId) {
      if (!(this_present_circleId && that_present_circleId))
        return false;
      if (this.circleId != that.circleId)
        return false;
    }

    boolean this_present_email = true && this.isSetEmail();
    boolean that_present_email = true && that.isSetEmail();
    if (this_present_email || that_present_email) {
      if (!(this_present_email && that_present_email))
        return false;
      if (!this.email.equals(that.email))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

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

    int lastComparison = 0;
    HotspotStore typedOther = (HotspotStore)other;

    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHotspotId()).compareTo(typedOther.isSetHotspotId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHotspotId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hotspotId, typedOther.hotspotId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCompanyId()).compareTo(typedOther.isSetCompanyId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCompanyId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.companyId, typedOther.companyId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCity()).compareTo(typedOther.isSetCity());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCity()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.city, typedOther.city);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCollectedAmount()).compareTo(typedOther.isSetCollectedAmount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCollectedAmount()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collectedAmount, typedOther.collectedAmount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAvailableLimit()).compareTo(typedOther.isSetAvailableLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAvailableLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availableLimit, typedOther.availableLimit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreditLimit()).compareTo(typedOther.isSetCreditLimit());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreditLimit()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creditLimit, typedOther.creditLimit);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSalt()).compareTo(typedOther.isSetSalt());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSalt()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salt, typedOther.salt);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPassword()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(typedOther.isSetIsActive());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsActive()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCircleId()).compareTo(typedOther.isSetCircleId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCircleId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.circleId, typedOther.circleId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetEmail()).compareTo(typedOther.isSetEmail());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEmail()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, typedOther.email);
      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 {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.id = iprot.readI64();
            setIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // HOTSPOT_ID
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.hotspotId = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // COMPANY_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.companyId = iprot.readI64();
            setCompanyIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.name = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // CITY
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.city = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // COLLECTED_AMOUNT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.collectedAmount = iprot.readI64();
            setCollectedAmountIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // AVAILABLE_LIMIT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.availableLimit = iprot.readI64();
            setAvailableLimitIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // CREDIT_LIMIT
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.creditLimit = iprot.readI64();
            setCreditLimitIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // SALT
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.salt = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // PASSWORD
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.password = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // IS_ACTIVE
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.isActive = iprot.readBool();
            setIsActiveIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // CIRCLE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.circleId = iprot.readI64();
            setCircleIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // EMAIL
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.email = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();
    validate();
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(ID_FIELD_DESC);
    oprot.writeI64(this.id);
    oprot.writeFieldEnd();
    if (this.hotspotId != null) {
      oprot.writeFieldBegin(HOTSPOT_ID_FIELD_DESC);
      oprot.writeString(this.hotspotId);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(COMPANY_ID_FIELD_DESC);
    oprot.writeI64(this.companyId);
    oprot.writeFieldEnd();
    if (this.name != null) {
      oprot.writeFieldBegin(NAME_FIELD_DESC);
      oprot.writeString(this.name);
      oprot.writeFieldEnd();
    }
    if (this.city != null) {
      oprot.writeFieldBegin(CITY_FIELD_DESC);
      oprot.writeString(this.city);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(COLLECTED_AMOUNT_FIELD_DESC);
    oprot.writeI64(this.collectedAmount);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(AVAILABLE_LIMIT_FIELD_DESC);
    oprot.writeI64(this.availableLimit);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CREDIT_LIMIT_FIELD_DESC);
    oprot.writeI64(this.creditLimit);
    oprot.writeFieldEnd();
    if (this.salt != null) {
      oprot.writeFieldBegin(SALT_FIELD_DESC);
      oprot.writeString(this.salt);
      oprot.writeFieldEnd();
    }
    if (this.password != null) {
      oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
      oprot.writeString(this.password);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
    oprot.writeBool(this.isActive);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CIRCLE_ID_FIELD_DESC);
    oprot.writeI64(this.circleId);
    oprot.writeFieldEnd();
    if (this.email != null) {
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
      oprot.writeString(this.email);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("HotspotStore(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("hotspotId:");
    if (this.hotspotId == null) {
      sb.append("null");
    } else {
      sb.append(this.hotspotId);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("companyId:");
    sb.append(this.companyId);
    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("city:");
    if (this.city == null) {
      sb.append("null");
    } else {
      sb.append(this.city);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("collectedAmount:");
    sb.append(this.collectedAmount);
    first = false;
    if (!first) sb.append(", ");
    sb.append("availableLimit:");
    sb.append(this.availableLimit);
    first = false;
    if (!first) sb.append(", ");
    sb.append("creditLimit:");
    sb.append(this.creditLimit);
    first = false;
    if (!first) sb.append(", ");
    sb.append("salt:");
    if (this.salt == null) {
      sb.append("null");
    } else {
      sb.append(this.salt);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("password:");
    if (this.password == null) {
      sb.append("null");
    } else {
      sb.append(this.password);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("isActive:");
    sb.append(this.isActive);
    first = false;
    if (!first) sb.append(", ");
    sb.append("circleId:");
    sb.append(this.circleId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("email:");
    if (this.email == null) {
      sb.append("null");
    } else {
      sb.append(this.email);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
  }

  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_bit_vector = new BitSet(1);
      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);
    }
  }

}