Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
483 rajveer 1
/**
2
 * Autogenerated by Thrift
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.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class Order implements TBase<Order._Fields>, java.io.Serializable, Cloneable, Comparable<Order> {
27
  private static final TStruct STRUCT_DESC = new TStruct("Order");
28
 
29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
30
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)2);
31
  private static final TField LINEITEMS_FIELD_DESC = new TField("lineitems", TType.LIST, (short)3);
32
  private static final TField LOGISTICS_PROVIDER_ID_FIELD_DESC = new TField("logistics_provider_id", TType.I64, (short)4);
33
  private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybill_no", TType.STRING, (short)5);
34
  private static final TField TRACKING_ID_FIELD_DESC = new TField("tracking_id", TType.STRING, (short)6);
35
  private static final TField EXPECTED_DELIVERY_TIME_FIELD_DESC = new TField("expected_delivery_time", TType.I64, (short)7);
36
  private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)8);
37
  private static final TField CUSTOMER_NAME_FIELD_DESC = new TField("customer_name", TType.STRING, (short)9);
38
  private static final TField CUSTOMER_MOBILENUMBER_FIELD_DESC = new TField("customer_mobilenumber", TType.STRING, (short)10);
39
  private static final TField CUSTOMER_PINCODE_FIELD_DESC = new TField("customer_pincode", TType.STRING, (short)11);
40
  private static final TField CUSTOMER_ADDRESS_FIELD_DESC = new TField("customer_address", TType.STRING, (short)12);
41
  private static final TField CUSTOMER_EMAIL_FIELD_DESC = new TField("customer_email", TType.STRING, (short)13);
42
  private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)14);
43
  private static final TField STATUS_DESCRIPTION_FIELD_DESC = new TField("statusDescription", TType.STRING, (short)15);
44
  private static final TField TOTAL_AMOUNT_FIELD_DESC = new TField("total_amount", TType.DOUBLE, (short)16);
45
  private static final TField TOTAL_WEIGHT_FIELD_DESC = new TField("total_weight", TType.DOUBLE, (short)17);
46
  private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)18);
47
  private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)19);
48
  private static final TField CREATED_TIMESTAMP_FIELD_DESC = new TField("created_timestamp", TType.I64, (short)20);
49
  private static final TField ACCEPTED_TIMESTAMP_FIELD_DESC = new TField("accepted_timestamp", TType.I64, (short)21);
50
  private static final TField BILLING_TIMESTAMP_FIELD_DESC = new TField("billing_timestamp", TType.I64, (short)22);
51
  private static final TField SHIPPING_TIMESTAMP_FIELD_DESC = new TField("shipping_timestamp", TType.I64, (short)23);
52
  private static final TField DELIVERY_TIMESTAMP_FIELD_DESC = new TField("delivery_timestamp", TType.I64, (short)24);
53
 
54
  private long id;
55
  private long warehouse_id;
56
  private List<LineItem> lineitems;
57
  private long logistics_provider_id;
58
  private String airwaybill_no;
59
  private String tracking_id;
60
  private long expected_delivery_time;
61
  private long customer_id;
62
  private String customer_name;
63
  private String customer_mobilenumber;
64
  private String customer_pincode;
65
  private String customer_address;
66
  private String customer_email;
67
  private OrderStatus status;
68
  private String statusDescription;
69
  private double total_amount;
70
  private double total_weight;
71
  private String invoice_number;
72
  private String billed_by;
73
  private long created_timestamp;
74
  private long accepted_timestamp;
75
  private long billing_timestamp;
76
  private long shipping_timestamp;
77
  private long delivery_timestamp;
78
 
79
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
80
  public enum _Fields implements TFieldIdEnum {
81
    ID((short)1, "id"),
82
    WAREHOUSE_ID((short)2, "warehouse_id"),
83
    /**
84
     * 	item info
85
     * *
86
     */
87
    LINEITEMS((short)3, "lineitems"),
88
    /**
89
     *   logistics info
90
     * *
91
     */
92
    LOGISTICS_PROVIDER_ID((short)4, "logistics_provider_id"),
93
    AIRWAYBILL_NO((short)5, "airwaybill_no"),
94
    TRACKING_ID((short)6, "tracking_id"),
95
    EXPECTED_DELIVERY_TIME((short)7, "expected_delivery_time"),
96
    /**
97
     *   customer info
98
     * *
99
     */
100
    CUSTOMER_ID((short)8, "customer_id"),
101
    CUSTOMER_NAME((short)9, "customer_name"),
102
    CUSTOMER_MOBILENUMBER((short)10, "customer_mobilenumber"),
103
    CUSTOMER_PINCODE((short)11, "customer_pincode"),
104
    CUSTOMER_ADDRESS((short)12, "customer_address"),
105
    CUSTOMER_EMAIL((short)13, "customer_email"),
106
    /**
107
     * 	status and misc info
108
     * *
109
     * 
110
     * @see OrderStatus
111
     */
112
    STATUS((short)14, "status"),
113
    STATUS_DESCRIPTION((short)15, "statusDescription"),
114
    TOTAL_AMOUNT((short)16, "total_amount"),
115
    TOTAL_WEIGHT((short)17, "total_weight"),
116
    /**
117
     * 	billing info
118
     * *
119
     */
120
    INVOICE_NUMBER((short)18, "invoice_number"),
121
    BILLED_BY((short)19, "billed_by"),
122
    /**
123
     * 	timestamps
124
     * *
125
     */
126
    CREATED_TIMESTAMP((short)20, "created_timestamp"),
127
    ACCEPTED_TIMESTAMP((short)21, "accepted_timestamp"),
128
    BILLING_TIMESTAMP((short)22, "billing_timestamp"),
129
    SHIPPING_TIMESTAMP((short)23, "shipping_timestamp"),
130
    DELIVERY_TIMESTAMP((short)24, "delivery_timestamp");
131
 
132
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
133
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
134
 
135
    static {
136
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
137
        byId.put((int)field._thriftId, field);
138
        byName.put(field.getFieldName(), field);
139
      }
140
    }
141
 
142
    /**
143
     * Find the _Fields constant that matches fieldId, or null if its not found.
144
     */
145
    public static _Fields findByThriftId(int fieldId) {
146
      return byId.get(fieldId);
147
    }
148
 
149
    /**
150
     * Find the _Fields constant that matches fieldId, throwing an exception
151
     * if it is not found.
152
     */
153
    public static _Fields findByThriftIdOrThrow(int fieldId) {
154
      _Fields fields = findByThriftId(fieldId);
155
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
156
      return fields;
157
    }
158
 
159
    /**
160
     * Find the _Fields constant that matches name, or null if its not found.
161
     */
162
    public static _Fields findByName(String name) {
163
      return byName.get(name);
164
    }
165
 
166
    private final short _thriftId;
167
    private final String _fieldName;
168
 
169
    _Fields(short thriftId, String fieldName) {
170
      _thriftId = thriftId;
171
      _fieldName = fieldName;
172
    }
173
 
174
    public short getThriftFieldId() {
175
      return _thriftId;
176
    }
177
 
178
    public String getFieldName() {
179
      return _fieldName;
180
    }
181
  }
182
 
183
  // isset id assignments
184
  private static final int __ID_ISSET_ID = 0;
185
  private static final int __WAREHOUSE_ID_ISSET_ID = 1;
186
  private static final int __LOGISTICS_PROVIDER_ID_ISSET_ID = 2;
187
  private static final int __EXPECTED_DELIVERY_TIME_ISSET_ID = 3;
188
  private static final int __CUSTOMER_ID_ISSET_ID = 4;
189
  private static final int __TOTAL_AMOUNT_ISSET_ID = 5;
190
  private static final int __TOTAL_WEIGHT_ISSET_ID = 6;
191
  private static final int __CREATED_TIMESTAMP_ISSET_ID = 7;
192
  private static final int __ACCEPTED_TIMESTAMP_ISSET_ID = 8;
193
  private static final int __BILLING_TIMESTAMP_ISSET_ID = 9;
194
  private static final int __SHIPPING_TIMESTAMP_ISSET_ID = 10;
195
  private static final int __DELIVERY_TIMESTAMP_ISSET_ID = 11;
196
  private BitSet __isset_bit_vector = new BitSet(12);
197
 
198
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
199
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
200
        new FieldValueMetaData(TType.I64)));
201
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
202
        new FieldValueMetaData(TType.I64)));
203
    put(_Fields.LINEITEMS, new FieldMetaData("lineitems", TFieldRequirementType.DEFAULT, 
204
        new ListMetaData(TType.LIST, 
205
            new StructMetaData(TType.STRUCT, LineItem.class))));
206
    put(_Fields.LOGISTICS_PROVIDER_ID, new FieldMetaData("logistics_provider_id", TFieldRequirementType.DEFAULT, 
207
        new FieldValueMetaData(TType.I64)));
208
    put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybill_no", TFieldRequirementType.DEFAULT, 
209
        new FieldValueMetaData(TType.STRING)));
210
    put(_Fields.TRACKING_ID, new FieldMetaData("tracking_id", TFieldRequirementType.DEFAULT, 
211
        new FieldValueMetaData(TType.STRING)));
212
    put(_Fields.EXPECTED_DELIVERY_TIME, new FieldMetaData("expected_delivery_time", TFieldRequirementType.DEFAULT, 
213
        new FieldValueMetaData(TType.I64)));
214
    put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
215
        new FieldValueMetaData(TType.I64)));
216
    put(_Fields.CUSTOMER_NAME, new FieldMetaData("customer_name", TFieldRequirementType.DEFAULT, 
217
        new FieldValueMetaData(TType.STRING)));
218
    put(_Fields.CUSTOMER_MOBILENUMBER, new FieldMetaData("customer_mobilenumber", TFieldRequirementType.DEFAULT, 
219
        new FieldValueMetaData(TType.STRING)));
220
    put(_Fields.CUSTOMER_PINCODE, new FieldMetaData("customer_pincode", TFieldRequirementType.DEFAULT, 
221
        new FieldValueMetaData(TType.STRING)));
222
    put(_Fields.CUSTOMER_ADDRESS, new FieldMetaData("customer_address", TFieldRequirementType.DEFAULT, 
223
        new FieldValueMetaData(TType.STRING)));
224
    put(_Fields.CUSTOMER_EMAIL, new FieldMetaData("customer_email", TFieldRequirementType.DEFAULT, 
225
        new FieldValueMetaData(TType.STRING)));
226
    put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
227
        new EnumMetaData(TType.ENUM, OrderStatus.class)));
228
    put(_Fields.STATUS_DESCRIPTION, new FieldMetaData("statusDescription", TFieldRequirementType.DEFAULT, 
229
        new FieldValueMetaData(TType.STRING)));
