Subversion Repositories SmartDukaan

Rev

Rev 4865 | Rev 6524 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
483 rajveer 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
483 rajveer 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.logistics;
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;
3430 rajveer 18
import java.nio.ByteBuffer;
483 rajveer 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class LogisticsInfo implements org.apache.thrift.TBase<LogisticsInfo, LogisticsInfo._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LogisticsInfo");
483 rajveer 25
 
3430 rajveer 26
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField DELIVERY_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("deliveryTime", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField AIRWAY_BILLNO_FIELD_DESC = new org.apache.thrift.protocol.TField("airway_billno", org.apache.thrift.protocol.TType.STRING, (short)4);
4009 chandransh 30
  private static final org.apache.thrift.protocol.TField SHIPPING_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingTime", org.apache.thrift.protocol.TType.I64, (short)5);
4865 rajveer 31
  private static final org.apache.thrift.protocol.TField COD_ALLOWED_FIELD_DESC = new org.apache.thrift.protocol.TField("codAllowed", org.apache.thrift.protocol.TType.BOOL, (short)6);
5110 mandeep.dh 32
  private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)7);
483 rajveer 33
 
3430 rajveer 34
  private long warehouseId; // required
35
  private long providerId; // required
36
  private long deliveryTime; // required
37
  private String airway_billno; // required
4009 chandransh 38
  private long shippingTime; // required
4865 rajveer 39
  private boolean codAllowed; // required
5110 mandeep.dh 40
  private long fulfilmentWarehouseId; // required
483 rajveer 41
 
42
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 43
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
648 chandransh 44
    WAREHOUSE_ID((short)1, "warehouseId"),
45
    PROVIDER_ID((short)2, "providerId"),
46
    DELIVERY_TIME((short)3, "deliveryTime"),
4009 chandransh 47
    AIRWAY_BILLNO((short)4, "airway_billno"),
4865 rajveer 48
    SHIPPING_TIME((short)5, "shippingTime"),
5110 mandeep.dh 49
    COD_ALLOWED((short)6, "codAllowed"),
50
    FULFILMENT_WAREHOUSE_ID((short)7, "fulfilmentWarehouseId");
483 rajveer 51
 
52
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
53
 
54
    static {
55
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
56
        byName.put(field.getFieldName(), field);
57
      }
58
    }
59
 
60
    /**
61
     * Find the _Fields constant that matches fieldId, or null if its not found.
62
     */
63
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 64
      switch(fieldId) {
65
        case 1: // WAREHOUSE_ID
66
          return WAREHOUSE_ID;
67
        case 2: // PROVIDER_ID
68
          return PROVIDER_ID;
69
        case 3: // DELIVERY_TIME
70
          return DELIVERY_TIME;
71
        case 4: // AIRWAY_BILLNO
72
          return AIRWAY_BILLNO;
4009 chandransh 73
        case 5: // SHIPPING_TIME
74
          return SHIPPING_TIME;
4865 rajveer 75
        case 6: // COD_ALLOWED
76
          return COD_ALLOWED;
5110 mandeep.dh 77
        case 7: // FULFILMENT_WAREHOUSE_ID
78
          return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 79
        default:
80
          return null;
81
      }
483 rajveer 82
    }
83
 
84
    /**
85
     * Find the _Fields constant that matches fieldId, throwing an exception
86
     * if it is not found.
87
     */
88
    public static _Fields findByThriftIdOrThrow(int fieldId) {
89
      _Fields fields = findByThriftId(fieldId);
90
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
91
      return fields;
92
    }
93
 
94
    /**
95
     * Find the _Fields constant that matches name, or null if its not found.
96
     */
97
    public static _Fields findByName(String name) {
98
      return byName.get(name);
99
    }
100
 
101
    private final short _thriftId;
102
    private final String _fieldName;
103
 
104
    _Fields(short thriftId, String fieldName) {
105
      _thriftId = thriftId;
106
      _fieldName = fieldName;
107
    }
