Subversion Repositories SmartDukaan

Rev

Rev 7330 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5945 mandeep.dh 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.inventory;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class Warehouse implements org.apache.thrift.TBase<Warehouse, Warehouse._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Warehouse");
25
 
26
  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);
27
  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);
28
  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);
29
  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);
30
  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);
31
  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);
32
  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);
33
  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);
34
  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);
35
  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);
36
  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);
37
  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);
38
  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);
39
  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);
40
  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);
41
  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);
42
  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);
43
 
44
  private long id; // required
45
  private String displayName; // required
46
  private String location; // required
47
  private long addedOn; // required
48
  private long lastCheckedOn; // required
49
  private String tinNumber; // required
50
  private String pincode; // required
51
  private String vendorString; // required
52
  private WarehouseLocation logisticsLocation; // required
53
  private BillingType billingType; // required
54
  private WarehouseType warehouseType; // required
55
  private InventoryType inventoryType; // required
56
  private Vendor vendor; // required
57
  private long shippingWarehouseId; // required
58
  private long billingWarehouseId; // required
59
  private boolean isAvailabilityMonitored; // required
60
  private long transferDelayInHours; // required
61
 
62
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
63
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
64
    ID((short)1, "id"),
65
    DISPLAY_NAME((short)2, "displayName"),
66
    LOCATION((short)3, "location"),
67
    ADDED_ON((short)5, "addedOn"),
68
    LAST_CHECKED_ON((short)6, "lastCheckedOn"),
69
    TIN_NUMBER((short)7, "tinNumber"),
70
    PINCODE((short)8, "pincode"),
71
    VENDOR_STRING((short)9, "vendorString"),
72
    /**
73
     * 
74
     * @see WarehouseLocation
75
     */
76
    LOGISTICS_LOCATION((short)10, "logisticsLocation"),
77
    /**
78
     * 
79
     * @see BillingType
80
     */
81
    BILLING_TYPE((short)12, "billingType"),
82
    /**
83
     * 
84
     * @see WarehouseType
85
     */
86
    WAREHOUSE_TYPE((short)13, "warehouseType"),
87
    /**
88
     * 
89
     * @see InventoryType
90
     */
91
    INVENTORY_TYPE((short)14, "inventoryType"),
92
    VENDOR((short)15, "vendor"),
93
    SHIPPING_WAREHOUSE_ID((short)16, "shippingWarehouseId"),
94
    BILLING_WAREHOUSE_ID((short)17, "billingWarehouseId"),
95
    IS_AVAILABILITY_MONITORED((short)18, "isAvailabilityMonitored"),
96
    TRANSFER_DELAY_IN_HOURS((short)19, "transferDelayInHours");
97
 
98
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
99
 
100
    static {
101
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
102
        byName.put(field.getFieldName(), field);
103
      }
104
    }
105
 
106
    /**
107
     * Find the _Fields constant that matches fieldId, or null if its not found.
108
     */
109
    public static _Fields findByThriftId(int fieldId) {
110
      switch(fieldId) {
111
        case 1: // ID
112
          return ID;
113
        case 2: // DISPLAY_NAME
114
          return DISPLAY_NAME;
115
        case 3: // LOCATION
116
          return LOCATION;
117
        case 5: // ADDED_ON
118
          return ADDED_ON;
119
        case 6: // LAST_CHECKED_ON
120
          return LAST_CHECKED_ON;
121
        case 7: // TIN_NUMBER
122
          return TIN_NUMBER;
123
        case 8: // PINCODE
124
          return PINCODE;
125
        case 9: // VENDOR_STRING
126
          return VENDOR_STRING;
127
        case 10: // LOGISTICS_LOCATION
128
          return LOGISTICS_LOCATION;
129
        case 12: // BILLING_TYPE
130
          return BILLING_TYPE;
131
        case 13: // WAREHOUSE_TYPE
132
          return WAREHOUSE_TYPE;
133
        case 14: // INVENTORY_TYPE
134
          return INVENTORY_TYPE;
135
        case 15: // VENDOR
136
          return VENDOR;
137
        case 16: // SHIPPING_WAREHOUSE_ID
138
          return SHIPPING_WAREHOUSE_ID;
139
        case 17: // BILLING_WAREHOUSE_ID
140
          return BILLING_WAREHOUSE_ID;
141
        case 18: // IS_AVAILABILITY_MONITORED
142
          return IS_AVAILABILITY_MONITORED;
143
        case 19: // TRANSFER_DELAY_IN_HOURS
144
          return TRANSFER_DELAY_IN_HOURS;
145
        default:
146
          return null;
147
      }
148
    }
149
 
150
    /**
151
     * Find the _Fields constant that matches fieldId, throwing an exception
152
     * if it is not found.
153
     */
154
    public static _Fields findByThriftIdOrThrow(int fieldId) {
155
      _Fields fields = findByThriftId(fieldId);
156
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
157
      return fields;
158
    }
159
 
160
    /**
161
     * Find the _Fields constant that matches name, or null if its not found.
162
     */
163
    public static _Fields findByName(String name) {
164
      return byName.get(name);
165
    }
166
 
167
    private final short _thriftId;
168
    private final String _fieldName;
169
 
170
    _Fields(short thriftId, String fieldName) {
171
      _thriftId = thriftId;
172
      _fieldName = fieldName;
173
    }
174
 
175
    public short getThriftFieldId() {
176
      return _thriftId;
177
    }
178
 
179
    public String getFieldName() {
180
      return _fieldName;
181
    }
182
  }
183
 
184
  // isset id assignments
185
  private static final int __ID_ISSET_ID = 0;
186
  private static final int __ADDEDON_ISSET_ID = 1;
187
  private static final int __LASTCHECKEDON_ISSET_ID = 2;
188
  private static final int __SHIPPINGWAREHOUSEID_ISSET_ID = 3;
189
  private static final int __BILLINGWAREHOUSEID_ISSET_ID = 4;
190
  private static final int __ISAVAILABILITYMONITORED_ISSET_ID = 5;
191
  private static final int __TRANSFERDELAYINHOURS_ISSET_ID = 6;
192
  private BitSet __isset_bit_vector = new BitSet(7);
193
 