230
    put(_Fields.TOTAL_AMOUNT, new FieldMetaData("total_amount", TFieldRequirementType.DEFAULT, 
231
        new FieldValueMetaData(TType.DOUBLE)));
232
    put(_Fields.TOTAL_WEIGHT, new FieldMetaData("total_weight", TFieldRequirementType.DEFAULT, 
233
        new FieldValueMetaData(TType.DOUBLE)));
234
    put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
235
        new FieldValueMetaData(TType.STRING)));
236
    put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
237
        new FieldValueMetaData(TType.STRING)));
238
    put(_Fields.CREATED_TIMESTAMP, new FieldMetaData("created_timestamp", TFieldRequirementType.DEFAULT, 
239
        new FieldValueMetaData(TType.I64)));
240
    put(_Fields.ACCEPTED_TIMESTAMP, new FieldMetaData("accepted_timestamp", TFieldRequirementType.DEFAULT, 
241
        new FieldValueMetaData(TType.I64)));
242
    put(_Fields.BILLING_TIMESTAMP, new FieldMetaData("billing_timestamp", TFieldRequirementType.DEFAULT, 
243
        new FieldValueMetaData(TType.I64)));
244
    put(_Fields.SHIPPING_TIMESTAMP, new FieldMetaData("shipping_timestamp", TFieldRequirementType.DEFAULT, 
245
        new FieldValueMetaData(TType.I64)));
246
    put(_Fields.DELIVERY_TIMESTAMP, new FieldMetaData("delivery_timestamp", TFieldRequirementType.DEFAULT, 
247
        new FieldValueMetaData(TType.I64)));
248
  }});
249
 
250
  static {
251
    FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap);
252
  }
253
 
254
  public Order() {
255
  }
256
 
257
  public Order(
258
    long id,
259
    long warehouse_id,
260
    List<LineItem> lineitems,
261
    long logistics_provider_id,
262
    String airwaybill_no,
263
    String tracking_id,
264
    long expected_delivery_time,
265
    long customer_id,
266
    String customer_name,
267
    String customer_mobilenumber,
268
    String customer_pincode,
269
    String customer_address,
270
    String customer_email,
271
    OrderStatus status,
272
    String statusDescription,
273
    double total_amount,
274
    double total_weight,
275
    String invoice_number,
276
    String billed_by,
277
    long created_timestamp,
278
    long accepted_timestamp,
279
    long billing_timestamp,
280
    long shipping_timestamp,
281
    long delivery_timestamp)
282
  {
283
    this();
284
    this.id = id;
285
    setIdIsSet(true);
286
    this.warehouse_id = warehouse_id;
287
    setWarehouse_idIsSet(true);
288
    this.lineitems = lineitems;
289
    this.logistics_provider_id = logistics_provider_id;
290
    setLogistics_provider_idIsSet(true);
291
    this.airwaybill_no = airwaybill_no;
292
    this.tracking_id = tracking_id;
293
    this.expected_delivery_time = expected_delivery_time;
294
    setExpected_delivery_timeIsSet(true);
295
    this.customer_id = customer_id;
296
    setCustomer_idIsSet(true);
297
    this.customer_name = customer_name;
298
    this.customer_mobilenumber = customer_mobilenumber;
299
    this.customer_pincode = customer_pincode;
300
    this.customer_address = customer_address;
301
    this.customer_email = customer_email;
302
    this.status = status;
303
    this.statusDescription = statusDescription;
304
    this.total_amount = total_amount;
305
    setTotal_amountIsSet(true);
306
    this.total_weight = total_weight;
307
    setTotal_weightIsSet(true);
308
    this.invoice_number = invoice_number;
309
    this.billed_by = billed_by;
310
    this.created_timestamp = created_timestamp;
311
    setCreated_timestampIsSet(true);
312
    this.accepted_timestamp = accepted_timestamp;
313
    setAccepted_timestampIsSet(true);
314
    this.billing_timestamp = billing_timestamp;
315
    setBilling_timestampIsSet(true);
316
    this.shipping_timestamp = shipping_timestamp;
317
    setShipping_timestampIsSet(true);
318
    this.delivery_timestamp = delivery_timestamp;
319
    setDelivery_timestampIsSet(true);
320
  }
321
 
322
  /**
323
   * Performs a deep copy on <i>other</i>.
324
   */
325
  public Order(Order other) {
326
    __isset_bit_vector.clear();
327
    __isset_bit_vector.or(other.__isset_bit_vector);
328
    this.id = other.id;
329
    this.warehouse_id = other.warehouse_id;
330
    if (other.isSetLineitems()) {
331
      List<LineItem> __this__lineitems = new ArrayList<LineItem>();
332
      for (LineItem other_element : other.lineitems) {
333
        __this__lineitems.add(new LineItem(other_element));
334
      }
335
      this.lineitems = __this__lineitems;
336
    }
337
    this.logistics_provider_id = other.logistics_provider_id;
338
    if (other.isSetAirwaybill_no()) {
339
      this.airwaybill_no = other.airwaybill_no;
340
    }
341
    if (other.isSetTracking_id()) {
342
      this.tracking_id = other.tracking_id;
343
    }
344
    this.expected_delivery_time = other.expected_delivery_time;
345
    this.customer_id = other.customer_id;
346
    if (other.isSetCustomer_name()) {
347
      this.customer_name = other.customer_name;
348
    }
349
    if (other.isSetCustomer_mobilenumber()) {
350
      this.customer_mobilenumber = other.customer_mobilenumber;
351
    }
352
    if (other.isSetCustomer_pincode()) {
353
      this.customer_pincode = other.customer_pincode;
354
    }
355
    if (other.isSetCustomer_address()) {
356
      this.customer_address = other.customer_address;
357
    }
358
    if (other.isSetCustomer_email()) {
359
      this.customer_email = other.customer_email;
360
    }
361
    if (other.isSetStatus()) {
362
      this.status = other.status;
363
    }
364
    if (other.isSetStatusDescription()) {
365
      this.statusDescription = other.statusDescription;
366
    }
367
    this.total_amount = other.total_amount;
368
    this.total_weight = other.total_weight;
369
    if (other.isSetInvoice_number()) {
370
      this.invoice_number = other.invoice_number;
371
    }
372
    if (other.isSetBilled_by()) {
373
      this.billed_by = other.billed_by;
374
    }
375
    this.created_timestamp = other.created_timestamp;
376
    this.accepted_timestamp = other.accepted_timestamp;
377
    this.billing_timestamp = other.billing_timestamp;
378
    this.shipping_timestamp = other.shipping_timestamp;
379
    this.delivery_timestamp = other.delivery_timestamp;
380
  }
381
 
382
  public Order deepCopy() {
383
    return new Order(this);
384
  }
385
 
386
  @Deprecated
387
  public Order clone() {
388
    return new Order(this);
389
  }
390
 
391
  public long getId() {
392
    return this.id;
393
  }
394
 
395
  public Order setId(long id) {
396
    this.id = id;
397
    setIdIsSet(true);
398
    return this;
399
  }
400
 
401
  public void unsetId() {
402
    __isset_bit_vector.clear(__ID_ISSET_ID);
403
  }
404
 
405
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
406
  public boolean isSetId() {
407
    return __isset_bit_vector.get(__ID_ISSET_ID);
408
  }
409
 
410
  public void setIdIsSet(boolean value) {
411
    __isset_bit_vector.set(__ID_ISSET_ID, value);
412
  }
413
 
414
  public long getWarehouse_id() {
415
    return this.warehouse_id;
416
  }
417
 
418
  public Order setWarehouse_id(long warehouse_id) {
419
    this.warehouse_id = warehouse_id;
420
    setWarehouse_idIsSet(true);
421
    return this;
422
  }
423
 
424
  public void unsetWarehouse_id() {
425
    __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
426
  }
427
 
428
  /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
429
  public boolean isSetWarehouse_id() {
430
    return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
431
  }
432
 
433
  public void setWarehouse_idIsSet(boolean value) {
434
    __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
435
  }
436
 
437
  public int getLineitemsSize() {
438
    return (this.lineitems == null) ? 0 : this.lineitems.size();
439
  }
440
 
441
  public java.util.Iterator<LineItem> getLineitemsIterator() {
442
    return (this.lineitems == null) ? null : this.lineitems.iterator();
443
  }
444
 
445
  public void addToLineitems(LineItem elem) {
446
    if (this.lineitems == null) {
447
      this.lineitems = new ArrayList<LineItem>();
448
    }
449
    this.lineitems.add(elem);
450
  }
451
 
452
  /**
453
   * 	item info
454
   * *
455
   */
456
  public List<LineItem> getLineitems() {
457
    return this.lineitems;
458
  }
459
 
460
  /**
461
   * 	item info
462
   * *
463
   */
464
  public Order setLineitems(List<LineItem> lineitems) {
465
    this.lineitems = lineitems;
466
    return this;
467
  }
468
 
469
  public void unsetLineitems() {
470
    this.lineitems = null;
471
  }
472
 
473
  /** Returns true if field lineitems is set (has been asigned a value) and false otherwise */
474
  public boolean isSetLineitems() {
475
    return this.lineitems != null;
476
  }
477
 
478
  public void setLineitemsIsSet(boolean value) {
479
    if (!value) {
480
      this.lineitems = null;
481
    }
482
  }
483
 
484
  /**
485
   *   logistics info
486
   * *
487
   */
488
  public long getLogistics_provider_id() {
489
    return this.logistics_provider_id;
490
  }
491
 
492
  /**
493
   *   logistics info
494
   * *
495
   */
496
  public Order setLogistics_provider_id(long logistics_provider_id) {
497
    this.logistics_provider_id = logistics_provider_id;
498
    setLogistics_provider_idIsSet(true);
499
    return this;
500
  }
501
 
502
  public void unsetLogistics_provider_id() {
503
    __isset_bit_vector.clear(__LOGISTICS_PROVIDER_ID_ISSET_ID);
504
  }
505
 
506
  /** Returns true if field logistics_provider_id is set (has been asigned a value) and false otherwise */
507
  public boolean isSetLogistics_provider_id() {
508
    return __isset_bit_vector.get(__LOGISTICS_PROVIDER_ID_ISSET_ID);
509
  }
510
 
511
  public void setLogistics_provider_idIsSet(boolean value) {
512
    __isset_bit_vector.set(__LOGISTICS_PROVIDER_ID_ISSET_ID, value);
513
  }
514
 
515
  public String getAirwaybill_no() {
516
    return this.airwaybill_no;
517
  }
518
 
519
  public Order setAirwaybill_no(String airwaybill_no) {
520
    this.airwaybill_no = airwaybill_no;
521
    return this;
522
  }
523
 
524
  public void unsetAirwaybill_no() {
525
    this.airwaybill_no = null;
526
  }
527
 
