Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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