194
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
195
  static {
196
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
197
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
198
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
199
    tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
200
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
201
    tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
203
    tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
204
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
205
    tmpMap.put(_Fields.LAST_CHECKED_ON, new org.apache.thrift.meta_data.FieldMetaData("lastCheckedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
206
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
207
    tmpMap.put(_Fields.TIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("tinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
208
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
209
    tmpMap.put(_Fields.PINCODE, new org.apache.thrift.meta_data.FieldMetaData("pincode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
210
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
211
    tmpMap.put(_Fields.VENDOR_STRING, new org.apache.thrift.meta_data.FieldMetaData("vendorString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
212
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
213
    tmpMap.put(_Fields.LOGISTICS_LOCATION, new org.apache.thrift.meta_data.FieldMetaData("logisticsLocation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
214
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WarehouseLocation.class)));
215
    tmpMap.put(_Fields.BILLING_TYPE, new org.apache.thrift.meta_data.FieldMetaData("billingType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
216
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, BillingType.class)));
217
    tmpMap.put(_Fields.WAREHOUSE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("warehouseType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
218
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WarehouseType.class)));
219
    tmpMap.put(_Fields.INVENTORY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("inventoryType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
220
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, InventoryType.class)));
221
    tmpMap.put(_Fields.VENDOR, new org.apache.thrift.meta_data.FieldMetaData("vendor", org.apache.thrift.TFieldRequirementType.DEFAULT, 
222
        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Vendor.class)));
223
    tmpMap.put(_Fields.SHIPPING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("shippingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
224
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
225
    tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
226
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
227
    tmpMap.put(_Fields.IS_AVAILABILITY_MONITORED, new org.apache.thrift.meta_data.FieldMetaData("isAvailabilityMonitored", org.apache.thrift.TFieldRequirementType.DEFAULT, 
228
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
229
    tmpMap.put(_Fields.TRANSFER_DELAY_IN_HOURS, new org.apache.thrift.meta_data.FieldMetaData("transferDelayInHours", org.apache.thrift.TFieldRequirementType.DEFAULT, 
230
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
231
    metaDataMap = Collections.unmodifiableMap(tmpMap);
232
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Warehouse.class, metaDataMap);
233
  }
234
 
235
  public Warehouse() {
236
  }
237
 
238
  public Warehouse(
239
    long id,
240
    String displayName,
241
    String location,
242
    long addedOn,
243
    long lastCheckedOn,
244
    String tinNumber,
245
    String pincode,
246
    String vendorString,
247
    WarehouseLocation logisticsLocation,
248
    BillingType billingType,
249
    WarehouseType warehouseType,
250
    InventoryType inventoryType,
251
    Vendor vendor,
252
    long shippingWarehouseId,
253
    long billingWarehouseId,
254
    boolean isAvailabilityMonitored,
255
    long transferDelayInHours)
256
  {
257
    this();
258
    this.id = id;
259
    setIdIsSet(true);
260
    this.displayName = displayName;
261
    this.location = location;
262
    this.addedOn = addedOn;
263
    setAddedOnIsSet(true);
264
    this.lastCheckedOn = lastCheckedOn;
265
    setLastCheckedOnIsSet(true);
266
    this.tinNumber = tinNumber;
267
    this.pincode = pincode;
268
    this.vendorString = vendorString;
269
    this.logisticsLocation = logisticsLocation;
270
    this.billingType = billingType;
271
    this.warehouseType = warehouseType;
272
    this.inventoryType = inventoryType;
273
    this.vendor = vendor;
274
    this.shippingWarehouseId = shippingWarehouseId;
275
    setShippingWarehouseIdIsSet(true);
276
    this.billingWarehouseId = billingWarehouseId;
277
    setBillingWarehouseIdIsSet(true);
278
    this.isAvailabilityMonitored = isAvailabilityMonitored;
279
    setIsAvailabilityMonitoredIsSet(true);
280
    this.transferDelayInHours = transferDelayInHours;
281
    setTransferDelayInHoursIsSet(true);
282
  }
283
 
284
  /**
285
   * Performs a deep copy on <i>other</i>.
286
   */
287
  public Warehouse(Warehouse other) {
288
    __isset_bit_vector.clear();
289
    __isset_bit_vector.or(other.__isset_bit_vector);
290
    this.id = other.id;
291
    if (other.isSetDisplayName()) {
292
      this.displayName = other.displayName;
293
    }
294
    if (other.isSetLocation()) {
295
      this.location = other.location;
296
    }
297
    this.addedOn = other.addedOn;
298
    this.lastCheckedOn = other.lastCheckedOn;
299
    if (other.isSetTinNumber()) {
300
      this.tinNumber = other.tinNumber;
301
    }
302
    if (other.isSetPincode()) {
303
      this.pincode = other.pincode;
304
    }
305
    if (other.isSetVendorString()) {
306
      this.vendorString = other.vendorString;
307
    }
308
    if (other.isSetLogisticsLocation()) {
309
      this.logisticsLocation = other.logisticsLocation;
310
    }
311
    if (other.isSetBillingType()) {
312
      this.billingType = other.billingType;
313
    }
314
    if (other.isSetWarehouseType()) {
315
      this.warehouseType = other.warehouseType;
316
    }
317
    if (other.isSetInventoryType()) {
318
      this.inventoryType = other.inventoryType;
319
    }
320
    if (other.isSetVendor()) {
321
      this.vendor = new Vendor(other.vendor);
322
    }
323
    this.shippingWarehouseId = other.shippingWarehouseId;
324
    this.billingWarehouseId = other.billingWarehouseId;
325
    this.isAvailabilityMonitored = other.isAvailabilityMonitored;
326
    this.transferDelayInHours = other.transferDelayInHours;
327
  }
328
 
329
  public Warehouse deepCopy() {
330
    return new Warehouse(this);
331
  }
332
 
333
  @Override
334
  public void clear() {
335
    setIdIsSet(false);
336
    this.id = 0;
337
    this.displayName = null;
338
    this.location = null;
339
    setAddedOnIsSet(false);
340
    this.addedOn = 0;
341
    setLastCheckedOnIsSet(false);
342
    this.lastCheckedOn = 0;
343
    this.tinNumber = null;
344
    this.pincode = null;
345
    this.vendorString = null;
346
    this.logisticsLocation = null;
347
    this.billingType = null;
348
    this.warehouseType = null;
349
    this.inventoryType = null;
350
    this.vendor = null;
351
    setShippingWarehouseIdIsSet(false);
352
    this.shippingWarehouseId = 0;
353
    setBillingWarehouseIdIsSet(false);
354
    this.billingWarehouseId = 0;
355
    setIsAvailabilityMonitoredIsSet(false);
356
    this.isAvailabilityMonitored = false;
357
    setTransferDelayInHoursIsSet(false);
358
    this.transferDelayInHours = 0;
359
  }
360
 
361
  public long getId() {
362
    return this.id;
363
  }
364
 
365
  public void setId(long id) {
366
    this.id = id;
367
    setIdIsSet(true);
368
  }
369
 
370
  public void unsetId() {
371
    __isset_bit_vector.clear(__ID_ISSET_ID);
372
  }
373
 
374
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
375
  public boolean isSetId() {
376
    return __isset_bit_vector.get(__ID_ISSET_ID);
377
  }
378
 
379
  public void setIdIsSet(boolean value) {
380
    __isset_bit_vector.set(__ID_ISSET_ID, value);
381
  }
382
 
383
  public String getDisplayName() {
384
    return this.displayName;
385
  }
386
 
387
  public void setDisplayName(String displayName) {
388
    this.displayName = displayName;
389
  }
390
 
391
  public void unsetDisplayName() {
392
    this.displayName = null;
393
  }
394
 
395
  /** Returns true if field displayName is set (has been assigned a value) and false otherwise */
396
  public boolean isSetDisplayName() {
397
    return this.displayName != null;
398
  }
399
 
400
  public void setDisplayNameIsSet(boolean value) {
401
    if (!value) {
402
      this.displayName = null;
403
    }
404
  }
405
 
406
  public String getLocation() {
407
    return this.location;
408
  }
409
 
410
  public void setLocation(String location) {
411
    this.location = location;
412
  }
413
 
414
  public void unsetLocation() {
415
    this.location = null;
416
  }
417
 
418
  /** Returns true if field location is set (has been assigned a value) and false otherwise */
419
  public boolean isSetLocation() {
420
    return this.location != null;
421
  }
422
 
423
  public void setLocationIsSet(boolean value) {
424
    if (!value) {
425
      this.location = null;
426
    }
427
  }
428
 
429
  public long getAddedOn() {
430
    return this.addedOn;
431
  }
432
 
433
  public void setAddedOn(long addedOn) {
434
    this.addedOn = addedOn;
435
    setAddedOnIsSet(true);
436
  }
437
 
438
  public void unsetAddedOn() {
439
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
440
  }
441
 
442
  /** Returns true if field addedOn is set (has been assigned a value) and false otherwise */
443
  public boolean isSetAddedOn() {
444
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
445
  }
446
 
447
  public void setAddedOnIsSet(boolean value) {
448
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
449
  }
450
 
451
  public long getLastCheckedOn() {
452
    return this.lastCheckedOn;
453
  }
454
 
455
  public void setLastCheckedOn(long lastCheckedOn) {
456
    this.lastCheckedOn = lastCheckedOn;
457
    setLastCheckedOnIsSet(true);
458
  }
459
 
460
  public void unsetLastCheckedOn() {
461
    __isset_bit_vector.clear(__LASTCHECKEDON_ISSET_ID);
462
  }
463
 
464
  /** Returns true if field lastCheckedOn is set (has been assigned a value) and false otherwise */
465
  public boolean isSetLastCheckedOn() {
466
    return __isset_bit_vector.get(__LASTCHECKEDON_ISSET_ID);
467
  }
468
 
469
  public void setLastCheckedOnIsSet(boolean value) {
470
    __isset_bit_vector.set(__LASTCHECKEDON_ISSET_ID, value);
471
  }
472
 
473
  public String getTinNumber() {
474
    return this.tinNumber;
475
  }
476
 
477
  public void setTinNumber(String tinNumber) {
478
    this.tinNumber = tinNumber;
479
  }
480
 
481
  public void unsetTinNumber() {
482
    this.tinNumber = null;
483
  }
484
 
485
  /** Returns true if field tinNumber is set (has been assigned a value) and false otherwise */
486
  public boolean isSetTinNumber() {
487
    return this.tinNumber != null;
488
  }
489
 
490
  public void setTinNumberIsSet(boolean value) {
491
    if (!value) {
492
      this.tinNumber = null;
493
    }
494
  }
495
 
496
  public String getPincode() {
497
    return this.pincode;
498
  }
499
 
500
  public void setPincode(String pincode) {
501
    this.pincode = pincode;
502
  }
503
 
504
  public void unsetPincode() {
505
    this.pincode = null;
506
  }
507
 
508
  /** Returns true if field pincode is set (has been assigned a value) and false otherwise */
509
  public boolean isSetPincode() {
510
    return this.pincode != null;
511
  }
512
 
513
  public void setPincodeIsSet(boolean value) {
514
    if (!value) {
515
      this.pincode = null;
516
    }
517
  }
518
 
519
  public String getVendorString() {
520
    return this.vendorString;
521
  }
522
 
523
  public void setVendorString(String vendorString) {
524
    this.vendorString = vendorString;
525
  }
526
 
527
  public void unsetVendorString() {
528
    this.vendorString = null;
529
  }
530
 
531
  /** Returns true if field vendorString is set (has been assigned a value) and false otherwise */
532
  public boolean isSetVendorString() {
533
    return this.vendorString != null;
534
  }
535
 
536
  public void setVendorStringIsSet(boolean value) {
537
    if (!value) {
538
      this.vendorString = null;
539
    }
540
  }
541
 
542
  /**
543
   * 
544
   * @see WarehouseLocation
545
   */
546
  public WarehouseLocation getLogisticsLocation() {
547
    return this.logisticsLocation;
548
  }
549
 
550
  /**
551
   * 
552
   * @see WarehouseLocation
553
   */
554
  public void setLogisticsLocation(WarehouseLocation logisticsLocation) {
555
    this.logisticsLocation = logisticsLocation;
556
  }
557
 
558
  public void unsetLogisticsLocation() {
559
    this.logisticsLocation = null;
560
  }
561
 
562
  /** Returns true if field logisticsLocation is set (has been assigned a value) and false otherwise */
563
  public boolean isSetLogisticsLocation() {
564
    return this.logisticsLocation != null;
565
  }
566
 
567
  public void setLogisticsLocationIsSet(boolean value) {
568
    if (!value) {
569
      this.logisticsLocation = null;
570
    }
571
  }
572
 
573
  /**
574
   * 
575
   * @see BillingType
576
   */
577
  public BillingType getBillingType() {
578
    return this.billingType;
579
  }
580
 
581
  /**
582
   * 
583
   * @see BillingType
584
   */
585
  public void setBillingType(BillingType billingType) {
586
    this.billingType = billingType;
587
  }
588
 
589
  public void unsetBillingType() {
590
    this.billingType = null;
591
  }
592
 
593
  /** Returns true if field billingType is set (has been assigned a value) and false otherwise */
594
  public boolean isSetBillingType() {
595
    return this.billingType != null;
596
  }
597
 
598
  public void setBillingTypeIsSet(boolean value) {
599
    if (!value) {
600
      this.billingType = null;
601
    }
602
  }
603
 
604
  /**
605
   * 
606
   * @see WarehouseType
607
   */
608
  public WarehouseType getWarehouseType() {
609
    return this.warehouseType;
610
  }
611
 
612
  /**
613
   * 
614
   * @see WarehouseType
615
   */
616
  public void setWarehouseType(WarehouseType warehouseType) {
617
    this.warehouseType = warehouseType;
618
  }
619
 
620
  public void unsetWarehouseType() {
621
    this.warehouseType = null;
622
  }
623
 
624
  /** Returns true if field warehouseType is set (has been assigned a value) and false otherwise */
625
  public boolean isSetWarehouseType() {
626
    return this.warehouseType != null;
627
  }
628
 
629
  public void setWarehouseTypeIsSet(boolean value) {
630
    if (!value) {
631
      this.warehouseType = null;
632
    }
633
  }
634
 
635
  /**
636
   * 
637
   * @see InventoryType
638
   */
639
  public InventoryType getInventoryType() {
640
    return this.inventoryType;
641
  }
642
 
643
  /**
644
   * 
645
   * @see InventoryType
646
   */
647
  public void setInventoryType(InventoryType inventoryType) {
648
    this.inventoryType = inventoryType;
649
  }
650
 
651
  public void unsetInventoryType() {
652
    this.inventoryType = null;
653
  }
654
 
655
  /** Returns true if field inventoryType is set (has been assigned a value) and false otherwise */
656
  public boolean isSetInventoryType() {
657
    return this.inventoryType != null;
658
  }
659
 
660
  public void setInventoryTypeIsSet(boolean value) {
661
    if (!value) {
662
      this.inventoryType = null;
663
    }
664
  }
665
 
666
  public Vendor getVendor() {
667
    return this.vendor;
668
  }
669
 
670
  public void setVendor(Vendor vendor) {
671
    this.vendor = vendor;
672
  }
673
 
674
  public void unsetVendor() {
675
    this.vendor = null;
676
  }
677
 
678
  /** Returns true if field vendor is set (has been assigned a value) and false otherwise */
679
  public boolean isSetVendor() {
680
    return this.vendor != null;
681
  }
682
 
683
  public void setVendorIsSet(boolean value) {
684
    if (!value) {
685
      this.vendor = null;
686
    }
687
  }
688
 
689
  public long getShippingWarehouseId() {
690
    return this.shippingWarehouseId;
691
  }
692
 
693
  public void setShippingWarehouseId(long shippingWarehouseId) {
694
    this.shippingWarehouseId = shippingWarehouseId;
695
    setShippingWarehouseIdIsSet(true);
696
  }
697
 
698
  public void unsetShippingWarehouseId() {
699
    __isset_bit_vector.clear(__SHIPPINGWAREHOUSEID_ISSET_ID);
700
  }
701
 
702
  /** Returns true if field shippingWarehouseId is set (has been assigned a value) and false otherwise */
703
  public boolean isSetShippingWarehouseId() {
704
    return __isset_bit_vector.get(__SHIPPINGWAREHOUSEID_ISSET_ID);
705
  }
706
 
707
  public void setShippingWarehouseIdIsSet(boolean value) {
708
    __isset_bit_vector.set(__SHIPPINGWAREHOUSEID_ISSET_ID, value);
709
  }
710
 
711
  public long getBillingWarehouseId() {
712
    return this.billingWarehouseId;
713
  }
714
 
715
  public void setBillingWarehouseId(long billingWarehouseId) {
716
    this.billingWarehouseId = billingWarehouseId;
717
    setBillingWarehouseIdIsSet(true);
718
  }
719
 
720
  public void unsetBillingWarehouseId() {
721
    __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
722
  }
723
 
724
  /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
725
  public boolean isSetBillingWarehouseId() {
726
    return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
727
  }
728
 
729
  public void setBillingWarehouseIdIsSet(boolean value) {
730
    __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
731
  }
732
 
733
  public boolean isIsAvailabilityMonitored() {
734
    return this.isAvailabilityMonitored;
735
  }
736
 
737
  public void setIsAvailabilityMonitored(boolean isAvailabilityMonitored) {
738
    this.isAvailabilityMonitored = isAvailabilityMonitored;
739
    setIsAvailabilityMonitoredIsSet(true);
740
  }
741
 
742
  public void unsetIsAvailabilityMonitored() {
743
    __isset_bit_vector.clear(__ISAVAILABILITYMONITORED_ISSET_ID);
744
  }
745
 
746
  /** Returns true if field isAvailabilityMonitored is set (has been assigned a value) and false otherwise */
747
  public boolean isSetIsAvailabilityMonitored() {
748
    return __isset_bit_vector.get(__ISAVAILABILITYMONITORED_ISSET_ID);
749
  }
750
 
751
  public void setIsAvailabilityMonitoredIsSet(boolean value) {
752
    __isset_bit_vector.set(__ISAVAILABILITYMONITORED_ISSET_ID, value);
753
  }
754
 
755
  public long getTransferDelayInHours() {
756
    return this.transferDelayInHours;
757
  }
758
 
759
  public void setTransferDelayInHours(long transferDelayInHours) {
760
    this.transferDelayInHours = transferDelayInHours;
761
    setTransferDelayInHoursIsSet(true);
762
  }
763
 
764
  public void unsetTransferDelayInHours() {
765
    __isset_bit_vector.clear(__TRANSFERDELAYINHOURS_ISSET_ID);
766
  }
767
 
768
  /** Returns true if field transferDelayInHours is set (has been assigned a value) and false otherwise */
769
  public boolean isSetTransferDelayInHours() {
770
    return __isset_bit_vector.get(__TRANSFERDELAYINHOURS_ISSET_ID);
771
  }
772
 
773
  public void setTransferDelayInHoursIsSet(boolean value) {
774
    __isset_bit_vector.set(__TRANSFERDELAYINHOURS_ISSET_ID, value);
775
  }
776
 
777
  public void setFieldValue(_Fields field, Object value) {
778
    switch (field) {
779
    case ID:
780
      if (value == null) {
781
        unsetId();
782
      } else {
783
        setId((Long)value);
784
      }
785
      break;
786
 
787
    case DISPLAY_NAME:
788
      if (value == null) {
789
        unsetDisplayName();
790
      } else {
791
        setDisplayName((String)value);
792
      }
793
      break;
794
 
795
    case LOCATION:
796
      if (value == null) {
797
        unsetLocation();
798
      } else {
799
        setLocation((String)value);
800
      }
801
      break;
802
 
803
    case ADDED_ON:
804
      if (value == null) {
805
        unsetAddedOn();
806
      } else {
807
        setAddedOn((Long)value);
808
      }
809
      break;
810
 
811
    case LAST_CHECKED_ON:
812
      if (value == null) {
813
        unsetLastCheckedOn();
814
      } else {
815
        setLastCheckedOn((Long)value);
816
      }
817
      break;
818
 
819
    case TIN_NUMBER:
820
      if (value == null) {
821
        unsetTinNumber();
822
      } else {
823
        setTinNumber((String)value);
824
      }
825
      break;
826
 
827
    case PINCODE:
828
      if (value == null) {
829
        unsetPincode();
830
      } else {
831
        setPincode((String)value);
832
      }
833
      break;
834
 
835
    case VENDOR_STRING:
836
      if (value == null) {
837
        unsetVendorString();
838
      } else {
839
        setVendorString((String)value);
840
      }
841
      break;
842
 
843
    case LOGISTICS_LOCATION:
844
      if (value == null) {
845
        unsetLogisticsLocation();
846
      } else {
847
        setLogisticsLocation((WarehouseLocation)value);
848
      }
849
      break;
850
 
851
    case BILLING_TYPE:
852
      if (value == null) {
853
        unsetBillingType();
854
      } else {
855
        setBillingType((BillingType)value);
856
      }
857
      break;
858
 
859
    case WAREHOUSE_TYPE:
860
      if (value == null) {
861
        unsetWarehouseType();
862
      } else {
863
        setWarehouseType((WarehouseType)value);
864
      }
865
      break;
866
 
867
    case INVENTORY_TYPE:
868
      if (value == null) {
869
        unsetInventoryType();
870
      } else {
871
        setInventoryType((InventoryType)value);
872
      }
873
      break;
874
 
875
    case VENDOR:
876
      if (value == null) {
877
        unsetVendor();
878
      } else {
879
        setVendor((Vendor)value);
880
      }
881
      break;
882
 
883
    case SHIPPING_WAREHOUSE_ID:
884
      if (value == null) {
885
        unsetShippingWarehouseId();
886
      } else {
887
        setShippingWarehouseId((Long)value);
888
      }
889
      break;
890
 
891
    case BILLING_WAREHOUSE_ID:
892
      if (value == null) {
893
        unsetBillingWarehouseId();
894
      } else {
895
        setBillingWarehouseId((Long)value);
896
      }
897
      break;
898
 
899
    case IS_AVAILABILITY_MONITORED:
900
      if (value == null) {
901
        unsetIsAvailabilityMonitored();
902
      } else {
903
        setIsAvailabilityMonitored((Boolean)value);
904
      }
905
      break;
906
 
907
    case TRANSFER_DELAY_IN_HOURS:
908
      if (value == null) {
909
        unsetTransferDelayInHours();
910
      } else {
911
        setTransferDelayInHours((Long)value);
912
      }
913
      break;
914
 
915
    }
916
  }
917
 
918
  public Object getFieldValue(_Fields field) {
919
    switch (field) {
920
    case ID:
921
      return Long.valueOf(getId());
922
 
923
    case DISPLAY_NAME:
924
      return getDisplayName();
925
 
926
    case LOCATION:
927
      return getLocation();
928
 
929
    case ADDED_ON:
930
      return Long.valueOf(getAddedOn());
931
 
932
    case LAST_CHECKED_ON:
933
      return Long.valueOf(getLastCheckedOn());
934
 
935
    case TIN_NUMBER:
936
      return getTinNumber();
937
 
938
    case PINCODE:
939
      return getPincode();
940
 
941
    case VENDOR_STRING:
942
      return getVendorString();
943
 
944
    case LOGISTICS_LOCATION:
945
      return getLogisticsLocation();
946
 
947
    case BILLING_TYPE:
948
      return getBillingType();
949
 
950
    case WAREHOUSE_TYPE:
951
      return getWarehouseType();
952
 
953
    case INVENTORY_TYPE:
954
      return getInventoryType();
955
 
956
    case VENDOR:
957
      return getVendor();
958
 
959
    case SHIPPING_WAREHOUSE_ID:
960
      return Long.valueOf(getShippingWarehouseId());
961
 
962
    case BILLING_WAREHOUSE_ID:
963
      return Long.valueOf(getBillingWarehouseId());
964
 
965
    case IS_AVAILABILITY_MONITORED:
966
      return Boolean.valueOf(isIsAvailabilityMonitored());
967
 
968
    case TRANSFER_DELAY_IN_HOURS:
969
      return Long.valueOf(getTransferDelayInHours());
970
 
971
    }
972
    throw new IllegalStateException();
973
  }
974
 
975
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
976
  public boolean isSet(_Fields field) {
977
    if (field == null) {
978
      throw new IllegalArgumentException();
979
    }
980
 
981
    switch (field) {
982
    case ID:
983
      return isSetId();
984
    case DISPLAY_NAME:
985
      return isSetDisplayName();
986
    case LOCATION:
987
      return isSetLocation();
988
    case ADDED_ON:
989
      return isSetAddedOn();
990
    case LAST_CHECKED_ON:
991
      return isSetLastCheckedOn();
992
    case TIN_NUMBER:
993
      return isSetTinNumber();
994
    case PINCODE:
995
      return isSetPincode();
996
    case VENDOR_STRING:
997
      return isSetVendorString();
998
    case LOGISTICS_LOCATION:
999
      return isSetLogisticsLocation();
1000
    case BILLING_TYPE:
1001
      return isSetBillingType();
1002
    case WAREHOUSE_TYPE:
1003
      return isSetWarehouseType();
1004
    case INVENTORY_TYPE:
1005
      return isSetInventoryType();
1006
    case VENDOR:
1007
      return isSetVendor();
1008
    case SHIPPING_WAREHOUSE_ID:
1009
      return isSetShippingWarehouseId();
1010
    case BILLING_WAREHOUSE_ID:
1011
      return isSetBillingWarehouseId();
1012
    case IS_AVAILABILITY_MONITORED:
1013
      return isSetIsAvailabilityMonitored();
1014
    case TRANSFER_DELAY_IN_HOURS:
1015
      return isSetTransferDelayInHours();
1016
    }
1017
    throw new IllegalStateException();
1018
  }
1019
 
1020
  @Override
1021
  public boolean equals(Object that) {
1022
    if (that == null)
1023
      return false;
1024
    if (that instanceof Warehouse)
1025
      return this.equals((Warehouse)that);
1026
    return false;
1027
  }
1028
 
1029
  public boolean equals(Warehouse that) {
1030
    if (that == null)
1031
      return false;
1032
 
1033
    boolean this_present_id = true;
1034
    boolean that_present_id = true;
1035
    if (this_present_id || that_present_id) {
1036
      if (!(this_present_id && that_present_id))
1037
        return false;
1038
      if (this.id != that.id)
1039
        return false;
1040
    }
1041
 
1042
    boolean this_present_displayName = true && this.isSetDisplayName();
1043
    boolean that_present_displayName = true && that.isSetDisplayName();
1044
    if (this_present_displayName || that_present_displayName) {
1045
      if (!(this_present_displayName && that_present_displayName))
1046
        return false;
1047
      if (!this.displayName.equals(that.displayName))
1048
        return false;
1049
    }
1050
 
1051
    boolean this_present_location = true && this.isSetLocation();
1052
    boolean that_present_location = true && that.isSetLocation();
1053
    if (this_present_location || that_present_location) {
1054
      if (!(this_present_location && that_present_location))
1055
        return false;
1056
      if (!this.location.equals(that.location))
1057
        return false;
1058
    }
1059
 
1060
    boolean this_present_addedOn = true;
1061
    boolean that_present_addedOn = true;
1062
    if (this_present_addedOn || that_present_addedOn) {
1063
      if (!(this_present_addedOn && that_present_addedOn))
1064
        return false;
1065
      if (this.addedOn != that.addedOn)
1066
        return false;
1067
    }
1068
 
1069
    boolean this_present_lastCheckedOn = true;
1070
    boolean that_present_lastCheckedOn = true;
1071
    if (this_present_lastCheckedOn || that_present_lastCheckedOn) {
1072
      if (!(this_present_lastCheckedOn && that_present_lastCheckedOn))
1073
        return false;
1074
      if (this.lastCheckedOn != that.lastCheckedOn)
1075
        return false;
1076
    }
1077
 
1078
    boolean this_present_tinNumber = true && this.isSetTinNumber();
1079
    boolean that_present_tinNumber = true && that.isSetTinNumber();
1080
    if (this_present_tinNumber || that_present_tinNumber) {
1081
      if (!(this_present_tinNumber && that_present_tinNumber))
1082
        return false;
1083
      if (!this.tinNumber.equals(that.tinNumber))
1084
        return false;
1085
    }
1086
 
1087
    boolean this_present_pincode = true && this.isSetPincode();
1088
    boolean that_present_pincode = true && that.isSetPincode();
1089
    if (this_present_pincode || that_present_pincode) {
1090
      if (!(this_present_pincode && that_present_pincode))
1091
        return false;
1092
      if (!this.pincode.equals(that.pincode))
1093
        return false;
1094
    }
1095
 
1096
    boolean this_present_vendorString = true && this.isSetVendorString();
1097
    boolean that_present_vendorString = true && that.isSetVendorString();
1098
    if (this_present_vendorString || that_present_vendorString) {
1099
      if (!(this_present_vendorString && that_present_vendorString))
1100
        return false;
1101
      if (!this.vendorString.equals(that.vendorString))
1102
        return false;
1103
    }
1104
 
1105
    boolean this_present_logisticsLocation = true && this.isSetLogisticsLocation();
1106
    boolean that_present_logisticsLocation = true && that.isSetLogisticsLocation();
1107
    if (this_present_logisticsLocation || that_present_logisticsLocation) {
1108
      if (!(this_present_logisticsLocation && that_present_logisticsLocation))
1109
        return false;
1110
      if (!this.logisticsLocation.equals(that.logisticsLocation))
1111
        return false;
1112
    }
1113
 
1114
    boolean this_present_billingType = true && this.isSetBillingType();
1115
    boolean that_present_billingType = true && that.isSetBillingType();
1116
    if (this_present_billingType || that_present_billingType) {
1117
      if (!(this_present_billingType && that_present_billingType))
1118
        return false;
1119
      if (!this.billingType.equals(that.billingType))
1120
        return false;
1121
    }
1122
 
1123
    boolean this_present_warehouseType = true && this.isSetWarehouseType();
1124
    boolean that_present_warehouseType = true && that.isSetWarehouseType();
1125
    if (this_present_warehouseType || that_present_warehouseType) {
1126
      if (!(this_present_warehouseType && that_present_warehouseType))
1127
        return false;
1128
      if (!this.warehouseType.equals(that.warehouseType))
1129
        return false;
1130
    }
1131
 
1132
    boolean this_present_inventoryType = true && this.isSetInventoryType();
1133
    boolean that_present_inventoryType = true && that.isSetInventoryType();
1134
    if (this_present_inventoryType || that_present_inventoryType) {
1135
      if (!(this_present_inventoryType && that_present_inventoryType))
1136
        return false;
1137
      if (!this.inventoryType.equals(that.inventoryType))
1138
        return false;
1139
    }
1140
 
1141
    boolean this_present_vendor = true && this.isSetVendor();
1142
    boolean that_present_vendor = true && that.isSetVendor();
1143
    if (this_present_vendor || that_present_vendor) {
1144
      if (!(this_present_vendor && that_present_vendor))
1145
        return false;
1146
      if (!this.vendor.equals(that.vendor))
1147
        return false;
1148
    }
1149
 
1150
    boolean this_present_shippingWarehouseId = true;
1151
    boolean that_present_shippingWarehouseId = true;
1152
    if (this_present_shippingWarehouseId || that_present_shippingWarehouseId) {
1153
      if (!(this_present_shippingWarehouseId && that_present_shippingWarehouseId))
1154
        return false;
1155
      if (this.shippingWarehouseId != that.shippingWarehouseId)
1156
        return false;
1157
    }
1158
 
1159
    boolean this_present_billingWarehouseId = true;
1160
    boolean that_present_billingWarehouseId = true;
1161
    if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
1162
      if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
1163
        return false;
1164
      if (this.billingWarehouseId != that.billingWarehouseId)
1165
        return false;
1166
    }
1167
 
1168
    boolean this_present_isAvailabilityMonitored = true;
1169
    boolean that_present_isAvailabilityMonitored = true;
1170
    if (this_present_isAvailabilityMonitored || that_present_isAvailabilityMonitored) {
1171
      if (!(this_present_isAvailabilityMonitored && that_present_isAvailabilityMonitored))
1172
        return false;
1173
      if (this.isAvailabilityMonitored != that.isAvailabilityMonitored)
1174
        return false;
1175
    }
1176
 
1177
    boolean this_present_transferDelayInHours = true;
1178
    boolean that_present_transferDelayInHours = true;
1179
    if (this_present_transferDelayInHours || that_present_transferDelayInHours) {
1180
      if (!(this_present_transferDelayInHours && that_present_transferDelayInHours))
1181
        return false;
1182
      if (this.transferDelayInHours != that.transferDelayInHours)
1183
        return false;
1184
    }
1185
 
1186
    return true;
1187
  }
1188
 
1189
  @Override
1190
  public int hashCode() {
1191
    return 0;
1192
  }
1193
 
1194
  public int compareTo(Warehouse other) {
1195
    if (!getClass().equals(other.getClass())) {
1196
      return getClass().getName().compareTo(other.getClass().getName());
1197
    }
1198
 
1199
    int lastComparison = 0;
1200
    Warehouse typedOther = (Warehouse)other;
1201
 
1202
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
1203
    if (lastComparison != 0) {
1204
      return lastComparison;
1205
    }
1206
    if (isSetId()) {
1207
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
1208
      if (lastComparison != 0) {
1209
        return lastComparison;
1210
      }
1211
    }
1212
    lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(typedOther.isSetDisplayName());
1213
    if (lastComparison != 0) {
1214
      return lastComparison;
1215
    }
1216
    if (isSetDisplayName()) {
1217
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, typedOther.displayName);
1218
      if (lastComparison != 0) {
1219
        return lastComparison;
1220
      }
1221
    }
1222
    lastComparison = Boolean.valueOf(isSetLocation()).compareTo(typedOther.isSetLocation());
1223
    if (lastComparison != 0) {
1224
      return lastComparison;
1225
    }
1226
    if (isSetLocation()) {
1227
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, typedOther.location);
1228
      if (lastComparison != 0) {
1229
        return lastComparison;
1230
      }
1231
    }
1232
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
1233
    if (lastComparison != 0) {
1234
      return lastComparison;
1235
    }
1236
    if (isSetAddedOn()) {
1237
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
1238
      if (lastComparison != 0) {
1239
        return lastComparison;
1240
      }
1241
    }
1242
    lastComparison = Boolean.valueOf(isSetLastCheckedOn()).compareTo(typedOther.isSetLastCheckedOn());
1243
    if (lastComparison != 0) {
1244
      return lastComparison;
1245
    }
1246
    if (isSetLastCheckedOn()) {
1247
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastCheckedOn, typedOther.lastCheckedOn);
1248
      if (lastComparison != 0) {
1249
        return lastComparison;
1250
      }
1251
    }
1252
    lastComparison = Boolean.valueOf(isSetTinNumber()).compareTo(typedOther.isSetTinNumber());
1253
    if (lastComparison != 0) {
1254
      return lastComparison;
1255
    }
1256
    if (isSetTinNumber()) {
1257
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tinNumber, typedOther.tinNumber);
1258
      if (lastComparison != 0) {
1259
        return lastComparison;
1260
      }
1261
    }
1262
    lastComparison = Boolean.valueOf(isSetPincode()).compareTo(typedOther.isSetPincode());
1263
    if (lastComparison != 0) {
1264
      return lastComparison;
1265
    }
1266
    if (isSetPincode()) {
1267
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pincode, typedOther.pincode);
1268
      if (lastComparison != 0) {
1269
        return lastComparison;
1270
      }
1271
    }
1272
    lastComparison = Boolean.valueOf(isSetVendorString()).compareTo(typedOther.isSetVendorString());
1273
    if (lastComparison != 0) {
1274
      return lastComparison;
1275
    }
1276
    if (isSetVendorString()) {
1277
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorString, typedOther.vendorString);
1278
      if (lastComparison != 0) {
1279
        return lastComparison;
1280
      }
1281
    }
1282
    lastComparison = Boolean.valueOf(isSetLogisticsLocation()).compareTo(typedOther.isSetLogisticsLocation());
1283
    if (lastComparison != 0) {
1284
      return lastComparison;
1285
    }
1286
    if (isSetLogisticsLocation()) {
1287
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsLocation, typedOther.logisticsLocation);
1288
      if (lastComparison != 0) {
1289
        return lastComparison;
1290
      }
1291
    }
1292
    lastComparison = Boolean.valueOf(isSetBillingType()).compareTo(typedOther.isSetBillingType());
1293
    if (lastComparison != 0) {
1294
      return lastComparison;
1295
    }
1296
    if (isSetBillingType()) {
1297
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingType, typedOther.billingType);
1298
      if (lastComparison != 0) {
1299
        return lastComparison;
1300
      }
1301
    }