528
  /** Returns true if field airwaybill_no is set (has been asigned a value) and false otherwise */
529
  public boolean isSetAirwaybill_no() {
530
    return this.airwaybill_no != null;
531
  }
532
 
533
  public void setAirwaybill_noIsSet(boolean value) {
534
    if (!value) {
535
      this.airwaybill_no = null;
536
    }
537
  }
538
 
539
  public String getTracking_id() {
540
    return this.tracking_id;
541
  }
542
 
543
  public Order setTracking_id(String tracking_id) {
544
    this.tracking_id = tracking_id;
545
    return this;
546
  }
547
 
548
  public void unsetTracking_id() {
549
    this.tracking_id = null;
550
  }
551
 
552
  /** Returns true if field tracking_id is set (has been asigned a value) and false otherwise */
553
  public boolean isSetTracking_id() {
554
    return this.tracking_id != null;
555
  }
556
 
557
  public void setTracking_idIsSet(boolean value) {
558
    if (!value) {
559
      this.tracking_id = null;
560
    }
561
  }
562
 
563
  public long getExpected_delivery_time() {
564
    return this.expected_delivery_time;
565
  }
566
 
567
  public Order setExpected_delivery_time(long expected_delivery_time) {
568
    this.expected_delivery_time = expected_delivery_time;
569
    setExpected_delivery_timeIsSet(true);
570
    return this;
571
  }
572
 
573
  public void unsetExpected_delivery_time() {
574
    __isset_bit_vector.clear(__EXPECTED_DELIVERY_TIME_ISSET_ID);
575
  }
576
 
577
  /** Returns true if field expected_delivery_time is set (has been asigned a value) and false otherwise */
578
  public boolean isSetExpected_delivery_time() {
579
    return __isset_bit_vector.get(__EXPECTED_DELIVERY_TIME_ISSET_ID);
580
  }
581
 
582
  public void setExpected_delivery_timeIsSet(boolean value) {
583
    __isset_bit_vector.set(__EXPECTED_DELIVERY_TIME_ISSET_ID, value);
584
  }
585
 
586
  /**
587
   *   customer info
588
   * *
589
   */
590
  public long getCustomer_id() {
591
    return this.customer_id;
592
  }
593
 
594
  /**
595
   *   customer info
596
   * *
597
   */
598
  public Order setCustomer_id(long customer_id) {
599
    this.customer_id = customer_id;
600
    setCustomer_idIsSet(true);
601
    return this;
602
  }
603
 
604
  public void unsetCustomer_id() {
605
    __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
606
  }
607
 
608
  /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
609
  public boolean isSetCustomer_id() {
610
    return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
611
  }
612
 
613
  public void setCustomer_idIsSet(boolean value) {
614
    __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
615
  }
616
 
617
  public String getCustomer_name() {
618
    return this.customer_name;
619
  }
620
 
621
  public Order setCustomer_name(String customer_name) {
622
    this.customer_name = customer_name;
623
    return this;
624
  }
625
 
626
  public void unsetCustomer_name() {
627
    this.customer_name = null;
628
  }
629
 
630
  /** Returns true if field customer_name is set (has been asigned a value) and false otherwise */
631
  public boolean isSetCustomer_name() {
632
    return this.customer_name != null;
633
  }
634
 
635
  public void setCustomer_nameIsSet(boolean value) {
636
    if (!value) {
637
      this.customer_name = null;
638
    }
639
  }
640
 
641
  public String getCustomer_mobilenumber() {
642
    return this.customer_mobilenumber;
643
  }
644
 
645
  public Order setCustomer_mobilenumber(String customer_mobilenumber) {
646
    this.customer_mobilenumber = customer_mobilenumber;
647
    return this;
648
  }
649
 
650
  public void unsetCustomer_mobilenumber() {
651
    this.customer_mobilenumber = null;
652
  }
653
 
654
  /** Returns true if field customer_mobilenumber is set (has been asigned a value) and false otherwise */
655
  public boolean isSetCustomer_mobilenumber() {
656
    return this.customer_mobilenumber != null;
657
  }
658
 
659
  public void setCustomer_mobilenumberIsSet(boolean value) {
660
    if (!value) {
661
      this.customer_mobilenumber = null;
662
    }
663
  }
664
 
665
  public String getCustomer_pincode() {
666
    return this.customer_pincode;
667
  }
668
 
669
  public Order setCustomer_pincode(String customer_pincode) {
670
    this.customer_pincode = customer_pincode;
671
    return this;
672
  }
673
 
674
  public void unsetCustomer_pincode() {
675
    this.customer_pincode = null;
676
  }
677
 
678
  /** Returns true if field customer_pincode is set (has been asigned a value) and false otherwise */
679
  public boolean isSetCustomer_pincode() {
680
    return this.customer_pincode != null;
681
  }
682
 
683
  public void setCustomer_pincodeIsSet(boolean value) {
684
    if (!value) {
685
      this.customer_pincode = null;
686
    }
687
  }
688
 
689
  public String getCustomer_address() {
690
    return this.customer_address;
691
  }
692
 
693
  public Order setCustomer_address(String customer_address) {
694
    this.customer_address = customer_address;
695
    return this;
696
  }
697
 
698
  public void unsetCustomer_address() {
699
    this.customer_address = null;
700
  }
701
 
702
  /** Returns true if field customer_address is set (has been asigned a value) and false otherwise */
703
  public boolean isSetCustomer_address() {
704
    return this.customer_address != null;
705
  }
706
 
707
  public void setCustomer_addressIsSet(boolean value) {
708
    if (!value) {
709
      this.customer_address = null;
710
    }
711
  }
712
 
713
  public String getCustomer_email() {
714
    return this.customer_email;
715
  }
716
 
717
  public Order setCustomer_email(String customer_email) {
718
    this.customer_email = customer_email;
719
    return this;
720
  }
721
 
722
  public void unsetCustomer_email() {
723
    this.customer_email = null;
724
  }
725
 
726
  /** Returns true if field customer_email is set (has been asigned a value) and false otherwise */
727
  public boolean isSetCustomer_email() {
728
    return this.customer_email != null;
729
  }
730
 
731
  public void setCustomer_emailIsSet(boolean value) {
732
    if (!value) {
733
      this.customer_email = null;
734
    }
735
  }
736
 
737
  /**
738
   * 	status and misc info
739
   * *
740
   * 
741
   * @see OrderStatus
742
   */
743
  public OrderStatus getStatus() {
744
    return this.status;
745
  }
746
 
747
  /**
748
   * 	status and misc info
749
   * *
750
   * 
751
   * @see OrderStatus
752
   */
753
  public Order setStatus(OrderStatus status) {
754
    this.status = status;
755
    return this;
756
  }
757
 
758
  public void unsetStatus() {
759
    this.status = null;
760
  }
761
 
762
  /** Returns true if field status is set (has been asigned a value) and false otherwise */
763
  public boolean isSetStatus() {
764
    return this.status != null;
765
  }
766
 
767
  public void setStatusIsSet(boolean value) {
768
    if (!value) {
769
      this.status = null;
770
    }
771
  }
772
 
773
  public String getStatusDescription() {
774
    return this.statusDescription;
775
  }
776
 
777
  public Order setStatusDescription(String statusDescription) {
778
    this.statusDescription = statusDescription;
779
    return this;
780
  }
781
 
782
  public void unsetStatusDescription() {
783
    this.statusDescription = null;
784
  }
785
 
786
  /** Returns true if field statusDescription is set (has been asigned a value) and false otherwise */
787
  public boolean isSetStatusDescription() {
788
    return this.statusDescription != null;
789
  }
790
 
791
  public void setStatusDescriptionIsSet(boolean value) {
792
    if (!value) {
793
      this.statusDescription = null;
794
    }
795
  }
796
 
797
  public double getTotal_amount() {
798
    return this.total_amount;
799
  }
800
 
801
  public Order setTotal_amount(double total_amount) {
802
    this.total_amount = total_amount;
803
    setTotal_amountIsSet(true);
804
    return this;
805
  }
806
 
807
  public void unsetTotal_amount() {
808
    __isset_bit_vector.clear(__TOTAL_AMOUNT_ISSET_ID);
809
  }
810
 
811
  /** Returns true if field total_amount is set (has been asigned a value) and false otherwise */
812
  public boolean isSetTotal_amount() {
813
    return __isset_bit_vector.get(__TOTAL_AMOUNT_ISSET_ID);
814
  }
815
 
816
  public void setTotal_amountIsSet(boolean value) {
817
    __isset_bit_vector.set(__TOTAL_AMOUNT_ISSET_ID, value);
818
  }
819
 
820
  public double getTotal_weight() {
821
    return this.total_weight;
822
  }
823
 
824
  public Order setTotal_weight(double total_weight) {
825
    this.total_weight = total_weight;
826
    setTotal_weightIsSet(true);
827
    return this;
828
  }
829
 
830
  public void unsetTotal_weight() {
831
    __isset_bit_vector.clear(__TOTAL_WEIGHT_ISSET_ID);
832
  }
833
 
834
  /** Returns true if field total_weight is set (has been asigned a value) and false otherwise */
835
  public boolean isSetTotal_weight() {
836
    return __isset_bit_vector.get(__TOTAL_WEIGHT_ISSET_ID);
837
  }
838
 
839
  public void setTotal_weightIsSet(boolean value) {
840
    __isset_bit_vector.set(__TOTAL_WEIGHT_ISSET_ID, value);
841
  }
842
 
843
  /**
844
   * 	billing info
845
   * *
846
   */
847
  public String getInvoice_number() {
848
    return this.invoice_number;
849
  }
850
 
851
  /**
852
   * 	billing info
853
   * *
854
   */
855
  public Order setInvoice_number(String invoice_number) {
856
    this.invoice_number = invoice_number;
857
    return this;
858
  }
859
 
860
  public void unsetInvoice_number() {
861
    this.invoice_number = null;
862
  }
863
 
864
  /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
865
  public boolean isSetInvoice_number() {
866
    return this.invoice_number != null;
867
  }
868
 
869
  public void setInvoice_numberIsSet(boolean value) {
870
    if (!value) {
871
      this.invoice_number = null;
872
    }
873
  }
874
 
875
  public String getBilled_by() {
876
    return this.billed_by;
877
  }
878
 
879
  public Order setBilled_by(String billed_by) {
880
    this.billed_by = billed_by;
881
    return this;
882
  }
883
 
884
  public void unsetBilled_by() {
885
    this.billed_by = null;
886
  }
887
 
888
  /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
889
  public boolean isSetBilled_by() {
890
    return this.billed_by != null;
891
  }
892
 
893
  public void setBilled_byIsSet(boolean value) {
894
    if (!value) {
895
      this.billed_by = null;
896
    }
897
  }
