Subversion Repositories SmartDukaan

Rev

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

  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 CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("code", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField OWNER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerName", org.apache.thrift.protocol.TType.STRING, (short)4);
  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)5);
  private static final org.apache.thrift.protocol.TField MOBILE_FIELD_DESC = new org.apache.thrift.protocol.TField("mobile", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField ALTERNATE_MOBILE_FIELD_DESC = new org.apache.thrift.protocol.TField("alternateMobile", org.apache.thrift.protocol.TType.STRING, (short)7);
  private static final org.apache.thrift.protocol.TField STRIKER_FIELD_DESC = new org.apache.thrift.protocol.TField("striker", org.apache.thrift.protocol.TType.BOOL, (short)8);
  private static final org.apache.thrift.protocol.TField TIN_FIELD_DESC = new org.apache.thrift.protocol.TField("tin", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField SP_COUNTER_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("spCounterSize", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField FP_COUNTER_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("fpCounterSize", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField DOB_FIELD_DESC = new org.apache.thrift.protocol.TField("dob", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)13);
  private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.I64, (short)14);
  private static final org.apache.thrift.protocol.TField DOCUMENT_VERIFIED_FIELD_DESC = new org.apache.thrift.protocol.TField("documentVerified", org.apache.thrift.protocol.TType.BOOL, (short)15);
  private static final org.apache.thrift.protocol.TField VERIFICATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("verificationType", org.apache.thrift.protocol.TType.I32, (short)16);
  private static final org.apache.thrift.protocol.TField VERIFIED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("verifiedOn", org.apache.thrift.protocol.TType.I64, (short)17);
  private static final org.apache.thrift.protocol.TField GSTIN_FIELD_DESC = new org.apache.thrift.protocol.TField("gstin", org.apache.thrift.protocol.TType.STRING, (short)18);

  private long id; // required
  private String code; // required
  private String name; // required
  private String ownerName; // required
  private String email; // required
  private String mobile; // required
  private String alternateMobile; // required
  private boolean striker; // required
  private String tin; // required
  private long spCounterSize; // required
  private long fpCounterSize; // required
  private String dob; // required
  private long addedOn; // required
  private long address; // required
  private boolean documentVerified; // required
  private CounterVerificationType verificationType; // required
  private long verifiedOn; // required
  private String gstin; // 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"),
    CODE((short)2, "code"),
    NAME((short)3, "name"),
    OWNER_NAME((short)4, "ownerName"),
    EMAIL((short)5, "email"),
    MOBILE((short)6, "mobile"),
    ALTERNATE_MOBILE((short)7, "alternateMobile"),
    STRIKER((short)8, "striker"),
    TIN((short)9, "tin"),
    SP_COUNTER_SIZE((short)10, "spCounterSize"),
    FP_COUNTER_SIZE((short)11, "fpCounterSize"),
    DOB((short)12, "dob"),
    ADDED_ON((short)13, "addedOn"),
    ADDRESS((short)14, "address"),
    DOCUMENT_VERIFIED((short)15, "documentVerified"),
    /**
     * 
     * @see CounterVerificationType
     */
    VERIFICATION_TYPE((short)16, "verificationType"),
    VERIFIED_ON((short)17, "verifiedOn"),
    GSTIN((short)18, "gstin");

    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: // CODE
          return CODE;
        case 3: // NAME
          return NAME;
        case 4: // OWNER_NAME
          return OWNER_NAME;
        case 5: // EMAIL
          return EMAIL;
        case 6: // MOBILE
          return MOBILE;
        case 7: // ALTERNATE_MOBILE
          return ALTERNATE_MOBILE;
        case 8: // STRIKER
          return STRIKER;
        case 9: // TIN
          return TIN;
        case 10: // SP_COUNTER_SIZE
          return SP_COUNTER_SIZE;
        case 11: // FP_COUNTER_SIZE
          return FP_COUNTER_SIZE;
        case 12: // DOB
          return DOB;
        case 13: // ADDED_ON
          return ADDED_ON;
        case 14: // ADDRESS
          return ADDRESS;
        case 15: // DOCUMENT_VERIFIED
          return DOCUMENT_VERIFIED;
        case 16: // VERIFICATION_TYPE
          return VERIFICATION_TYPE;
        case 17: // VERIFIED_ON
          return VERIFIED_ON;
        case 18: // GSTIN
          return GSTIN;
        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 __STRIKER_ISSET_ID = 1;
  private static final int __SPCOUNTERSIZE_ISSET_ID = 2;
  private static final int __FPCOUNTERSIZE_ISSET_ID = 3;
  private static final int __ADDEDON_ISSET_ID = 4;
  private static final int __ADDRESS_ISSET_ID = 5;
  private static final int __DOCUMENTVERIFIED_ISSET_ID = 6;
  private static final int __VERIFIEDON_ISSET_ID = 7;
  private BitSet __isset_bit_vector = new BitSet(8);

  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.CODE, new org.apache.thrift.meta_data.FieldMetaData("code", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.OWNER_NAME, new org.apache.thrift.meta_data.FieldMetaData("ownerName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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)));
    tmpMap.put(_Fields.MOBILE, new org.apache.thrift.meta_data.FieldMetaData("mobile", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ALTERNATE_MOBILE, new org.apache.thrift.meta_data.FieldMetaData("alternateMobile", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.STRIKER, new org.apache.thrift.meta_data.FieldMetaData("striker", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.SP_COUNTER_SIZE, new org.apache.thrift.meta_data.FieldMetaData("spCounterSize", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.FP_COUNTER_SIZE, new org.apache.thrift.meta_data.FieldMetaData("fpCounterSize", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DOB, new org.apache.thrift.meta_data.FieldMetaData("dob", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.DOCUMENT_VERIFIED, new org.apache.thrift.meta_data.FieldMetaData("documentVerified", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.VERIFICATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("verificationType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CounterVerificationType.class)));
    tmpMap.put(_Fields.VERIFIED_ON, new org.apache.thrift.meta_data.FieldMetaData("verifiedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.GSTIN, new org.apache.thrift.meta_data.FieldMetaData("gstin", 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(Counter.class, metaDataMap);
  }

  public Counter() {
  }

  public Counter(
    long id,
    String code,
    String name,
    String ownerName,
    String email,
    String mobile,
    String alternateMobile,
    boolean striker,
    String tin,
    long spCounterSize,
    long fpCounterSize,
    String dob,
    long addedOn,
    long address,
    boolean documentVerified,
    CounterVerificationType verificationType,
    long verifiedOn,
    String gstin)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.code = code;
    this.name = name;
    this.ownerName = ownerName;
    this.email = email;
    this.mobile = mobile;
    this.alternateMobile = alternateMobile;
    this.striker = striker;
    setStrikerIsSet(true);
    this.tin = tin;
    this.spCounterSize = spCounterSize;
    setSpCounterSizeIsSet(true);
    this.fpCounterSize = fpCounterSize;
    setFpCounterSizeIsSet(true);
    this.dob = dob;
    this.addedOn = addedOn;
    setAddedOnIsSet(true);
    this.address = address;
    setAddressIsSet(true);
    this.documentVerified = documentVerified;
    setDocumentVerifiedIsSet(true);
    this.verificationType = verificationType;
    this.verifiedOn = verifiedOn;
    setVerifiedOnIsSet(true);
    this.gstin = gstin;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Counter(Counter other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetCode()) {
      this.code = other.code;
    }
    if (other.isSetName()) {
      this.name = other.name;
    }
    if (other.isSetOwnerName()) {
      this.ownerName = other.ownerName;
    }
    if (other.isSetEmail()) {
      this.email = other.email;
    }
    if (other.isSetMobile()) {
      this.mobile = other.mobile;
    }
    if (other.isSetAlternateMobile()) {
      this.alternateMobile = other.alternateMobile;
    }
    this.striker = other.striker;
    if (other.isSetTin()) {
      this.tin = other.tin;
    }
    this.spCounterSize = other.spCounterSize;
    this.fpCounterSize = other.fpCounterSize;
    if (other.isSetDob()) {
      this.dob = other.dob;
    }
    this.addedOn = other.addedOn;
    this.address = other.address;
    this.documentVerified = other.documentVerified;
    if (other.isSetVerificationType()) {
      this.verificationType = other.verificationType;
    }
    this.verifiedOn = other.verifiedOn;
    if (other.isSetGstin()) {
      this.gstin = other.gstin;
    }
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.code = null;
    this.name = null;
    this.ownerName = null;
    this.email = null;
    this.mobile = null;
    this.alternateMobile = null;
    setStrikerIsSet(false);
    this.striker = false;
    this.tin = null;
    setSpCounterSizeIsSet(false);
    this.spCounterSize = 0;
    setFpCounterSizeIsSet(false);
    this.fpCounterSize = 0;
    this.dob = null;
    setAddedOnIsSet(false);
    this.addedOn = 0;
    setAddressIsSet(false);
    this.address = 0;
    setDocumentVerifiedIsSet(false);
    this.documentVerified = false;
    this.verificationType = null;
    setVerifiedOnIsSet(false);
    this.verifiedOn = 0;
    this.gstin = 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 getCode() {
    return this.code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public void unsetCode() {
    this.code = null;
  }

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

  public void setCodeIsSet(boolean value) {
    if (!value) {
      this.code = null;
    }
  }

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

  public void setOwnerName(String ownerName) {
    this.ownerName = ownerName;
  }

  public void unsetOwnerName() {
    this.ownerName = null;
  }

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

  public void setOwnerNameIsSet(boolean value) {
    if (!value) {
      this.ownerName = null;
    }
  }

  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 String getMobile() {
    return this.mobile;
  }

  public void setMobile(String mobile) {
    this.mobile = mobile;
  }

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

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

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

  public String getAlternateMobile() {
    return this.alternateMobile;
  }

  public void setAlternateMobile(String alternateMobile) {
    this.alternateMobile = alternateMobile;
  }

  public void unsetAlternateMobile() {
    this.alternateMobile = null;
  }

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

  public void setAlternateMobileIsSet(boolean value) {
    if (!value) {
      this.alternateMobile = null;
    }
  }

  public boolean isStriker() {
    return this.striker;
  }

  public void setStriker(boolean striker) {
    this.striker = striker;
    setStrikerIsSet(true);
  }

  public void unsetStriker() {
    __isset_bit_vector.clear(__STRIKER_ISSET_ID);
  }

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

  public void setStrikerIsSet(boolean value) {
    __isset_bit_vector.set(__STRIKER_ISSET_ID, value);
  }

  public String getTin() {
    return this.tin;
  }

  public void setTin(String tin) {
    this.tin = tin;
  }

  public void unsetTin() {
    this.tin = null;
  }

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

  public void setTinIsSet(boolean value) {
    if (!value) {
      this.tin = null;
    }
  }

  public long getSpCounterSize() {
    return this.spCounterSize;
  }

  public void setSpCounterSize(long spCounterSize) {
    this.spCounterSize = spCounterSize;
    setSpCounterSizeIsSet(true);
  }

  public void unsetSpCounterSize() {
    __isset_bit_vector.clear(__SPCOUNTERSIZE_ISSET_ID);
  }

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

  public void setSpCounterSizeIsSet(boolean value) {
    __isset_bit_vector.set(__SPCOUNTERSIZE_ISSET_ID, value);
  }

  public long getFpCounterSize() {
    return this.fpCounterSize;
  }

  public void setFpCounterSize(long fpCounterSize) {
    this.fpCounterSize = fpCounterSize;
    setFpCounterSizeIsSet(true);
  }

  public void unsetFpCounterSize() {
    __isset_bit_vector.clear(__FPCOUNTERSIZE_ISSET_ID);
  }

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

  public void setFpCounterSizeIsSet(boolean value) {
    __isset_bit_vector.set(__FPCOUNTERSIZE_ISSET_ID, value);
  }

  public String getDob() {
    return this.dob;
  }

  public void setDob(String dob) {
    this.dob = dob;
  }

  public void unsetDob() {
    this.dob = null;
  }

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

  public void setDobIsSet(boolean value) {
    if (!value) {
      this.dob = null;
    }
  }

  public long getAddedOn() {
    return this.addedOn;
  }

  public void setAddedOn(long addedOn) {
    this.addedOn = addedOn;
    setAddedOnIsSet(true);
  }

  public void unsetAddedOn() {
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
  }

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

  public void setAddedOnIsSet(boolean value) {
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
  }

  public long getAddress() {
    return this.address;
  }

  public void setAddress(long address) {
    this.address = address;
    setAddressIsSet(true);
  }

  public void unsetAddress() {
    __isset_bit_vector.clear(__ADDRESS_ISSET_ID);
  }

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

  public void setAddressIsSet(boolean value) {
    __isset_bit_vector.set(__ADDRESS_ISSET_ID, value);
  }

  public boolean isDocumentVerified() {
    return this.documentVerified;
  }

  public void setDocumentVerified(boolean documentVerified) {
    this.documentVerified = documentVerified;
    setDocumentVerifiedIsSet(true);
  }

  public void unsetDocumentVerified() {
    __isset_bit_vector.clear(__DOCUMENTVERIFIED_ISSET_ID);
  }

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

  public void setDocumentVerifiedIsSet(boolean value) {
    __isset_bit_vector.set(__DOCUMENTVERIFIED_ISSET_ID, value);
  }

  /**
   * 
   * @see CounterVerificationType
   */
  public CounterVerificationType getVerificationType() {
    return this.verificationType;
  }

  /**
   * 
   * @see CounterVerificationType
   */
  public void setVerificationType(CounterVerificationType verificationType) {
    this.verificationType = verificationType;
  }

  public void unsetVerificationType() {
    this.verificationType = null;
  }

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

  public void setVerificationTypeIsSet(boolean value) {
    if (!value) {
      this.verificationType = null;
    }
  }

  public long getVerifiedOn() {
    return this.verifiedOn;
  }

  public void setVerifiedOn(long verifiedOn) {
    this.verifiedOn = verifiedOn;
    setVerifiedOnIsSet(true);
  }

  public void unsetVerifiedOn() {
    __isset_bit_vector.clear(__VERIFIEDON_ISSET_ID);
  }

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

  public void setVerifiedOnIsSet(boolean value) {
    __isset_bit_vector.set(__VERIFIEDON_ISSET_ID, value);
  }

  public String getGstin() {
    return this.gstin;
  }

  public void setGstin(String gstin) {
    this.gstin = gstin;
  }

  public void unsetGstin() {
    this.gstin = null;
  }

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

  public void setGstinIsSet(boolean value) {
    if (!value) {
      this.gstin = null;
    }
  }

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

    case CODE:
      if (value == null) {
        unsetCode();
      } else {
        setCode((String)value);
      }
      break;

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

    case OWNER_NAME:
      if (value == null) {
        unsetOwnerName();
      } else {
        setOwnerName((String)value);
      }
      break;

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

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

    case ALTERNATE_MOBILE:
      if (value == null) {
        unsetAlternateMobile();
      } else {
        setAlternateMobile((String)value);
      }
      break;

    case STRIKER:
      if (value == null) {
        unsetStriker();
      } else {
        setStriker((Boolean)value);
      }
      break;

    case TIN:
      if (value == null) {
        unsetTin();
      } else {
        setTin((String)value);
      }
      break;

    case SP_COUNTER_SIZE:
      if (value == null) {
        unsetSpCounterSize();
      } else {
        setSpCounterSize((Long)value);
      }
      break;

    case FP_COUNTER_SIZE:
      if (value == null) {
        unsetFpCounterSize();
      } else {
        setFpCounterSize((Long)value);
      }
      break;

    case DOB:
      if (value == null) {
        unsetDob();
      } else {
        setDob((String)value);
      }
      break;

    case ADDED_ON:
      if (value == null) {
        unsetAddedOn();
      } else {
        setAddedOn((Long)value);
      }
      break;

    case ADDRESS:
      if (value == null) {
        unsetAddress();
      } else {
        setAddress((Long)value);
      }
      break;

    case DOCUMENT_VERIFIED:
      if (value == null) {
        unsetDocumentVerified();
      } else {
        setDocumentVerified((Boolean)value);
      }
      break;

    case VERIFICATION_TYPE:
      if (value == null) {
        unsetVerificationType();
      } else {
        setVerificationType((CounterVerificationType)value);
      }
      break;

    case VERIFIED_ON:
      if (value == null) {
        unsetVerifiedOn();
      } else {
        setVerifiedOn((Long)value);
      }
      break;

    case GSTIN:
      if (value == null) {
        unsetGstin();
      } else {
        setGstin((String)value);
      }
      break;

    }
  }

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

    case CODE:
      return getCode();

    case NAME:
      return getName();

    case OWNER_NAME:
      return getOwnerName();

    case EMAIL:
      return getEmail();

    case MOBILE:
      return getMobile();

    case ALTERNATE_MOBILE:
      return getAlternateMobile();

    case STRIKER:
      return Boolean.valueOf(isStriker());

    case TIN:
      return getTin();

    case SP_COUNTER_SIZE:
      return Long.valueOf(getSpCounterSize());

    case FP_COUNTER_SIZE:
      return Long.valueOf(getFpCounterSize());

    case DOB:
      return getDob();

    case ADDED_ON:
      return Long.valueOf(getAddedOn());

    case ADDRESS:
      return Long.valueOf(getAddress());

    case DOCUMENT_VERIFIED:
      return Boolean.valueOf(isDocumentVerified());

    case VERIFICATION_TYPE:
      return getVerificationType();

    case VERIFIED_ON:
      return Long.valueOf(getVerifiedOn());

    case GSTIN:
      return getGstin();

    }
    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 CODE:
      return isSetCode();
    case NAME:
      return isSetName();
    case OWNER_NAME:
      return isSetOwnerName();
    case EMAIL:
      return isSetEmail();
    case MOBILE:
      return isSetMobile();
    case ALTERNATE_MOBILE:
      return isSetAlternateMobile();
    case STRIKER:
      return isSetStriker();
    case TIN:
      return isSetTin();
    case SP_COUNTER_SIZE:
      return isSetSpCounterSize();
    case FP_COUNTER_SIZE:
      return isSetFpCounterSize();
    case DOB:
      return isSetDob();
    case ADDED_ON:
      return isSetAddedOn();
    case ADDRESS:
      return isSetAddress();
    case DOCUMENT_VERIFIED:
      return isSetDocumentVerified();
    case VERIFICATION_TYPE:
      return isSetVerificationType();
    case VERIFIED_ON:
      return isSetVerifiedOn();
    case GSTIN:
      return isSetGstin();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(Counter 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_code = true && this.isSetCode();
    boolean that_present_code = true && that.isSetCode();
    if (this_present_code || that_present_code) {
      if (!(this_present_code && that_present_code))
        return false;
      if (!this.code.equals(that.code))
        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_ownerName = true && this.isSetOwnerName();
    boolean that_present_ownerName = true && that.isSetOwnerName();
    if (this_present_ownerName || that_present_ownerName) {
      if (!(this_present_ownerName && that_present_ownerName))
        return false;
      if (!this.ownerName.equals(that.ownerName))
        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;
    }

    boolean this_present_mobile = true && this.isSetMobile();
    boolean that_present_mobile = true && that.isSetMobile();
    if (this_present_mobile || that_present_mobile) {
      if (!(this_present_mobile && that_present_mobile))
        return false;
      if (!this.mobile.equals(that.mobile))
        return false;
    }

    boolean this_present_alternateMobile = true && this.isSetAlternateMobile();
    boolean that_present_alternateMobile = true && that.isSetAlternateMobile();
    if (this_present_alternateMobile || that_present_alternateMobile) {
      if (!(this_present_alternateMobile && that_present_alternateMobile))
        return false;
      if (!this.alternateMobile.equals(that.alternateMobile))
        return false;
    }

    boolean this_present_striker = true;
    boolean that_present_striker = true;
    if (this_present_striker || that_present_striker) {
      if (!(this_present_striker && that_present_striker))
        return false;
      if (this.striker != that.striker)
        return false;
    }

    boolean this_present_tin = true && this.isSetTin();
    boolean that_present_tin = true && that.isSetTin();
    if (this_present_tin || that_present_tin) {
      if (!(this_present_tin && that_present_tin))
        return false;
      if (!this.tin.equals(that.tin))
        return false;
    }

    boolean this_present_spCounterSize = true;
    boolean that_present_spCounterSize = true;
    if (this_present_spCounterSize || that_present_spCounterSize) {
      if (!(this_present_spCounterSize && that_present_spCounterSize))
        return false;
      if (this.spCounterSize != that.spCounterSize)
        return false;
    }

    boolean this_present_fpCounterSize = true;
    boolean that_present_fpCounterSize = true;
    if (this_present_fpCounterSize || that_present_fpCounterSize) {
      if (!(this_present_fpCounterSize && that_present_fpCounterSize))
        return false;
      if (this.fpCounterSize != that.fpCounterSize)
        return false;
    }

    boolean this_present_dob = true && this.isSetDob();
    boolean that_present_dob = true && that.isSetDob();
    if (this_present_dob || that_present_dob) {
      if (!(this_present_dob && that_present_dob))
        return false;
      if (!this.dob.equals(that.dob))
        return false;
    }

    boolean this_present_addedOn = true;
    boolean that_present_addedOn = true;
    if (this_present_addedOn || that_present_addedOn) {
      if (!(this_present_addedOn && that_present_addedOn))
        return false;
      if (this.addedOn != that.addedOn)
        return false;
    }

    boolean this_present_address = true;
    boolean that_present_address = true;
    if (this_present_address || that_present_address) {
      if (!(this_present_address && that_present_address))
        return false;
      if (this.address != that.address)
        return false;
    }

    boolean this_present_documentVerified = true;
    boolean that_present_documentVerified = true;
    if (this_present_documentVerified || that_present_documentVerified) {
      if (!(this_present_documentVerified && that_present_documentVerified))
        return false;
      if (this.documentVerified != that.documentVerified)
        return false;
    }

    boolean this_present_verificationType = true && this.isSetVerificationType();
    boolean that_present_verificationType = true && that.isSetVerificationType();
    if (this_present_verificationType || that_present_verificationType) {
      if (!(this_present_verificationType && that_present_verificationType))
        return false;
      if (!this.verificationType.equals(that.verificationType))
        return false;
    }

    boolean this_present_verifiedOn = true;
    boolean that_present_verifiedOn = true;
    if (this_present_verifiedOn || that_present_verifiedOn) {
      if (!(this_present_verifiedOn && that_present_verifiedOn))
        return false;
      if (this.verifiedOn != that.verifiedOn)
        return false;
    }

    boolean this_present_gstin = true && this.isSetGstin();
    boolean that_present_gstin = true && that.isSetGstin();
    if (this_present_gstin || that_present_gstin) {
      if (!(this_present_gstin && that_present_gstin))
        return false;
      if (!this.gstin.equals(that.gstin))
        return false;
    }

    return true;
  }

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

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

    int lastComparison = 0;
    Counter typedOther = (Counter)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(isSetCode()).compareTo(typedOther.isSetCode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.code, typedOther.code);
      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(isSetOwnerName()).compareTo(typedOther.isSetOwnerName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOwnerName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, typedOther.ownerName);
      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;
      }
    }
    lastComparison = Boolean.valueOf(isSetMobile()).compareTo(typedOther.isSetMobile());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMobile()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mobile, typedOther.mobile);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAlternateMobile()).compareTo(typedOther.isSetAlternateMobile());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAlternateMobile()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternateMobile, typedOther.alternateMobile);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStriker()).compareTo(typedOther.isSetStriker());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStriker()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.striker, typedOther.striker);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTin()).compareTo(typedOther.isSetTin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSpCounterSize()).compareTo(typedOther.isSetSpCounterSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSpCounterSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spCounterSize, typedOther.spCounterSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFpCounterSize()).compareTo(typedOther.isSetFpCounterSize());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFpCounterSize()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fpCounterSize, typedOther.fpCounterSize);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDob()).compareTo(typedOther.isSetDob());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDob()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dob, typedOther.dob);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAddedOn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAddress()).compareTo(typedOther.isSetAddress());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAddress()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, typedOther.address);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDocumentVerified()).compareTo(typedOther.isSetDocumentVerified());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDocumentVerified()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.documentVerified, typedOther.documentVerified);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVerificationType()).compareTo(typedOther.isSetVerificationType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVerificationType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.verificationType, typedOther.verificationType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVerifiedOn()).compareTo(typedOther.isSetVerifiedOn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVerifiedOn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.verifiedOn, typedOther.verifiedOn);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGstin()).compareTo(typedOther.isSetGstin());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGstin()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gstin, typedOther.gstin);
      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: // CODE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.code = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // 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 4: // OWNER_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.ownerName = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // 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;
        case 6: // MOBILE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.mobile = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // ALTERNATE_MOBILE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.alternateMobile = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // STRIKER
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.striker = iprot.readBool();
            setStrikerIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // TIN
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.tin = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // SP_COUNTER_SIZE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.spCounterSize = iprot.readI64();
            setSpCounterSizeIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // FP_COUNTER_SIZE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.fpCounterSize = iprot.readI64();
            setFpCounterSizeIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // DOB
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.dob = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // ADDED_ON
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.addedOn = iprot.readI64();
            setAddedOnIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // ADDRESS
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.address = iprot.readI64();
            setAddressIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // DOCUMENT_VERIFIED
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.documentVerified = iprot.readBool();
            setDocumentVerifiedIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // VERIFICATION_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.verificationType = CounterVerificationType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // VERIFIED_ON
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.verifiedOn = iprot.readI64();
            setVerifiedOnIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 18: // GSTIN
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.gstin = 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.code != null) {
      oprot.writeFieldBegin(CODE_FIELD_DESC);
      oprot.writeString(this.code);
      oprot.writeFieldEnd();
    }
    if (this.name != null) {
      oprot.writeFieldBegin(NAME_FIELD_DESC);
      oprot.writeString(this.name);
      oprot.writeFieldEnd();
    }
    if (this.ownerName != null) {
      oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC);
      oprot.writeString(this.ownerName);
      oprot.writeFieldEnd();
    }
    if (this.email != null) {
      oprot.writeFieldBegin(EMAIL_FIELD_DESC);
      oprot.writeString(this.email);
      oprot.writeFieldEnd();
    }
    if (this.mobile != null) {
      oprot.writeFieldBegin(MOBILE_FIELD_DESC);
      oprot.writeString(this.mobile);
      oprot.writeFieldEnd();
    }
    if (this.alternateMobile != null) {
      oprot.writeFieldBegin(ALTERNATE_MOBILE_FIELD_DESC);
      oprot.writeString(this.alternateMobile);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(STRIKER_FIELD_DESC);
    oprot.writeBool(this.striker);
    oprot.writeFieldEnd();
    if (this.tin != null) {
      oprot.writeFieldBegin(TIN_FIELD_DESC);
      oprot.writeString(this.tin);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(SP_COUNTER_SIZE_FIELD_DESC);
    oprot.writeI64(this.spCounterSize);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(FP_COUNTER_SIZE_FIELD_DESC);
    oprot.writeI64(this.fpCounterSize);
    oprot.writeFieldEnd();
    if (this.dob != null) {
      oprot.writeFieldBegin(DOB_FIELD_DESC);
      oprot.writeString(this.dob);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
    oprot.writeI64(this.addedOn);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
    oprot.writeI64(this.address);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(DOCUMENT_VERIFIED_FIELD_DESC);
    oprot.writeBool(this.documentVerified);
    oprot.writeFieldEnd();
    if (this.verificationType != null) {
      oprot.writeFieldBegin(VERIFICATION_TYPE_FIELD_DESC);
      oprot.writeI32(this.verificationType.getValue());
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(VERIFIED_ON_FIELD_DESC);
    oprot.writeI64(this.verifiedOn);
    oprot.writeFieldEnd();
    if (this.gstin != null) {
      oprot.writeFieldBegin(GSTIN_FIELD_DESC);
      oprot.writeString(this.gstin);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

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

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("code:");
    if (this.code == null) {
      sb.append("null");
    } else {
      sb.append(this.code);
    }
    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("ownerName:");
    if (this.ownerName == null) {
      sb.append("null");
    } else {
      sb.append(this.ownerName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("email:");
    if (this.email == null) {
      sb.append("null");
    } else {
      sb.append(this.email);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("mobile:");
    if (this.mobile == null) {
      sb.append("null");
    } else {
      sb.append(this.mobile);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("alternateMobile:");
    if (this.alternateMobile == null) {
      sb.append("null");
    } else {
      sb.append(this.alternateMobile);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("striker:");
    sb.append(this.striker);
    first = false;
    if (!first) sb.append(", ");
    sb.append("tin:");
    if (this.tin == null) {
      sb.append("null");
    } else {
      sb.append(this.tin);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("spCounterSize:");
    sb.append(this.spCounterSize);
    first = false;
    if (!first) sb.append(", ");
    sb.append("fpCounterSize:");
    sb.append(this.fpCounterSize);
    first = false;
    if (!first) sb.append(", ");
    sb.append("dob:");
    if (this.dob == null) {
      sb.append("null");
    } else {
      sb.append(this.dob);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("addedOn:");
    sb.append(this.addedOn);
    first = false;
    if (!first) sb.append(", ");
    sb.append("address:");
    sb.append(this.address);
    first = false;
    if (!first) sb.append(", ");
    sb.append("documentVerified:");
    sb.append(this.documentVerified);
    first = false;
    if (!first) sb.append(", ");
    sb.append("verificationType:");
    if (this.verificationType == null) {
      sb.append("null");
    } else {
      sb.append(this.verificationType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("verifiedOn:");
    sb.append(this.verifiedOn);
    first = false;
    if (!first) sb.append(", ");
    sb.append("gstin:");
    if (this.gstin == null) {
      sb.append("null");
    } else {
      sb.append(this.gstin);
    }
    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);
    }
  }

}