1302
    lastComparison = Boolean.valueOf(isSetWarehouseType()).compareTo(typedOther.isSetWarehouseType());
1303
    if (lastComparison != 0) {
1304
      return lastComparison;
1305
    }
1306
    if (isSetWarehouseType()) {
1307
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseType, typedOther.warehouseType);
1308
      if (lastComparison != 0) {
1309
        return lastComparison;
1310
      }
1311
    }
1312
    lastComparison = Boolean.valueOf(isSetInventoryType()).compareTo(typedOther.isSetInventoryType());
1313
    if (lastComparison != 0) {
1314
      return lastComparison;
1315
    }
1316
    if (isSetInventoryType()) {
1317
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryType, typedOther.inventoryType);
1318
      if (lastComparison != 0) {
1319
        return lastComparison;
1320
      }
1321
    }
1322
    lastComparison = Boolean.valueOf(isSetVendor()).compareTo(typedOther.isSetVendor());
1323
    if (lastComparison != 0) {
1324
      return lastComparison;
1325
    }
1326
    if (isSetVendor()) {
1327
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendor, typedOther.vendor);
1328
      if (lastComparison != 0) {
1329
        return lastComparison;
1330
      }
1331
    }
1332
    lastComparison = Boolean.valueOf(isSetShippingWarehouseId()).compareTo(typedOther.isSetShippingWarehouseId());