898
 
899
  /**
900
   * 	timestamps
901
   * *
902
   */
903
  public long getCreated_timestamp() {
904
    return this.created_timestamp;
905
  }
906
 
907
  /**
908
   * 	timestamps
909
   * *
910
   */
911
  public Order setCreated_timestamp(long created_timestamp) {
912
    this.created_timestamp = created_timestamp;
913
    setCreated_timestampIsSet(true);
914
    return this;
915
  }
916
 
917
  public void unsetCreated_timestamp() {
918
    __isset_bit_vector.clear(__CREATED_TIMESTAMP_ISSET_ID);
919
  }
920
 
921
  /** Returns true if field created_timestamp is set (has been asigned a value) and false otherwise */
922
  public boolean isSetCreated_timestamp() {
923
    return __isset_bit_vector.get(__CREATED_TIMESTAMP_ISSET_ID);
924
  }
925
 
926
  public void setCreated_timestampIsSet(boolean value) {
927
    __isset_bit_vector.set(__CREATED_TIMESTAMP_ISSET_ID, value);
928
  }
929
 
930
  public long getAccepted_timestamp() {
931
    return this.accepted_timestamp;
932
  }
933
 
934
  public Order setAccepted_timestamp(long accepted_timestamp) {
935
    this.accepted_timestamp = accepted_timestamp;
936
    setAccepted_timestampIsSet(true);
937
    return this;
938
  }
939
 
940
  public void unsetAccepted_timestamp() {
941
    __isset_bit_vector.clear(__ACCEPTED_TIMESTAMP_ISSET_ID);
942
  }
943
 
944
  /** Returns true if field accepted_timestamp is set (has been asigned a value) and false otherwise */
945
  public boolean isSetAccepted_timestamp() {
946
    return __isset_bit_vector.get(__ACCEPTED_TIMESTAMP_ISSET_ID);
947
  }
948
 
949
  public void setAccepted_timestampIsSet(boolean value) {
950
    __isset_bit_vector.set(__ACCEPTED_TIMESTAMP_ISSET_ID, value);
951
  }
952
 
953
  public long getBilling_timestamp() {
954
    return this.billing_timestamp;
955
  }
956
 
957
  public Order setBilling_timestamp(long billing_timestamp) {
958
    this.billing_timestamp = billing_timestamp;
959
    setBilling_timestampIsSet(true);
960
    return this;
961
  }
962
 
963
  public void unsetBilling_timestamp() {
964
    __isset_bit_vector.clear(__BILLING_TIMESTAMP_ISSET_ID);
965
  }
966
 
967
  /** Returns true if field billing_timestamp is set (has been asigned a value) and false otherwise */
968
  public boolean isSetBilling_timestamp() {
969
    return __isset_bit_vector.get(__BILLING_TIMESTAMP_ISSET_ID);
970
  }
971
 
972
  public void setBilling_timestampIsSet(boolean value) {
973
    __isset_bit_vector.set(__BILLING_TIMESTAMP_ISSET_ID, value);
974
  }
975
 
976
  public long getShipping_timestamp() {
977
    return this.shipping_timestamp;
978
  }
979
 
980
  public Order setShipping_timestamp(long shipping_timestamp) {
981
    this.shipping_timestamp = shipping_timestamp;
982
    setShipping_timestampIsSet(true);
983
    return this;
984
  }
985
 
986
  public void unsetShipping_timestamp() {
987
    __isset_bit_vector.clear(__SHIPPING_TIMESTAMP_ISSET_ID);
988
  }
989
 
990
  /** Returns true if field shipping_timestamp is set (has been asigned a value) and false otherwise */
991
  public boolean isSetShipping_timestamp() {
992
    return __isset_bit_vector.get(__SHIPPING_TIMESTAMP_ISSET_ID);
993
  }
994
 
995
  public void setShipping_timestampIsSet(boolean value) {
996
    __isset_bit_vector.set(__SHIPPING_TIMESTAMP_ISSET_ID, value);
997
  }
998
 
999
  public long getDelivery_timestamp() {
1000
    return this.delivery_timestamp;
1001
  }
1002
 
1003
  public Order setDelivery_timestamp(long delivery_timestamp) {
1004
    this.delivery_timestamp = delivery_timestamp;
1005
    setDelivery_timestampIsSet(true);
1006
    return this;
1007
  }
1008
 
1009
  public void unsetDelivery_timestamp() {
1010
    __isset_bit_vector.clear(__DELIVERY_TIMESTAMP_ISSET_ID);
1011
  }
1012
 
1013
  /** Returns true if field delivery_timestamp is set (has been asigned a value) and false otherwise */
1014
  public boolean isSetDelivery_timestamp() {
1015
    return __isset_bit_vector.get(__DELIVERY_TIMESTAMP_ISSET_ID);
1016
  }
1017
 
1018
  public void setDelivery_timestampIsSet(boolean value) {
1019
    __isset_bit_vector.set(__DELIVERY_TIMESTAMP_ISSET_ID, value);
1020
  }
1021
 
1022
  public void setFieldValue(_Fields field, Object value) {
1023
    switch (field) {
1024
    case ID:
1025
      if (value == null) {
1026
        unsetId();
1027
      } else {
1028
        setId((Long)value);
1029
      }
1030
      break;
1031
 
1032
    case WAREHOUSE_ID:
1033
      if (value == null) {
1034
        unsetWarehouse_id();
1035
      } else {
1036
        setWarehouse_id((Long)value);
1037
      }
1038
      break;
1039
 
1040
    case LINEITEMS:
1041
      if (value == null) {
1042
        unsetLineitems();
1043
      } else {
1044
        setLineitems((List<LineItem>)value);
1045
      }
1046
      break;
1047
 
1048
    case LOGISTICS_PROVIDER_ID:
1049
      if (value == null) {
1050
        unsetLogistics_provider_id();
1051
      } else {
1052
        setLogistics_provider_id((Long)value);
1053
      }
1054
      break;
1055
 
1056
    case AIRWAYBILL_NO:
1057
      if (value == null) {
1058
        unsetAirwaybill_no();
1059
      } else {
1060
        setAirwaybill_no((String)value);
1061
      }
1062
      break;
1063
 
1064
    case TRACKING_ID:
1065
      if (value == null) {
1066
        unsetTracking_id();
1067
      } else {
1068
        setTracking_id((String)value);
1069
      }
1070
      break;
1071
 
1072
    case EXPECTED_DELIVERY_TIME:
1073
      if (value == null) {
1074
        unsetExpected_delivery_time();
1075
      } else {
1076
        setExpected_delivery_time((Long)value);
1077
      }
1078
      break;
1079
 
1080
    case CUSTOMER_ID:
1081
      if (value == null) {
1082
        unsetCustomer_id();
1083
      } else {
1084
        setCustomer_id((Long)value);
1085
      }
1086
      break;
1087
 
1088
    case CUSTOMER_NAME:
1089
      if (value == null) {
1090
        unsetCustomer_name();
1091
      } else {
1092
        setCustomer_name((String)value);
1093
      }
1094
      break;
1095
 
1096
    case CUSTOMER_MOBILENUMBER:
1097
      if (value == null) {
1098
        unsetCustomer_mobilenumber();
1099
      } else {
1100
        setCustomer_mobilenumber((String)value);
1101
      }
1102
      break;
1103
 
1104
    case CUSTOMER_PINCODE:
1105
      if (value == null) {
1106
        unsetCustomer_pincode();
1107
      } else {
1108
        setCustomer_pincode((String)value);
1109
      }
1110
      break;
1111
 
1112
    case CUSTOMER_ADDRESS:
1113
      if (value == null) {
1114
        unsetCustomer_address();
1115
      } else {
1116
        setCustomer_address((String)value);
1117
      }
1118
      break;
1119
 
1120
    case CUSTOMER_EMAIL:
1121
      if (value == null) {
1122
        unsetCustomer_email();
1123
      } else {
1124
        setCustomer_email((String)value);
1125
      }
1126
      break;
1127
 
1128
    case STATUS:
1129
      if (value == null) {
1130
        unsetStatus();
1131
      } else {
1132
        setStatus((OrderStatus)value);
1133
      }
1134
      break;
1135
 
1136
    case STATUS_DESCRIPTION:
1137
      if (value == null) {
1138
        unsetStatusDescription();
1139
      } else {
1140
        setStatusDescription((String)value);
1141
      }
1142
      break;
1143
 
1144
    case TOTAL_AMOUNT:
1145
      if (value == null) {
1146
        unsetTotal_amount();
1147
      } else {
1148
        setTotal_amount((Double)value);
1149
      }
1150
      break;
1151
 
1152
    case TOTAL_WEIGHT:
1153
      if (value == null) {
1154
        unsetTotal_weight();
1155
      } else {
1156
        setTotal_weight((Double)value);
1157
      }
1158
      break;
1159
 
1160
    case INVOICE_NUMBER:
1161
      if (value == null) {
1162
        unsetInvoice_number();
1163
      } else {
1164
        setInvoice_number((String)value);
1165
      }
1166
      break;
1167
 
1168
    case BILLED_BY:
1169
      if (value == null) {
1170
        unsetBilled_by();
1171
      } else {
1172
        setBilled_by((String)value);
1173
      }
1174
      break;
1175
 
1176
    case CREATED_TIMESTAMP:
1177
      if (value == null) {
1178
        unsetCreated_timestamp();
1179
      } else {
1180
        setCreated_timestamp((Long)value);
1181
      }
1182
      break;
1183
 
1184
    case ACCEPTED_TIMESTAMP:
1185
      if (value == null) {
1186
        unsetAccepted_timestamp();
1187
      } else {
1188
        setAccepted_timestamp((Long)value);
1189
      }
1190
      break;
1191
 
1192
    case BILLING_TIMESTAMP:
1193
      if (value == null) {
1194
        unsetBilling_timestamp();
1195
      } else {
1196
        setBilling_timestamp((Long)value);
1197
      }
1198
      break;
1199
 
1200
    case SHIPPING_TIMESTAMP:
1201
      if (value == null) {
1202
        unsetShipping_timestamp();
1203
      } else {
1204
        setShipping_timestamp((Long)value);
1205
      }
1206
      break;
1207
 
1208
    case DELIVERY_TIMESTAMP:
1209
      if (value == null) {
1210
        unsetDelivery_timestamp();
1211
      } else {
1212
        setDelivery_timestamp((Long)value);
1213
      }
1214
      break;
1215
 
1216
    }
1217
  }
1218
 
1219
  public void setFieldValue(int fieldID, Object value) {
1220
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1221
  }
1222
 
