Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
7788 manish.sha 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.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;
18
import java.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class LogisticsLocationInfo implements org.apache.thrift.TBase<LogisticsLocationInfo, LogisticsLocationInfo._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LogisticsLocationInfo");
25
 
26
  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)1);
27
  private static final org.apache.thrift.protocol.TField PIN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pinCode", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField DESTINATION_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("destinationCode", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField EXP_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("expAvailable", org.apache.thrift.protocol.TType.BOOL, (short)4);
30
  private static final org.apache.thrift.protocol.TField COD_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("codAvailable", org.apache.thrift.protocol.TType.BOOL, (short)5);
31
  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)6);
32
  private static final org.apache.thrift.protocol.TField COD_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("codLimit", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField PREPAID_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("prepaidLimit", org.apache.thrift.protocol.TType.I64, (short)8);
34
  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)9);
35
  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)10);
36
  private static final org.apache.thrift.protocol.TField DELIVERY_DELAY_FIELD_DESC = new org.apache.thrift.protocol.TField("delivery_delay", org.apache.thrift.protocol.TType.I64, (short)11);
37
 
38
  private long providerId; // required
39
  private String pinCode; // required
40
  private String destinationCode; // required
41
  private boolean expAvailable; // required
42
  private boolean codAvailable; // required
43
  private boolean otgAvailable; // required
44
  private long codLimit; // required
45
  private long prepaidLimit; // required
46
  private long warehouseId; // required
47
  private long deliveryTime; // required
48
  private long delivery_delay; // required
49
 
50
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
51
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
52
    PROVIDER_ID((short)1, "providerId"),
53
    PIN_CODE((short)2, "pinCode"),
54
    DESTINATION_CODE((short)3, "destinationCode"),
55
    EXP_AVAILABLE((short)4, "expAvailable"),
56
    COD_AVAILABLE((short)5, "codAvailable"),
57
    OTG_AVAILABLE((short)6, "otgAvailable"),
58
    COD_LIMIT((short)7, "codLimit"),
59
    PREPAID_LIMIT((short)8, "prepaidLimit"),
60
    WAREHOUSE_ID((short)9, "warehouseId"),
61
    DELIVERY_TIME((short)10, "deliveryTime"),
62
    DELIVERY_DELAY((short)11, "delivery_delay");
63
 
64
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
65
 
66
    static {
67
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
68
        byName.put(field.getFieldName(), field);
69
      }
70
    }
71
 
72
    /**
73
     * Find the _Fields constant that matches fieldId, or null if its not found.
74
     */
75
    public static _Fields findByThriftId(int fieldId) {
76
      switch(fieldId) {
77
        case 1: // PROVIDER_ID
78
          return PROVIDER_ID;
79
        case 2: // PIN_CODE
80
          return PIN_CODE;
81
        case 3: // DESTINATION_CODE
82
          return DESTINATION_CODE;
83
        case 4: // EXP_AVAILABLE
84
          return EXP_AVAILABLE;
85
        case 5: // COD_AVAILABLE
86
          return COD_AVAILABLE;
87
        case 6: // OTG_AVAILABLE
88
          return OTG_AVAILABLE;
89
        case 7: // COD_LIMIT
90
          return COD_LIMIT;
91
        case 8: // PREPAID_LIMIT
92
          return PREPAID_LIMIT;
93
        case 9: // WAREHOUSE_ID
94
          return WAREHOUSE_ID;
95
        case 10: // DELIVERY_TIME
96
          return DELIVERY_TIME;
97
        case 11: // DELIVERY_DELAY
98
          return DELIVERY_DELAY;
99
        default:
100
          return null;
101
      }
102
    }
103
 
104
    /**
105
     * Find the _Fields constant that matches fieldId, throwing an exception
106
     * if it is not found.
107
     */
108
    public static _Fields findByThriftIdOrThrow(int fieldId) {
109
      _Fields fields = findByThriftId(fieldId);
110
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
111
      return fields;
112
    }
113
 
114
    /**
115
     * Find the _Fields constant that matches name, or null if its not found.
116
     */
117
    public static _Fields findByName(String name) {
118
      return byName.get(name);
119
    }
120
 
121
    private final short _thriftId;
122
    private final String _fieldName;
123
 
124
    _Fields(short thriftId, String fieldName) {
125
      _thriftId = thriftId;
126
      _fieldName = fieldName;
127
    }
128
 
129
    public short getThriftFieldId() {
130
      return _thriftId;
131
    }
132
 
133
    public String getFieldName() {
134
      return _fieldName;
135
    }
136
  }
137
 
138
  // isset id assignments
139
  private static final int __PROVIDERID_ISSET_ID = 0;
140
  private static final int __EXPAVAILABLE_ISSET_ID = 1;
141
  private static final int __CODAVAILABLE_ISSET_ID = 2;
142
  private static final int __OTGAVAILABLE_ISSET_ID = 3;
143
  private static final int __CODLIMIT_ISSET_ID = 4;
144
  private static final int __PREPAIDLIMIT_ISSET_ID = 5;