1333
    if (lastComparison != 0) {
1334
      return lastComparison;
1335
    }
1336
    if (isSetShippingWarehouseId()) {
1337
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingWarehouseId, typedOther.shippingWarehouseId);
1338
      if (lastComparison != 0) {
1339
        return lastComparison;
1340
      }
1341
    }
1342
    lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
1343
    if (lastComparison != 0) {
1344
      return lastComparison;
1345
    }
1346
    if (isSetBillingWarehouseId()) {
1347
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
1348
      if (lastComparison != 0) {
1349
        return lastComparison;
1350
      }
1351
    }
1352
    lastComparison = Boolean.valueOf(isSetIsAvailabilityMonitored()).compareTo(typedOther.isSetIsAvailabilityMonitored());
1353
    if (lastComparison != 0) {
1354
      return lastComparison;
1355
    }
1356
    if (isSetIsAvailabilityMonitored()) {
1357
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isAvailabilityMonitored, typedOther.isAvailabilityMonitored);
1358
      if (lastComparison != 0) {
1359
        return lastComparison;
1360
      }
1361
    }
1362
    lastComparison = Boolean.valueOf(isSetTransferDelayInHours()).compareTo(typedOther.isSetTransferDelayInHours());
1363
    if (lastComparison != 0) {
1364
      return lastComparison;
1365
    }