1223
  public Object getFieldValue(_Fields field) {
1224
    switch (field) {
1225
    case ID:
1226
      return new Long(getId());
1227
 
1228
    case WAREHOUSE_ID:
1229
      return new Long(getWarehouse_id());
1230
 
1231
    case LINEITEMS:
1232
      return getLineitems();
1233
 
1234
    case LOGISTICS_PROVIDER_ID:
1235
      return new Long(getLogistics_provider_id());
1236
 
1237
    case AIRWAYBILL_NO:
1238
      return getAirwaybill_no();
1239
 
1240
    case TRACKING_ID:
1241
      return getTracking_id();
1242
 
1243
    case EXPECTED_DELIVERY_TIME:
1244
      return new Long(getExpected_delivery_time());
1245
 
1246
    case CUSTOMER_ID:
1247
      return new Long(getCustomer_id());
1248
 
1249
    case CUSTOMER_NAME:
1250
      return getCustomer_name();
1251
 
1252
    case CUSTOMER_MOBILENUMBER:
1253
      return getCustomer_mobilenumber();
1254
 
1255
    case CUSTOMER_PINCODE:
1256
      return getCustomer_pincode();
1257
 
1258
    case CUSTOMER_ADDRESS:
1259
      return getCustomer_address();
1260
 
1261
    case CUSTOMER_EMAIL:
1262
      return getCustomer_email();
1263
 
1264
    case STATUS:
1265
      return getStatus();
1266
 
1267
    case STATUS_DESCRIPTION:
1268
      return getStatusDescription();
1269
 
1270
    case TOTAL_AMOUNT:
1271
      return new Double(getTotal_amount());
1272
 
1273
    case TOTAL_WEIGHT:
1274
      return new Double(getTotal_weight());
1275
 
1276
    case INVOICE_NUMBER:
1277
      return getInvoice_number();
1278
 
1279
    case BILLED_BY:
1280
      return getBilled_by();
1281
 
1282
    case CREATED_TIMESTAMP:
1283
      return new Long(getCreated_timestamp());
1284
 
1285
    case ACCEPTED_TIMESTAMP:
1286
      return new Long(getAccepted_timestamp());
1287
 
1288
    case BILLING_TIMESTAMP:
1289
      return new Long(getBilling_timestamp());
1290
 
1291
    case SHIPPING_TIMESTAMP:
1292
      return new Long(getShipping_timestamp());
1293
 
1294
    case DELIVERY_TIMESTAMP:
1295
      return new Long(getDelivery_timestamp());
1296
 
1297
    }
1298
    throw new IllegalStateException();
1299
  }
1300
 
1301
  public Object getFieldValue(int fieldId) {
1302
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1303
  }
1304
 
1305
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1306
  public boolean isSet(_Fields field) {
1307
    switch (field) {
1308
    case ID:
1309
      return isSetId();
1310
    case WAREHOUSE_ID:
1311
      return isSetWarehouse_id();
1312
    case LINEITEMS:
1313
      return isSetLineitems();
1314
    case LOGISTICS_PROVIDER_ID:
1315
      return isSetLogistics_provider_id();
1316
    case AIRWAYBILL_NO:
1317
      return isSetAirwaybill_no();
1318
    case TRACKING_ID:
1319
      return isSetTracking_id();
1320
    case EXPECTED_DELIVERY_TIME:
1321
      return isSetExpected_delivery_time();
1322
    case CUSTOMER_ID:
1323
      return isSetCustomer_id();
1324
    case CUSTOMER_NAME:
1325
      return isSetCustomer_name();
1326
    case CUSTOMER_MOBILENUMBER:
1327
      return isSetCustomer_mobilenumber();
1328
    case CUSTOMER_PINCODE:
1329
      return isSetCustomer_pincode();
1330
    case CUSTOMER_ADDRESS:
1331
      return isSetCustomer_address();
1332
    case CUSTOMER_EMAIL:
1333
      return isSetCustomer_email();
1334
    case STATUS:
1335
      return isSetStatus();
1336
    case STATUS_DESCRIPTION:
1337
      return isSetStatusDescription();
1338
    case TOTAL_AMOUNT:
1339
      return isSetTotal_amount();
1340
    case TOTAL_WEIGHT:
1341
      return isSetTotal_weight();
1342
    case INVOICE_NUMBER:
1343
      return isSetInvoice_number();
1344
    case BILLED_BY:
1345
      return isSetBilled_by();
1346
    case CREATED_TIMESTAMP:
1347
      return isSetCreated_timestamp();
1348
    case ACCEPTED_TIMESTAMP:
1349
      return isSetAccepted_timestamp();
1350
    case BILLING_TIMESTAMP:
1351
      return isSetBilling_timestamp();
1352
    case SHIPPING_TIMESTAMP:
1353
      return isSetShipping_timestamp();
1354
    case DELIVERY_TIMESTAMP:
1355
      return isSetDelivery_timestamp();
1356
    }
1357
    throw new IllegalStateException();
1358
  }
1359
 
1360
  public boolean isSet(int fieldID) {
1361
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1362
  }
1363
 
1364
  @Override
1365
  public boolean equals(Object that) {
1366
    if (that == null)
1367
      return false;
1368
    if (that instanceof Order)
1369
      return this.equals((Order)that);
1370
    return false;
1371
  }
1372
 
1373
  public boolean equals(Order that) {
1374
    if (that == null)
1375
      return false;
1376
 
1377
    boolean this_present_id = true;
1378
    boolean that_present_id = true;
1379
    if (this_present_id || that_present_id) {
1380
      if (!(this_present_id && that_present_id))
1381
        return false;
1382
      if (this.id != that.id)
1383
        return false;
1384
    }
1385
 
1386
    boolean this_present_warehouse_id = true;
1387
    boolean that_present_warehouse_id = true;
1388
    if (this_present_warehouse_id || that_present_warehouse_id) {
1389
      if (!(this_present_warehouse_id && that_present_warehouse_id))
1390
        return false;
1391
      if (this.warehouse_id != that.warehouse_id)
1392
        return false;
1393
    }
1394
 
1395
    boolean this_present_lineitems = true && this.isSetLineitems();
1396
    boolean that_present_lineitems = true && that.isSetLineitems();
1397
    if (this_present_lineitems || that_present_lineitems) {
1398
      if (!(this_present_lineitems && that_present_lineitems))
1399
        return false;
1400
      if (!this.lineitems.equals(that.lineitems))
1401
        return false;
1402
    }
1403
 
1404
    boolean this_present_logistics_provider_id = true;
1405
    boolean that_present_logistics_provider_id = true;
1406
    if (this_present_logistics_provider_id || that_present_logistics_provider_id) {
1407
      if (!(this_present_logistics_provider_id && that_present_logistics_provider_id))
1408
        return false;
1409
      if (this.logistics_provider_id != that.logistics_provider_id)
1410
        return false;
1411
    }
1412
 
1413
    boolean this_present_airwaybill_no = true && this.isSetAirwaybill_no();
1414
    boolean that_present_airwaybill_no = true && that.isSetAirwaybill_no();
1415
    if (this_present_airwaybill_no || that_present_airwaybill_no) {
1416
      if (!(this_present_airwaybill_no && that_present_airwaybill_no))
1417
        return false;
1418
      if (!this.airwaybill_no.equals(that.airwaybill_no))
1419
        return false;
1420
    }
1421
 
1422
    boolean this_present_tracking_id = true && this.isSetTracking_id();
1423
    boolean that_present_tracking_id = true && that.isSetTracking_id();
1424
    if (this_present_tracking_id || that_present_tracking_id) {
1425
      if (!(this_present_tracking_id && that_present_tracking_id))
1426
        return false;
1427
      if (!this.tracking_id.equals(that.tracking_id))
1428
        return false;
1429
    }
1430
 
1431
    boolean this_present_expected_delivery_time = true;
1432
    boolean that_present_expected_delivery_time = true;
1433
    if (this_present_expected_delivery_time || that_present_expected_delivery_time) {
1434
      if (!(this_present_expected_delivery_time && that_present_expected_delivery_time))
1435
        return false;
1436
      if (this.expected_delivery_time != that.expected_delivery_time)
1437
        return false;
1438
    }
1439
 
1440
    boolean this_present_customer_id = true;
1441
    boolean that_present_customer_id = true;
1442
    if (this_present_customer_id || that_present_customer_id) {
1443
      if (!(this_present_customer_id && that_present_customer_id))
1444
        return false;
1445
      if (this.customer_id != that.customer_id)
1446
        return false;
1447
    }
1448
 
1449
    boolean this_present_customer_name = true && this.isSetCustomer_name();
1450
    boolean that_present_customer_name = true && that.isSetCustomer_name();
1451
    if (this_present_customer_name || that_present_customer_name) {
1452
      if (!(this_present_customer_name && that_present_customer_name))
1453
        return false;
1454
      if (!this.customer_name.equals(that.customer_name))
1455
        return false;
1456
    }
1457
 
1458
    boolean this_present_customer_mobilenumber = true && this.isSetCustomer_mobilenumber();
1459
    boolean that_present_customer_mobilenumber = true && that.isSetCustomer_mobilenumber();
1460
    if (this_present_customer_mobilenumber || that_present_customer_mobilenumber) {
1461
      if (!(this_present_customer_mobilenumber && that_present_customer_mobilenumber))
1462
        return false;
1463
      if (!this.customer_mobilenumber.equals(that.customer_mobilenumber))
1464
        return false;
1465
    }
1466
 
1467
    boolean this_present_customer_pincode = true && this.isSetCustomer_pincode();
1468
    boolean that_present_customer_pincode = true && that.isSetCustomer_pincode();
1469
    if (this_present_customer_pincode || that_present_customer_pincode) {
1470
      if (!(this_present_customer_pincode && that_present_customer_pincode))
1471
        return false;
1472
      if (!this.customer_pincode.equals(that.customer_pincode))
1473
        return false;
1474
    }
1475
 
1476
    boolean this_present_customer_address = true && this.isSetCustomer_address();
1477
    boolean that_present_customer_address = true && that.isSetCustomer_address();
1478
    if (this_present_customer_address || that_present_customer_address) {
1479
      if (!(this_present_customer_address && that_present_customer_address))
1480
        return false;
1481
      if (!this.customer_address.equals(that.customer_address))
1482
        return false;
1483
    }
1484
 
1485
    boolean this_present_customer_email = true && this.isSetCustomer_email();
1486
    boolean that_present_customer_email = true && that.isSetCustomer_email();
1487
    if (this_present_customer_email || that_present_customer_email) {
1488
      if (!(this_present_customer_email && that_present_customer_email))
1489
        return false;
1490
      if (!this.customer_email.equals(that.customer_email))
1491
        return false;
1492
    }
1493
 
1494
    boolean this_present_status = true && this.isSetStatus();
1495
    boolean that_present_status = true && that.isSetStatus();
1496
    if (this_present_status || that_present_status) {
1497
      if (!(this_present_status && that_present_status))
1498
        return false;
1499
      if (!this.status.equals(that.status))
1500
        return false;
1501
    }
1502
 
1503
    boolean this_present_statusDescription = true && this.isSetStatusDescription();
1504
    boolean that_present_statusDescription = true && that.isSetStatusDescription();
1505
    if (this_present_statusDescription || that_present_statusDescription) {
1506
      if (!(this_present_statusDescription && that_present_statusDescription))
1507
        return false;
1508
      if (!this.statusDescription.equals(that.statusDescription))
1509
        return false;
1510
    }
1511
 
1512
    boolean this_present_total_amount = true;
1513
    boolean that_present_total_amount = true;
1514
    if (this_present_total_amount || that_present_total_amount) {
1515
      if (!(this_present_total_amount && that_present_total_amount))
1516
        return false;
1517
      if (this.total_amount != that.total_amount)
1518
        return false;
1519
    }
1520
 
1521
    boolean this_present_total_weight = true;
1522
    boolean that_present_total_weight = true;
1523
    if (this_present_total_weight || that_present_total_weight) {
1524
      if (!(this_present_total_weight && that_present_total_weight))
1525
        return false;
1526
      if (this.total_weight != that.total_weight)
1527
        return false;
1528
    }
1529
 
1530
    boolean this_present_invoice_number = true && this.isSetInvoice_number();
1531
    boolean that_present_invoice_number = true && that.isSetInvoice_number();
1532
    if (this_present_invoice_number || that_present_invoice_number) {
1533
      if (!(this_present_invoice_number && that_present_invoice_number))
1534
        return false;
1535
      if (!this.invoice_number.equals(that.invoice_number))
1536
        return false;
1537
    }
1538
 
1539
    boolean this_present_billed_by = true && this.isSetBilled_by();
1540
    boolean that_present_billed_by = true && that.isSetBilled_by();
1541
    if (this_present_billed_by || that_present_billed_by) {
1542
      if (!(this_present_billed_by && that_present_billed_by))
1543
        return false;
1544
      if (!this.billed_by.equals(that.billed_by))
1545
        return false;
1546
    }
1547
 
1548
    boolean this_present_created_timestamp = true;
1549
    boolean that_present_created_timestamp = true;
1550
    if (this_present_created_timestamp || that_present_created_timestamp) {
1551
      if (!(this_present_created_timestamp && that_present_created_timestamp))
1552
        return false;
1553
      if (this.created_timestamp != that.created_timestamp)
1554
        return false;
1555
    }
1556
 
1557
    boolean this_present_accepted_timestamp = true;
1558
    boolean that_present_accepted_timestamp = true;
1559
    if (this_present_accepted_timestamp || that_present_accepted_timestamp) {
1560
      if (!(this_present_accepted_timestamp && that_present_accepted_timestamp))
1561
        return false;
1562
      if (this.accepted_timestamp != that.accepted_timestamp)
1563
        return false;
1564
    }
1565
 
1566
    boolean this_present_billing_timestamp = true;
1567
    boolean that_present_billing_timestamp = true;
1568
    if (this_present_billing_timestamp || that_present_billing_timestamp) {
1569
      if (!(this_present_billing_timestamp && that_present_billing_timestamp))
1570
        return false;
1571
      if (this.billing_timestamp != that.billing_timestamp)
1572
        return false;
1573
    }
1574
 
1575
    boolean this_present_shipping_timestamp = true;
1576
    boolean that_present_shipping_timestamp = true;
1577
    if (this_present_shipping_timestamp || that_present_shipping_timestamp) {
1578
      if (!(this_present_shipping_timestamp && that_present_shipping_timestamp))
1579
        return false;
1580
      if (this.shipping_timestamp != that.shipping_timestamp)
1581
        return false;
1582
    }
1583
 
1584
    boolean this_present_delivery_timestamp = true;
1585
    boolean that_present_delivery_timestamp = true;
1586
    if (this_present_delivery_timestamp || that_present_delivery_timestamp) {
1587
      if (!(this_present_delivery_timestamp && that_present_delivery_timestamp))
1588
        return false;
1589
      if (this.delivery_timestamp != that.delivery_timestamp)
1590
        return false;
1591
    }
1592
 
1593
    return true;
1594
  }
