Subversion Repositories SmartDukaan

Rev

Rev 18530 | 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.user;

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

  private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField TIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("tinNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField CST_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("cstNumber", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField DEALER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerName", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField DEALER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("dealerAddress", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField PAN_FIELD_DESC = new org.apache.thrift.protocol.TField("pan", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField REGISTRATION_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("registrationDate", org.apache.thrift.protocol.TType.I64, (short)8);
  private static final org.apache.thrift.protocol.TField REGISTRATION_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("registrationStatus", org.apache.thrift.protocol.TType.BOOL, (short)9);
  private static final org.apache.thrift.protocol.TField VALIDATED_TILL_FIELD_DESC = new org.apache.thrift.protocol.TField("validatedTill", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)11);

  private long counterId; // required
  private String tinNumber; // required
  private String cstNumber; // required
  private String dealerName; // required
  private String dealerAddress; // required
  private String state; // required
  private String pan; // required
  private long registrationDate; // required
  private boolean registrationStatus; // required
  private long validatedTill; // required
  private long created; // 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 {
    COUNTER_ID((short)1, "counterId"),
    TIN_NUMBER((short)2, "tinNumber"),
    CST_NUMBER((short)3, "cstNumber"),
    DEALER_NAME((short)4, "dealerName"),
    DEALER_ADDRESS((short)5, "dealerAddress"),
    STATE((short)6, "state"),
    PAN((short)7, "pan"),
    REGISTRATION_DATE((short)8, "registrationDate"),
    REGISTRATION_STATUS((short)9, "registrationStatus"),
    VALIDATED_TILL((short)10, "validatedTill"),
    CREATED((short)11, "created");

    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: // COUNTER_ID
          return COUNTER_ID;
        case 2: // TIN_NUMBER
          return TIN_NUMBER;
        case 3: // CST_NUMBER
          return CST_NUMBER;
        case 4: // DEALER_NAME
          return DEALER_NAME;
        case 5: // DEALER_ADDRESS
          return DEALER_ADDRESS;
        case 6: // STATE
          return STATE;
        case 7: // PAN
          return PAN;
        case 8: // REGISTRATION_DATE
          return REGISTRATION_DATE;
        case 9: // REGISTRATION_STATUS
          return REGISTRATION_STATUS;
        case 10: // VALIDATED_TILL
          return VALIDATED_TILL;
        case 11: // CREATED
          return CREATED;
        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 __COUNTERID_ISSET_ID = 0;
  private static final int __REGISTRATIONDATE_ISSET_ID = 1;
  private static final int __REGISTRATIONSTATUS_ISSET_ID = 2;
  private static final int __VALIDATEDTILL_ISSET_ID = 3;
  private static final int __CREATED_ISSET_ID = 4;
  private BitSet __isset_bit_vector = new BitSet(5);

  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.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("tinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CST_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("cstNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DEALER_NAME, new org.apache.thrift.meta_data.FieldMetaData("dealerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.DEALER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("dealerAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PAN, new org.apache.thrift.meta_data.FieldMetaData("pan", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.REGISTRATION_DATE, new org.apache.thrift.meta_data.FieldMetaData("registrationDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.REGISTRATION_STATUS, new org.apache.thrift.meta_data.FieldMetaData("registrationStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.VALIDATED_TILL, new org.apache.thrift.meta_data.FieldMetaData("validatedTill", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.CREATED, new org.apache.thrift.meta_data.FieldMetaData("created", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CounterOnlineInfo.class, metaDataMap);
  }

  public CounterOnlineInfo() {
  }

  public CounterOnlineInfo(
    long counterId,
    String tinNumber,
    String cstNumber,
    String dealerName,
    String dealerAddress,
    String state,
    String pan,
    long registrationDate,
    boolean registrationStatus,
    long validatedTill,
    long created)
  {
    this();
    this.counterId = counterId;
    setCounterIdIsSet(true);
    this.tinNumber = tinNumber;
    this.cstNumber = cstNumber;
    this.dealerName = dealerName;
    this.dealerAddress = dealerAddress;
    this.state = state;
    this.pan = pan;
    this.registrationDate = registrationDate;
    setRegistrationDateIsSet(true);
    this.registrationStatus = registrationStatus;
    setRegistrationStatusIsSet(true);
    this.validatedTill = validatedTill;
    setValidatedTillIsSet(true);
    this.created = created;
    setCreatedIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public CounterOnlineInfo(CounterOnlineInfo other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.counterId = other.counterId;
    if (other.isSetTinNumber()) {
      this.tinNumber = other.tinNumber;
    }
    if (other.isSetCstNumber()) {
      this.cstNumber = other.cstNumber;
    }
    if (other.isSetDealerName()) {
      this.dealerName = other.dealerName;
    }
    if (other.isSetDealerAddress()) {
      this.dealerAddress = other.dealerAddress;
    }
    if (other.isSetState()) {
      this.state = other.state;
    }
    if (other.isSetPan()) {
      this.pan = other.pan;
    }
    this.registrationDate = other.registrationDate;
    this.registrationStatus = other.registrationStatus;
    this.validatedTill = other.validatedTill;
    this.created = other.created;
  }

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

  @Override
  public void clear() {
    setCounterIdIsSet(false);
    this.counterId = 0;
    this.tinNumber = null;
    this.cstNumber = null;
    this.dealerName = null;
    this.dealerAddress = null;
    this.state = null;
    this.pan = null;
    setRegistrationDateIsSet(false);
    this.registrationDate = 0;
    setRegistrationStatusIsSet(false);
    this.registrationStatus = false;
    setValidatedTillIsSet(false);
    this.validatedTill = 0;
    setCreatedIsSet(false);
    this.created = 0;
  }

  public long getCounterId() {
    return this.counterId;
  }

  public void setCounterId(long counterId) {
    this.counterId = counterId;
    setCounterIdIsSet(true);
  }

  public void unsetCounterId() {
    __isset_bit_vector.clear(__COUNTERID_ISSET_ID);
  }

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

  public void setCounterIdIsSet(boolean value) {
    __isset_bit_vector.set(__COUNTERID_ISSET_ID, value);
  }

  public String getTinNumber() {
    return this.tinNumber;
  }

  public void setTinNumber(String tinNumber) {
    this.tinNumber = tinNumber;
  }

  public void unsetTinNumber() {
    this.tinNumber = null;
  }

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

  public void setTinNumberIsSet(boolean value) {
    if (!value) {
      this.tinNumber = null;
    }
  }

  public String getCstNumber() {
    return this.cstNumber;
  }

  public void setCstNumber(String cstNumber) {
    this.cstNumber = cstNumber;
  }

  public void unsetCstNumber() {
    this.cstNumber = null;
  }

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

  public void setCstNumberIsSet(boolean value) {
    if (!value) {
      this.cstNumber = null;
    }
  }

  public String getDealerName() {
    return this.dealerName;
  }

  public void setDealerName(String dealerName) {
    this.dealerName = dealerName;
  }

  public void unsetDealerName() {
    this.dealerName = null;
  }

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

  public void setDealerNameIsSet(boolean value) {
    if (!value) {
      this.dealerName = null;
    }
  }

  public String getDealerAddress() {
    return this.dealerAddress;
  }

  public void setDealerAddress(String dealerAddress) {
    this.dealerAddress = dealerAddress;
  }

  public void unsetDealerAddress() {
    this.dealerAddress = null;
  }

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

  public void setDealerAddressIsSet(boolean value) {
    if (!value) {
      this.dealerAddress = null;
    }
  }

  public String getState() {
    return this.state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public void unsetState() {
    this.state = null;
  }

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

  public void setStateIsSet(boolean value) {
    if (!value) {
      this.state = null;
    }
  }

  public String getPan() {
    return this.pan;
  }

  public void setPan(String pan) {
    this.pan = pan;
  }

  public void unsetPan() {
    this.pan = null;
  }

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

  public void setPanIsSet(boolean value) {
    if (!value) {
      this.pan = null;
    }
  }

  public long getRegistrationDate() {
    return this.registrationDate;
  }

  public void setRegistrationDate(long registrationDate) {
    this.registrationDate = registrationDate;
    setRegistrationDateIsSet(true);
  }

  public void unsetRegistrationDate() {
    __isset_bit_vector.clear(__REGISTRATIONDATE_ISSET_ID);
  }

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

  public void setRegistrationDateIsSet(boolean value) {
    __isset_bit_vector.set(__REGISTRATIONDATE_ISSET_ID, value);
  }

  public boolean isRegistrationStatus() {
    return this.registrationStatus;
  }

  public void setRegistrationStatus(boolean registrationStatus) {
    this.registrationStatus = registrationStatus;
    setRegistrationStatusIsSet(true);
  }

  public void unsetRegistrationStatus() {
    __isset_bit_vector.clear(__REGISTRATIONSTATUS_ISSET_ID);
  }

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

  public void setRegistrationStatusIsSet(boolean value) {
    __isset_bit_vector.set(__REGISTRATIONSTATUS_ISSET_ID, value);
  }

  public long getValidatedTill() {
    return this.validatedTill;
  }

  public void setValidatedTill(long validatedTill) {
    this.validatedTill = validatedTill;
    setValidatedTillIsSet(true);
  }

  public void unsetValidatedTill() {
    __isset_bit_vector.clear(__VALIDATEDTILL_ISSET_ID);
  }

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

  public void setValidatedTillIsSet(boolean value) {
    __isset_bit_vector.set(__VALIDATEDTILL_ISSET_ID, value);
  }

  public long getCreated() {
    return this.created;
  }

  public void setCreated(long created) {
    this.created = created;
    setCreatedIsSet(true);
  }

  public void unsetCreated() {
    __isset_bit_vector.clear(__CREATED_ISSET_ID);
  }

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

  public void setCreatedIsSet(boolean value) {
    __isset_bit_vector.set(__CREATED_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case COUNTER_ID:
      if (value == null) {
        unsetCounterId();
      } else {
        setCounterId((Long)value);
      }
      break;

    case TIN_NUMBER:
      if (value == null) {
        unsetTinNumber();
      } else {
        setTinNumber((String)value);
      }
      break;

    case CST_NUMBER:
      if (value == null) {
        unsetCstNumber();
      } else {
        setCstNumber((String)value);
      }
      break;

    case DEALER_NAME:
      if (value == null) {
        unsetDealerName();
      } else {
        setDealerName((String)value);
      }
      break;

    case DEALER_ADDRESS:
      if (value == null) {
        unsetDealerAddress();
      } else {
        setDealerAddress((String)value);
      }
      break;

    case STATE:
      if (value == null) {
        unsetState();
      } else {
        setState((String)value);
      }
      break;

    case PAN:
      if (value == null) {
        unsetPan();
      } else {
        setPan((String)value);
      }
      break;

    case REGISTRATION_DATE:
      if (value == null) {
        unsetRegistrationDate();
      } else {
        setRegistrationDate((Long)value);
      }
      break;

    case REGISTRATION_STATUS:
      if (value == null) {
        unsetRegistrationStatus();
      } else {
        setRegistrationStatus((Boolean)value);
      }
      break;

    case VALIDATED_TILL:
      if (value == null) {
        unsetValidatedTill();
      } else {
        setValidatedTill((Long)value);
      }
      break;

    case CREATED:
      if (value == null) {
        unsetCreated();
      } else {
        setCreated((Long)value);
      }
      break;

    }
  }

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

    case TIN_NUMBER:
      return getTinNumber();

    case CST_NUMBER:
      return getCstNumber();

    case DEALER_NAME:
      return getDealerName();

    case DEALER_ADDRESS:
      return getDealerAddress();

    case STATE:
      return getState();

    case PAN:
      return getPan();

    case REGISTRATION_DATE:
      return Long.valueOf(getRegistrationDate());

    case REGISTRATION_STATUS:
      return Boolean.valueOf(isRegistrationStatus());

    case VALIDATED_TILL:
      return Long.valueOf(getValidatedTill());

    case CREATED:
      return Long.valueOf(getCreated());

    }
    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 COUNTER_ID:
      return isSetCounterId();
    case TIN_NUMBER:
      return isSetTinNumber();
    case CST_NUMBER:
      return isSetCstNumber();
    case DEALER_NAME:
      return isSetDealerName();
    case DEALER_ADDRESS:
      return isSetDealerAddress();
    case STATE:
      return isSetState();
    case PAN:
      return isSetPan();
    case REGISTRATION_DATE:
      return isSetRegistrationDate();
    case REGISTRATION_STATUS:
      return isSetRegistrationStatus();
    case VALIDATED_TILL:
      return isSetValidatedTill();
    case CREATED:
      return isSetCreated();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(CounterOnlineInfo that) {
    if (that == null)
      return false;

    boolean this_present_counterId = true;
    boolean that_present_counterId = true;
    if (this_present_counterId || that_present_counterId) {
      if (!(this_present_counterId && that_present_counterId))
        return false;
      if (this.counterId != that.counterId)
        return false;
    }

    boolean this_present_tinNumber = true && this.isSetTinNumber();
    boolean that_present_tinNumber = true && that.isSetTinNumber();
    if (this_present_tinNumber || that_present_tinNumber) {
      if (!(this_present_tinNumber && that_present_tinNumber))
        return false;
      if (!this.tinNumber.equals(that.tinNumber))
        return false;
    }

    boolean this_present_cstNumber = true && this.isSetCstNumber();
    boolean that_present_cstNumber = true && that.isSetCstNumber();
    if (this_present_cstNumber || that_present_cstNumber) {
      if (!(this_present_cstNumber && that_present_cstNumber))
        return false;
      if (!this.cstNumber.equals(that.cstNumber))
        return false;
    }

    boolean this_present_dealerName = true && this.isSetDealerName();
    boolean that_present_dealerName = true && that.isSetDealerName();
    if (this_present_dealerName || that_present_dealerName) {
      if (!(this_present_dealerName && that_present_dealerName))
        return false;
      if (!this.dealerName.equals(that.dealerName))
        return false;
    }

    boolean this_present_dealerAddress = true && this.isSetDealerAddress();
    boolean that_present_dealerAddress = true && that.isSetDealerAddress();
    if (this_present_dealerAddress || that_present_dealerAddress) {
      if (!(this_present_dealerAddress && that_present_dealerAddress))
        return false;
      if (!this.dealerAddress.equals(that.dealerAddress))
        return false;
    }

    boolean this_present_state = true && this.isSetState();
    boolean that_present_state = true && that.isSetState();
    if (this_present_state || that_present_state) {
      if (!(this_present_state && that_present_state))
        return false;
      if (!this.state.equals(that.state))
        return false;
    }

    boolean this_present_pan = true && this.isSetPan();
    boolean that_present_pan = true && that.isSetPan();
    if (this_present_pan || that_present_pan) {
      if (!(this_present_pan && that_present_pan))
        return false;
      if (!this.pan.equals(that.pan))
        return false;
    }

    boolean this_present_registrationDate = true;
    boolean that_present_registrationDate = true;
    if (this_present_registrationDate || that_present_registrationDate) {
      if (!(this_present_registrationDate && that_present_registrationDate))
        return false;
      if (this.registrationDate != that.registrationDate)
        return false;
    }

    boolean this_present_registrationStatus = true;
    boolean that_present_registrationStatus = true;
    if (this_present_registrationStatus || that_present_registrationStatus) {
      if (!(this_present_registrationStatus && that_present_registrationStatus))
        return false;
      if (this.registrationStatus != that.registrationStatus)
        return false;
    }

    boolean this_present_validatedTill = true;
    boolean that_present_validatedTill = true;
    if (this_present_validatedTill || that_present_validatedTill) {
      if (!(this_present_validatedTill && that_present_validatedTill))
        return false;
      if (this.validatedTill != that.validatedTill)
        return false;
    }

    boolean this_present_created = true;
    boolean that_present_created = true;
    if (this_present_created || that_present_created) {
      if (!(this_present_created && that_present_created))
        return false;
      if (this.created != that.created)
        return false;
    }

    return true;
  }

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

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

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

    lastComparison = Boolean.valueOf(isSetCounterId()).compareTo(typedOther.isSetCounterId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCounterId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counterId, typedOther.counterId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTinNumber()).compareTo(typedOther.isSetTinNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTinNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCstNumber()).compareTo(typedOther.isSetCstNumber());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCstNumber()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cstNumber, typedOther.cstNumber);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDealerName()).compareTo(typedOther.isSetDealerName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDealerName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerName, typedOther.dealerName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDealerAddress()).compareTo(typedOther.isSetDealerAddress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDealerAddress()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dealerAddress, typedOther.dealerAddress);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetPan()).compareTo(typedOther.isSetPan());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPan()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pan, typedOther.pan);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRegistrationDate()).compareTo(typedOther.isSetRegistrationDate());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRegistrationDate()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registrationDate, typedOther.registrationDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRegistrationStatus()).compareTo(typedOther.isSetRegistrationStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRegistrationStatus()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registrationStatus, typedOther.registrationStatus);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetValidatedTill()).compareTo(typedOther.isSetValidatedTill());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetValidatedTill()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validatedTill, typedOther.validatedTill);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreated()).compareTo(typedOther.isSetCreated());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreated()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.created, typedOther.created);
      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: // COUNTER_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.counterId = iprot.readI64();
            setCounterIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // TIN_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.tinNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // CST_NUMBER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.cstNumber = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // DEALER_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.dealerName = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // DEALER_ADDRESS
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.dealerAddress = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // STATE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.state = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // PAN
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.pan = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // REGISTRATION_DATE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.registrationDate = iprot.readI64();
            setRegistrationDateIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // REGISTRATION_STATUS
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.registrationStatus = iprot.readBool();
            setRegistrationStatusIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // VALIDATED_TILL
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.validatedTill = iprot.readI64();
            setValidatedTillIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // CREATED
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.created = iprot.readI64();
            setCreatedIsSet(true);
          } 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(COUNTER_ID_FIELD_DESC);
    oprot.writeI64(this.counterId);
    oprot.writeFieldEnd();
    if (this.tinNumber != null) {
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
      oprot.writeString(this.tinNumber);
      oprot.writeFieldEnd();
    }
    if (this.cstNumber != null) {
      oprot.writeFieldBegin(CST_NUMBER_FIELD_DESC);
      oprot.writeString(this.cstNumber);
      oprot.writeFieldEnd();
    }
    if (this.dealerName != null) {
      oprot.writeFieldBegin(DEALER_NAME_FIELD_DESC);
      oprot.writeString(this.dealerName);
      oprot.writeFieldEnd();
    }
    if (this.dealerAddress != null) {
      oprot.writeFieldBegin(DEALER_ADDRESS_FIELD_DESC);
      oprot.writeString(this.dealerAddress);
      oprot.writeFieldEnd();
    }
    if (this.state != null) {
      oprot.writeFieldBegin(STATE_FIELD_DESC);
      oprot.writeString(this.state);
      oprot.writeFieldEnd();
    }
    if (this.pan != null) {
      oprot.writeFieldBegin(PAN_FIELD_DESC);
      oprot.writeString(this.pan);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(REGISTRATION_DATE_FIELD_DESC);
    oprot.writeI64(this.registrationDate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(REGISTRATION_STATUS_FIELD_DESC);
    oprot.writeBool(this.registrationStatus);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(VALIDATED_TILL_FIELD_DESC);
    oprot.writeI64(this.validatedTill);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(CREATED_FIELD_DESC);
    oprot.writeI64(this.created);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("counterId:");
    sb.append(this.counterId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("tinNumber:");
    if (this.tinNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.tinNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("cstNumber:");
    if (this.cstNumber == null) {
      sb.append("null");
    } else {
      sb.append(this.cstNumber);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("dealerName:");
    if (this.dealerName == null) {
      sb.append("null");
    } else {
      sb.append(this.dealerName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("dealerAddress:");
    if (this.dealerAddress == null) {
      sb.append("null");
    } else {
      sb.append(this.dealerAddress);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("state:");
    if (this.state == null) {
      sb.append("null");
    } else {
      sb.append(this.state);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("pan:");
    if (this.pan == null) {
      sb.append("null");
    } else {
      sb.append(this.pan);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("registrationDate:");
    sb.append(this.registrationDate);
    first = false;
    if (!first) sb.append(", ");
    sb.append("registrationStatus:");
    sb.append(this.registrationStatus);
    first = false;
    if (!first) sb.append(", ");
    sb.append("validatedTill:");
    sb.append(this.validatedTill);
    first = false;
    if (!first) sb.append(", ");
    sb.append("created:");
    sb.append(this.created);
    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);
    }
  }

}