108
 
109
    public short getThriftFieldId() {
110
      return _thriftId;
111
    }
112
 
113
    public String getFieldName() {
114
      return _fieldName;
115
    }
116
  }
117
 
118
  // isset id assignments
648 chandransh 119
  private static final int __WAREHOUSEID_ISSET_ID = 0;
120
  private static final int __PROVIDERID_ISSET_ID = 1;
121
  private static final int __DELIVERYTIME_ISSET_ID = 2;
4009 chandransh 122
  private static final int __SHIPPINGTIME_ISSET_ID = 3;
4865 rajveer 123
  private static final int __CODALLOWED_ISSET_ID = 4;
5110 mandeep.dh 124
  private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 5;
125
  private BitSet __isset_bit_vector = new BitSet(6);
483 rajveer 126
 
3430 rajveer 127
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
483 rajveer 128
  static {
3430 rajveer 129
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
130
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    tmpMap.put(_Fields.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
134
    tmpMap.put(_Fields.DELIVERY_TIME, new org.apache.thrift.meta_data.FieldMetaData("deliveryTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
136
    tmpMap.put(_Fields.AIRWAY_BILLNO, new org.apache.thrift.meta_data.FieldMetaData("airway_billno", org.apache.thrift.TFieldRequirementType.DEFAULT, 
137
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4009 chandransh 138
    tmpMap.put(_Fields.SHIPPING_TIME, new org.apache.thrift.meta_data.FieldMetaData("shippingTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
139
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4865 rajveer 140
    tmpMap.put(_Fields.COD_ALLOWED, new org.apache.thrift.meta_data.FieldMetaData("codAllowed", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
5110 mandeep.dh 142
    tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 144
    metaDataMap = Collections.unmodifiableMap(tmpMap);
145
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsInfo.class, metaDataMap);
483 rajveer 146
  }
147
 
148
  public LogisticsInfo() {
149
  }
150
 
151
  public LogisticsInfo(
648 chandransh 152
    long warehouseId,
153
    long providerId,
154
    long deliveryTime,
4009 chandransh 155
    String airway_billno,
4865 rajveer 156
    long shippingTime,
5110 mandeep.dh 157
    boolean codAllowed,
158
    long fulfilmentWarehouseId)
483 rajveer 159
  {
160
    this();
648 chandransh 161
    this.warehouseId = warehouseId;
162
    setWarehouseIdIsSet(true);
163
    this.providerId = providerId;
164
    setProviderIdIsSet(true);
165
    this.deliveryTime = deliveryTime;
166
    setDeliveryTimeIsSet(true);
483 rajveer 167
    this.airway_billno = airway_billno;
4009 chandransh 168
    this.shippingTime = shippingTime;
169
    setShippingTimeIsSet(true);
4865 rajveer 170
    this.codAllowed = codAllowed;
171
    setCodAllowedIsSet(true);
5110 mandeep.dh 172
    this.fulfilmentWarehouseId = fulfilmentWarehouseId;
173
    setFulfilmentWarehouseIdIsSet(true);
483 rajveer 174
  }
175
 
176
  /**
177
   * Performs a deep copy on <i>other</i>.
178
   */
179
  public LogisticsInfo(LogisticsInfo other) {
180
    __isset_bit_vector.clear();
181
    __isset_bit_vector.or(other.__isset_bit_vector);
648 chandransh 182
    this.warehouseId = other.warehouseId;
183
    this.providerId = other.providerId;
184
    this.deliveryTime = other.deliveryTime;
510 rajveer 185
    if (other.isSetAirway_billno()) {
186
      this.airway_billno = other.airway_billno;
187
    }
4009 chandransh 188
    this.shippingTime = other.shippingTime;
4865 rajveer 189
    this.codAllowed = other.codAllowed;
5110 mandeep.dh 190
    this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
483 rajveer 191
  }
192
 
193
  public LogisticsInfo deepCopy() {
194
    return new LogisticsInfo(this);
195
  }
196
 
3430 rajveer 197
  @Override
198
  public void clear() {
199
    setWarehouseIdIsSet(false);
200
    this.warehouseId = 0;
201
    setProviderIdIsSet(false);
202
    this.providerId = 0;
203
    setDeliveryTimeIsSet(false);
204
    this.deliveryTime = 0;
205
    this.airway_billno = null;
4009 chandransh 206
    setShippingTimeIsSet(false);
207
    this.shippingTime = 0;
4865 rajveer 208
    setCodAllowedIsSet(false);
209
    this.codAllowed = false;
5110 mandeep.dh 210
    setFulfilmentWarehouseIdIsSet(false);
211
    this.fulfilmentWarehouseId = 0;
483 rajveer 212
  }
213
 
648 chandransh 214
  public long getWarehouseId() {
215
    return this.warehouseId;
483 rajveer 216
  }
217
 
3430 rajveer 218
  public void setWarehouseId(long warehouseId) {
648 chandransh 219
    this.warehouseId = warehouseId;
220
    setWarehouseIdIsSet(true);
483 rajveer 221
  }
222
 
648 chandransh 223
  public void unsetWarehouseId() {
224
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
483 rajveer 225
  }
226
 
3430 rajveer 227
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
648 chandransh 228
  public boolean isSetWarehouseId() {
229
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
483 rajveer 230
  }
231
 
648 chandransh 232
  public void setWarehouseIdIsSet(boolean value) {
233
    __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
483 rajveer 234
  }
235
 
648 chandransh 236
  public long getProviderId() {
237
    return this.providerId;
483 rajveer 238
  }
239
 
3430 rajveer 240
  public void setProviderId(long providerId) {
648 chandransh 241
    this.providerId = providerId;
242
    setProviderIdIsSet(true);
483 rajveer 243
  }
244
 
648 chandransh 245
  public void unsetProviderId() {
246
    __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
483 rajveer 247
  }
248
 
3430 rajveer 249
  /** Returns true if field providerId is set (has been assigned a value) and false otherwise */
648 chandransh 250
  public boolean isSetProviderId() {
251
    return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
483 rajveer 252
  }
253
 
648 chandransh 254
  public void setProviderIdIsSet(boolean value) {
255
    __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
483 rajveer 256
  }
257
 
648 chandransh 258
  public long getDeliveryTime() {
259
    return this.deliveryTime;
260
  }
261
 
3430 rajveer 262
  public void setDeliveryTime(long deliveryTime) {
648 chandransh 263
    this.deliveryTime = deliveryTime;
264
    setDeliveryTimeIsSet(true);
265
  }
266
 
267
  public void unsetDeliveryTime() {
268
    __isset_bit_vector.clear(__DELIVERYTIME_ISSET_ID);
269
  }
270
 
3430 rajveer 271
  /** Returns true if field deliveryTime is set (has been assigned a value) and false otherwise */
648 chandransh 272
  public boolean isSetDeliveryTime() {
273
    return __isset_bit_vector.get(__DELIVERYTIME_ISSET_ID);
274
  }
275
 
276
  public void setDeliveryTimeIsSet(boolean value) {
277
    __isset_bit_vector.set(__DELIVERYTIME_ISSET_ID, value);
278
  }
279
 
510 rajveer 280
  public String getAirway_billno() {
483 rajveer 281
    return this.airway_billno;
282
  }
283
 
3430 rajveer 284
  public void setAirway_billno(String airway_billno) {
483 rajveer 285
    this.airway_billno = airway_billno;
286
  }
287
 
288
  public void unsetAirway_billno() {
510 rajveer 289
    this.airway_billno = null;
483 rajveer 290
  }
291
 
3430 rajveer 292
  /** Returns true if field airway_billno is set (has been assigned a value) and false otherwise */
483 rajveer 293
  public boolean isSetAirway_billno() {
510 rajveer 294
    return this.airway_billno != null;
483 rajveer 295
  }
296
 
297
  public void setAirway_billnoIsSet(boolean value) {
510 rajveer 298
    if (!value) {
299
      this.airway_billno = null;
300
    }
483 rajveer 301
  }
302
 
4009 chandransh 303
  public long getShippingTime() {
304
    return this.shippingTime;
305
  }
306
 
307
  public void setShippingTime(long shippingTime) {
308
    this.shippingTime = shippingTime;
309
    setShippingTimeIsSet(true);
310
  }
311
 
312
  public void unsetShippingTime() {
313
    __isset_bit_vector.clear(__SHIPPINGTIME_ISSET_ID);
314
  }
315
 
316
  /** Returns true if field shippingTime is set (has been assigned a value) and false otherwise */
317
  public boolean isSetShippingTime() {
318
    return __isset_bit_vector.get(__SHIPPINGTIME_ISSET_ID);
319
  }
320
 
321
  public void setShippingTimeIsSet(boolean value) {
322
    __isset_bit_vector.set(__SHIPPINGTIME_ISSET_ID, value);
323
  }
324
 
4865 rajveer 325
  public boolean isCodAllowed() {
326
    return this.codAllowed;
327
  }
328
 
329
  public void setCodAllowed(boolean codAllowed) {
330
    this.codAllowed = codAllowed;
331
    setCodAllowedIsSet(true);
332
  }
333
 
334
  public void unsetCodAllowed() {
335
    __isset_bit_vector.clear(__CODALLOWED_ISSET_ID);
336
  }
337
 
338
  /** Returns true if field codAllowed is set (has been assigned a value) and false otherwise */
339
  public boolean isSetCodAllowed() {
340
    return __isset_bit_vector.get(__CODALLOWED_ISSET_ID);
341
  }
342
 
343
  public void setCodAllowedIsSet(boolean value) {
344
    __isset_bit_vector.set(__CODALLOWED_ISSET_ID, value);
345
  }
346
 
5110 mandeep.dh 347
  public long getFulfilmentWarehouseId() {
348
    return this.fulfilmentWarehouseId;
349
  }
350
 
351
  public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
352
    this.fulfilmentWarehouseId = fulfilmentWarehouseId;
353
    setFulfilmentWarehouseIdIsSet(true);
354
  }
355
 
356
  public void unsetFulfilmentWarehouseId() {
357
    __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
358
  }
359
 
360
  /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
361
  public boolean isSetFulfilmentWarehouseId() {
362
    return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
363
  }
364
 
365
  public void setFulfilmentWarehouseIdIsSet(boolean value) {
366
    __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
367
  }
368
 
483 rajveer 369
  public void setFieldValue(_Fields field, Object value) {
370
    switch (field) {
371
    case WAREHOUSE_ID:
372
      if (value == null) {
648 chandransh 373
        unsetWarehouseId();
483 rajveer 374
      } else {
648 chandransh 375
        setWarehouseId((Long)value);
483 rajveer 376
      }
377
      break;
378
 
379
    case PROVIDER_ID:
380
      if (value == null) {
648 chandransh 381
        unsetProviderId();
483 rajveer 382
      } else {
648 chandransh 383
        setProviderId((Long)value);
483 rajveer 384
      }
385
      break;
386
 
648 chandransh 387
    case DELIVERY_TIME:
483 rajveer 388
      if (value == null) {
648 chandransh 389
        unsetDeliveryTime();
483 rajveer 390
      } else {
648 chandransh 391
        setDeliveryTime((Long)value);
483 rajveer 392
      }
393
      break;
394
 
648 chandransh 395
    case AIRWAY_BILLNO:
483 rajveer 396
      if (value == null) {
648 chandransh 397
        unsetAirway_billno();
483 rajveer 398
      } else {
648 chandransh 399
        setAirway_billno((String)value);
483 rajveer 400
      }
401
      break;
402
 
4009 chandransh 403
    case SHIPPING_TIME:
404
      if (value == null) {
405
        unsetShippingTime();
406
      } else {
407
        setShippingTime((Long)value);
408
      }
409
      break;
410
 
4865 rajveer 411
    case COD_ALLOWED:
412
      if (value == null) {
413
        unsetCodAllowed();
414
      } else {
415
        setCodAllowed((Boolean)value);
416
      }
417
      break;
418
 
5110 mandeep.dh 419
    case FULFILMENT_WAREHOUSE_ID:
420
      if (value == null) {
421
        unsetFulfilmentWarehouseId();
422
      } else {
423
        setFulfilmentWarehouseId((Long)value);
424
      }
425
      break;
426
 
483 rajveer 427
    }
428
  }
429
 
430
  public Object getFieldValue(_Fields field) {
431
    switch (field) {
432
    case WAREHOUSE_ID:
3430 rajveer 433
      return Long.valueOf(getWarehouseId());
483 rajveer 434
 
435
    case PROVIDER_ID:
3430 rajveer 436
      return Long.valueOf(getProviderId());
483 rajveer 437
 
648 chandransh 438
    case DELIVERY_TIME:
3430 rajveer 439
      return Long.valueOf(getDeliveryTime());
648 chandransh 440
 
483 rajveer 441
    case AIRWAY_BILLNO:
510 rajveer 442
      return getAirway_billno();
483 rajveer 443
 
4009 chandransh 444
    case SHIPPING_TIME:
445
      return Long.valueOf(getShippingTime());
446
 
4865 rajveer 447
    case COD_ALLOWED:
448
      return Boolean.valueOf(isCodAllowed());
449
 
5110 mandeep.dh 450
    case FULFILMENT_WAREHOUSE_ID:
451
      return Long.valueOf(getFulfilmentWarehouseId());
452
 
483 rajveer 453
    }
454
    throw new IllegalStateException();
455
  }
456
 
3430 rajveer 457
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
458
  public boolean isSet(_Fields field) {
459
    if (field == null) {
460
      throw new IllegalArgumentException();
461
    }
483 rajveer 462
 
463
    switch (field) {
464
    case WAREHOUSE_ID:
648 chandransh 465
      return isSetWarehouseId();
483 rajveer 466
    case PROVIDER_ID:
648 chandransh 467
      return isSetProviderId();
468
    case DELIVERY_TIME:
469
      return isSetDeliveryTime();
483 rajveer 470
    case AIRWAY_BILLNO:
471
      return isSetAirway_billno();
4009 chandransh 472
    case SHIPPING_TIME:
473
      return isSetShippingTime();
4865 rajveer 474
    case COD_ALLOWED:
475
      return isSetCodAllowed();
5110 mandeep.dh 476
    case FULFILMENT_WAREHOUSE_ID:
477
      return isSetFulfilmentWarehouseId();
483 rajveer 478
    }
479
    throw new IllegalStateException();
480
  }
481
 
482
  @Override
483
  public boolean equals(Object that) {
484
    if (that == null)
485
      return false;
486
    if (that instanceof LogisticsInfo)
487
      return this.equals((LogisticsInfo)that);
488
    return false;
489
  }
490
 
491
  public boolean equals(LogisticsInfo that) {
492
    if (that == null)
493
      return false;
494
 
648 chandransh 495
    boolean this_present_warehouseId = true;
496
    boolean that_present_warehouseId = true;
497
    if (this_present_warehouseId || that_present_warehouseId) {
498
      if (!(this_present_warehouseId && that_present_warehouseId))
483 rajveer 499
        return false;
648 chandransh 500
      if (this.warehouseId != that.warehouseId)
483 rajveer 501
        return false;
502
    }
503
 
648 chandransh 504
    boolean this_present_providerId = true;
505
    boolean that_present_providerId = true;
506
    if (this_present_providerId || that_present_providerId) {
507
      if (!(this_present_providerId && that_present_providerId))
483 rajveer 508
        return false;
648 chandransh 509
      if (this.providerId != that.providerId)
483 rajveer 510
        return false;
511
    }
512
 
648 chandransh 513
    boolean this_present_deliveryTime = true;
514
    boolean that_present_deliveryTime = true;
515
    if (this_present_deliveryTime || that_present_deliveryTime) {
516
      if (!(this_present_deliveryTime && that_present_deliveryTime))
517
        return false;
518
      if (this.deliveryTime != that.deliveryTime)
519
        return false;
520
    }
521
 
510 rajveer 522
    boolean this_present_airway_billno = true && this.isSetAirway_billno();
523
    boolean that_present_airway_billno = true && that.isSetAirway_billno();
483 rajveer 524
    if (this_present_airway_billno || that_present_airway_billno) {
525
      if (!(this_present_airway_billno && that_present_airway_billno))
526
        return false;
510 rajveer 527
      if (!this.airway_billno.equals(that.airway_billno))
483 rajveer 528
        return false;
529
    }
530
 
4009 chandransh 531
    boolean this_present_shippingTime = true;
532
    boolean that_present_shippingTime = true;
533
    if (this_present_shippingTime || that_present_shippingTime) {
534
      if (!(this_present_shippingTime && that_present_shippingTime))
535
        return false;
536
      if (this.shippingTime != that.shippingTime)
537
        return false;
538
    }
539
 
4865 rajveer 540
    boolean this_present_codAllowed = true;
541
    boolean that_present_codAllowed = true;
542
    if (this_present_codAllowed || that_present_codAllowed) {
543
      if (!(this_present_codAllowed && that_present_codAllowed))
544
        return false;
545
      if (this.codAllowed != that.codAllowed)
546
        return false;
547
    }
548
 
5110 mandeep.dh 549
    boolean this_present_fulfilmentWarehouseId = true;
550
    boolean that_present_fulfilmentWarehouseId = true;
551
    if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
552
      if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
553
        return false;
554
      if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
555
        return false;
556
    }
557
 
483 rajveer 558
    return true;
559
  }
560
 
561
  @Override
562
  public int hashCode() {
563
    return 0;
564
  }
565
 
566
  public int compareTo(LogisticsInfo other) {
567
    if (!getClass().equals(other.getClass())) {
568
      return getClass().getName().compareTo(other.getClass().getName());
569
    }
570
 
571
    int lastComparison = 0;
572
    LogisticsInfo typedOther = (LogisticsInfo)other;
573
 
3430 rajveer 574
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
483 rajveer 575
    if (lastComparison != 0) {
576
      return lastComparison;
577
    }
3430 rajveer 578
    if (isSetWarehouseId()) {
579
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
580
      if (lastComparison != 0) {
581
        return lastComparison;
582
      }
483 rajveer 583
    }
3430 rajveer 584
    lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
483 rajveer 585
    if (lastComparison != 0) {
586
      return lastComparison;
587
    }
3430 rajveer 588
    if (isSetProviderId()) {
589
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
590
      if (lastComparison != 0) {
591
        return lastComparison;
592
      }
483 rajveer 593
    }
3430 rajveer 594
    lastComparison = Boolean.valueOf(isSetDeliveryTime()).compareTo(typedOther.isSetDeliveryTime());
483 rajveer 595
    if (lastComparison != 0) {
596
      return lastComparison;
597
    }
3430 rajveer 598
    if (isSetDeliveryTime()) {
599
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deliveryTime, typedOther.deliveryTime);
600
      if (lastComparison != 0) {
601
        return lastComparison;
602
      }
483 rajveer 603
    }
3430 rajveer 604
    lastComparison = Boolean.valueOf(isSetAirway_billno()).compareTo(typedOther.isSetAirway_billno());
483 rajveer 605
    if (lastComparison != 0) {
606
      return lastComparison;
607
    }
3430 rajveer 608
    if (isSetAirway_billno()) {
609
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airway_billno, typedOther.airway_billno);
610
      if (lastComparison != 0) {
611
        return lastComparison;
612
      }
483 rajveer 613
    }
4009 chandransh 614
    lastComparison = Boolean.valueOf(isSetShippingTime()).compareTo(typedOther.isSetShippingTime());
615
    if (lastComparison != 0) {
616
      return lastComparison;
617
    }
618
    if (isSetShippingTime()) {
619
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingTime, typedOther.shippingTime);
620
      if (lastComparison != 0) {
621
        return lastComparison;
622
      }
623
    }
4865 rajveer 624
    lastComparison = Boolean.valueOf(isSetCodAllowed()).compareTo(typedOther.isSetCodAllowed());
625
    if (lastComparison != 0) {
626
      return lastComparison;
627
    }
628
    if (isSetCodAllowed()) {
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAllowed, typedOther.codAllowed);
630
      if (lastComparison != 0) {
631
        return lastComparison;
632
      }
633
    }
5110 mandeep.dh 634
    lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
635
    if (lastComparison != 0) {
636
      return lastComparison;
637
    }
638
    if (isSetFulfilmentWarehouseId()) {
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
640
      if (lastComparison != 0) {
641
        return lastComparison;
642
      }
643
    }
483 rajveer 644
    return 0;
645
  }
646
 
3430 rajveer 647
  public _Fields fieldForId(int fieldId) {
648
    return _Fields.findByThriftId(fieldId);
649
  }
650
 
651
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
652
    org.apache.thrift.protocol.TField field;
483 rajveer 653
    iprot.readStructBegin();
654
    while (true)
655
    {
656
      field = iprot.readFieldBegin();
3430 rajveer 657
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
483 rajveer 658
        break;
659
      }
3430 rajveer 660
      switch (field.id) {
661
        case 1: // WAREHOUSE_ID
662
          if (field.type == org.apache.thrift.protocol.TType.I64) {
663
            this.warehouseId = iprot.readI64();
664
            setWarehouseIdIsSet(true);
665
          } else { 
666
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
667
          }
668
          break;
669
        case 2: // PROVIDER_ID
670
          if (field.type == org.apache.thrift.protocol.TType.I64) {
671
            this.providerId = iprot.readI64();
672
            setProviderIdIsSet(true);
673
          } else { 
674
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
675
          }
676
          break;
677
        case 3: // DELIVERY_TIME
678
          if (field.type == org.apache.thrift.protocol.TType.I64) {
679
            this.deliveryTime = iprot.readI64();
680
            setDeliveryTimeIsSet(true);
681
          } else { 
682
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
683
          }
684
          break;
685
        case 4: // AIRWAY_BILLNO
686
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
687
            this.airway_billno = iprot.readString();
688
          } else { 
689
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
690
          }
691
          break;
4009 chandransh 692
        case 5: // SHIPPING_TIME
693
          if (field.type == org.apache.thrift.protocol.TType.I64) {
694
            this.shippingTime = iprot.readI64();
695
            setShippingTimeIsSet(true);
696
          } else { 
697
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
698
          }
699
          break;
4865 rajveer 700
        case 6: // COD_ALLOWED
701
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
702
            this.codAllowed = iprot.readBool();
703
            setCodAllowedIsSet(true);
704
          } else { 
705
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
706
          }
707
          break;
5110 mandeep.dh 708
        case 7: // FULFILMENT_WAREHOUSE_ID
709
          if (field.type == org.apache.thrift.protocol.TType.I64) {
710
            this.fulfilmentWarehouseId = iprot.readI64();
711
            setFulfilmentWarehouseIdIsSet(true);
712
          } else { 
713
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
714
          }
715
          break;
3430 rajveer 716
        default:
717
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
483 rajveer 718
      }