1366
    if (isSetTransferDelayInHours()) {
1367
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferDelayInHours, typedOther.transferDelayInHours);
1368
      if (lastComparison != 0) {
1369
        return lastComparison;
1370
      }
1371
    }
1372
    return 0;
1373
  }
1374
 
1375
  public _Fields fieldForId(int fieldId) {
1376
    return _Fields.findByThriftId(fieldId);
1377
  }
1378
 
1379
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1380
    org.apache.thrift.protocol.TField field;
1381
    iprot.readStructBegin();
1382
    while (true)
1383
    {
1384
      field = iprot.readFieldBegin();
1385
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1386
        break;
1387
      }
1388
      switch (field.id) {
1389
        case 1: // ID
1390
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1391
            this.id = iprot.readI64();
1392
            setIdIsSet(true);
1393
          } else { 
1394
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1395
          }
1396
          break;
1397
        case 2: // DISPLAY_NAME
1398
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1399
            this.displayName = iprot.readString();
1400
          } else { 
1401
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1402
          }
1403
          break;
1404
        case 3: // LOCATION
1405
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1406
            this.location = iprot.readString();
1407
          } else { 
1408
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1409
          }
1410
          break;
1411
        case 5: // ADDED_ON
1412
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1413
            this.addedOn = iprot.readI64();