145
  private static final int __WAREHOUSEID_ISSET_ID = 6;
146
  private static final int __DELIVERYTIME_ISSET_ID = 7;
147
  private static final int __DELIVERY_DELAY_ISSET_ID = 8;
148
  private BitSet __isset_bit_vector = new BitSet(9);
149
 
150
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
151
  static {
152
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
153
    tmpMap.put(_Fields.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
155
    tmpMap.put(_Fields.PIN_CODE, new org.apache.thrift.meta_data.FieldMetaData("pinCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
157
    tmpMap.put(_Fields.DESTINATION_CODE, new org.apache.thrift.meta_data.FieldMetaData("destinationCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
159
    tmpMap.put(_Fields.EXP_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("expAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
161
    tmpMap.put(_Fields.COD_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("codAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
163
    tmpMap.put(_Fields.OTG_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("otgAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
165
    tmpMap.put(_Fields.COD_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("codLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
167
    tmpMap.put(_Fields.PREPAID_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("prepaidLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
169
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
171
    tmpMap.put(_Fields.DELIVERY_TIME, new org.apache.thrift.meta_data.FieldMetaData("deliveryTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
173
    tmpMap.put(_Fields.DELIVERY_DELAY, new org.apache.thrift.meta_data.FieldMetaData("delivery_delay", org.apache.thrift.TFieldRequirementType.DEFAULT, 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
175
    metaDataMap = Collections.unmodifiableMap(tmpMap);
176
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LogisticsLocationInfo.class, metaDataMap);
177
  }
178
 
179
  public LogisticsLocationInfo() {
180
  }
181
 
182
  public LogisticsLocationInfo(
183
    long providerId,
184
    String pinCode,
185
    String destinationCode,
186
    boolean expAvailable,
187
    boolean codAvailable,
188
    boolean otgAvailable,
189
    long codLimit,
190
    long prepaidLimit,
191
    long warehouseId,
192
    long deliveryTime,
193
    long delivery_delay)
194
  {
195
    this();
196
    this.providerId = providerId;
197
    setProviderIdIsSet(true);
198
    this.pinCode = pinCode;
199
    this.destinationCode = destinationCode;
200
    this.expAvailable = expAvailable;
201
    setExpAvailableIsSet(true);
202
    this.codAvailable = codAvailable;
203
    setCodAvailableIsSet(true);
204
    this.otgAvailable = otgAvailable;
205
    setOtgAvailableIsSet(true);
206
    this.codLimit = codLimit;
207
    setCodLimitIsSet(true);
208
    this.prepaidLimit = prepaidLimit;
209
    setPrepaidLimitIsSet(true);
210
    this.warehouseId = warehouseId;
211
    setWarehouseIdIsSet(true);
212
    this.deliveryTime = deliveryTime;
213
    setDeliveryTimeIsSet(true);
214
    this.delivery_delay = delivery_delay;
215
    setDelivery_delayIsSet(true);
216
  }
217
 
218
  /**
219
   * Performs a deep copy on <i>other</i>.
220
   */
221
  public LogisticsLocationInfo(LogisticsLocationInfo other) {
222
    __isset_bit_vector.clear();
223
    __isset_bit_vector.or(other.__isset_bit_vector);
224
    this.providerId = other.providerId;
225
    if (other.isSetPinCode()) {
226
      this.pinCode = other.pinCode;
227
    }
228
    if (other.isSetDestinationCode()) {
229
      this.destinationCode = other.destinationCode;
230
    }
231
    this.expAvailable = other.expAvailable;
232
    this.codAvailable = other.codAvailable;
233
    this.otgAvailable = other.otgAvailable;
234
    this.codLimit = other.codLimit;
235
    this.prepaidLimit = other.prepaidLimit;
236
    this.warehouseId = other.warehouseId;
237
    this.deliveryTime = other.deliveryTime;
238
    this.delivery_delay = other.delivery_delay;
239
  }
240
 
241
  public LogisticsLocationInfo deepCopy() {
242
    return new LogisticsLocationInfo(this);
243
  }
244
 
245
  @Override
246
  public void clear() {
247
    setProviderIdIsSet(false);
248
    this.providerId = 0;
249
    this.pinCode = null;
250
    this.destinationCode = null;
251
    setExpAvailableIsSet(false);
252
    this.expAvailable = false;
253
    setCodAvailableIsSet(false);
254
    this.codAvailable = false;
255
    setOtgAvailableIsSet(false);
256
    this.otgAvailable = false;
257
    setCodLimitIsSet(false);
258
    this.codLimit = 0;
259
    setPrepaidLimitIsSet(false);
260
    this.prepaidLimit = 0;
261
    setWarehouseIdIsSet(false);
262
    this.warehouseId = 0;
263
    setDeliveryTimeIsSet(false);
264
    this.deliveryTime = 0;
265
    setDelivery_delayIsSet(false);
266
    this.delivery_delay = 0;
267
  }
268
 
269
  public long getProviderId() {
270
    return this.providerId;
271
  }
272
 
273
  public void setProviderId(long providerId) {
274
    this.providerId = providerId;
275
    setProviderIdIsSet(true);
276
  }
277
 
278
  public void unsetProviderId() {
279
    __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
280
  }
281
 
282
  /** Returns true if field providerId is set (has been assigned a value) and false otherwise */
283
  public boolean isSetProviderId() {
284
    return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
285
  }
286
 
287
  public void setProviderIdIsSet(boolean value) {
288
    __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
289
  }
290
 
291
  public String getPinCode() {
292
    return this.pinCode;
293
  }
294
 
295
  public void setPinCode(String pinCode) {
296
    this.pinCode = pinCode;
297
  }
298
 
299
  public void unsetPinCode() {
300
    this.pinCode = null;
301
  }
302
 
303
  /** Returns true if field pinCode is set (has been assigned a value) and false otherwise */
304
  public boolean isSetPinCode() {
305
    return this.pinCode != null;
306
  }
307
 
308
  public void setPinCodeIsSet(boolean value) {
309
    if (!value) {
310
      this.pinCode = null;
311
    }
312
  }
313
 
314
  public String getDestinationCode() {
315
    return this.destinationCode;
316
  }
317
 
318
  public void setDestinationCode(String destinationCode) {
319
    this.destinationCode = destinationCode;
320
  }
321
 
322
  public void unsetDestinationCode() {
323
    this.destinationCode = null;
324
  }
325
 
326
  /** Returns true if field destinationCode is set (has been assigned a value) and false otherwise */
327
  public boolean isSetDestinationCode() {
328
    return this.destinationCode != null;
329
  }
330
 
331
  public void setDestinationCodeIsSet(boolean value) {
332
    if (!value) {
333
      this.destinationCode = null;
334
    }
335
  }
336
 
337
  public boolean isExpAvailable() {
338
    return this.expAvailable;
339
  }
340
 
341
  public void setExpAvailable(boolean expAvailable) {
342
    this.expAvailable = expAvailable;
343
    setExpAvailableIsSet(true);
344
  }
345
 
346
  public void unsetExpAvailable() {
347
    __isset_bit_vector.clear(__EXPAVAILABLE_ISSET_ID);
348
  }
349
 
350
  /** Returns true if field expAvailable is set (has been assigned a value) and false otherwise */
351
  public boolean isSetExpAvailable() {
352
    return __isset_bit_vector.get(__EXPAVAILABLE_ISSET_ID);
353
  }
354
 
355
  public void setExpAvailableIsSet(boolean value) {
356
    __isset_bit_vector.set(__EXPAVAILABLE_ISSET_ID, value);
357
  }
358
 
359
  public boolean isCodAvailable() {
360
    return this.codAvailable;
361
  }
362
 
363
  public void setCodAvailable(boolean codAvailable) {
364
    this.codAvailable = codAvailable;
365
    setCodAvailableIsSet(true);
366
  }
367
 
368
  public void unsetCodAvailable() {
369
    __isset_bit_vector.clear(__CODAVAILABLE_ISSET_ID);
370
  }
371
 
372
  /** Returns true if field codAvailable is set (has been assigned a value) and false otherwise */
373
  public boolean isSetCodAvailable() {
374
    return __isset_bit_vector.get(__CODAVAILABLE_ISSET_ID);
375
  }
376
 
377
  public void setCodAvailableIsSet(boolean value) {
378
    __isset_bit_vector.set(__CODAVAILABLE_ISSET_ID, value);
379
  }
380
 
381
  public boolean isOtgAvailable() {
382
    return this.otgAvailable;
383
  }
384
 
385
  public void setOtgAvailable(boolean otgAvailable) {
386
    this.otgAvailable = otgAvailable;
387
    setOtgAvailableIsSet(true);
388
  }
389
 
390
  public void unsetOtgAvailable() {
391
    __isset_bit_vector.clear(__OTGAVAILABLE_ISSET_ID);
392
  }
393
 
394
  /** Returns true if field otgAvailable is set (has been assigned a value) and false otherwise */
395
  public boolean isSetOtgAvailable() {
396
    return __isset_bit_vector.get(__OTGAVAILABLE_ISSET_ID);
397
  }
398
 
399
  public void setOtgAvailableIsSet(boolean value) {
400
    __isset_bit_vector.set(__OTGAVAILABLE_ISSET_ID, value);
401
  }
402
 
403
  public long getCodLimit() {
404
    return this.codLimit;
405
  }
406
 
407
  public void setCodLimit(long codLimit) {
408
    this.codLimit = codLimit;
409
    setCodLimitIsSet(true);
410
  }
411
 
412
  public void unsetCodLimit() {
413
    __isset_bit_vector.clear(__CODLIMIT_ISSET_ID);
414
  }
415
 
416
  /** Returns true if field codLimit is set (has been assigned a value) and false otherwise */
417
  public boolean isSetCodLimit() {
418
    return __isset_bit_vector.get(__CODLIMIT_ISSET_ID);
419
  }
420
 
421
  public void setCodLimitIsSet(boolean value) {
422
    __isset_bit_vector.set(__CODLIMIT_ISSET_ID, value);
423
  }
424
 
425
  public long getPrepaidLimit() {
426
    return this.prepaidLimit;
427
  }
428
 
429
  public void setPrepaidLimit(long prepaidLimit) {
430
    this.prepaidLimit = prepaidLimit;
431
    setPrepaidLimitIsSet(true);
432
  }
433
 
434
  public void unsetPrepaidLimit() {
435
    __isset_bit_vector.clear(__PREPAIDLIMIT_ISSET_ID);
436
  }
437
 
438
  /** Returns true if field prepaidLimit is set (has been assigned a value) and false otherwise */
439
  public boolean isSetPrepaidLimit() {
440
    return __isset_bit_vector.get(__PREPAIDLIMIT_ISSET_ID);
441
  }
442
 
443
  public void setPrepaidLimitIsSet(boolean value) {
444
    __isset_bit_vector.set(__PREPAIDLIMIT_ISSET_ID, value);
445
  }
446
 
447
  public long getWarehouseId() {
448
    return this.warehouseId;
449
  }
450
 
451
  public void setWarehouseId(long warehouseId) {
452
    this.warehouseId = warehouseId;
453
    setWarehouseIdIsSet(true);
454
  }
455
 
456
  public void unsetWarehouseId() {
457
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
458
  }
459
 
460
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
461
  public boolean isSetWarehouseId() {
462
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
463
  }
464
 
465
  public void setWarehouseIdIsSet(boolean value) {
466
    __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
467
  }
468
 
469
  public long getDeliveryTime() {
470
    return this.deliveryTime;
471
  }
472
 
473
  public void setDeliveryTime(long deliveryTime) {
474
    this.deliveryTime = deliveryTime;
475
    setDeliveryTimeIsSet(true);
476
  }
477
 
478
  public void unsetDeliveryTime() {
479
    __isset_bit_vector.clear(__DELIVERYTIME_ISSET_ID);
480
  }
481
 
482
  /** Returns true if field deliveryTime is set (has been assigned a value) and false otherwise */
483
  public boolean isSetDeliveryTime() {
484
    return __isset_bit_vector.get(__DELIVERYTIME_ISSET_ID);
485
  }
486
 
487
  public void setDeliveryTimeIsSet(boolean value) {
488
    __isset_bit_vector.set(__DELIVERYTIME_ISSET_ID, value);
489
  }
490
 
491
  public long getDelivery_delay() {
492
    return this.delivery_delay;
493
  }
494
 
495
  public void setDelivery_delay(long delivery_delay) {
496
    this.delivery_delay = delivery_delay;
497
    setDelivery_delayIsSet(true);
498
  }
499
 
500
  public void unsetDelivery_delay() {
501
    __isset_bit_vector.clear(__DELIVERY_DELAY_ISSET_ID);
502
  }
503
 
504
  /** Returns true if field delivery_delay is set (has been assigned a value) and false otherwise */
505
  public boolean isSetDelivery_delay() {
506
    return __isset_bit_vector.get(__DELIVERY_DELAY_ISSET_ID);
507
  }
508
 
509
  public void setDelivery_delayIsSet(boolean value) {
510
    __isset_bit_vector.set(__DELIVERY_DELAY_ISSET_ID, value);
511
  }
512
 
513
  public void setFieldValue(_Fields field, Object value) {
514
    switch (field) {
515
    case PROVIDER_ID:
516
      if (value == null) {
517
        unsetProviderId();
518
      } else {
519
        setProviderId((Long)value);
520
      }
521
      break;
522
 
523
    case PIN_CODE:
524
      if (value == null) {
525
        unsetPinCode();
526
      } else {
527
        setPinCode((String)value);
528
      }
529
      break;
530
 
531
    case DESTINATION_CODE:
532
      if (value == null) {
533
        unsetDestinationCode();
534
      } else {
535
        setDestinationCode((String)value);
536
      }
537
      break;
538
 
539
    case EXP_AVAILABLE:
540
      if (value == null) {
541
        unsetExpAvailable();
542
      } else {
543
        setExpAvailable((Boolean)value);
544
      }
545
      break;
546
 
547
    case COD_AVAILABLE:
548
      if (value == null) {
549
        unsetCodAvailable();
550
      } else {
551
        setCodAvailable((Boolean)value);
552
      }
553
      break;
554
 
555
    case OTG_AVAILABLE:
556
      if (value == null) {
557
        unsetOtgAvailable();
558
      } else {
559
        setOtgAvailable((Boolean)value);
560
      }
561
      break;
562
 
563
    case COD_LIMIT:
564
      if (value == null) {
565
        unsetCodLimit();
566
      } else {
567
        setCodLimit((Long)value);
568
      }
569
      break;
570
 
571
    case PREPAID_LIMIT:
572
      if (value == null) {
573
        unsetPrepaidLimit();
574
      } else {
575
        setPrepaidLimit((Long)value);
576
      }
577
      break;
578
 
579
    case WAREHOUSE_ID:
580
      if (value == null) {
581
        unsetWarehouseId();
582
      } else {
583
        setWarehouseId((Long)value);
584
      }
585
      break;
586
 
587
    case DELIVERY_TIME:
588
      if (value == null) {
589
        unsetDeliveryTime();
590
      } else {
591
        setDeliveryTime((Long)value);
592
      }
593
      break;
594
 
595
    case DELIVERY_DELAY:
596
      if (value == null) {
597
        unsetDelivery_delay();
598
      } else {
599
        setDelivery_delay((Long)value);
600
      }
601
      break;
602
 
603
    }
604
  }
605
 
606
  public Object getFieldValue(_Fields field) {
607
    switch (field) {
608
    case PROVIDER_ID:
609
      return Long.valueOf(getProviderId());
610
 
611
    case PIN_CODE:
612
      return getPinCode();
613
 
614
    case DESTINATION_CODE:
615
      return getDestinationCode();
616
 
617
    case EXP_AVAILABLE:
618
      return Boolean.valueOf(isExpAvailable());
619
 
620
    case COD_AVAILABLE:
621
      return Boolean.valueOf(isCodAvailable());
622
 
623
    case OTG_AVAILABLE:
624
      return Boolean.valueOf(isOtgAvailable());
625
 
626
    case COD_LIMIT:
627
      return Long.valueOf(getCodLimit());
628
 
629
    case PREPAID_LIMIT:
630
      return Long.valueOf(getPrepaidLimit());
631
 
632
    case WAREHOUSE_ID:
633
      return Long.valueOf(getWarehouseId());
634
 
635
    case DELIVERY_TIME:
636
      return Long.valueOf(getDeliveryTime());
637
 
638
    case DELIVERY_DELAY:
639
      return Long.valueOf(getDelivery_delay());
640
 
641
    }
642
    throw new IllegalStateException();
643
  }
644
 
645
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
646
  public boolean isSet(_Fields field) {
647
    if (field == null) {
648
      throw new IllegalArgumentException();
649
    }
650
 
651
    switch (field) {
652
    case PROVIDER_ID:
653
      return isSetProviderId();
654
    case PIN_CODE:
655
      return isSetPinCode();
656
    case DESTINATION_CODE:
657
      return isSetDestinationCode();
658
    case EXP_AVAILABLE:
659
      return isSetExpAvailable();
660
    case COD_AVAILABLE:
661
      return isSetCodAvailable();
662
    case OTG_AVAILABLE:
663
      return isSetOtgAvailable();
664
    case COD_LIMIT:
665
      return isSetCodLimit();
666
    case PREPAID_LIMIT:
667
      return isSetPrepaidLimit();
668
    case WAREHOUSE_ID:
669
      return isSetWarehouseId();
670
    case DELIVERY_TIME:
671
      return isSetDeliveryTime();
672
    case DELIVERY_DELAY:
673
      return isSetDelivery_delay();
674
    }
675
    throw new IllegalStateException();
676
  }
677
 
678
  @Override
679
  public boolean equals(Object that) {
680
    if (that == null)
681
      return false;
682
    if (that instanceof LogisticsLocationInfo)
683
      return this.equals((LogisticsLocationInfo)that);
684
    return false;
685
  }
686
 
687
  public boolean equals(LogisticsLocationInfo that) {
688
    if (that == null)
689
      return false;
690
 
691
    boolean this_present_providerId = true;
692
    boolean that_present_providerId = true;
693
    if (this_present_providerId || that_present_providerId) {
694
      if (!(this_present_providerId && that_present_providerId))
695
        return false;
696
      if (this.providerId != that.providerId)
697
        return false;
698
    }
699
 
700
    boolean this_present_pinCode = true && this.isSetPinCode();
701
    boolean that_present_pinCode = true && that.isSetPinCode();
702
    if (this_present_pinCode || that_present_pinCode) {
703
      if (!(this_present_pinCode && that_present_pinCode))
704
        return false;
705
      if (!this.pinCode.equals(that.pinCode))
706
        return false;
707
    }
708
 
709
    boolean this_present_destinationCode = true && this.isSetDestinationCode();
710
    boolean that_present_destinationCode = true && that.isSetDestinationCode();
711
    if (this_present_destinationCode || that_present_destinationCode) {
712
      if (!(this_present_destinationCode && that_present_destinationCode))
713
        return false;
714
      if (!this.destinationCode.equals(that.destinationCode))
715
        return false;
716
    }
717
 
718
    boolean this_present_expAvailable = true;
719
    boolean that_present_expAvailable = true;
720
    if (this_present_expAvailable || that_present_expAvailable) {
721
      if (!(this_present_expAvailable && that_present_expAvailable))
722
        return false;
723
      if (this.expAvailable != that.expAvailable)
724
        return false;
725
    }
726
 
727
    boolean this_present_codAvailable = true;
728
    boolean that_present_codAvailable = true;
729
    if (this_present_codAvailable || that_present_codAvailable) {
730
      if (!(this_present_codAvailable && that_present_codAvailable))
731
        return false;
732
      if (this.codAvailable != that.codAvailable)
733
        return false;
734
    }
735
 
736
    boolean this_present_otgAvailable = true;
737
    boolean that_present_otgAvailable = true;
738
    if (this_present_otgAvailable || that_present_otgAvailable) {
739
      if (!(this_present_otgAvailable && that_present_otgAvailable))
740
        return false;
741
      if (this.otgAvailable != that.otgAvailable)
742
        return false;
743
    }
744
 
745
    boolean this_present_codLimit = true;
746
    boolean that_present_codLimit = true;
747
    if (this_present_codLimit || that_present_codLimit) {
748
      if (!(this_present_codLimit && that_present_codLimit))
749
        return false;
750
      if (this.codLimit != that.codLimit)
751
        return false;
752
    }
753
 
754
    boolean this_present_prepaidLimit = true;
755
    boolean that_present_prepaidLimit = true;
756
    if (this_present_prepaidLimit || that_present_prepaidLimit) {
757
      if (!(this_present_prepaidLimit && that_present_prepaidLimit))
758
        return false;
759
      if (this.prepaidLimit != that.prepaidLimit)
760
        return false;
761
    }
762
 
763
    boolean this_present_warehouseId = true;
764
    boolean that_present_warehouseId = true;
765
    if (this_present_warehouseId || that_present_warehouseId) {
766
      if (!(this_present_warehouseId && that_present_warehouseId))
767
        return false;
768
      if (this.warehouseId != that.warehouseId)
769
        return false;
770
    }
771
 
772
    boolean this_present_deliveryTime = true;
773
    boolean that_present_deliveryTime = true;
774
    if (this_present_deliveryTime || that_present_deliveryTime) {
775
      if (!(this_present_deliveryTime && that_present_deliveryTime))
776
        return false;
777
      if (this.deliveryTime != that.deliveryTime)
778
        return false;
779
    }
780
 
781
    boolean this_present_delivery_delay = true;
782
    boolean that_present_delivery_delay = true;
783
    if (this_present_delivery_delay || that_present_delivery_delay) {
784
      if (!(this_present_delivery_delay && that_present_delivery_delay))
785
        return false;
786
      if (this.delivery_delay != that.delivery_delay)
787
        return false;
788
    }
789
 
790
    return true;
791
  }
792
 
793
  @Override
794
  public int hashCode() {
795
    return 0;
796
  }
797
 
798
  public int compareTo(LogisticsLocationInfo other) {
799
    if (!getClass().equals(other.getClass())) {
800
      return getClass().getName().compareTo(other.getClass().getName());
801
    }
802
 
803
    int lastComparison = 0;
804
    LogisticsLocationInfo typedOther = (LogisticsLocationInfo)other;
805
 
806
    lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
807
    if (lastComparison != 0) {
808
      return lastComparison;
809
    }
810
    if (isSetProviderId()) {
811
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
812
      if (lastComparison != 0) {
813
        return lastComparison;
814
      }
815
    }
816
    lastComparison = Boolean.valueOf(isSetPinCode()).compareTo(typedOther.isSetPinCode());
817
    if (lastComparison != 0) {
818
      return lastComparison;
819
    }
820
    if (isSetPinCode()) {
821
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinCode, typedOther.pinCode);
822
      if (lastComparison != 0) {
823
        return lastComparison;
824
      }
825
    }
826
    lastComparison = Boolean.valueOf(isSetDestinationCode()).compareTo(typedOther.isSetDestinationCode());
827
    if (lastComparison != 0) {
828
      return lastComparison;
829
    }
830
    if (isSetDestinationCode()) {
831
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destinationCode, typedOther.destinationCode);
832
      if (lastComparison != 0) {
833
        return lastComparison;
834
      }
835
    }
836
    lastComparison = Boolean.valueOf(isSetExpAvailable()).compareTo(typedOther.isSetExpAvailable());
837
    if (lastComparison != 0) {
838
      return lastComparison;
839
    }
840
    if (isSetExpAvailable()) {
841
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expAvailable, typedOther.expAvailable);
842
      if (lastComparison != 0) {
843
        return lastComparison;
844
      }
845
    }
846
    lastComparison = Boolean.valueOf(isSetCodAvailable()).compareTo(typedOther.isSetCodAvailable());
847
    if (lastComparison != 0) {
848
      return lastComparison;
849
    }
850
    if (isSetCodAvailable()) {
851
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAvailable, typedOther.codAvailable);
852
      if (lastComparison != 0) {
853
        return lastComparison;
854
      }
855
    }
856
    lastComparison = Boolean.valueOf(isSetOtgAvailable()).compareTo(typedOther.isSetOtgAvailable());
857
    if (lastComparison != 0) {
858
      return lastComparison;
859
    }
860
    if (isSetOtgAvailable()) {
861
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.otgAvailable, typedOther.otgAvailable);
862
      if (lastComparison != 0) {
863
        return lastComparison;
864
      }
865
    }
866
    lastComparison = Boolean.valueOf(isSetCodLimit()).compareTo(typedOther.isSetCodLimit());
867
    if (lastComparison != 0) {
868
      return lastComparison;
869
    }
870
    if (isSetCodLimit()) {
871
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codLimit, typedOther.codLimit);
872
      if (lastComparison != 0) {
873
        return lastComparison;
874
      }
875
    }
876
    lastComparison = Boolean.valueOf(isSetPrepaidLimit()).compareTo(typedOther.isSetPrepaidLimit());
877
    if (lastComparison != 0) {
878
      return lastComparison;
879
    }
880
    if (isSetPrepaidLimit()) {
881
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.prepaidLimit, typedOther.prepaidLimit);
882
      if (lastComparison != 0) {
883
        return lastComparison;
884
      }
885
    }
886
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
887
    if (lastComparison != 0) {
888
      return lastComparison;
889
    }
890
    if (isSetWarehouseId()) {
891
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
892
      if (lastComparison != 0) {
893
        return lastComparison;
894
      }
895
    }
896
    lastComparison = Boolean.valueOf(isSetDeliveryTime()).compareTo(typedOther.isSetDeliveryTime());
897
    if (lastComparison != 0) {
898
      return lastComparison;
899
    }
900
    if (isSetDeliveryTime()) {
901
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deliveryTime, typedOther.deliveryTime);
902
      if (lastComparison != 0) {
903
        return lastComparison;
904
      }
905
    }
906
    lastComparison = Boolean.valueOf(isSetDelivery_delay()).compareTo(typedOther.isSetDelivery_delay());
907
    if (lastComparison != 0) {
908
      return lastComparison;
909
    }
910
    if (isSetDelivery_delay()) {
911
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delivery_delay, typedOther.delivery_delay);
912
      if (lastComparison != 0) {
913
        return lastComparison;
914
      }
915
    }
916
    return 0;
917
  }
918
 
919
  public _Fields fieldForId(int fieldId) {
920
    return _Fields.findByThriftId(fieldId);
921
  }
922
 
923
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
924
    org.apache.thrift.protocol.TField field;
925
    iprot.readStructBegin();
926
    while (true)
927
    {
928
      field = iprot.readFieldBegin();
929
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
930
        break;
931
      }
932
      switch (field.id) {
933
        case 1: // PROVIDER_ID
934
          if (field.type == org.apache.thrift.protocol.TType.I64) {
935
            this.providerId = iprot.readI64();
936
            setProviderIdIsSet(true);
937
          } else { 
938
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
939
          }
940
          break;
941
        case 2: // PIN_CODE
942
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
943
            this.pinCode = iprot.readString();
944
          } else { 
945
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
946
          }
947
          break;
948
        case 3: // DESTINATION_CODE
949
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
950
            this.destinationCode = iprot.readString();
951
          } else { 
952
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
953
          }
954
          break;
955
        case 4: // EXP_AVAILABLE
956
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
957
            this.expAvailable = iprot.readBool();
958
            setExpAvailableIsSet(true);
959
          } else { 
960
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
961
          }
962
          break;
963
        case 5: // COD_AVAILABLE
964
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
965
            this.codAvailable = iprot.readBool();
966
            setCodAvailableIsSet(true);
967
          } else { 
968
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
969
          }
970
          break;
971
        case 6: // OTG_AVAILABLE
972
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
973
            this.otgAvailable = iprot.readBool();
974
            setOtgAvailableIsSet(true);
975
          } else { 
976
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
977
          }
978
          break;
979
        case 7: // COD_LIMIT
980
          if (field.type == org.apache.thrift.protocol.TType.I64) {
981
            this.codLimit = iprot.readI64();
982
            setCodLimitIsSet(true);
983
          } else { 
984
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
985
          }
986
          break;
987
        case 8: // PREPAID_LIMIT
988
          if (field.type == org.apache.thrift.protocol.TType.I64) {
989
            this.prepaidLimit = iprot.readI64();
990
            setPrepaidLimitIsSet(true);
991
          } else { 
992
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
993
          }
994
          break;
995
        case 9: // WAREHOUSE_ID
996
          if (field.type == org.apache.thrift.protocol.TType.I64) {
997
            this.warehouseId = iprot.readI64();
998
            setWarehouseIdIsSet(true);
999
          } else { 
1000
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1001
          }
1002
          break;
1003
        case 10: // DELIVERY_TIME
1004
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1005
            this.deliveryTime = iprot.readI64();
1006
            setDeliveryTimeIsSet(true);
1007
          } else { 
1008
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1009
          }
1010
          break;
1011
        case 11: // DELIVERY_DELAY
1012
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1013
            this.delivery_delay = iprot.readI64();
1014
            setDelivery_delayIsSet(true);
1015
          } else { 
1016
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1017
          }
1018
          break;
1019
        default:
1020
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1021
      }
1022
      iprot.readFieldEnd();
1023
    }
1024
    iprot.readStructEnd();
1025
    validate();
1026
  }