1595
 
1596
  @Override
1597
  public int hashCode() {
1598
    return 0;
1599
  }
1600
 
1601
  public int compareTo(Order other) {
1602
    if (!getClass().equals(other.getClass())) {
1603
      return getClass().getName().compareTo(other.getClass().getName());
1604
    }
1605
 
1606
    int lastComparison = 0;
1607
    Order typedOther = (Order)other;
1608
 
1609
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
1610
    if (lastComparison != 0) {
1611
      return lastComparison;
1612
    }
1613
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
1614
    if (lastComparison != 0) {
1615
      return lastComparison;
1616
    }
1617
    lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
1618
    if (lastComparison != 0) {
1619
      return lastComparison;
1620
    }
1621
    lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
1622
    if (lastComparison != 0) {
1623
      return lastComparison;
1624
    }
1625
    lastComparison = Boolean.valueOf(isSetLineitems()).compareTo(isSetLineitems());
1626
    if (lastComparison != 0) {
1627
      return lastComparison;
1628
    }
1629
    lastComparison = TBaseHelper.compareTo(lineitems, typedOther.lineitems);
1630
    if (lastComparison != 0) {
1631
      return lastComparison;
1632
    }
1633
    lastComparison = Boolean.valueOf(isSetLogistics_provider_id()).compareTo(isSetLogistics_provider_id());
1634
    if (lastComparison != 0) {
1635
      return lastComparison;
1636
    }
1637
    lastComparison = TBaseHelper.compareTo(logistics_provider_id, typedOther.logistics_provider_id);
1638
    if (lastComparison != 0) {
1639
      return lastComparison;
1640
    }
1641
    lastComparison = Boolean.valueOf(isSetAirwaybill_no()).compareTo(isSetAirwaybill_no());
1642
    if (lastComparison != 0) {
1643
      return lastComparison;
1644
    }
1645
    lastComparison = TBaseHelper.compareTo(airwaybill_no, typedOther.airwaybill_no);
1646
    if (lastComparison != 0) {
1647
      return lastComparison;
1648
    }
1649
    lastComparison = Boolean.valueOf(isSetTracking_id()).compareTo(isSetTracking_id());
1650
    if (lastComparison != 0) {
1651
      return lastComparison;
1652
    }
1653
    lastComparison = TBaseHelper.compareTo(tracking_id, typedOther.tracking_id);
1654
    if (lastComparison != 0) {
1655
      return lastComparison;
1656
    }
1657
    lastComparison = Boolean.valueOf(isSetExpected_delivery_time()).compareTo(isSetExpected_delivery_time());
1658
    if (lastComparison != 0) {
1659
      return lastComparison;
1660
    }
1661
    lastComparison = TBaseHelper.compareTo(expected_delivery_time, typedOther.expected_delivery_time);
1662
    if (lastComparison != 0) {
1663
      return lastComparison;
1664
    }
1665
    lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
1666
    if (lastComparison != 0) {
1667
      return lastComparison;
1668
    }
1669
    lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
1670
    if (lastComparison != 0) {
1671
      return lastComparison;
1672
    }
1673
    lastComparison = Boolean.valueOf(isSetCustomer_name()).compareTo(isSetCustomer_name());
1674
    if (lastComparison != 0) {
1675
      return lastComparison;
1676
    }
1677
    lastComparison = TBaseHelper.compareTo(customer_name, typedOther.customer_name);
1678
    if (lastComparison != 0) {
1679
      return lastComparison;
1680
    }
1681
    lastComparison = Boolean.valueOf(isSetCustomer_mobilenumber()).compareTo(isSetCustomer_mobilenumber());
1682
    if (lastComparison != 0) {
1683
      return lastComparison;
1684
    }
1685
    lastComparison = TBaseHelper.compareTo(customer_mobilenumber, typedOther.customer_mobilenumber);
1686
    if (lastComparison != 0) {
1687
      return lastComparison;
1688
    }
1689
    lastComparison = Boolean.valueOf(isSetCustomer_pincode()).compareTo(isSetCustomer_pincode());
1690
    if (lastComparison != 0) {
1691
      return lastComparison;
1692
    }
1693
    lastComparison = TBaseHelper.compareTo(customer_pincode, typedOther.customer_pincode);
1694
    if (lastComparison != 0) {
1695
      return lastComparison;
1696
    }
1697
    lastComparison = Boolean.valueOf(isSetCustomer_address()).compareTo(isSetCustomer_address());
1698
    if (lastComparison != 0) {
1699
      return lastComparison;
1700
    }
1701
    lastComparison = TBaseHelper.compareTo(customer_address, typedOther.customer_address);
1702
    if (lastComparison != 0) {
1703
      return lastComparison;
1704
    }
1705
    lastComparison = Boolean.valueOf(isSetCustomer_email()).compareTo(isSetCustomer_email());
1706
    if (lastComparison != 0) {
1707
      return lastComparison;
1708
    }
1709
    lastComparison = TBaseHelper.compareTo(customer_email, typedOther.customer_email);
1710
    if (lastComparison != 0) {
1711
      return lastComparison;
1712
    }
1713
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
1714
    if (lastComparison != 0) {
1715
      return lastComparison;
1716
    }
1717
    lastComparison = TBaseHelper.compareTo(status, typedOther.status);
1718
    if (lastComparison != 0) {
1719
      return lastComparison;
1720
    }
1721
    lastComparison = Boolean.valueOf(isSetStatusDescription()).compareTo(isSetStatusDescription());
1722
    if (lastComparison != 0) {
1723
      return lastComparison;
1724
    }
1725
    lastComparison = TBaseHelper.compareTo(statusDescription, typedOther.statusDescription);
1726
    if (lastComparison != 0) {
1727
      return lastComparison;
1728
    }
1729
    lastComparison = Boolean.valueOf(isSetTotal_amount()).compareTo(isSetTotal_amount());
1730
    if (lastComparison != 0) {
1731
      return lastComparison;
1732
    }
1733
    lastComparison = TBaseHelper.compareTo(total_amount, typedOther.total_amount);
1734
    if (lastComparison != 0) {
1735
      return lastComparison;
1736
    }
1737
    lastComparison = Boolean.valueOf(isSetTotal_weight()).compareTo(isSetTotal_weight());
1738
    if (lastComparison != 0) {
1739
      return lastComparison;
1740
    }
1741
    lastComparison = TBaseHelper.compareTo(total_weight, typedOther.total_weight);
1742
    if (lastComparison != 0) {
1743
      return lastComparison;
1744
    }
1745
    lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
1746
    if (lastComparison != 0) {
1747
      return lastComparison;
1748
    }
1749
    lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
1750
    if (lastComparison != 0) {
1751
      return lastComparison;
1752
    }
1753
    lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
1754
    if (lastComparison != 0) {
1755
      return lastComparison;
1756
    }
1757
    lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
1758
    if (lastComparison != 0) {
1759
      return lastComparison;
1760
    }
1761
    lastComparison = Boolean.valueOf(isSetCreated_timestamp()).compareTo(isSetCreated_timestamp());
1762
    if (lastComparison != 0) {
1763
      return lastComparison;
1764
    }
1765
    lastComparison = TBaseHelper.compareTo(created_timestamp, typedOther.created_timestamp);
1766
    if (lastComparison != 0) {
1767
      return lastComparison;
1768
    }
1769
    lastComparison = Boolean.valueOf(isSetAccepted_timestamp()).compareTo(isSetAccepted_timestamp());
1770
    if (lastComparison != 0) {
1771
      return lastComparison;
1772
    }
1773
    lastComparison = TBaseHelper.compareTo(accepted_timestamp, typedOther.accepted_timestamp);
1774
    if (lastComparison != 0) {
1775
      return lastComparison;
1776
    }
1777
    lastComparison = Boolean.valueOf(isSetBilling_timestamp()).compareTo(isSetBilling_timestamp());
1778
    if (lastComparison != 0) {
1779
      return lastComparison;
1780
    }
1781
    lastComparison = TBaseHelper.compareTo(billing_timestamp, typedOther.billing_timestamp);
1782
    if (lastComparison != 0) {
1783
      return lastComparison;
1784
    }
1785
    lastComparison = Boolean.valueOf(isSetShipping_timestamp()).compareTo(isSetShipping_timestamp());
1786
    if (lastComparison != 0) {
1787
      return lastComparison;
1788
    }
1789
    lastComparison = TBaseHelper.compareTo(shipping_timestamp, typedOther.shipping_timestamp);
1790
    if (lastComparison != 0) {
1791
      return lastComparison;
1792
    }
1793
    lastComparison = Boolean.valueOf(isSetDelivery_timestamp()).compareTo(isSetDelivery_timestamp());
1794
    if (lastComparison != 0) {
1795
      return lastComparison;
1796
    }
1797
    lastComparison = TBaseHelper.compareTo(delivery_timestamp, typedOther.delivery_timestamp);
1798
    if (lastComparison != 0) {
1799
      return lastComparison;
1800
    }
1801
    return 0;
1802
  }