1414
            setAddedOnIsSet(true);
1415
          } else { 
1416
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1417
          }
1418
          break;
1419
        case 6: // LAST_CHECKED_ON
1420
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1421
            this.lastCheckedOn = iprot.readI64();
1422
            setLastCheckedOnIsSet(true);
1423
          } else { 
1424
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1425
          }
1426
          break;
1427
        case 7: // TIN_NUMBER
1428
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1429
            this.tinNumber = iprot.readString();
1430
          } else { 
1431
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1432
          }
1433
          break;
1434
        case 8: // PINCODE
1435
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1436
            this.pincode = iprot.readString();
1437
          } else { 
1438
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1439
          }
1440
          break;
1441
        case 9: // VENDOR_STRING
1442
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1443
            this.vendorString = iprot.readString();
1444
          } else { 
1445
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1446
          }
1447
          break;
1448
        case 10: // LOGISTICS_LOCATION
1449
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1450
            this.logisticsLocation = WarehouseLocation.findByValue(iprot.readI32());
1451
          } else { 
1452
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1453
          }
1454
          break;
1455
        case 12: // BILLING_TYPE
1456
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1457
            this.billingType = BillingType.findByValue(iprot.readI32());
1458
          } else { 
1459
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1460
          }
1461
          break;
1462
        case 13: // WAREHOUSE_TYPE