1027
 
1028
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1029
    validate();
1030
 
1031
    oprot.writeStructBegin(STRUCT_DESC);
1032
    oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
1033
    oprot.writeI64(this.providerId);
1034
    oprot.writeFieldEnd();
1035
    if (this.pinCode != null) {
1036
      oprot.writeFieldBegin(PIN_CODE_FIELD_DESC);
1037
      oprot.writeString(this.pinCode);
1038
      oprot.writeFieldEnd();
1039
    }
1040
    if (this.destinationCode != null) {
1041
      oprot.writeFieldBegin(DESTINATION_CODE_FIELD_DESC);
1042
      oprot.writeString(this.destinationCode);
1043
      oprot.writeFieldEnd();
1044
    }
1045
    oprot.writeFieldBegin(EXP_AVAILABLE_FIELD_DESC);
1046
    oprot.writeBool(this.expAvailable);
1047
    oprot.writeFieldEnd();
1048
    oprot.writeFieldBegin(COD_AVAILABLE_FIELD_DESC);
1049
    oprot.writeBool(this.codAvailable);
1050
    oprot.writeFieldEnd();
1051
    oprot.writeFieldBegin(OTG_AVAILABLE_FIELD_DESC);
1052
    oprot.writeBool(this.otgAvailable);
1053
    oprot.writeFieldEnd();