1803
 
1804
  public void read(TProtocol iprot) throws TException {
1805
    TField field;
1806
    iprot.readStructBegin();
1807
    while (true)
1808
    {
1809
      field = iprot.readFieldBegin();
1810
      if (field.type == TType.STOP) { 
1811
        break;
1812
      }
1813
      _Fields fieldId = _Fields.findByThriftId(field.id);
1814
      if (fieldId == null) {
1815
        TProtocolUtil.skip(iprot, field.type);
1816
      } else {
1817
        switch (fieldId) {
1818
          case ID:
1819
            if (field.type == TType.I64) {
1820
              this.id = iprot.readI64();
1821
              setIdIsSet(true);
1822
            } else { 
1823
              TProtocolUtil.skip(iprot, field.type);
1824
            }
1825
            break;
1826
          case WAREHOUSE_ID:
1827
            if (field.type == TType.I64) {
1828
              this.warehouse_id = iprot.readI64();
1829
              setWarehouse_idIsSet(true);
1830
            } else { 
1831
              TProtocolUtil.skip(iprot, field.type);
1832
            }
1833
            break;
1834
          case LINEITEMS:
1835
            if (field.type == TType.LIST) {
1836
              {
1837
                TList _list5 = iprot.readListBegin();
1838
                this.lineitems = new ArrayList<LineItem>(_list5.size);
1839
                for (int _i6 = 0; _i6 < _list5.size; ++_i6)
1840
                {
1841
                  LineItem _elem7;
1842
                  _elem7 = new LineItem();
1843
                  _elem7.read(iprot);
1844
                  this.lineitems.add(_elem7);
1845
                }
1846
                iprot.readListEnd();
1847
              }
1848
            } else { 
1849
              TProtocolUtil.skip(iprot, field.type);
1850
            }
1851
            break;
1852
          case LOGISTICS_PROVIDER_ID:
1853
            if (field.type == TType.I64) {
1854
              this.logistics_provider_id = iprot.readI64();
1855
              setLogistics_provider_idIsSet(true);
1856
            } else { 
1857
              TProtocolUtil.skip(iprot, field.type);
1858
            }
1859
            break;
1860
          case AIRWAYBILL_NO:
1861
            if (field.type == TType.STRING) {
1862
              this.airwaybill_no = iprot.readString();
1863
            } else { 
1864
              TProtocolUtil.skip(iprot, field.type);
1865
            }
1866
            break;
1867
          case TRACKING_ID:
1868
            if (field.type == TType.STRING) {
1869
              this.tracking_id = iprot.readString();
1870
            } else { 
1871
              TProtocolUtil.skip(iprot, field.type);
1872
            }
1873
            break;
1874
          case EXPECTED_DELIVERY_TIME:
1875
            if (field.type == TType.I64) {
1876
              this.expected_delivery_time = iprot.readI64();
1877
              setExpected_delivery_timeIsSet(true);
1878
            } else { 
1879
              TProtocolUtil.skip(iprot, field.type);
1880
            }
1881
            break;
1882
          case CUSTOMER_ID:
1883
            if (field.type == TType.I64) {
1884
              this.customer_id = iprot.readI64();
1885
              setCustomer_idIsSet(true);
1886
            } else { 
1887
              TProtocolUtil.skip(iprot, field.type);
1888
            }
1889
            break;
1890
          case CUSTOMER_NAME:
1891
            if (field.type == TType.STRING) {
1892
              this.customer_name = iprot.readString();
1893
            } else { 
1894
              TProtocolUtil.skip(iprot, field.type);
1895
            }
1896
            break;
1897
          case CUSTOMER_MOBILENUMBER:
1898
            if (field.type == TType.STRING) {
1899
              this.customer_mobilenumber = iprot.readString();
1900
            } else { 
1901
              TProtocolUtil.skip(iprot, field.type);
1902
            }
1903
            break;
1904
          case CUSTOMER_PINCODE:
1905
            if (field.type == TType.STRING) {
1906
              this.customer_pincode = iprot.readString();
1907
            } else { 
1908
              TProtocolUtil.skip(iprot, field.type);
1909
            }
1910
            break;
1911
          case CUSTOMER_ADDRESS:
1912
            if (field.type == TType.STRING) {
1913
              this.customer_address = iprot.readString();
1914
            } else { 
1915
              TProtocolUtil.skip(iprot, field.type);
1916
            }
1917
            break;
1918
          case CUSTOMER_EMAIL:
1919
            if (field.type == TType.STRING) {
1920
              this.customer_email = iprot.readString();
1921
            } else { 
1922
              TProtocolUtil.skip(iprot, field.type);
1923
            }
1924
            break;
1925
          case STATUS:
1926
            if (field.type == TType.I32) {
1927
              this.status = OrderStatus.findByValue(iprot.readI32());
1928
            } else { 
1929
              TProtocolUtil.skip(iprot, field.type);
1930
            }
1931
            break;
1932
          case STATUS_DESCRIPTION:
1933
            if (field.type == TType.STRING) {
1934
              this.statusDescription = iprot.readString();
1935
            } else { 
1936
              TProtocolUtil.skip(iprot, field.type);
1937
            }
1938
            break;
1939
          case TOTAL_AMOUNT:
1940
            if (field.type == TType.DOUBLE) {
1941
              this.total_amount = iprot.readDouble();
1942
              setTotal_amountIsSet(true);
1943
            } else { 
1944
              TProtocolUtil.skip(iprot, field.type);
1945
            }
1946
            break;
1947
          case TOTAL_WEIGHT:
1948
            if (field.type == TType.DOUBLE) {
1949
              this.total_weight = iprot.readDouble();
1950
              setTotal_weightIsSet(true);
1951
            } else { 
1952
              TProtocolUtil.skip(iprot, field.type);
1953
            }
1954
            break;
1955
          case INVOICE_NUMBER:
1956
            if (field.type == TType.STRING) {
1957
              this.invoice_number = iprot.readString();
1958
            } else { 
1959
              TProtocolUtil.skip(iprot, field.type);
1960
            }
1961
            break;
1962
          case BILLED_BY:
1963
            if (field.type == TType.STRING) {
1964
              this.billed_by = iprot.readString();
1965
            } else { 
1966
              TProtocolUtil.skip(iprot, field.type);
1967
            }
1968
            break;
1969
          case CREATED_TIMESTAMP:
1970
            if (field.type == TType.I64) {
1971
              this.created_timestamp = iprot.readI64();
1972
              setCreated_timestampIsSet(true);
1973
            } else { 
1974
              TProtocolUtil.skip(iprot, field.type);
1975
            }
1976
            break;
1977
          case ACCEPTED_TIMESTAMP:
1978
            if (field.type == TType.I64) {
1979
              this.accepted_timestamp = iprot.readI64();
1980
              setAccepted_timestampIsSet(true);
1981
            } else { 
1982
              TProtocolUtil.skip(iprot, field.type);
1983
            }
1984
            break;
1985
          case BILLING_TIMESTAMP:
1986
            if (field.type == TType.I64) {
1987
              this.billing_timestamp = iprot.readI64();
1988
              setBilling_timestampIsSet(true);
1989
            } else { 
1990
              TProtocolUtil.skip(iprot, field.type);
1991
            }
1992
            break;
1993
          case SHIPPING_TIMESTAMP:
1994
            if (field.type == TType.I64) {
1995
              this.shipping_timestamp = iprot.readI64();
1996
              setShipping_timestampIsSet(true);
1997
            } else { 
1998
              TProtocolUtil.skip(iprot, field.type);
1999
            }
2000
            break;
2001
          case DELIVERY_TIMESTAMP:
2002
            if (field.type == TType.I64) {
2003
              this.delivery_timestamp = iprot.readI64();
2004
              setDelivery_timestampIsSet(true);
2005
            } else { 
2006
              TProtocolUtil.skip(iprot, field.type);
2007
            }
2008
            break;
2009
        }
2010
        iprot.readFieldEnd();
2011
      }
2012
    }
2013
    iprot.readStructEnd();
2014
    validate();
2015
  }
2016
 