1463
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1464
            this.warehouseType = WarehouseType.findByValue(iprot.readI32());
1465
          } else { 
1466
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1467
          }
1468
          break;
1469
        case 14: // INVENTORY_TYPE
1470
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1471
            this.inventoryType = InventoryType.findByValue(iprot.readI32());
1472
          } else { 
1473
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1474
          }
1475
          break;
1476
        case 15: // VENDOR
1477
          if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
1478
            this.vendor = new Vendor();
1479
            this.vendor.read(iprot);
1480
          } else { 
1481
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1482
          }
1483
          break;
1484
        case 16: // SHIPPING_WAREHOUSE_ID
1485
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1486
            this.shippingWarehouseId = iprot.readI64();
1487
            setShippingWarehouseIdIsSet(true);
1488
          } else { 
1489
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1490
          }
1491
          break;
1492
        case 17: // BILLING_WAREHOUSE_ID
1493
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1494
            this.billingWarehouseId = iprot.readI64();
1495
            setBillingWarehouseIdIsSet(true);
1496
          } else { 
1497
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1498
          }
1499
          break;
1500
        case 18: // IS_AVAILABILITY_MONITORED
1501
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
1502
            this.isAvailabilityMonitored = iprot.readBool();
1503
            setIsAvailabilityMonitoredIsSet(true);
1504
          } else { 
1505
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1506
          }
1507
          break;
1508
        case 19: // TRANSFER_DELAY_IN_HOURS
1509
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1510
            this.transferDelayInHours = iprot.readI64();
1511
            setTransferDelayInHoursIsSet(true);
1512
          } else { 
1513
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1514
          }
1515
          break;
1516
        default:
1517
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1518
      }
1519
      iprot.readFieldEnd();
1520
    }
1521
    iprot.readStructEnd();
1522
    validate();
1523
  }
1524
 
1525
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1526
    validate();
1527
 
1528
    oprot.writeStructBegin(STRUCT_DESC);
1529
    oprot.writeFieldBegin(ID_FIELD_DESC);
1530
    oprot.writeI64(this.id);
1531
    oprot.writeFieldEnd();
1532
    if (this.displayName != null) {
1533
      oprot.writeFieldBegin(DISPLAY_NAME_FIELD_DESC);
1534
      oprot.writeString(this.displayName);
1535
      oprot.writeFieldEnd();
1536
    }
1537
    if (this.location != null) {
1538
      oprot.writeFieldBegin(LOCATION_FIELD_DESC);
1539
      oprot.writeString(this.location);
1540
      oprot.writeFieldEnd();
1541
    }
1542
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
1543
    oprot.writeI64(this.addedOn);
1544
    oprot.writeFieldEnd();
1545
    oprot.writeFieldBegin(LAST_CHECKED_ON_FIELD_DESC);
1546
    oprot.writeI64(this.lastCheckedOn);
1547
    oprot.writeFieldEnd();
