Subversion Repositories SmartDukaan

Rev

Rev 12357 | 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.inventory;

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

  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 DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
  private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRING, (short)3);
  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)5);
  private static final org.apache.thrift.protocol.TField LAST_CHECKED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("lastCheckedOn", org.apache.thrift.protocol.TType.I64, (short)6);
  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)7);
  private static final org.apache.thrift.protocol.TField PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pincode", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField VENDOR_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorString", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField LOGISTICS_LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsLocation", org.apache.thrift.protocol.TType.I32, (short)10);
  private static final org.apache.thrift.protocol.TField BILLING_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("billingType", org.apache.thrift.protocol.TType.I32, (short)12);
  private static final org.apache.thrift.protocol.TField WAREHOUSE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseType", org.apache.thrift.protocol.TType.I32, (short)13);
  private static final org.apache.thrift.protocol.TField INVENTORY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryType", org.apache.thrift.protocol.TType.I32, (short)14);
  private static final org.apache.thrift.protocol.TField VENDOR_FIELD_DESC = new org.apache.thrift.protocol.TField("vendor", org.apache.thrift.protocol.TType.STRUCT, (short)15);
  private static final org.apache.thrift.protocol.TField SHIPPING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)16);
  private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)17);
  private static final org.apache.thrift.protocol.TField IS_AVAILABILITY_MONITORED_FIELD_DESC = new org.apache.thrift.protocol.TField("isAvailabilityMonitored", org.apache.thrift.protocol.TType.BOOL, (short)18);
  private static final org.apache.thrift.protocol.TField TRANSFER_DELAY_IN_HOURS_FIELD_DESC = new org.apache.thrift.protocol.TField("transferDelayInHours", org.apache.thrift.protocol.TType.I64, (short)19);
  private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("stateId", org.apache.thrift.protocol.TType.I64, (short)20);
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)21);
  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)22);

  private long id; // required
  private String displayName; // required
  private String location; // required
  private long addedOn; // required
  private long lastCheckedOn; // required
  private String tinNumber; // required
  private String pincode; // required
  private String vendorString; // required
  private WarehouseLocation logisticsLocation; // required
  private BillingType billingType; // required
  private WarehouseType warehouseType; // required
  private InventoryType inventoryType; // required
  private Vendor vendor; // required
  private long shippingWarehouseId; // required
  private long billingWarehouseId; // required
  private boolean isAvailabilityMonitored; // required
  private long transferDelayInHours; // required
  private long stateId; // required
  private long source; // 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"),
    DISPLAY_NAME((short)2, "displayName"),
    LOCATION((short)3, "location"),
    ADDED_ON((short)5, "addedOn"),
    LAST_CHECKED_ON((short)6, "lastCheckedOn"),
    TIN_NUMBER((short)7, "tinNumber"),
    PINCODE((short)8, "pincode"),
    VENDOR_STRING((short)9, "vendorString"),
    /**
     * 
     * @see WarehouseLocation
     */
    LOGISTICS_LOCATION((short)10, "logisticsLocation"),
    /**
     * 
     * @see BillingType
     */
    BILLING_TYPE((short)12, "billingType"),
    /**
     * 
     * @see WarehouseType
     */
    WAREHOUSE_TYPE((short)13, "warehouseType"),
    /**
     * 
     * @see InventoryType
     */
    INVENTORY_TYPE((short)14, "inventoryType"),
    VENDOR((short)15, "vendor"),
    SHIPPING_WAREHOUSE_ID((short)16, "shippingWarehouseId"),
    BILLING_WAREHOUSE_ID((short)17, "billingWarehouseId"),
    IS_AVAILABILITY_MONITORED((short)18, "isAvailabilityMonitored"),
    TRANSFER_DELAY_IN_HOURS((short)19, "transferDelayInHours"),
    STATE_ID((short)20, "stateId"),
    SOURCE((short)21, "source"),
    GSTIN((short)22, "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: // DISPLAY_NAME
          return DISPLAY_NAME;
        case 3: // LOCATION
          return LOCATION;
        case 5: // ADDED_ON
          return ADDED_ON;
        case 6: // LAST_CHECKED_ON
          return LAST_CHECKED_ON;
        case 7: // TIN_NUMBER
          return TIN_NUMBER;
        case 8: // PINCODE
          return PINCODE;
        case 9: // VENDOR_STRING
          return VENDOR_STRING;
        case 10: // LOGISTICS_LOCATION
          return LOGISTICS_LOCATION;
        case 12: // BILLING_TYPE
          return BILLING_TYPE;
        case 13: // WAREHOUSE_TYPE
          return WAREHOUSE_TYPE;
        case 14: // INVENTORY_TYPE
          return INVENTORY_TYPE;
        case 15: // VENDOR
          return VENDOR;
        case 16: // SHIPPING_WAREHOUSE_ID
          return SHIPPING_WAREHOUSE_ID;
        case 17: // BILLING_WAREHOUSE_ID
          return BILLING_WAREHOUSE_ID;
        case 18: // IS_AVAILABILITY_MONITORED
          return IS_AVAILABILITY_MONITORED;
        case 19: // TRANSFER_DELAY_IN_HOURS
          return TRANSFER_DELAY_IN_HOURS;
        case 20: // STATE_ID
          return STATE_ID;
        case 21: // SOURCE
          return SOURCE;
        case 22: // 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 __ADDEDON_ISSET_ID = 1;
  private static final int __LASTCHECKEDON_ISSET_ID = 2;
  private static final int __SHIPPINGWAREHOUSEID_ISSET_ID = 3;
  private static final int __BILLINGWAREHOUSEID_ISSET_ID = 4;
  private static final int __ISAVAILABILITYMONITORED_ISSET_ID = 5;
  private static final int __TRANSFERDELAYINHOURS_ISSET_ID = 6;
  private static final int __STATEID_ISSET_ID = 7;
  private static final int __SOURCE_ISSET_ID = 8;
  private BitSet __isset_bit_vector = new BitSet(9);

  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.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", 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.LAST_CHECKED_ON, new org.apache.thrift.meta_data.FieldMetaData("lastCheckedOn", 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.PINCODE, new org.apache.thrift.meta_data.FieldMetaData("pincode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.VENDOR_STRING, new org.apache.thrift.meta_data.FieldMetaData("vendorString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.LOGISTICS_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("logisticsLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WarehouseLocation.class)));
    tmpMap.put(_Fields.BILLING_TYPE, new org.apache.thrift.meta_data.FieldMetaData("billingType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BillingType.class)));
    tmpMap.put(_Fields.WAREHOUSE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("warehouseType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WarehouseType.class)));
    tmpMap.put(_Fields.INVENTORY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("inventoryType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, InventoryType.class)));
    tmpMap.put(_Fields.VENDOR, new org.apache.thrift.meta_data.FieldMetaData("vendor", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Vendor.class)));
    tmpMap.put(_Fields.SHIPPING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("shippingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IS_AVAILABILITY_MONITORED, new org.apache.thrift.meta_data.FieldMetaData("isAvailabilityMonitored", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.TRANSFER_DELAY_IN_HOURS, new org.apache.thrift.meta_data.FieldMetaData("transferDelayInHours", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", 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(Warehouse.class, metaDataMap);
  }

  public Warehouse() {
  }

  public Warehouse(
    long id,
    String displayName,
    String location,
    long addedOn,
    long lastCheckedOn,
    String tinNumber,
    String pincode,
    String vendorString,
    WarehouseLocation logisticsLocation,
    BillingType billingType,
    WarehouseType warehouseType,
    InventoryType inventoryType,
    Vendor vendor,
    long shippingWarehouseId,
    long billingWarehouseId,
    boolean isAvailabilityMonitored,
    long transferDelayInHours,
    long stateId,
    long source,
    String gstin)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.displayName = displayName;
    this.location = location;
    this.addedOn = addedOn;
    setAddedOnIsSet(true);
    this.lastCheckedOn = lastCheckedOn;
    setLastCheckedOnIsSet(true);
    this.tinNumber = tinNumber;
    this.pincode = pincode;
    this.vendorString = vendorString;
    this.logisticsLocation = logisticsLocation;
    this.billingType = billingType;
    this.warehouseType = warehouseType;
    this.inventoryType = inventoryType;
    this.vendor = vendor;
    this.shippingWarehouseId = shippingWarehouseId;
    setShippingWarehouseIdIsSet(true);
    this.billingWarehouseId = billingWarehouseId;
    setBillingWarehouseIdIsSet(true);
    this.isAvailabilityMonitored = isAvailabilityMonitored;
    setIsAvailabilityMonitoredIsSet(true);
    this.transferDelayInHours = transferDelayInHours;
    setTransferDelayInHoursIsSet(true);
    this.stateId = stateId;
    setStateIdIsSet(true);
    this.source = source;
    setSourceIsSet(true);
    this.gstin = gstin;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public Warehouse(Warehouse other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.id = other.id;
    if (other.isSetDisplayName()) {
      this.displayName = other.displayName;
    }
    if (other.isSetLocation()) {
      this.location = other.location;
    }
    this.addedOn = other.addedOn;
    this.lastCheckedOn = other.lastCheckedOn;
    if (other.isSetTinNumber()) {
      this.tinNumber = other.tinNumber;
    }
    if (other.isSetPincode()) {
      this.pincode = other.pincode;
    }
    if (other.isSetVendorString()) {
      this.vendorString = other.vendorString;
    }
    if (other.isSetLogisticsLocation()) {
      this.logisticsLocation = other.logisticsLocation;
    }
    if (other.isSetBillingType()) {
      this.billingType = other.billingType;
    }
    if (other.isSetWarehouseType()) {
      this.warehouseType = other.warehouseType;
    }
    if (other.isSetInventoryType()) {
      this.inventoryType = other.inventoryType;
    }
    if (other.isSetVendor()) {
      this.vendor = new Vendor(other.vendor);
    }
    this.shippingWarehouseId = other.shippingWarehouseId;
    this.billingWarehouseId = other.billingWarehouseId;
    this.isAvailabilityMonitored = other.isAvailabilityMonitored;
    this.transferDelayInHours = other.transferDelayInHours;
    this.stateId = other.stateId;
    this.source = other.source;
    if (other.isSetGstin()) {
      this.gstin = other.gstin;
    }
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    this.displayName = null;
    this.location = null;
    setAddedOnIsSet(false);
    this.addedOn = 0;
    setLastCheckedOnIsSet(false);
    this.lastCheckedOn = 0;
    this.tinNumber = null;
    this.pincode = null;
    this.vendorString = null;
    this.logisticsLocation = null;
    this.billingType = null;
    this.warehouseType = null;
    this.inventoryType = null;
    this.vendor = null;
    setShippingWarehouseIdIsSet(false);
    this.shippingWarehouseId = 0;
    setBillingWarehouseIdIsSet(false);
    this.billingWarehouseId = 0;
    setIsAvailabilityMonitoredIsSet(false);
    this.isAvailabilityMonitored = false;
    setTransferDelayInHoursIsSet(false);
    this.transferDelayInHours = 0;
    setStateIdIsSet(false);
    this.stateId = 0;
    setSourceIsSet(false);
    this.source = 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 getDisplayName() {
    return this.displayName;
  }

  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  public void unsetDisplayName() {
    this.displayName = null;
  }

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

  public void setDisplayNameIsSet(boolean value) {
    if (!value) {
      this.displayName = null;
    }
  }

  public String getLocation() {
    return this.location;
  }

  public void setLocation(String location) {
    this.location = location;
  }

  public void unsetLocation() {
    this.location = null;
  }

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

  public void setLocationIsSet(boolean value) {
    if (!value) {
      this.location = 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 getLastCheckedOn() {
    return this.lastCheckedOn;
  }

  public void setLastCheckedOn(long lastCheckedOn) {
    this.lastCheckedOn = lastCheckedOn;
    setLastCheckedOnIsSet(true);
  }

  public void unsetLastCheckedOn() {
    __isset_bit_vector.clear(__LASTCHECKEDON_ISSET_ID);
  }

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

  public void setLastCheckedOnIsSet(boolean value) {
    __isset_bit_vector.set(__LASTCHECKEDON_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 getPincode() {
    return this.pincode;
  }

  public void setPincode(String pincode) {
    this.pincode = pincode;
  }

  public void unsetPincode() {
    this.pincode = null;
  }

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

  public void setPincodeIsSet(boolean value) {
    if (!value) {
      this.pincode = null;
    }
  }

  public String getVendorString() {
    return this.vendorString;
  }

  public void setVendorString(String vendorString) {
    this.vendorString = vendorString;
  }

  public void unsetVendorString() {
    this.vendorString = null;
  }

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

  public void setVendorStringIsSet(boolean value) {
    if (!value) {
      this.vendorString = null;
    }
  }

  /**
   * 
   * @see WarehouseLocation
   */
  public WarehouseLocation getLogisticsLocation() {
    return this.logisticsLocation;
  }

  /**
   * 
   * @see WarehouseLocation
   */
  public void setLogisticsLocation(WarehouseLocation logisticsLocation) {
    this.logisticsLocation = logisticsLocation;
  }

  public void unsetLogisticsLocation() {
    this.logisticsLocation = null;
  }

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

  public void setLogisticsLocationIsSet(boolean value) {
    if (!value) {
      this.logisticsLocation = null;
    }
  }

  /**
   * 
   * @see BillingType
   */
  public BillingType getBillingType() {
    return this.billingType;
  }

  /**
   * 
   * @see BillingType
   */
  public void setBillingType(BillingType billingType) {
    this.billingType = billingType;
  }

  public void unsetBillingType() {
    this.billingType = null;
  }

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

  public void setBillingTypeIsSet(boolean value) {
    if (!value) {
      this.billingType = null;
    }
  }

  /**
   * 
   * @see WarehouseType
   */
  public WarehouseType getWarehouseType() {
    return this.warehouseType;
  }

  /**
   * 
   * @see WarehouseType
   */
  public void setWarehouseType(WarehouseType warehouseType) {
    this.warehouseType = warehouseType;
  }

  public void unsetWarehouseType() {
    this.warehouseType = null;
  }

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

  public void setWarehouseTypeIsSet(boolean value) {
    if (!value) {
      this.warehouseType = null;
    }
  }

  /**
   * 
   * @see InventoryType
   */
  public InventoryType getInventoryType() {
    return this.inventoryType;
  }

  /**
   * 
   * @see InventoryType
   */
  public void setInventoryType(InventoryType inventoryType) {
    this.inventoryType = inventoryType;
  }

  public void unsetInventoryType() {
    this.inventoryType = null;
  }

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

  public void setInventoryTypeIsSet(boolean value) {
    if (!value) {
      this.inventoryType = null;
    }
  }

  public Vendor getVendor() {
    return this.vendor;
  }

  public void setVendor(Vendor vendor) {
    this.vendor = vendor;
  }

  public void unsetVendor() {
    this.vendor = null;
  }

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

  public void setVendorIsSet(boolean value) {
    if (!value) {
      this.vendor = null;
    }
  }

  public long getShippingWarehouseId() {
    return this.shippingWarehouseId;
  }

  public void setShippingWarehouseId(long shippingWarehouseId) {
    this.shippingWarehouseId = shippingWarehouseId;
    setShippingWarehouseIdIsSet(true);
  }

  public void unsetShippingWarehouseId() {
    __isset_bit_vector.clear(__SHIPPINGWAREHOUSEID_ISSET_ID);
  }

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

  public void setShippingWarehouseIdIsSet(boolean value) {
    __isset_bit_vector.set(__SHIPPINGWAREHOUSEID_ISSET_ID, value);
  }

  public long getBillingWarehouseId() {
    return this.billingWarehouseId;
  }

  public void setBillingWarehouseId(long billingWarehouseId) {
    this.billingWarehouseId = billingWarehouseId;
    setBillingWarehouseIdIsSet(true);
  }

  public void unsetBillingWarehouseId() {
    __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
  }

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

  public void setBillingWarehouseIdIsSet(boolean value) {
    __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
  }

  public boolean isIsAvailabilityMonitored() {
    return this.isAvailabilityMonitored;
  }

  public void setIsAvailabilityMonitored(boolean isAvailabilityMonitored) {
    this.isAvailabilityMonitored = isAvailabilityMonitored;
    setIsAvailabilityMonitoredIsSet(true);
  }

  public void unsetIsAvailabilityMonitored() {
    __isset_bit_vector.clear(__ISAVAILABILITYMONITORED_ISSET_ID);
  }

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

  public void setIsAvailabilityMonitoredIsSet(boolean value) {
    __isset_bit_vector.set(__ISAVAILABILITYMONITORED_ISSET_ID, value);
  }

  public long getTransferDelayInHours() {
    return this.transferDelayInHours;
  }

  public void setTransferDelayInHours(long transferDelayInHours) {
    this.transferDelayInHours = transferDelayInHours;
    setTransferDelayInHoursIsSet(true);
  }

  public void unsetTransferDelayInHours() {
    __isset_bit_vector.clear(__TRANSFERDELAYINHOURS_ISSET_ID);
  }

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

  public void setTransferDelayInHoursIsSet(boolean value) {
    __isset_bit_vector.set(__TRANSFERDELAYINHOURS_ISSET_ID, value);
  }

  public long getStateId() {
    return this.stateId;
  }

  public void setStateId(long stateId) {
    this.stateId = stateId;
    setStateIdIsSet(true);
  }

  public void unsetStateId() {
    __isset_bit_vector.clear(__STATEID_ISSET_ID);
  }

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

  public void setStateIdIsSet(boolean value) {
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
  }

  public long getSource() {
    return this.source;
  }

  public void setSource(long source) {
    this.source = source;
    setSourceIsSet(true);
  }

  public void unsetSource() {
    __isset_bit_vector.clear(__SOURCE_ISSET_ID);
  }

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

  public void setSourceIsSet(boolean value) {
    __isset_bit_vector.set(__SOURCE_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 DISPLAY_NAME:
      if (value == null) {
        unsetDisplayName();
      } else {
        setDisplayName((String)value);
      }
      break;

    case LOCATION:
      if (value == null) {
        unsetLocation();
      } else {
        setLocation((String)value);
      }
      break;

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

    case LAST_CHECKED_ON:
      if (value == null) {
        unsetLastCheckedOn();
      } else {
        setLastCheckedOn((Long)value);
      }
      break;

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

    case PINCODE:
      if (value == null) {
        unsetPincode();
      } else {
        setPincode((String)value);
      }
      break;

    case VENDOR_STRING:
      if (value == null) {
        unsetVendorString();
      } else {
        setVendorString((String)value);
      }
      break;

    case LOGISTICS_LOCATION:
      if (value == null) {
        unsetLogisticsLocation();
      } else {
        setLogisticsLocation((WarehouseLocation)value);
      }
      break;

    case BILLING_TYPE:
      if (value == null) {
        unsetBillingType();
      } else {
        setBillingType((BillingType)value);
      }
      break;

    case WAREHOUSE_TYPE:
      if (value == null) {
        unsetWarehouseType();
      } else {
        setWarehouseType((WarehouseType)value);
      }
      break;

    case INVENTORY_TYPE:
      if (value == null) {
        unsetInventoryType();
      } else {
        setInventoryType((InventoryType)value);
      }
      break;

    case VENDOR:
      if (value == null) {
        unsetVendor();
      } else {
        setVendor((Vendor)value);
      }
      break;

    case SHIPPING_WAREHOUSE_ID:
      if (value == null) {
        unsetShippingWarehouseId();
      } else {
        setShippingWarehouseId((Long)value);
      }
      break;

    case BILLING_WAREHOUSE_ID:
      if (value == null) {
        unsetBillingWarehouseId();
      } else {
        setBillingWarehouseId((Long)value);
      }
      break;

    case IS_AVAILABILITY_MONITORED:
      if (value == null) {
        unsetIsAvailabilityMonitored();
      } else {
        setIsAvailabilityMonitored((Boolean)value);
      }
      break;

    case TRANSFER_DELAY_IN_HOURS:
      if (value == null) {
        unsetTransferDelayInHours();
      } else {
        setTransferDelayInHours((Long)value);
      }
      break;

    case STATE_ID:
      if (value == null) {
        unsetStateId();
      } else {
        setStateId((Long)value);
      }
      break;

    case SOURCE:
      if (value == null) {
        unsetSource();
      } else {
        setSource((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 DISPLAY_NAME:
      return getDisplayName();

    case LOCATION:
      return getLocation();

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

    case LAST_CHECKED_ON:
      return Long.valueOf(getLastCheckedOn());

    case TIN_NUMBER:
      return getTinNumber();

    case PINCODE:
      return getPincode();

    case VENDOR_STRING:
      return getVendorString();

    case LOGISTICS_LOCATION:
      return getLogisticsLocation();

    case BILLING_TYPE:
      return getBillingType();

    case WAREHOUSE_TYPE:
      return getWarehouseType();

    case INVENTORY_TYPE:
      return getInventoryType();

    case VENDOR:
      return getVendor();

    case SHIPPING_WAREHOUSE_ID:
      return Long.valueOf(getShippingWarehouseId());

    case BILLING_WAREHOUSE_ID:
      return Long.valueOf(getBillingWarehouseId());

    case IS_AVAILABILITY_MONITORED:
      return Boolean.valueOf(isIsAvailabilityMonitored());

    case TRANSFER_DELAY_IN_HOURS:
      return Long.valueOf(getTransferDelayInHours());

    case STATE_ID:
      return Long.valueOf(getStateId());

    case SOURCE:
      return Long.valueOf(getSource());

    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 DISPLAY_NAME:
      return isSetDisplayName();
    case LOCATION:
      return isSetLocation();
    case ADDED_ON:
      return isSetAddedOn();
    case LAST_CHECKED_ON:
      return isSetLastCheckedOn();
    case TIN_NUMBER:
      return isSetTinNumber();
    case PINCODE:
      return isSetPincode();
    case VENDOR_STRING:
      return isSetVendorString();
    case LOGISTICS_LOCATION:
      return isSetLogisticsLocation();
    case BILLING_TYPE:
      return isSetBillingType();
    case WAREHOUSE_TYPE:
      return isSetWarehouseType();
    case INVENTORY_TYPE:
      return isSetInventoryType();
    case VENDOR:
      return isSetVendor();
    case SHIPPING_WAREHOUSE_ID:
      return isSetShippingWarehouseId();
    case BILLING_WAREHOUSE_ID:
      return isSetBillingWarehouseId();
    case IS_AVAILABILITY_MONITORED:
      return isSetIsAvailabilityMonitored();
    case TRANSFER_DELAY_IN_HOURS:
      return isSetTransferDelayInHours();
    case STATE_ID:
      return isSetStateId();
    case SOURCE:
      return isSetSource();
    case GSTIN:
      return isSetGstin();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(Warehouse 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_displayName = true && this.isSetDisplayName();
    boolean that_present_displayName = true && that.isSetDisplayName();
    if (this_present_displayName || that_present_displayName) {
      if (!(this_present_displayName && that_present_displayName))
        return false;
      if (!this.displayName.equals(that.displayName))
        return false;
    }

    boolean this_present_location = true && this.isSetLocation();
    boolean that_present_location = true && that.isSetLocation();
    if (this_present_location || that_present_location) {
      if (!(this_present_location && that_present_location))
        return false;
      if (!this.location.equals(that.location))
        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_lastCheckedOn = true;
    boolean that_present_lastCheckedOn = true;
    if (this_present_lastCheckedOn || that_present_lastCheckedOn) {
      if (!(this_present_lastCheckedOn && that_present_lastCheckedOn))
        return false;
      if (this.lastCheckedOn != that.lastCheckedOn)
        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_pincode = true && this.isSetPincode();
    boolean that_present_pincode = true && that.isSetPincode();
    if (this_present_pincode || that_present_pincode) {
      if (!(this_present_pincode && that_present_pincode))
        return false;
      if (!this.pincode.equals(that.pincode))
        return false;
    }

    boolean this_present_vendorString = true && this.isSetVendorString();
    boolean that_present_vendorString = true && that.isSetVendorString();
    if (this_present_vendorString || that_present_vendorString) {
      if (!(this_present_vendorString && that_present_vendorString))
        return false;
      if (!this.vendorString.equals(that.vendorString))
        return false;
    }

    boolean this_present_logisticsLocation = true && this.isSetLogisticsLocation();
    boolean that_present_logisticsLocation = true && that.isSetLogisticsLocation();
    if (this_present_logisticsLocation || that_present_logisticsLocation) {
      if (!(this_present_logisticsLocation && that_present_logisticsLocation))
        return false;
      if (!this.logisticsLocation.equals(that.logisticsLocation))
        return false;
    }

    boolean this_present_billingType = true && this.isSetBillingType();
    boolean that_present_billingType = true && that.isSetBillingType();
    if (this_present_billingType || that_present_billingType) {
      if (!(this_present_billingType && that_present_billingType))
        return false;
      if (!this.billingType.equals(that.billingType))
        return false;
    }

    boolean this_present_warehouseType = true && this.isSetWarehouseType();
    boolean that_present_warehouseType = true && that.isSetWarehouseType();
    if (this_present_warehouseType || that_present_warehouseType) {
      if (!(this_present_warehouseType && that_present_warehouseType))
        return false;
      if (!this.warehouseType.equals(that.warehouseType))
        return false;
    }

    boolean this_present_inventoryType = true && this.isSetInventoryType();
    boolean that_present_inventoryType = true && that.isSetInventoryType();
    if (this_present_inventoryType || that_present_inventoryType) {
      if (!(this_present_inventoryType && that_present_inventoryType))
        return false;
      if (!this.inventoryType.equals(that.inventoryType))
        return false;
    }

    boolean this_present_vendor = true && this.isSetVendor();
    boolean that_present_vendor = true && that.isSetVendor();
    if (this_present_vendor || that_present_vendor) {
      if (!(this_present_vendor && that_present_vendor))
        return false;
      if (!this.vendor.equals(that.vendor))
        return false;
    }

    boolean this_present_shippingWarehouseId = true;
    boolean that_present_shippingWarehouseId = true;
    if (this_present_shippingWarehouseId || that_present_shippingWarehouseId) {
      if (!(this_present_shippingWarehouseId && that_present_shippingWarehouseId))
        return false;
      if (this.shippingWarehouseId != that.shippingWarehouseId)
        return false;
    }

    boolean this_present_billingWarehouseId = true;
    boolean that_present_billingWarehouseId = true;
    if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
      if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
        return false;
      if (this.billingWarehouseId != that.billingWarehouseId)
        return false;
    }

    boolean this_present_isAvailabilityMonitored = true;
    boolean that_present_isAvailabilityMonitored = true;
    if (this_present_isAvailabilityMonitored || that_present_isAvailabilityMonitored) {
      if (!(this_present_isAvailabilityMonitored && that_present_isAvailabilityMonitored))
        return false;
      if (this.isAvailabilityMonitored != that.isAvailabilityMonitored)
        return false;
    }

    boolean this_present_transferDelayInHours = true;
    boolean that_present_transferDelayInHours = true;
    if (this_present_transferDelayInHours || that_present_transferDelayInHours) {
      if (!(this_present_transferDelayInHours && that_present_transferDelayInHours))
        return false;
      if (this.transferDelayInHours != that.transferDelayInHours)
        return false;
    }

    boolean this_present_stateId = true;
    boolean that_present_stateId = true;
    if (this_present_stateId || that_present_stateId) {
      if (!(this_present_stateId && that_present_stateId))
        return false;
      if (this.stateId != that.stateId)
        return false;
    }

    boolean this_present_source = true;
    boolean that_present_source = true;
    if (this_present_source || that_present_source) {
      if (!(this_present_source && that_present_source))
        return false;
      if (this.source != that.source)
        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(Warehouse other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    Warehouse typedOther = (Warehouse)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(isSetDisplayName()).compareTo(typedOther.isSetDisplayName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDisplayName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, typedOther.displayName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLocation()).compareTo(typedOther.isSetLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, typedOther.location);
      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(isSetLastCheckedOn()).compareTo(typedOther.isSetLastCheckedOn());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLastCheckedOn()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastCheckedOn, typedOther.lastCheckedOn);
      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(isSetPincode()).compareTo(typedOther.isSetPincode());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetPincode()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pincode, typedOther.pincode);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVendorString()).compareTo(typedOther.isSetVendorString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVendorString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorString, typedOther.vendorString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLogisticsLocation()).compareTo(typedOther.isSetLogisticsLocation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLogisticsLocation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsLocation, typedOther.logisticsLocation);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBillingType()).compareTo(typedOther.isSetBillingType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBillingType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingType, typedOther.billingType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetWarehouseType()).compareTo(typedOther.isSetWarehouseType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetWarehouseType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseType, typedOther.warehouseType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInventoryType()).compareTo(typedOther.isSetInventoryType());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInventoryType()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryType, typedOther.inventoryType);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetVendor()).compareTo(typedOther.isSetVendor());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetVendor()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendor, typedOther.vendor);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetShippingWarehouseId()).compareTo(typedOther.isSetShippingWarehouseId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetShippingWarehouseId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingWarehouseId, typedOther.shippingWarehouseId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBillingWarehouseId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIsAvailabilityMonitored()).compareTo(typedOther.isSetIsAvailabilityMonitored());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIsAvailabilityMonitored()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAvailabilityMonitored, typedOther.isAvailabilityMonitored);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTransferDelayInHours()).compareTo(typedOther.isSetTransferDelayInHours());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTransferDelayInHours()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferDelayInHours, typedOther.transferDelayInHours);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStateId()).compareTo(typedOther.isSetStateId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStateId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSource()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
      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: // DISPLAY_NAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.displayName = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // LOCATION
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.location = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // 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 6: // LAST_CHECKED_ON
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.lastCheckedOn = iprot.readI64();
            setLastCheckedOnIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // 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 8: // PINCODE
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.pincode = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // VENDOR_STRING
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.vendorString = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // LOGISTICS_LOCATION
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.logisticsLocation = WarehouseLocation.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // BILLING_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.billingType = BillingType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // WAREHOUSE_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.warehouseType = WarehouseType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // INVENTORY_TYPE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.inventoryType = InventoryType.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // VENDOR
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
            this.vendor = new Vendor();
            this.vendor.read(iprot);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // SHIPPING_WAREHOUSE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.shippingWarehouseId = iprot.readI64();
            setShippingWarehouseIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // BILLING_WAREHOUSE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.billingWarehouseId = iprot.readI64();
            setBillingWarehouseIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 18: // IS_AVAILABILITY_MONITORED
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.isAvailabilityMonitored = iprot.readBool();
            setIsAvailabilityMonitoredIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 19: // TRANSFER_DELAY_IN_HOURS
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.transferDelayInHours = iprot.readI64();
            setTransferDelayInHoursIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 20: // STATE_ID
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.stateId = iprot.readI64();
            setStateIdIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 21: // SOURCE
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.source = iprot.readI64();
            setSourceIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 22: // 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.displayName != null) {
      oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
      oprot.writeString(this.displayName);
      oprot.writeFieldEnd();
    }
    if (this.location != null) {
      oprot.writeFieldBegin(LOCATION_FIELD_DESC);
      oprot.writeString(this.location);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
    oprot.writeI64(this.addedOn);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(LAST_CHECKED_ON_FIELD_DESC);
    oprot.writeI64(this.lastCheckedOn);
    oprot.writeFieldEnd();
    if (this.tinNumber != null) {
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
      oprot.writeString(this.tinNumber);
      oprot.writeFieldEnd();
    }
    if (this.pincode != null) {
      oprot.writeFieldBegin(PINCODE_FIELD_DESC);
      oprot.writeString(this.pincode);
      oprot.writeFieldEnd();
    }
    if (this.vendorString != null) {
      oprot.writeFieldBegin(VENDOR_STRING_FIELD_DESC);
      oprot.writeString(this.vendorString);
      oprot.writeFieldEnd();
    }
    if (this.logisticsLocation != null) {
      oprot.writeFieldBegin(LOGISTICS_LOCATION_FIELD_DESC);
      oprot.writeI32(this.logisticsLocation.getValue());
      oprot.writeFieldEnd();
    }
    if (this.billingType != null) {
      oprot.writeFieldBegin(BILLING_TYPE_FIELD_DESC);
      oprot.writeI32(this.billingType.getValue());
      oprot.writeFieldEnd();
    }
    if (this.warehouseType != null) {
      oprot.writeFieldBegin(WAREHOUSE_TYPE_FIELD_DESC);
      oprot.writeI32(this.warehouseType.getValue());
      oprot.writeFieldEnd();
    }
    if (this.inventoryType != null) {
      oprot.writeFieldBegin(INVENTORY_TYPE_FIELD_DESC);
      oprot.writeI32(this.inventoryType.getValue());
      oprot.writeFieldEnd();
    }
    if (this.vendor != null) {
      oprot.writeFieldBegin(VENDOR_FIELD_DESC);
      this.vendor.write(oprot);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(SHIPPING_WAREHOUSE_ID_FIELD_DESC);
    oprot.writeI64(this.shippingWarehouseId);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
    oprot.writeI64(this.billingWarehouseId);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(IS_AVAILABILITY_MONITORED_FIELD_DESC);
    oprot.writeBool(this.isAvailabilityMonitored);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TRANSFER_DELAY_IN_HOURS_FIELD_DESC);
    oprot.writeI64(this.transferDelayInHours);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
    oprot.writeI64(this.stateId);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(SOURCE_FIELD_DESC);
    oprot.writeI64(this.source);
    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("Warehouse(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("displayName:");
    if (this.displayName == null) {
      sb.append("null");
    } else {
      sb.append(this.displayName);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("location:");
    if (this.location == null) {
      sb.append("null");
    } else {
      sb.append(this.location);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("addedOn:");
    sb.append(this.addedOn);
    first = false;
    if (!first) sb.append(", ");
    sb.append("lastCheckedOn:");
    sb.append(this.lastCheckedOn);
    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("pincode:");
    if (this.pincode == null) {
      sb.append("null");
    } else {
      sb.append(this.pincode);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("vendorString:");
    if (this.vendorString == null) {
      sb.append("null");
    } else {
      sb.append(this.vendorString);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("logisticsLocation:");
    if (this.logisticsLocation == null) {
      sb.append("null");
    } else {
      sb.append(this.logisticsLocation);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("billingType:");
    if (this.billingType == null) {
      sb.append("null");
    } else {
      sb.append(this.billingType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("warehouseType:");
    if (this.warehouseType == null) {
      sb.append("null");
    } else {
      sb.append(this.warehouseType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("inventoryType:");
    if (this.inventoryType == null) {
      sb.append("null");
    } else {
      sb.append(this.inventoryType);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("vendor:");
    if (this.vendor == null) {
      sb.append("null");
    } else {
      sb.append(this.vendor);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("shippingWarehouseId:");
    sb.append(this.shippingWarehouseId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("billingWarehouseId:");
    sb.append(this.billingWarehouseId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("isAvailabilityMonitored:");
    sb.append(this.isAvailabilityMonitored);
    first = false;
    if (!first) sb.append(", ");
    sb.append("transferDelayInHours:");
    sb.append(this.transferDelayInHours);
    first = false;
    if (!first) sb.append(", ");
    sb.append("stateId:");
    sb.append(this.stateId);
    first = false;
    if (!first) sb.append(", ");
    sb.append("source:");
    sb.append(this.source);
    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);
    }
  }

}