1054
    oprot.writeFieldBegin(COD_LIMIT_FIELD_DESC);
1055
    oprot.writeI64(this.codLimit);
1056
    oprot.writeFieldEnd();
1057
    oprot.writeFieldBegin(PREPAID_LIMIT_FIELD_DESC);
1058
    oprot.writeI64(this.prepaidLimit);
1059
    oprot.writeFieldEnd();
1060
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
1061
    oprot.writeI64(this.warehouseId);
1062
    oprot.writeFieldEnd();
1063
    oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);
1064
    oprot.writeI64(this.deliveryTime);
1065
    oprot.writeFieldEnd();
1066
    oprot.writeFieldBegin(DELIVERY_DELAY_FIELD_DESC);
1067
    oprot.writeI64(this.delivery_delay);
1068
    oprot.writeFieldEnd();
1069
    oprot.writeFieldStop();
1070
    oprot.writeStructEnd();
1071
  }
1072
 
1073
  @Override
1074
  public String toString() {
1075
    StringBuilder sb = new StringBuilder("LogisticsLocationInfo(");
1076
    boolean first = true;
1077
 
1078
    sb.append("providerId:");
1079
    sb.append(this.providerId);
1080
    first = false;
1081
    if (!first) sb.append(", ");
1082
    sb.append("pinCode:");
1083
    if (this.pinCode == null) {
1084
      sb.append("null");
1085
    } else {
1086
      sb.append(this.pinCode);
1087
    }
1088
    first = false;
1089
    if (!first) sb.append(", ");
1090
    sb.append("destinationCode:");
1091
    if (this.destinationCode == null) {
1092
      sb.append("null");
1093
    } else {
1094
      sb.append(this.destinationCode);
1095
    }
1096
    first = false;
1097
    if (!first) sb.append(", ");
1098
    sb.append("expAvailable:");
1099
    sb.append(this.expAvailable);
1100
    first = false;
1101
    if (!first) sb.append(", ");
1102
    sb.append("codAvailable:");
1103
    sb.append(this.codAvailable);
1104
    first = false;
1105
    if (!first) sb.append(", ");
1106
    sb.append("otgAvailable:");
1107
    sb.append(this.otgAvailable);
1108
    first = false;
1109
    if (!first) sb.append(", ");
1110
    sb.append("codLimit:");
1111
    sb.append(this.codLimit);
1112
    first = false;
1113
    if (!first) sb.append(", ");
1114
    sb.append("prepaidLimit:");
1115
    sb.append(this.prepaidLimit);
1116
    first = false;
1117
    if (!first) sb.append(", ");
1118
    sb.append("warehouseId:");
1119
    sb.append(this.warehouseId);
1120
    first = false;
1121
    if (!first) sb.append(", ");
1122
    sb.append("deliveryTime:");
1123
    sb.append(this.deliveryTime);
1124
    first = false;
1125
    if (!first) sb.append(", ");
1126
    sb.append("delivery_delay:");
1127
    sb.append(this.delivery_delay);
1128
    first = false;
1129
    sb.append(")");
1130
    return sb.toString();
1131
  }
1132
 
1133
  public void validate() throws org.apache.thrift.TException {
1134
    // check for required fields
1135
  }
1136
 
1137
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1138
    try {
1139
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1140
    } catch (org.apache.thrift.TException te) {
1141
      throw new java.io.IOException(te);
1142
    }
1143
  }
1144
 
1145
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1146
    try {
1147
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1148
      __isset_bit_vector = new BitSet(1);
1149
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1150
    } catch (org.apache.thrift.TException te) {
1151
      throw new java.io.IOException(te);
1152
    }
1153
  }
1154
 
1155
}
1156