Subversion Repositories SmartDukaan

Rev

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