1548
    if (this.tinNumber != null) {
1549
      oprot.writeFieldBegin(TIN_NUMBER_FIELD_DESC);
1550
      oprot.writeString(this.tinNumber);
1551
      oprot.writeFieldEnd();
1552
    }
1553
    if (this.pincode != null) {
1554
      oprot.writeFieldBegin(PINCODE_FIELD_DESC);
1555
      oprot.writeString(this.pincode);
1556
      oprot.writeFieldEnd();
1557
    }
1558
    if (this.vendorString != null) {
1559
      oprot.writeFieldBegin(VENDOR_STRING_FIELD_DESC);
1560
      oprot.writeString(this.vendorString);
1561
      oprot.writeFieldEnd();
1562
    }
1563
    if (this.logisticsLocation != null) {
1564
      oprot.writeFieldBegin(LOGISTICS_LOCATION_FIELD_DESC);
1565
      oprot.writeI32(this.logisticsLocation.getValue());
1566
      oprot.writeFieldEnd();
1567
    }
1568
    if (this.billingType != null) {
1569
      oprot.writeFieldBegin(BILLING_TYPE_FIELD_DESC);
1570
      oprot.writeI32(this.billingType.getValue());
1571
      oprot.writeFieldEnd();
1572
    }
1573
    if (this.warehouseType != null) {
1574
      oprot.writeFieldBegin(WAREHOUSE_TYPE_FIELD_DESC);
1575
      oprot.writeI32(this.warehouseType.getValue());
1576
      oprot.writeFieldEnd();
1577
    }
1578
    if (this.inventoryType != null) {
1579
      oprot.writeFieldBegin(INVENTORY_TYPE_FIELD_DESC);
1580
      oprot.writeI32(this.inventoryType.getValue());
1581
      oprot.writeFieldEnd();
1582
    }
1583
    if (this.vendor != null) {
1584
      oprot.writeFieldBegin(VENDOR_FIELD_DESC);
1585
      this.vendor.write(oprot);
1586
      oprot.writeFieldEnd();
1587
    }
1588
    oprot.writeFieldBegin(SHIPPING_WAREHOUSE_ID_FIELD_DESC);
1589
    oprot.writeI64(this.shippingWarehouseId);
1590
    oprot.writeFieldEnd();
1591
    oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
1592
    oprot.writeI64(this.billingWarehouseId);
1593
    oprot.writeFieldEnd();
1594
    oprot.writeFieldBegin(IS_AVAILABILITY_MONITORED_FIELD_DESC);
1595
    oprot.writeBool(this.isAvailabilityMonitored);
1596
    oprot.writeFieldEnd();
1597
    oprot.writeFieldBegin(TRANSFER_DELAY_IN_HOURS_FIELD_DESC);
1598
    oprot.writeI64(this.transferDelayInHours);
1599
    oprot.writeFieldEnd();
1600
    oprot.writeFieldStop();
1601
    oprot.writeStructEnd();
1602
  }
1603
 
1604
  @Override
1605
  public String toString() {
1606
    StringBuilder sb = new StringBuilder("Warehouse(");
1607
    boolean first = true;
1608
 
1609
    sb.append("id:");
1610
    sb.append(this.id);
1611
    first = false;
1612
    if (!first) sb.append(", ");
1613
    sb.append("displayName:");
1614
    if (this.displayName == null) {
1615
      sb.append("null");
1616
    } else {
1617
      sb.append(this.displayName);
1618
    }
1619
    first = false;
1620
    if (!first) sb.append(", ");
1621
    sb.append("location:");
1622
    if (this.location == null) {
1623
      sb.append("null");
1624
    } else {
1625
      sb.append(this.location);
1626
    }
1627
    first = false;
1628
    if (!first) sb.append(", ");
1629
    sb.append("addedOn:");
1630
    sb.append(this.addedOn);
1631
    first = false;
1632
    if (!first) sb.append(", ");
1633
    sb.append("lastCheckedOn:");
1634
    sb.append(this.lastCheckedOn);
1635
    first = false;
1636
    if (!first) sb.append(", ");
1637
    sb.append("tinNumber:");
1638
    if (this.tinNumber == null) {
1639
      sb.append("null");
1640
    } else {
1641
      sb.append(this.tinNumber);
1642
    }
1643
    first = false;
1644
    if (!first) sb.append(", ");
1645
    sb.append("pincode:");
1646
    if (this.pincode == null) {
1647
      sb.append("null");
1648
    } else {
1649
      sb.append(this.pincode);
1650
    }
1651
    first = false;
1652
    if (!first) sb.append(", ");
1653
    sb.append("vendorString:");
1654
    if (this.vendorString == null) {
1655
      sb.append("null");
1656
    } else {
1657
      sb.append(this.vendorString);
1658
    }
1659
    first = false;
1660
    if (!first) sb.append(", ");
1661
    sb.append("logisticsLocation:");
1662
    if (this.logisticsLocation == null) {
1663
      sb.append("null");
1664
    } else {
1665
      sb.append(this.logisticsLocation);
1666
    }
1667
    first = false;
1668
    if (!first) sb.append(", ");
1669
    sb.append("billingType:");
1670
    if (this.billingType == null) {
1671
      sb.append("null");
1672
    } else {
1673
      sb.append(this.billingType);
1674
    }
1675
    first = false;
1676
    if (!first) sb.append(", ");
1677
    sb.append("warehouseType:");
1678
    if (this.warehouseType == null) {
1679
      sb.append("null");
1680
    } else {
1681
      sb.append(this.warehouseType);
1682
    }
1683
    first = false;
1684
    if (!first) sb.append(", ");
1685
    sb.append("inventoryType:");
1686
    if (this.inventoryType == null) {
1687
      sb.append("null");
1688
    } else {
1689
      sb.append(this.inventoryType);
1690
    }
1691
    first = false;
1692
    if (!first) sb.append(", ");
1693
    sb.append("vendor:");
1694
    if (this.vendor == null) {
1695
      sb.append("null");
1696
    } else {
1697
      sb.append(this.vendor);
1698
    }
1699
    first = false;
1700
    if (!first) sb.append(", ");
1701
    sb.append("shippingWarehouseId:");
1702
    sb.append(this.shippingWarehouseId);
1703
    first = false;
1704
    if (!first) sb.append(", ");
1705
    sb.append("billingWarehouseId:");
1706
    sb.append(this.billingWarehouseId);
1707
    first = false;
1708
    if (!first) sb.append(", ");
1709
    sb.append("isAvailabilityMonitored:");
1710
    sb.append(this.isAvailabilityMonitored);
1711
    first = false;
1712
    if (!first) sb.append(", ");
1713
    sb.append("transferDelayInHours:");
1714
    sb.append(this.transferDelayInHours);
1715
    first = false;
1716
    sb.append(")");
1717
    return sb.toString();
1718
  }
1719
 
1720
  public void validate() throws org.apache.thrift.TException {
1721
    // check for required fields
1722
  }
1723
 
1724
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1725
    try {
1726
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1727
    } catch (org.apache.thrift.TException te) {
1728
      throw new java.io.IOException(te);
1729
    }
1730
  }
1731
 
1732
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1733
    try {
1734
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1735
      __isset_bit_vector = new BitSet(1);
1736
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1737
    } catch (org.apache.thrift.TException te) {
1738
      throw new java.io.IOException(te);
1739
    }
1740
  }
1741
 
1742
}
1743