3430 rajveer 719
      iprot.readFieldEnd();
483 rajveer 720
    }
721
    iprot.readStructEnd();
722
    validate();
723
  }
724
 
3430 rajveer 725
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
483 rajveer 726
    validate();
727
 
728
    oprot.writeStructBegin(STRUCT_DESC);
729
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
648 chandransh 730
    oprot.writeI64(this.warehouseId);
483 rajveer 731
    oprot.writeFieldEnd();
732
    oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
648 chandransh 733
    oprot.writeI64(this.providerId);
483 rajveer 734
    oprot.writeFieldEnd();
648 chandransh 735
    oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);
736
    oprot.writeI64(this.deliveryTime);
737
    oprot.writeFieldEnd();
510 rajveer 738
    if (this.airway_billno != null) {
739
      oprot.writeFieldBegin(AIRWAY_BILLNO_FIELD_DESC);
740
      oprot.writeString(this.airway_billno);
741
      oprot.writeFieldEnd();
742
    }
4009 chandransh 743
    oprot.writeFieldBegin(SHIPPING_TIME_FIELD_DESC);
744
    oprot.writeI64(this.shippingTime);
745
    oprot.writeFieldEnd();
4865 rajveer 746
    oprot.writeFieldBegin(COD_ALLOWED_FIELD_DESC);
