Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
13691 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 HsOrder implements org.apache.thrift.TBase<HsOrder, HsOrder._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HsOrder");
25
 
26
  private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField HS_ORDER_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("hsOrderNo", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField HS_SUB_ORDER_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("hsSubOrderNo", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField CATALOGUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogueName", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField HS_ORDER_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("hsOrderDate", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField HS_PRODUCT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hsProductId", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField HS_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("hsItemId", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField SELLER_SKU_FIELD_DESC = new org.apache.thrift.protocol.TField("sellerSku", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField PAYMENT_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("paymentMode", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField COURIER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("courierName", org.apache.thrift.protocol.TType.STRING, (short)10);
36
  private static final org.apache.thrift.protocol.TField SLA_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("slaDays", org.apache.thrift.protocol.TType.I64, (short)11);
37
 
38
  private long orderId; // required
39
  private String hsOrderNo; // required
40
  private String hsSubOrderNo; // required
41
  private String catalogueName; // required
42
  private long hsOrderDate; // required
43
  private String hsProductId; // required
44
  private String hsItemId; // required
45
  private String sellerSku; // required
46
  private String paymentMode; // required
47
  private String courierName; // required
48
  private long slaDays; // 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
    ORDER_ID((short)1, "orderId"),
53
    HS_ORDER_NO((short)2, "hsOrderNo"),
54
    HS_SUB_ORDER_NO((short)3, "hsSubOrderNo"),
55
    CATALOGUE_NAME((short)4, "catalogueName"),
56
    HS_ORDER_DATE((short)5, "hsOrderDate"),
57
    HS_PRODUCT_ID((short)6, "hsProductId"),
58
    HS_ITEM_ID((short)7, "hsItemId"),
59
    SELLER_SKU((short)8, "sellerSku"),
60
    PAYMENT_MODE((short)9, "paymentMode"),
61
    COURIER_NAME((short)10, "courierName"),
62
    SLA_DAYS((short)11, "slaDays");
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: // ORDER_ID
78
          return ORDER_ID;
79
        case 2: // HS_ORDER_NO
80
          return HS_ORDER_NO;
81
        case 3: // HS_SUB_ORDER_NO
82
          return HS_SUB_ORDER_NO;
83
        case 4: // CATALOGUE_NAME
84
          return CATALOGUE_NAME;
85
        case 5: // HS_ORDER_DATE
86
          return HS_ORDER_DATE;
87
        case 6: // HS_PRODUCT_ID
88
          return HS_PRODUCT_ID;
89
        case 7: // HS_ITEM_ID
90
          return HS_ITEM_ID;
91
        case 8: // SELLER_SKU
92
          return SELLER_SKU;
93
        case 9: // PAYMENT_MODE
94
          return PAYMENT_MODE;
95
        case 10: // COURIER_NAME
96
          return COURIER_NAME;
97
        case 11: // SLA_DAYS
98
          return SLA_DAYS;
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 __ORDERID_ISSET_ID = 0;
140
  private static final int __HSORDERDATE_ISSET_ID = 1;
141
  private static final int __SLADAYS_ISSET_ID = 2;
142
  private BitSet __isset_bit_vector = new BitSet(3);
143
 
144
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
145
  static {
146
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
147
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
149
    tmpMap.put(_Fields.HS_ORDER_NO, new org.apache.thrift.meta_data.FieldMetaData("hsOrderNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
151
    tmpMap.put(_Fields.HS_SUB_ORDER_NO, new org.apache.thrift.meta_data.FieldMetaData("hsSubOrderNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
152
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
153
    tmpMap.put(_Fields.CATALOGUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("catalogueName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
155
    tmpMap.put(_Fields.HS_ORDER_DATE, new org.apache.thrift.meta_data.FieldMetaData("hsOrderDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
157
    tmpMap.put(_Fields.HS_PRODUCT_ID, new org.apache.thrift.meta_data.FieldMetaData("hsProductId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
159
    tmpMap.put(_Fields.HS_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("hsItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
161
    tmpMap.put(_Fields.SELLER_SKU, new org.apache.thrift.meta_data.FieldMetaData("sellerSku", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
163
    tmpMap.put(_Fields.PAYMENT_MODE, new org.apache.thrift.meta_data.FieldMetaData("paymentMode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
165
    tmpMap.put(_Fields.COURIER_NAME, new org.apache.thrift.meta_data.FieldMetaData("courierName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
167
    tmpMap.put(_Fields.SLA_DAYS, new org.apache.thrift.meta_data.FieldMetaData("slaDays", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
169
    metaDataMap = Collections.unmodifiableMap(tmpMap);
170
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HsOrder.class, metaDataMap);
171
  }
172
 
173
  public HsOrder() {
174
  }
175
 
176
  public HsOrder(
177
    long orderId,
178
    String hsOrderNo,
179
    String hsSubOrderNo,
180
    String catalogueName,
181
    long hsOrderDate,
182
    String hsProductId,
183
    String hsItemId,
184
    String sellerSku,
185
    String paymentMode,
186
    String courierName,
187
    long slaDays)
188
  {
189
    this();
190
    this.orderId = orderId;
191
    setOrderIdIsSet(true);
192
    this.hsOrderNo = hsOrderNo;
193
    this.hsSubOrderNo = hsSubOrderNo;
194
    this.catalogueName = catalogueName;
195
    this.hsOrderDate = hsOrderDate;
196
    setHsOrderDateIsSet(true);
197
    this.hsProductId = hsProductId;
198
    this.hsItemId = hsItemId;
199
    this.sellerSku = sellerSku;
200
    this.paymentMode = paymentMode;
201
    this.courierName = courierName;
202
    this.slaDays = slaDays;
203
    setSlaDaysIsSet(true);
204
  }
205
 
206
  /**
207
   * Performs a deep copy on <i>other</i>.
208
   */
209
  public HsOrder(HsOrder other) {
210
    __isset_bit_vector.clear();
211
    __isset_bit_vector.or(other.__isset_bit_vector);
212
    this.orderId = other.orderId;
213
    if (other.isSetHsOrderNo()) {
214
      this.hsOrderNo = other.hsOrderNo;
215
    }
216
    if (other.isSetHsSubOrderNo()) {
217
      this.hsSubOrderNo = other.hsSubOrderNo;
218
    }
219
    if (other.isSetCatalogueName()) {
220
      this.catalogueName = other.catalogueName;
221
    }
222
    this.hsOrderDate = other.hsOrderDate;
223
    if (other.isSetHsProductId()) {
224
      this.hsProductId = other.hsProductId;
225
    }
226
    if (other.isSetHsItemId()) {
227
      this.hsItemId = other.hsItemId;
228
    }
229
    if (other.isSetSellerSku()) {
230
      this.sellerSku = other.sellerSku;
231
    }
232
    if (other.isSetPaymentMode()) {
233
      this.paymentMode = other.paymentMode;
234
    }
235
    if (other.isSetCourierName()) {
236
      this.courierName = other.courierName;
237
    }
238
    this.slaDays = other.slaDays;
239
  }
240
 
241
  public HsOrder deepCopy() {
242
    return new HsOrder(this);
243
  }
244
 
245
  @Override
246
  public void clear() {
247
    setOrderIdIsSet(false);
248
    this.orderId = 0;
249
    this.hsOrderNo = null;
250
    this.hsSubOrderNo = null;
251
    this.catalogueName = null;
252
    setHsOrderDateIsSet(false);
253
    this.hsOrderDate = 0;
254
    this.hsProductId = null;
255
    this.hsItemId = null;
256
    this.sellerSku = null;
257
    this.paymentMode = null;
258
    this.courierName = null;
259
    setSlaDaysIsSet(false);
260
    this.slaDays = 0;
261
  }
262
 
263
  public long getOrderId() {
264
    return this.orderId;
265
  }
266
 
267
  public void setOrderId(long orderId) {
268
    this.orderId = orderId;
269
    setOrderIdIsSet(true);
270
  }
271
 
272
  public void unsetOrderId() {
273
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
274
  }
275
 
276
  /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
277
  public boolean isSetOrderId() {
278
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
279
  }
280
 
281
  public void setOrderIdIsSet(boolean value) {
282
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
283
  }
284
 
285
  public String getHsOrderNo() {
286
    return this.hsOrderNo;
287
  }
288
 
289
  public void setHsOrderNo(String hsOrderNo) {
290
    this.hsOrderNo = hsOrderNo;
291
  }
292
 
293
  public void unsetHsOrderNo() {
294
    this.hsOrderNo = null;
295
  }
296
 
297
  /** Returns true if field hsOrderNo is set (has been assigned a value) and false otherwise */
298
  public boolean isSetHsOrderNo() {
299
    return this.hsOrderNo != null;
300
  }
301
 
302
  public void setHsOrderNoIsSet(boolean value) {
303
    if (!value) {
304
      this.hsOrderNo = null;
305
    }
306
  }
307
 
308
  public String getHsSubOrderNo() {
309
    return this.hsSubOrderNo;
310
  }
311
 
312
  public void setHsSubOrderNo(String hsSubOrderNo) {
313
    this.hsSubOrderNo = hsSubOrderNo;
314
  }
315
 
316
  public void unsetHsSubOrderNo() {
317
    this.hsSubOrderNo = null;
318
  }
319
 
320
  /** Returns true if field hsSubOrderNo is set (has been assigned a value) and false otherwise */
321
  public boolean isSetHsSubOrderNo() {
322
    return this.hsSubOrderNo != null;
323
  }
324
 
325
  public void setHsSubOrderNoIsSet(boolean value) {
326
    if (!value) {
327
      this.hsSubOrderNo = null;
328
    }
329
  }
330
 
331
  public String getCatalogueName() {
332
    return this.catalogueName;
333
  }
334
 
335
  public void setCatalogueName(String catalogueName) {
336
    this.catalogueName = catalogueName;
337
  }
338
 
339
  public void unsetCatalogueName() {
340
    this.catalogueName = null;
341
  }
342
 
343
  /** Returns true if field catalogueName is set (has been assigned a value) and false otherwise */
344
  public boolean isSetCatalogueName() {
345
    return this.catalogueName != null;
346
  }
347
 
348
  public void setCatalogueNameIsSet(boolean value) {
349
    if (!value) {
350
      this.catalogueName = null;
351
    }
352
  }
353
 
354
  public long getHsOrderDate() {
355
    return this.hsOrderDate;
356
  }
357
 
358
  public void setHsOrderDate(long hsOrderDate) {
359
    this.hsOrderDate = hsOrderDate;
360
    setHsOrderDateIsSet(true);
361
  }
362
 
363
  public void unsetHsOrderDate() {
364
    __isset_bit_vector.clear(__HSORDERDATE_ISSET_ID);
365
  }
366
 
367
  /** Returns true if field hsOrderDate is set (has been assigned a value) and false otherwise */
368
  public boolean isSetHsOrderDate() {
369
    return __isset_bit_vector.get(__HSORDERDATE_ISSET_ID);
370
  }
371
 
372
  public void setHsOrderDateIsSet(boolean value) {
373
    __isset_bit_vector.set(__HSORDERDATE_ISSET_ID, value);
374
  }
375
 
376
  public String getHsProductId() {
377
    return this.hsProductId;
378
  }
379
 
380
  public void setHsProductId(String hsProductId) {
381
    this.hsProductId = hsProductId;
382
  }
383
 
384
  public void unsetHsProductId() {
385
    this.hsProductId = null;
386
  }
387
 
388
  /** Returns true if field hsProductId is set (has been assigned a value) and false otherwise */
389
  public boolean isSetHsProductId() {
390
    return this.hsProductId != null;
391
  }
392
 
393
  public void setHsProductIdIsSet(boolean value) {
394
    if (!value) {
395
      this.hsProductId = null;
396
    }
397
  }
398
 
399
  public String getHsItemId() {
400
    return this.hsItemId;
401
  }
402
 
403
  public void setHsItemId(String hsItemId) {
404
    this.hsItemId = hsItemId;
405
  }
406
 
407
  public void unsetHsItemId() {
408
    this.hsItemId = null;
409
  }
410
 
411
  /** Returns true if field hsItemId is set (has been assigned a value) and false otherwise */
412
  public boolean isSetHsItemId() {
413
    return this.hsItemId != null;
414
  }
415
 
416
  public void setHsItemIdIsSet(boolean value) {
417
    if (!value) {
418
      this.hsItemId = null;
419
    }
420
  }
421
 
422
  public String getSellerSku() {
423
    return this.sellerSku;
424
  }
425
 
426
  public void setSellerSku(String sellerSku) {
427
    this.sellerSku = sellerSku;
428
  }
429
 
430
  public void unsetSellerSku() {
431
    this.sellerSku = null;
432
  }
433
 
434
  /** Returns true if field sellerSku is set (has been assigned a value) and false otherwise */
435
  public boolean isSetSellerSku() {
436
    return this.sellerSku != null;
437
  }
438
 
439
  public void setSellerSkuIsSet(boolean value) {
440
    if (!value) {
441
      this.sellerSku = null;
442
    }
443
  }
444
 
445
  public String getPaymentMode() {
446
    return this.paymentMode;
447
  }
448
 
449
  public void setPaymentMode(String paymentMode) {
450
    this.paymentMode = paymentMode;
451
  }
452
 
453
  public void unsetPaymentMode() {
454
    this.paymentMode = null;
455
  }
456
 
457
  /** Returns true if field paymentMode is set (has been assigned a value) and false otherwise */
458
  public boolean isSetPaymentMode() {
459
    return this.paymentMode != null;
460
  }
461
 
462
  public void setPaymentModeIsSet(boolean value) {
463
    if (!value) {
464
      this.paymentMode = null;
465
    }
466
  }
467
 
468
  public String getCourierName() {
469
    return this.courierName;
470
  }
471
 
472
  public void setCourierName(String courierName) {
473
    this.courierName = courierName;
474
  }
475
 
476
  public void unsetCourierName() {
477
    this.courierName = null;
478
  }
479
 
480
  /** Returns true if field courierName is set (has been assigned a value) and false otherwise */
481
  public boolean isSetCourierName() {
482
    return this.courierName != null;
483
  }
484
 
485
  public void setCourierNameIsSet(boolean value) {
486
    if (!value) {
487
      this.courierName = null;
488
    }
489
  }
490
 
491
  public long getSlaDays() {
492
    return this.slaDays;
493
  }
494
 
495
  public void setSlaDays(long slaDays) {
496
    this.slaDays = slaDays;
497
    setSlaDaysIsSet(true);
498
  }
499
 
500
  public void unsetSlaDays() {
501
    __isset_bit_vector.clear(__SLADAYS_ISSET_ID);
502
  }
503
 
504
  /** Returns true if field slaDays is set (has been assigned a value) and false otherwise */
505
  public boolean isSetSlaDays() {
506
    return __isset_bit_vector.get(__SLADAYS_ISSET_ID);
507
  }
508
 
509
  public void setSlaDaysIsSet(boolean value) {
510
    __isset_bit_vector.set(__SLADAYS_ISSET_ID, value);
511
  }
512
 
513
  public void setFieldValue(_Fields field, Object value) {
514
    switch (field) {
515
    case ORDER_ID:
516
      if (value == null) {
517
        unsetOrderId();
518
      } else {
519
        setOrderId((Long)value);
520
      }
521
      break;
522
 
523
    case HS_ORDER_NO:
524
      if (value == null) {
525
        unsetHsOrderNo();
526
      } else {
527
        setHsOrderNo((String)value);
528
      }
529
      break;
530
 
531
    case HS_SUB_ORDER_NO:
532
      if (value == null) {
533
        unsetHsSubOrderNo();
534
      } else {
535
        setHsSubOrderNo((String)value);
536
      }
537
      break;
538
 
539
    case CATALOGUE_NAME:
540
      if (value == null) {
541
        unsetCatalogueName();
542
      } else {
543
        setCatalogueName((String)value);
544
      }
545
      break;
546
 
547
    case HS_ORDER_DATE:
548
      if (value == null) {
549
        unsetHsOrderDate();
550
      } else {
551
        setHsOrderDate((Long)value);
552
      }
553
      break;
554
 
555
    case HS_PRODUCT_ID:
556
      if (value == null) {
557
        unsetHsProductId();
558
      } else {
559
        setHsProductId((String)value);
560
      }
561
      break;
562
 
563
    case HS_ITEM_ID:
564
      if (value == null) {
565
        unsetHsItemId();
566
      } else {
567
        setHsItemId((String)value);
568
      }
569
      break;
570
 
571
    case SELLER_SKU:
572
      if (value == null) {
573
        unsetSellerSku();
574
      } else {
575
        setSellerSku((String)value);
576
      }
577
      break;
578
 
579
    case PAYMENT_MODE:
580
      if (value == null) {
581
        unsetPaymentMode();
582
      } else {
583
        setPaymentMode((String)value);
584
      }
585
      break;
586
 
587
    case COURIER_NAME:
588
      if (value == null) {
589
        unsetCourierName();
590
      } else {
591
        setCourierName((String)value);
592
      }
593
      break;
594
 
595
    case SLA_DAYS:
596
      if (value == null) {
597
        unsetSlaDays();
598
      } else {
599
        setSlaDays((Long)value);
600
      }
601
      break;
602
 
603
    }
604
  }
605
 
606
  public Object getFieldValue(_Fields field) {
607
    switch (field) {
608
    case ORDER_ID:
609
      return Long.valueOf(getOrderId());
610
 
611
    case HS_ORDER_NO:
612
      return getHsOrderNo();
613
 
614
    case HS_SUB_ORDER_NO:
615
      return getHsSubOrderNo();
616
 
617
    case CATALOGUE_NAME:
618
      return getCatalogueName();
619
 
620
    case HS_ORDER_DATE:
621
      return Long.valueOf(getHsOrderDate());
622
 
623
    case HS_PRODUCT_ID:
624
      return getHsProductId();
625
 
626
    case HS_ITEM_ID:
627
      return getHsItemId();
628
 
629
    case SELLER_SKU:
630
      return getSellerSku();
631
 
632
    case PAYMENT_MODE:
633
      return getPaymentMode();
634
 
635
    case COURIER_NAME:
636
      return getCourierName();
637
 
638
    case SLA_DAYS:
639
      return Long.valueOf(getSlaDays());
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 ORDER_ID:
653
      return isSetOrderId();
654
    case HS_ORDER_NO:
655
      return isSetHsOrderNo();
656
    case HS_SUB_ORDER_NO:
657
      return isSetHsSubOrderNo();
658
    case CATALOGUE_NAME:
659
      return isSetCatalogueName();
660
    case HS_ORDER_DATE:
661
      return isSetHsOrderDate();
662
    case HS_PRODUCT_ID:
663
      return isSetHsProductId();
664
    case HS_ITEM_ID:
665
      return isSetHsItemId();
666
    case SELLER_SKU:
667
      return isSetSellerSku();
668
    case PAYMENT_MODE:
669
      return isSetPaymentMode();
670
    case COURIER_NAME:
671
      return isSetCourierName();
672
    case SLA_DAYS:
673
      return isSetSlaDays();
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 HsOrder)
683
      return this.equals((HsOrder)that);
684
    return false;
685
  }
686
 
687
  public boolean equals(HsOrder that) {
688
    if (that == null)
689
      return false;
690
 
691
    boolean this_present_orderId = true;
692
    boolean that_present_orderId = true;
693
    if (this_present_orderId || that_present_orderId) {
694
      if (!(this_present_orderId && that_present_orderId))
695
        return false;
696
      if (this.orderId != that.orderId)
697
        return false;
698
    }
699
 
700
    boolean this_present_hsOrderNo = true && this.isSetHsOrderNo();
701
    boolean that_present_hsOrderNo = true && that.isSetHsOrderNo();
702
    if (this_present_hsOrderNo || that_present_hsOrderNo) {
703
      if (!(this_present_hsOrderNo && that_present_hsOrderNo))
704
        return false;
705
      if (!this.hsOrderNo.equals(that.hsOrderNo))
706
        return false;
707
    }
708
 
709
    boolean this_present_hsSubOrderNo = true && this.isSetHsSubOrderNo();
710
    boolean that_present_hsSubOrderNo = true && that.isSetHsSubOrderNo();
711
    if (this_present_hsSubOrderNo || that_present_hsSubOrderNo) {
712
      if (!(this_present_hsSubOrderNo && that_present_hsSubOrderNo))
713
        return false;
714
      if (!this.hsSubOrderNo.equals(that.hsSubOrderNo))
715
        return false;
716
    }
717
 
718
    boolean this_present_catalogueName = true && this.isSetCatalogueName();
719
    boolean that_present_catalogueName = true && that.isSetCatalogueName();
720
    if (this_present_catalogueName || that_present_catalogueName) {
721
      if (!(this_present_catalogueName && that_present_catalogueName))
722
        return false;
723
      if (!this.catalogueName.equals(that.catalogueName))
724
        return false;
725
    }
726
 
727
    boolean this_present_hsOrderDate = true;
728
    boolean that_present_hsOrderDate = true;
729
    if (this_present_hsOrderDate || that_present_hsOrderDate) {
730
      if (!(this_present_hsOrderDate && that_present_hsOrderDate))
731
        return false;
732
      if (this.hsOrderDate != that.hsOrderDate)
733
        return false;
734
    }
735
 
736
    boolean this_present_hsProductId = true && this.isSetHsProductId();
737
    boolean that_present_hsProductId = true && that.isSetHsProductId();
738
    if (this_present_hsProductId || that_present_hsProductId) {
739
      if (!(this_present_hsProductId && that_present_hsProductId))
740
        return false;
741
      if (!this.hsProductId.equals(that.hsProductId))
742
        return false;
743
    }
744
 
745
    boolean this_present_hsItemId = true && this.isSetHsItemId();
746
    boolean that_present_hsItemId = true && that.isSetHsItemId();
747
    if (this_present_hsItemId || that_present_hsItemId) {
748
      if (!(this_present_hsItemId && that_present_hsItemId))
749
        return false;
750
      if (!this.hsItemId.equals(that.hsItemId))
751
        return false;
752
    }
753
 
754
    boolean this_present_sellerSku = true && this.isSetSellerSku();
755
    boolean that_present_sellerSku = true && that.isSetSellerSku();
756
    if (this_present_sellerSku || that_present_sellerSku) {
757
      if (!(this_present_sellerSku && that_present_sellerSku))
758
        return false;
759
      if (!this.sellerSku.equals(that.sellerSku))
760
        return false;
761
    }
762
 
763
    boolean this_present_paymentMode = true && this.isSetPaymentMode();
764
    boolean that_present_paymentMode = true && that.isSetPaymentMode();
765
    if (this_present_paymentMode || that_present_paymentMode) {
766
      if (!(this_present_paymentMode && that_present_paymentMode))
767
        return false;
768
      if (!this.paymentMode.equals(that.paymentMode))
769
        return false;
770
    }
771
 
772
    boolean this_present_courierName = true && this.isSetCourierName();
773
    boolean that_present_courierName = true && that.isSetCourierName();
774
    if (this_present_courierName || that_present_courierName) {
775
      if (!(this_present_courierName && that_present_courierName))
776
        return false;
777
      if (!this.courierName.equals(that.courierName))
778
        return false;
779
    }
780
 
781
    boolean this_present_slaDays = true;
782
    boolean that_present_slaDays = true;
783
    if (this_present_slaDays || that_present_slaDays) {
784
      if (!(this_present_slaDays && that_present_slaDays))
785
        return false;
786
      if (this.slaDays != that.slaDays)
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(HsOrder other) {
799
    if (!getClass().equals(other.getClass())) {
800
      return getClass().getName().compareTo(other.getClass().getName());
801
    }
802
 
803
    int lastComparison = 0;
804
    HsOrder typedOther = (HsOrder)other;
805
 
806
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
807
    if (lastComparison != 0) {
808
      return lastComparison;
809
    }
810
    if (isSetOrderId()) {
811
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
812
      if (lastComparison != 0) {
813
        return lastComparison;
814
      }
815
    }
816
    lastComparison = Boolean.valueOf(isSetHsOrderNo()).compareTo(typedOther.isSetHsOrderNo());
817
    if (lastComparison != 0) {
818
      return lastComparison;
819
    }
820
    if (isSetHsOrderNo()) {
821
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsOrderNo, typedOther.hsOrderNo);
822
      if (lastComparison != 0) {
823
        return lastComparison;
824
      }
825
    }
826
    lastComparison = Boolean.valueOf(isSetHsSubOrderNo()).compareTo(typedOther.isSetHsSubOrderNo());
827
    if (lastComparison != 0) {
828
      return lastComparison;
829
    }
830
    if (isSetHsSubOrderNo()) {
831
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsSubOrderNo, typedOther.hsSubOrderNo);
832
      if (lastComparison != 0) {
833
        return lastComparison;
834
      }
835
    }
836
    lastComparison = Boolean.valueOf(isSetCatalogueName()).compareTo(typedOther.isSetCatalogueName());
837
    if (lastComparison != 0) {
838
      return lastComparison;
839
    }
840
    if (isSetCatalogueName()) {
841
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogueName, typedOther.catalogueName);
842
      if (lastComparison != 0) {
843
        return lastComparison;
844
      }
845
    }
846
    lastComparison = Boolean.valueOf(isSetHsOrderDate()).compareTo(typedOther.isSetHsOrderDate());
847
    if (lastComparison != 0) {
848
      return lastComparison;
849
    }
850
    if (isSetHsOrderDate()) {
851
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsOrderDate, typedOther.hsOrderDate);
852
      if (lastComparison != 0) {
853
        return lastComparison;
854
      }
855
    }
856
    lastComparison = Boolean.valueOf(isSetHsProductId()).compareTo(typedOther.isSetHsProductId());
857
    if (lastComparison != 0) {
858
      return lastComparison;
859
    }
860
    if (isSetHsProductId()) {
861
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsProductId, typedOther.hsProductId);
862
      if (lastComparison != 0) {
863
        return lastComparison;
864
      }
865
    }
866
    lastComparison = Boolean.valueOf(isSetHsItemId()).compareTo(typedOther.isSetHsItemId());
867
    if (lastComparison != 0) {
868
      return lastComparison;
869
    }
870
    if (isSetHsItemId()) {
871
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hsItemId, typedOther.hsItemId);
872
      if (lastComparison != 0) {
873
        return lastComparison;
874
      }
875
    }
876
    lastComparison = Boolean.valueOf(isSetSellerSku()).compareTo(typedOther.isSetSellerSku());
877
    if (lastComparison != 0) {
878
      return lastComparison;
879
    }
880
    if (isSetSellerSku()) {
881
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sellerSku, typedOther.sellerSku);
882
      if (lastComparison != 0) {
883
        return lastComparison;
884
      }
885
    }
886
    lastComparison = Boolean.valueOf(isSetPaymentMode()).compareTo(typedOther.isSetPaymentMode());
887
    if (lastComparison != 0) {
888
      return lastComparison;
889
    }
890
    if (isSetPaymentMode()) {
891
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentMode, typedOther.paymentMode);
892
      if (lastComparison != 0) {
893
        return lastComparison;
894
      }
895
    }
896
    lastComparison = Boolean.valueOf(isSetCourierName()).compareTo(typedOther.isSetCourierName());
897
    if (lastComparison != 0) {
898
      return lastComparison;
899
    }
900
    if (isSetCourierName()) {
901
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.courierName, typedOther.courierName);
902
      if (lastComparison != 0) {
903
        return lastComparison;
904
      }
905
    }
906
    lastComparison = Boolean.valueOf(isSetSlaDays()).compareTo(typedOther.isSetSlaDays());
907
    if (lastComparison != 0) {
908
      return lastComparison;
909
    }
910
    if (isSetSlaDays()) {
911
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slaDays, typedOther.slaDays);
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: // ORDER_ID
934
          if (field.type == org.apache.thrift.protocol.TType.I64) {
935
            this.orderId = iprot.readI64();
936
            setOrderIdIsSet(true);
937
          } else { 
938
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
939
          }
940
          break;
941
        case 2: // HS_ORDER_NO
942
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
943
            this.hsOrderNo = iprot.readString();
944
          } else { 
945
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
946
          }
947
          break;
948
        case 3: // HS_SUB_ORDER_NO
949
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
950
            this.hsSubOrderNo = iprot.readString();
951
          } else { 
952
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
953
          }
954
          break;
955
        case 4: // CATALOGUE_NAME
956
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
957
            this.catalogueName = iprot.readString();
958
          } else { 
959
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
960
          }
961
          break;
962
        case 5: // HS_ORDER_DATE
963
          if (field.type == org.apache.thrift.protocol.TType.I64) {
964
            this.hsOrderDate = iprot.readI64();
965
            setHsOrderDateIsSet(true);
966
          } else { 
967
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
968
          }
969
          break;
970
        case 6: // HS_PRODUCT_ID
971
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
972
            this.hsProductId = iprot.readString();
973
          } else { 
974
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
975
          }
976
          break;
977
        case 7: // HS_ITEM_ID
978
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
979
            this.hsItemId = iprot.readString();
980
          } else { 
981
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
982
          }
983
          break;
984
        case 8: // SELLER_SKU
985
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
986
            this.sellerSku = iprot.readString();
987
          } else { 
988
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
989
          }
990
          break;
991
        case 9: // PAYMENT_MODE
992
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
993
            this.paymentMode = iprot.readString();
994
          } else { 
995
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
996
          }
997
          break;
998
        case 10: // COURIER_NAME
999
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1000
            this.courierName = iprot.readString();
1001
          } else { 
1002
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1003
          }
1004
          break;
1005
        case 11: // SLA_DAYS
1006
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1007
            this.slaDays = iprot.readI64();
1008
            setSlaDaysIsSet(true);
1009
          } else { 
1010
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1011
          }
1012
          break;
1013
        default:
1014
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1015
      }
1016
      iprot.readFieldEnd();
1017
    }
1018
    iprot.readStructEnd();
1019
    validate();
1020
  }
1021
 
1022
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1023
    validate();
1024
 
1025
    oprot.writeStructBegin(STRUCT_DESC);
1026
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
1027
    oprot.writeI64(this.orderId);
1028
    oprot.writeFieldEnd();
1029
    if (this.hsOrderNo != null) {
1030
      oprot.writeFieldBegin(HS_ORDER_NO_FIELD_DESC);
1031
      oprot.writeString(this.hsOrderNo);
1032
      oprot.writeFieldEnd();
1033
    }
1034
    if (this.hsSubOrderNo != null) {
1035
      oprot.writeFieldBegin(HS_SUB_ORDER_NO_FIELD_DESC);
1036
      oprot.writeString(this.hsSubOrderNo);
1037
      oprot.writeFieldEnd();
1038
    }
1039
    if (this.catalogueName != null) {
1040
      oprot.writeFieldBegin(CATALOGUE_NAME_FIELD_DESC);
1041
      oprot.writeString(this.catalogueName);
1042
      oprot.writeFieldEnd();
1043
    }
1044
    oprot.writeFieldBegin(HS_ORDER_DATE_FIELD_DESC);
1045
    oprot.writeI64(this.hsOrderDate);
1046
    oprot.writeFieldEnd();
1047
    if (this.hsProductId != null) {
1048
      oprot.writeFieldBegin(HS_PRODUCT_ID_FIELD_DESC);
1049
      oprot.writeString(this.hsProductId);
1050
      oprot.writeFieldEnd();
1051
    }
1052
    if (this.hsItemId != null) {
1053
      oprot.writeFieldBegin(HS_ITEM_ID_FIELD_DESC);
1054
      oprot.writeString(this.hsItemId);
1055
      oprot.writeFieldEnd();
1056
    }
1057
    if (this.sellerSku != null) {
1058
      oprot.writeFieldBegin(SELLER_SKU_FIELD_DESC);
1059
      oprot.writeString(this.sellerSku);
1060
      oprot.writeFieldEnd();
1061
    }
1062
    if (this.paymentMode != null) {
1063
      oprot.writeFieldBegin(PAYMENT_MODE_FIELD_DESC);
1064
      oprot.writeString(this.paymentMode);
1065
      oprot.writeFieldEnd();
1066
    }
1067
    if (this.courierName != null) {
1068
      oprot.writeFieldBegin(COURIER_NAME_FIELD_DESC);
1069
      oprot.writeString(this.courierName);
1070
      oprot.writeFieldEnd();
1071
    }
1072
    oprot.writeFieldBegin(SLA_DAYS_FIELD_DESC);
1073
    oprot.writeI64(this.slaDays);
1074
    oprot.writeFieldEnd();
1075
    oprot.writeFieldStop();
1076
    oprot.writeStructEnd();
1077
  }
1078
 
1079
  @Override
1080
  public String toString() {
1081
    StringBuilder sb = new StringBuilder("HsOrder(");
1082
    boolean first = true;
1083
 
1084
    sb.append("orderId:");
1085
    sb.append(this.orderId);
1086
    first = false;
1087
    if (!first) sb.append(", ");
1088
    sb.append("hsOrderNo:");
1089
    if (this.hsOrderNo == null) {
1090
      sb.append("null");
1091
    } else {
1092
      sb.append(this.hsOrderNo);
1093
    }
1094
    first = false;
1095
    if (!first) sb.append(", ");
1096
    sb.append("hsSubOrderNo:");
1097
    if (this.hsSubOrderNo == null) {
1098
      sb.append("null");
1099
    } else {
1100
      sb.append(this.hsSubOrderNo);
1101
    }
1102
    first = false;
1103
    if (!first) sb.append(", ");
1104
    sb.append("catalogueName:");
1105
    if (this.catalogueName == null) {
1106
      sb.append("null");
1107
    } else {
1108
      sb.append(this.catalogueName);
1109
    }
1110
    first = false;
1111
    if (!first) sb.append(", ");
1112
    sb.append("hsOrderDate:");
1113
    sb.append(this.hsOrderDate);
1114
    first = false;
1115
    if (!first) sb.append(", ");
1116
    sb.append("hsProductId:");
1117
    if (this.hsProductId == null) {
1118
      sb.append("null");
1119
    } else {
1120
      sb.append(this.hsProductId);
1121
    }
1122
    first = false;
1123
    if (!first) sb.append(", ");
1124
    sb.append("hsItemId:");
1125
    if (this.hsItemId == null) {
1126
      sb.append("null");
1127
    } else {
1128
      sb.append(this.hsItemId);
1129
    }
1130
    first = false;
1131
    if (!first) sb.append(", ");
1132
    sb.append("sellerSku:");
1133
    if (this.sellerSku == null) {
1134
      sb.append("null");
1135
    } else {
1136
      sb.append(this.sellerSku);
1137
    }
1138
    first = false;
1139
    if (!first) sb.append(", ");
1140
    sb.append("paymentMode:");
1141
    if (this.paymentMode == null) {
1142
      sb.append("null");
1143
    } else {
1144
      sb.append(this.paymentMode);
1145
    }
1146
    first = false;
1147
    if (!first) sb.append(", ");
1148
    sb.append("courierName:");
1149
    if (this.courierName == null) {
1150
      sb.append("null");
1151
    } else {
1152
      sb.append(this.courierName);
1153
    }
1154
    first = false;
1155
    if (!first) sb.append(", ");
1156
    sb.append("slaDays:");
1157
    sb.append(this.slaDays);
1158
    first = false;
1159
    sb.append(")");
1160
    return sb.toString();
1161
  }
1162
 
1163
  public void validate() throws org.apache.thrift.TException {
1164
    // check for required fields
1165
  }
1166
 
1167
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1168
    try {
1169
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1170
    } catch (org.apache.thrift.TException te) {
1171
      throw new java.io.IOException(te);
1172
    }
1173
  }
1174
 
1175
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1176
    try {
1177
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1178
      __isset_bit_vector = new BitSet(1);
1179
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1180
    } catch (org.apache.thrift.TException te) {
1181
      throw new java.io.IOException(te);
1182
    }
1183
  }
1184
 
1185
}
1186