2017
  public void write(TProtocol oprot) throws TException {
2018
    validate();
2019
 
2020
    oprot.writeStructBegin(STRUCT_DESC);
2021
    oprot.writeFieldBegin(ID_FIELD_DESC);
2022
    oprot.writeI64(this.id);
2023
    oprot.writeFieldEnd();
2024
    oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
2025
    oprot.writeI64(this.warehouse_id);
2026
    oprot.writeFieldEnd();
2027
    if (this.lineitems != null) {
2028
      oprot.writeFieldBegin(LINEITEMS_FIELD_DESC);
2029
      {
2030
        oprot.writeListBegin(new TList(TType.STRUCT, this.lineitems.size()));
2031
        for (LineItem _iter8 : this.lineitems)
2032
        {
2033
          _iter8.write(oprot);
2034
        }
2035
        oprot.writeListEnd();
2036
      }
2037
      oprot.writeFieldEnd();
2038
    }
2039
    oprot.writeFieldBegin(LOGISTICS_PROVIDER_ID_FIELD_DESC);
2040
    oprot.writeI64(this.logistics_provider_id);
2041
    oprot.writeFieldEnd();
2042
    if (this.airwaybill_no != null) {
2043
      oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
2044
      oprot.writeString(this.airwaybill_no);
2045
      oprot.writeFieldEnd();
2046
    }
2047
    if (this.tracking_id != null) {
2048
      oprot.writeFieldBegin(TRACKING_ID_FIELD_DESC);
2049
      oprot.writeString(this.tracking_id);
2050
      oprot.writeFieldEnd();
2051
    }
2052
    oprot.writeFieldBegin(EXPECTED_DELIVERY_TIME_FIELD_DESC);
2053
    oprot.writeI64(this.expected_delivery_time);
2054
    oprot.writeFieldEnd();
2055
    oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
2056
    oprot.writeI64(this.customer_id);
2057
    oprot.writeFieldEnd();
2058
    if (this.customer_name != null) {
2059
      oprot.writeFieldBegin(CUSTOMER_NAME_FIELD_DESC);
2060
      oprot.writeString(this.customer_name);
2061
      oprot.writeFieldEnd();
2062
    }
2063
    if (this.customer_mobilenumber != null) {
2064
      oprot.writeFieldBegin(CUSTOMER_MOBILENUMBER_FIELD_DESC);
2065
      oprot.writeString(this.customer_mobilenumber);
2066
      oprot.writeFieldEnd();
2067
    }
2068
    if (this.customer_pincode != null) {
2069
      oprot.writeFieldBegin(CUSTOMER_PINCODE_FIELD_DESC);
2070
      oprot.writeString(this.customer_pincode);
2071
      oprot.writeFieldEnd();
2072
    }
2073
    if (this.customer_address != null) {
2074
      oprot.writeFieldBegin(CUSTOMER_ADDRESS_FIELD_DESC);
2075
      oprot.writeString(this.customer_address);
2076
      oprot.writeFieldEnd();
2077
    }
2078
    if (this.customer_email != null) {
2079
      oprot.writeFieldBegin(CUSTOMER_EMAIL_FIELD_DESC);
2080
      oprot.writeString(this.customer_email);
2081
      oprot.writeFieldEnd();
2082
    }
2083
    if (this.status != null) {
2084
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
2085
      oprot.writeI32(this.status.getValue());
2086
      oprot.writeFieldEnd();
2087
    }
2088
    if (this.statusDescription != null) {
2089
      oprot.writeFieldBegin(STATUS_DESCRIPTION_FIELD_DESC);
2090
      oprot.writeString(this.statusDescription);
2091
      oprot.writeFieldEnd();
2092
    }
2093
    oprot.writeFieldBegin(TOTAL_AMOUNT_FIELD_DESC);
2094
    oprot.writeDouble(this.total_amount);
2095
    oprot.writeFieldEnd();
2096
    oprot.writeFieldBegin(TOTAL_WEIGHT_FIELD_DESC);
2097
    oprot.writeDouble(this.total_weight);
2098
    oprot.writeFieldEnd();
2099
    if (this.invoice_number != null) {
2100
      oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
2101
      oprot.writeString(this.invoice_number);
2102
      oprot.writeFieldEnd();
2103
    }
2104
    if (this.billed_by != null) {
2105
      oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
2106
      oprot.writeString(this.billed_by);
2107
      oprot.writeFieldEnd();
2108
    }
2109
    oprot.writeFieldBegin(CREATED_TIMESTAMP_FIELD_DESC);
2110
    oprot.writeI64(this.created_timestamp);
2111
    oprot.writeFieldEnd();
2112
    oprot.writeFieldBegin(ACCEPTED_TIMESTAMP_FIELD_DESC);
2113
    oprot.writeI64(this.accepted_timestamp);
2114
    oprot.writeFieldEnd();
2115
    oprot.writeFieldBegin(BILLING_TIMESTAMP_FIELD_DESC);
2116
    oprot.writeI64(this.billing_timestamp);
2117
    oprot.writeFieldEnd();
2118
    oprot.writeFieldBegin(SHIPPING_TIMESTAMP_FIELD_DESC);
2119
    oprot.writeI64(this.shipping_timestamp);
2120
    oprot.writeFieldEnd();
2121
    oprot.writeFieldBegin(DELIVERY_TIMESTAMP_FIELD_DESC);
2122
    oprot.writeI64(this.delivery_timestamp);
2123
    oprot.writeFieldEnd();
2124
    oprot.writeFieldStop();
2125
    oprot.writeStructEnd();
2126
  }
2127
 
2128
  @Override
2129
  public String toString() {
2130
    StringBuilder sb = new StringBuilder("Order(");
2131
    boolean first = true;
2132
 
2133
    sb.append("id:");
2134
    sb.append(this.id);
2135
    first = false;
2136
    if (!first) sb.append(", ");
2137
    sb.append("warehouse_id:");
2138
    sb.append(this.warehouse_id);
2139
    first = false;
2140
    if (!first) sb.append(", ");
2141
    sb.append("lineitems:");
2142
    if (this.lineitems == null) {
2143
      sb.append("null");
2144
    } else {
2145
      sb.append(this.lineitems);
2146
    }
2147
    first = false;
2148
    if (!first) sb.append(", ");
2149
    sb.append("logistics_provider_id:");
2150
    sb.append(this.logistics_provider_id);
2151
    first = false;
2152
    if (!first) sb.append(", ");
2153
    sb.append("airwaybill_no:");
2154
    if (this.airwaybill_no == null) {
2155
      sb.append("null");
2156
    } else {
2157
      sb.append(this.airwaybill_no);
2158
    }
2159
    first = false;
2160
    if (!first) sb.append(", ");
2161
    sb.append("tracking_id:");
2162
    if (this.tracking_id == null) {
2163
      sb.append("null");
2164
    } else {
2165
      sb.append(this.tracking_id);
2166
    }
2167
    first = false;
2168
    if (!first) sb.append(", ");
2169
    sb.append("expected_delivery_time:");
2170
    sb.append(this.expected_delivery_time);
2171
    first = false;
2172
    if (!first) sb.append(", ");
2173
    sb.append("customer_id:");
2174
    sb.append(this.customer_id);
2175
    first = false;
2176
    if (!first) sb.append(", ");
2177
    sb.append("customer_name:");
2178
    if (this.customer_name == null) {
2179
      sb.append("null");
2180
    } else {
2181
      sb.append(this.customer_name);
2182
    }
2183
    first = false;
2184
    if (!first) sb.append(", ");
2185
    sb.append("customer_mobilenumber:");
2186
    if (this.customer_mobilenumber == null) {
2187
      sb.append("null");
2188
    } else {
2189
      sb.append(this.customer_mobilenumber);
2190
    }
2191
    first = false;
2192
    if (!first) sb.append(", ");
2193
    sb.append("customer_pincode:");
2194
    if (this.customer_pincode == null) {
2195
      sb.append("null");
2196
    } else {
2197
      sb.append(this.customer_pincode);
2198
    }
2199
    first = false;
2200
    if (!first) sb.append(", ");
2201
    sb.append("customer_address:");
2202
    if (this.customer_address == null) {
2203
      sb.append("null");
2204
    } else {
2205
      sb.append(this.customer_address);
2206
    }
2207
    first = false;
2208
    if (!first) sb.append(", ");
2209
    sb.append("customer_email:");
2210
    if (this.customer_email == null) {
2211
      sb.append("null");
2212
    } else {
2213
      sb.append(this.customer_email);
2214
    }
2215
    first = false;
2216
    if (!first) sb.append(", ");
2217
    sb.append("status:");
2218
    if (this.status == null) {
2219
      sb.append("null");
2220
    } else {
2221
      String status_name = status.name();
2222
      if (status_name != null) {
2223
        sb.append(status_name);
2224
        sb.append(" (");
2225
      }
2226
      sb.append(this.status);
2227
      if (status_name != null) {
2228
        sb.append(")");
2229
      }
2230
    }
2231
    first = false;
2232
    if (!first) sb.append(", ");
2233
    sb.append("statusDescription:");
2234
    if (this.statusDescription == null) {
2235
      sb.append("null");
2236
    } else {
2237
      sb.append(this.statusDescription);
2238
    }
2239
    first = false;
2240
    if (!first) sb.append(", ");
2241
    sb.append("total_amount:");
2242
    sb.append(this.total_amount);
2243
    first = false;
2244
    if (!first) sb.append(", ");
2245
    sb.append("total_weight:");
2246
    sb.append(this.total_weight);
2247
    first = false;
2248
    if (!first) sb.append(", ");
2249
    sb.append("invoice_number:");
2250
    if (this.invoice_number == null) {
2251
      sb.append("null");
2252
    } else {
2253
      sb.append(this.invoice_number);
2254
    }
2255
    first = false;
2256
    if (!first) sb.append(", ");
2257
    sb.append("billed_by:");
2258
    if (this.billed_by == null) {
2259
      sb.append("null");
2260
    } else {
2261
      sb.append(this.billed_by);
2262
    }
2263
    first = false;
2264
    if (!first) sb.append(", ");
2265
    sb.append("created_timestamp:");
2266
    sb.append(this.created_timestamp);
2267
    first = false;
2268
    if (!first) sb.append(", ");
2269
    sb.append("accepted_timestamp:");
2270
    sb.append(this.accepted_timestamp);
2271
    first = false;
2272
    if (!first) sb.append(", ");
2273
    sb.append("billing_timestamp:");
2274
    sb.append(this.billing_timestamp);
2275
    first = false;
2276
    if (!first) sb.append(", ");
2277
    sb.append("shipping_timestamp:");
2278
    sb.append(this.shipping_timestamp);
2279
    first = false;
2280
    if (!first) sb.append(", ");
2281
    sb.append("delivery_timestamp:");
2282
    sb.append(this.delivery_timestamp);
2283
    first = false;
2284
    sb.append(")");
2285
    return sb.toString();
2286
  }
2287
 
2288
  public void validate() throws TException {
2289
    // check for required fields
2290
  }
2291
 
2292
}
2293