747
    oprot.writeBool(this.codAllowed);
748
    oprot.writeFieldEnd();
5110 mandeep.dh 749
    oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
750
    oprot.writeI64(this.fulfilmentWarehouseId);
751
    oprot.writeFieldEnd();
483 rajveer 752
    oprot.writeFieldStop();
753
    oprot.writeStructEnd();
754
  }
755
 
756
  @Override
757
  public String toString() {
758
    StringBuilder sb = new StringBuilder("LogisticsInfo(");
759
    boolean first = true;
760
 
648 chandransh 761
    sb.append("warehouseId:");
762
    sb.append(this.warehouseId);
483 rajveer 763
    first = false;
764
    if (!first) sb.append(", ");
648 chandransh 765
    sb.append("providerId:");
766
    sb.append(this.providerId);
483 rajveer 767
    first = false;
768
    if (!first) sb.append(", ");
648 chandransh 769
    sb.append("deliveryTime:");
770
    sb.append(this.deliveryTime);
771
    first = false;
772
    if (!first) sb.append(", ");
483 rajveer 773
    sb.append("airway_billno:");
510 rajveer 774
    if (this.airway_billno == null) {
775
      sb.append("null");
776
    } else {
777
      sb.append(this.airway_billno);
778
    }
483 rajveer 779
    first = false;
4009 chandransh 780
    if (!first) sb.append(", ");
781
    sb.append("shippingTime:");
782
    sb.append(this.shippingTime);
783
    first = false;
4865 rajveer 784
    if (!first) sb.append(", ");
785
    sb.append("codAllowed:");
786
    sb.append(this.codAllowed);
787
    first = false;
5110 mandeep.dh 788
    if (!first) sb.append(", ");
789
    sb.append("fulfilmentWarehouseId:");
790
    sb.append(this.fulfilmentWarehouseId);
791
    first = false;
483 rajveer 792
    sb.append(")");
793
    return sb.toString();
794
  }
795
 
3430 rajveer 796
  public void validate() throws org.apache.thrift.TException {
483 rajveer 797
    // check for required fields
798
  }
799
 
3430 rajveer 800
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
801
    try {
802
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
803
    } catch (org.apache.thrift.TException te) {
804
      throw new java.io.IOException(te);
805
    }
806
  }
807
 
808
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
809
    try {
810
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
811
      __isset_bit_vector = new BitSet(1);
812
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
813
    } catch (org.apache.thrift.TException te) {
814
      throw new java.io.IOException(te);
815
    }
816
  }
817
 
483 rajveer 818
}
819