Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4496 mandeep.dh 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.purchase;
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 LineItem implements org.apache.thrift.TBase<LineItem, LineItem._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LineItem");
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 ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField PRODUCT_GROUP_FIELD_DESC = new org.apache.thrift.protocol.TField("productGroup", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField BRAND_FIELD_DESC = new org.apache.thrift.protocol.TField("brand", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField MODEL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("modelNumber", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField MODEL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("modelName", org.apache.thrift.protocol.TType.STRING, (short)6);
32
  private static final org.apache.thrift.protocol.TField COLOR_FIELD_DESC = new org.apache.thrift.protocol.TField("color", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)8);
34
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
  private static final org.apache.thrift.protocol.TField UNFULFILLED_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("unfulfilledQuantity", org.apache.thrift.protocol.TType.DOUBLE, (short)10);
36
  private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)11);
37
  private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)12);
38
  private static final org.apache.thrift.protocol.TField FULFILLED_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilled", org.apache.thrift.protocol.TType.BOOL, (short)13);
39
 
40
  private long orderId; // required
41
  private long itemId; // required
42
  private String productGroup; // required
43
  private String brand; // required
44
  private String modelNumber; // required
45
  private String modelName; // required
46
  private String color; // required
47
  private String itemNumber; // required
48
  private double quantity; // required
49
  private double unfulfilledQuantity; // required
50
  private long createdAt; // required
51
  private double unitPrice; // required
52
  private boolean fulfilled; // required
53
 
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
56
    ORDER_ID((short)1, "orderId"),
57
    ITEM_ID((short)2, "itemId"),
58
    PRODUCT_GROUP((short)3, "productGroup"),
59
    BRAND((short)4, "brand"),
60
    MODEL_NUMBER((short)5, "modelNumber"),
61
    MODEL_NAME((short)6, "modelName"),
62
    COLOR((short)7, "color"),
63
    ITEM_NUMBER((short)8, "itemNumber"),
64
    QUANTITY((short)9, "quantity"),
65
    UNFULFILLED_QUANTITY((short)10, "unfulfilledQuantity"),
66
    CREATED_AT((short)11, "createdAt"),
67
    UNIT_PRICE((short)12, "unitPrice"),
68
    FULFILLED((short)13, "fulfilled");
69
 
70
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
71
 
72
    static {
73
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
74
        byName.put(field.getFieldName(), field);
75
      }
76
    }
77
 
78
    /**
79
     * Find the _Fields constant that matches fieldId, or null if its not found.
80
     */
81
    public static _Fields findByThriftId(int fieldId) {
82
      switch(fieldId) {
83
        case 1: // ORDER_ID
84
          return ORDER_ID;
85
        case 2: // ITEM_ID
86
          return ITEM_ID;
87
        case 3: // PRODUCT_GROUP
88
          return PRODUCT_GROUP;
89
        case 4: // BRAND
90
          return BRAND;
91
        case 5: // MODEL_NUMBER
92
          return MODEL_NUMBER;
93
        case 6: // MODEL_NAME
94
          return MODEL_NAME;
95
        case 7: // COLOR
96
          return COLOR;
97
        case 8: // ITEM_NUMBER
98
          return ITEM_NUMBER;
99
        case 9: // QUANTITY
100
          return QUANTITY;
101
        case 10: // UNFULFILLED_QUANTITY
102
          return UNFULFILLED_QUANTITY;
103
        case 11: // CREATED_AT
104
          return CREATED_AT;
105
        case 12: // UNIT_PRICE
106
          return UNIT_PRICE;
107
        case 13: // FULFILLED
108
          return FULFILLED;
109
        default:
110
          return null;
111
      }
112
    }
113
 
114
    /**
115
     * Find the _Fields constant that matches fieldId, throwing an exception
116
     * if it is not found.
117
     */
118
    public static _Fields findByThriftIdOrThrow(int fieldId) {
119
      _Fields fields = findByThriftId(fieldId);
120
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
121
      return fields;
122
    }
123
 
124
    /**
125
     * Find the _Fields constant that matches name, or null if its not found.
126
     */
127
    public static _Fields findByName(String name) {
128
      return byName.get(name);
129
    }
130
 
131
    private final short _thriftId;
132
    private final String _fieldName;
133
 
134
    _Fields(short thriftId, String fieldName) {
135
      _thriftId = thriftId;
136
      _fieldName = fieldName;
137
    }
138
 
139
    public short getThriftFieldId() {
140
      return _thriftId;
141
    }
142
 
143
    public String getFieldName() {
144
      return _fieldName;
145
    }
146
  }
147
 
148
  // isset id assignments
149
  private static final int __ORDERID_ISSET_ID = 0;
150
  private static final int __ITEMID_ISSET_ID = 1;
151
  private static final int __QUANTITY_ISSET_ID = 2;
152
  private static final int __UNFULFILLEDQUANTITY_ISSET_ID = 3;
153
  private static final int __CREATEDAT_ISSET_ID = 4;
154
  private static final int __UNITPRICE_ISSET_ID = 5;
155
  private static final int __FULFILLED_ISSET_ID = 6;
156
  private BitSet __isset_bit_vector = new BitSet(7);
157
 
158
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
159
  static {
160
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
161
    tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
162
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
163
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
165
    tmpMap.put(_Fields.PRODUCT_GROUP, new org.apache.thrift.meta_data.FieldMetaData("productGroup", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
167
    tmpMap.put(_Fields.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
169
    tmpMap.put(_Fields.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("modelNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
171
    tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("modelName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
172
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
173
    tmpMap.put(_Fields.COLOR, new org.apache.thrift.meta_data.FieldMetaData("color", org.apache.thrift.TFieldRequirementType.DEFAULT, 
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
175
    tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
177
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
178
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
179
    tmpMap.put(_Fields.UNFULFILLED_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("unfulfilledQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
180
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
181
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
183
    tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
184
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
185
    tmpMap.put(_Fields.FULFILLED, new org.apache.thrift.meta_data.FieldMetaData("fulfilled", org.apache.thrift.TFieldRequirementType.DEFAULT, 
186
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
187
    metaDataMap = Collections.unmodifiableMap(tmpMap);
188
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
189
  }
190
 
191
  public LineItem() {
192
  }
193
 
194
  public LineItem(
195
    long orderId,
196
    long itemId,
197
    String productGroup,
198
    String brand,
199
    String modelNumber,
200
    String modelName,
201
    String color,
202
    String itemNumber,
203
    double quantity,
204
    double unfulfilledQuantity,
205
    long createdAt,
206
    double unitPrice,
207
    boolean fulfilled)
208
  {
209
    this();
210
    this.orderId = orderId;
211
    setOrderIdIsSet(true);
212
    this.itemId = itemId;
213
    setItemIdIsSet(true);
214
    this.productGroup = productGroup;
215
    this.brand = brand;
216
    this.modelNumber = modelNumber;
217
    this.modelName = modelName;
218
    this.color = color;
219
    this.itemNumber = itemNumber;
220
    this.quantity = quantity;
221
    setQuantityIsSet(true);
222
    this.unfulfilledQuantity = unfulfilledQuantity;
223
    setUnfulfilledQuantityIsSet(true);
224
    this.createdAt = createdAt;
225
    setCreatedAtIsSet(true);
226
    this.unitPrice = unitPrice;
227
    setUnitPriceIsSet(true);
228
    this.fulfilled = fulfilled;
229
    setFulfilledIsSet(true);
230
  }
231
 
232
  /**
233
   * Performs a deep copy on <i>other</i>.
234
   */
235
  public LineItem(LineItem other) {
236
    __isset_bit_vector.clear();
237
    __isset_bit_vector.or(other.__isset_bit_vector);
238
    this.orderId = other.orderId;
239
    this.itemId = other.itemId;
240
    if (other.isSetProductGroup()) {
241
      this.productGroup = other.productGroup;
242
    }
243
    if (other.isSetBrand()) {
244
      this.brand = other.brand;
245
    }
246
    if (other.isSetModelNumber()) {
247
      this.modelNumber = other.modelNumber;
248
    }
249
    if (other.isSetModelName()) {
250
      this.modelName = other.modelName;
251
    }
252
    if (other.isSetColor()) {
253
      this.color = other.color;
254
    }
255
    if (other.isSetItemNumber()) {
256
      this.itemNumber = other.itemNumber;
257
    }
258
    this.quantity = other.quantity;
259
    this.unfulfilledQuantity = other.unfulfilledQuantity;
260
    this.createdAt = other.createdAt;
261
    this.unitPrice = other.unitPrice;
262
    this.fulfilled = other.fulfilled;
263
  }
264
 
265
  public LineItem deepCopy() {
266
    return new LineItem(this);
267
  }
268
 
269
  @Override
270
  public void clear() {
271
    setOrderIdIsSet(false);
272
    this.orderId = 0;
273
    setItemIdIsSet(false);
274
    this.itemId = 0;
275
    this.productGroup = null;
276
    this.brand = null;
277
    this.modelNumber = null;
278
    this.modelName = null;
279
    this.color = null;
280
    this.itemNumber = null;
281
    setQuantityIsSet(false);
282
    this.quantity = 0.0;
283
    setUnfulfilledQuantityIsSet(false);
284
    this.unfulfilledQuantity = 0.0;
285
    setCreatedAtIsSet(false);
286
    this.createdAt = 0;
287
    setUnitPriceIsSet(false);
288
    this.unitPrice = 0.0;
289
    setFulfilledIsSet(false);
290
    this.fulfilled = false;
291
  }
292
 
293
  public long getOrderId() {
294
    return this.orderId;
295
  }
296
 
297
  public void setOrderId(long orderId) {
298
    this.orderId = orderId;
299
    setOrderIdIsSet(true);
300
  }
301
 
302
  public void unsetOrderId() {
303
    __isset_bit_vector.clear(__ORDERID_ISSET_ID);
304
  }
305
 
306
  /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
307
  public boolean isSetOrderId() {
308
    return __isset_bit_vector.get(__ORDERID_ISSET_ID);
309
  }
310
 
311
  public void setOrderIdIsSet(boolean value) {
312
    __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
313
  }
314
 
315
  public long getItemId() {
316
    return this.itemId;
317
  }
318
 
319
  public void setItemId(long itemId) {
320
    this.itemId = itemId;
321
    setItemIdIsSet(true);
322
  }
323
 
324
  public void unsetItemId() {
325
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
326
  }
327
 
328
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
329
  public boolean isSetItemId() {
330
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
331
  }
332
 
333
  public void setItemIdIsSet(boolean value) {
334
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
335
  }
336
 
337
  public String getProductGroup() {
338
    return this.productGroup;
339
  }
340
 
341
  public void setProductGroup(String productGroup) {
342
    this.productGroup = productGroup;
343
  }
344
 
345
  public void unsetProductGroup() {
346
    this.productGroup = null;
347
  }
348
 
349
  /** Returns true if field productGroup is set (has been assigned a value) and false otherwise */
350
  public boolean isSetProductGroup() {
351
    return this.productGroup != null;
352
  }
353
 
354
  public void setProductGroupIsSet(boolean value) {
355
    if (!value) {
356
      this.productGroup = null;
357
    }
358
  }
359
 
360
  public String getBrand() {
361
    return this.brand;
362
  }
363
 
364
  public void setBrand(String brand) {
365
    this.brand = brand;
366
  }
367
 
368
  public void unsetBrand() {
369
    this.brand = null;
370
  }
371
 
372
  /** Returns true if field brand is set (has been assigned a value) and false otherwise */
373
  public boolean isSetBrand() {
374
    return this.brand != null;
375
  }
376
 
377
  public void setBrandIsSet(boolean value) {
378
    if (!value) {
379
      this.brand = null;
380
    }
381
  }
382
 
383
  public String getModelNumber() {
384
    return this.modelNumber;
385
  }
386
 
387
  public void setModelNumber(String modelNumber) {
388
    this.modelNumber = modelNumber;
389
  }
390
 
391
  public void unsetModelNumber() {
392
    this.modelNumber = null;
393
  }
394
 
395
  /** Returns true if field modelNumber is set (has been assigned a value) and false otherwise */
396
  public boolean isSetModelNumber() {
397
    return this.modelNumber != null;
398
  }
399
 
400
  public void setModelNumberIsSet(boolean value) {
401
    if (!value) {
402
      this.modelNumber = null;
403
    }
404
  }
405
 
406
  public String getModelName() {
407
    return this.modelName;
408
  }
409
 
410
  public void setModelName(String modelName) {
411
    this.modelName = modelName;
412
  }
413
 
414
  public void unsetModelName() {
415
    this.modelName = null;
416
  }
417
 
418
  /** Returns true if field modelName is set (has been assigned a value) and false otherwise */
419
  public boolean isSetModelName() {
420
    return this.modelName != null;
421
  }
422
 
423
  public void setModelNameIsSet(boolean value) {
424
    if (!value) {
425
      this.modelName = null;
426
    }
427
  }
428
 
429
  public String getColor() {
430
    return this.color;
431
  }
432
 
433
  public void setColor(String color) {
434
    this.color = color;
435
  }
436
 
437
  public void unsetColor() {
438
    this.color = null;
439
  }
440
 
441
  /** Returns true if field color is set (has been assigned a value) and false otherwise */
442
  public boolean isSetColor() {
443
    return this.color != null;
444
  }
445
 
446
  public void setColorIsSet(boolean value) {
447
    if (!value) {
448
      this.color = null;
449
    }
450
  }
451
 
452
  public String getItemNumber() {
453
    return this.itemNumber;
454
  }
455
 
456
  public void setItemNumber(String itemNumber) {
457
    this.itemNumber = itemNumber;
458
  }
459
 
460
  public void unsetItemNumber() {
461
    this.itemNumber = null;
462
  }
463
 
464
  /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
465
  public boolean isSetItemNumber() {
466
    return this.itemNumber != null;
467
  }
468
 
469
  public void setItemNumberIsSet(boolean value) {
470
    if (!value) {
471
      this.itemNumber = null;
472
    }
473
  }
474
 
475
  public double getQuantity() {
476
    return this.quantity;
477
  }
478
 
479
  public void setQuantity(double quantity) {
480
    this.quantity = quantity;
481
    setQuantityIsSet(true);
482
  }
483
 
484
  public void unsetQuantity() {
485
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
486
  }
487
 
488
  /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
489
  public boolean isSetQuantity() {
490
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
491
  }
492
 
493
  public void setQuantityIsSet(boolean value) {
494
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
495
  }
496
 
497
  public double getUnfulfilledQuantity() {
498
    return this.unfulfilledQuantity;
499
  }
500
 
501
  public void setUnfulfilledQuantity(double unfulfilledQuantity) {
502
    this.unfulfilledQuantity = unfulfilledQuantity;
503
    setUnfulfilledQuantityIsSet(true);
504
  }
505
 
506
  public void unsetUnfulfilledQuantity() {
507
    __isset_bit_vector.clear(__UNFULFILLEDQUANTITY_ISSET_ID);
508
  }
509
 
510
  /** Returns true if field unfulfilledQuantity is set (has been assigned a value) and false otherwise */
511
  public boolean isSetUnfulfilledQuantity() {
512
    return __isset_bit_vector.get(__UNFULFILLEDQUANTITY_ISSET_ID);
513
  }
514
 
515
  public void setUnfulfilledQuantityIsSet(boolean value) {
516
    __isset_bit_vector.set(__UNFULFILLEDQUANTITY_ISSET_ID, value);
517
  }
518
 
519
  public long getCreatedAt() {
520
    return this.createdAt;
521
  }
522
 
523
  public void setCreatedAt(long createdAt) {
524
    this.createdAt = createdAt;
525
    setCreatedAtIsSet(true);
526
  }
527
 
528
  public void unsetCreatedAt() {
529
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
530
  }
531
 
532
  /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
533
  public boolean isSetCreatedAt() {
534
    return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
535
  }
536
 
537
  public void setCreatedAtIsSet(boolean value) {
538
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
539
  }
540
 
541
  public double getUnitPrice() {
542
    return this.unitPrice;
543
  }
544
 
545
  public void setUnitPrice(double unitPrice) {
546
    this.unitPrice = unitPrice;
547
    setUnitPriceIsSet(true);
548
  }
549
 
550
  public void unsetUnitPrice() {
551
    __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
552
  }
553
 
554
  /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
555
  public boolean isSetUnitPrice() {
556
    return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
557
  }
558
 
559
  public void setUnitPriceIsSet(boolean value) {
560
    __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
561
  }
562
 
563
  public boolean isFulfilled() {
564
    return this.fulfilled;
565
  }
566
 
567
  public void setFulfilled(boolean fulfilled) {
568
    this.fulfilled = fulfilled;
569
    setFulfilledIsSet(true);
570
  }
571
 
572
  public void unsetFulfilled() {
573
    __isset_bit_vector.clear(__FULFILLED_ISSET_ID);
574
  }
575
 
576
  /** Returns true if field fulfilled is set (has been assigned a value) and false otherwise */
577
  public boolean isSetFulfilled() {
578
    return __isset_bit_vector.get(__FULFILLED_ISSET_ID);
579
  }
580
 
581
  public void setFulfilledIsSet(boolean value) {
582
    __isset_bit_vector.set(__FULFILLED_ISSET_ID, value);
583
  }
584
 
585
  public void setFieldValue(_Fields field, Object value) {
586
    switch (field) {
587
    case ORDER_ID:
588
      if (value == null) {
589
        unsetOrderId();
590
      } else {
591
        setOrderId((Long)value);
592
      }
593
      break;
594
 
595
    case ITEM_ID:
596
      if (value == null) {
597
        unsetItemId();
598
      } else {
599
        setItemId((Long)value);
600
      }
601
      break;
602
 
603
    case PRODUCT_GROUP:
604
      if (value == null) {
605
        unsetProductGroup();
606
      } else {
607
        setProductGroup((String)value);
608
      }
609
      break;
610
 
611
    case BRAND:
612
      if (value == null) {
613
        unsetBrand();
614
      } else {
615
        setBrand((String)value);
616
      }
617
      break;
618
 
619
    case MODEL_NUMBER:
620
      if (value == null) {
621
        unsetModelNumber();
622
      } else {
623
        setModelNumber((String)value);
624
      }
625
      break;
626
 
627
    case MODEL_NAME:
628
      if (value == null) {
629
        unsetModelName();
630
      } else {
631
        setModelName((String)value);
632
      }
633
      break;
634
 
635
    case COLOR:
636
      if (value == null) {
637
        unsetColor();
638
      } else {
639
        setColor((String)value);
640
      }
641
      break;
642
 
643
    case ITEM_NUMBER:
644
      if (value == null) {
645
        unsetItemNumber();
646
      } else {
647
        setItemNumber((String)value);
648
      }
649
      break;
650
 
651
    case QUANTITY:
652
      if (value == null) {
653
        unsetQuantity();
654
      } else {
655
        setQuantity((Double)value);
656
      }
657
      break;
658
 
659
    case UNFULFILLED_QUANTITY:
660
      if (value == null) {
661
        unsetUnfulfilledQuantity();
662
      } else {
663
        setUnfulfilledQuantity((Double)value);
664
      }
665
      break;
666
 
667
    case CREATED_AT:
668
      if (value == null) {
669
        unsetCreatedAt();
670
      } else {
671
        setCreatedAt((Long)value);
672
      }
673
      break;
674
 
675
    case UNIT_PRICE:
676
      if (value == null) {
677
        unsetUnitPrice();
678
      } else {
679
        setUnitPrice((Double)value);
680
      }
681
      break;
682
 
683
    case FULFILLED:
684
      if (value == null) {
685
        unsetFulfilled();
686
      } else {
687
        setFulfilled((Boolean)value);
688
      }
689
      break;
690
 
691
    }
692
  }
693
 
694
  public Object getFieldValue(_Fields field) {
695
    switch (field) {
696
    case ORDER_ID:
697
      return Long.valueOf(getOrderId());
698
 
699
    case ITEM_ID:
700
      return Long.valueOf(getItemId());
701
 
702
    case PRODUCT_GROUP:
703
      return getProductGroup();
704
 
705
    case BRAND:
706
      return getBrand();
707
 
708
    case MODEL_NUMBER:
709
      return getModelNumber();
710
 
711
    case MODEL_NAME:
712
      return getModelName();
713
 
714
    case COLOR:
715
      return getColor();
716
 
717
    case ITEM_NUMBER:
718
      return getItemNumber();
719
 
720
    case QUANTITY:
721
      return Double.valueOf(getQuantity());
722
 
723
    case UNFULFILLED_QUANTITY:
724
      return Double.valueOf(getUnfulfilledQuantity());
725
 
726
    case CREATED_AT:
727
      return Long.valueOf(getCreatedAt());
728
 
729
    case UNIT_PRICE:
730
      return Double.valueOf(getUnitPrice());
731
 
732
    case FULFILLED:
733
      return Boolean.valueOf(isFulfilled());
734
 
735
    }
736
    throw new IllegalStateException();
737
  }
738
 
739
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
740
  public boolean isSet(_Fields field) {
741
    if (field == null) {
742
      throw new IllegalArgumentException();
743
    }
744
 
745
    switch (field) {
746
    case ORDER_ID:
747
      return isSetOrderId();
748
    case ITEM_ID:
749
      return isSetItemId();
750
    case PRODUCT_GROUP:
751
      return isSetProductGroup();
752
    case BRAND:
753
      return isSetBrand();
754
    case MODEL_NUMBER:
755
      return isSetModelNumber();
756
    case MODEL_NAME:
757
      return isSetModelName();
758
    case COLOR:
759
      return isSetColor();
760
    case ITEM_NUMBER:
761
      return isSetItemNumber();
762
    case QUANTITY:
763
      return isSetQuantity();
764
    case UNFULFILLED_QUANTITY:
765
      return isSetUnfulfilledQuantity();
766
    case CREATED_AT:
767
      return isSetCreatedAt();
768
    case UNIT_PRICE:
769
      return isSetUnitPrice();
770
    case FULFILLED:
771
      return isSetFulfilled();
772
    }
773
    throw new IllegalStateException();
774
  }
775
 
776
  @Override
777
  public boolean equals(Object that) {
778
    if (that == null)
779
      return false;
780
    if (that instanceof LineItem)
781
      return this.equals((LineItem)that);
782
    return false;
783
  }
784
 
785
  public boolean equals(LineItem that) {
786
    if (that == null)
787
      return false;
788
 
789
    boolean this_present_orderId = true;
790
    boolean that_present_orderId = true;
791
    if (this_present_orderId || that_present_orderId) {
792
      if (!(this_present_orderId && that_present_orderId))
793
        return false;
794
      if (this.orderId != that.orderId)
795
        return false;
796
    }
797
 
798
    boolean this_present_itemId = true;
799
    boolean that_present_itemId = true;
800
    if (this_present_itemId || that_present_itemId) {
801
      if (!(this_present_itemId && that_present_itemId))
802
        return false;
803
      if (this.itemId != that.itemId)
804
        return false;
805
    }
806
 
807
    boolean this_present_productGroup = true && this.isSetProductGroup();
808
    boolean that_present_productGroup = true && that.isSetProductGroup();
809
    if (this_present_productGroup || that_present_productGroup) {
810
      if (!(this_present_productGroup && that_present_productGroup))
811
        return false;
812
      if (!this.productGroup.equals(that.productGroup))
813
        return false;
814
    }
815
 
816
    boolean this_present_brand = true && this.isSetBrand();
817
    boolean that_present_brand = true && that.isSetBrand();
818
    if (this_present_brand || that_present_brand) {
819
      if (!(this_present_brand && that_present_brand))
820
        return false;
821
      if (!this.brand.equals(that.brand))
822
        return false;
823
    }
824
 
825
    boolean this_present_modelNumber = true && this.isSetModelNumber();
826
    boolean that_present_modelNumber = true && that.isSetModelNumber();
827
    if (this_present_modelNumber || that_present_modelNumber) {
828
      if (!(this_present_modelNumber && that_present_modelNumber))
829
        return false;
830
      if (!this.modelNumber.equals(that.modelNumber))
831
        return false;
832
    }
833
 
834
    boolean this_present_modelName = true && this.isSetModelName();
835
    boolean that_present_modelName = true && that.isSetModelName();
836
    if (this_present_modelName || that_present_modelName) {
837
      if (!(this_present_modelName && that_present_modelName))
838
        return false;
839
      if (!this.modelName.equals(that.modelName))
840
        return false;
841
    }
842
 
843
    boolean this_present_color = true && this.isSetColor();
844
    boolean that_present_color = true && that.isSetColor();
845
    if (this_present_color || that_present_color) {
846
      if (!(this_present_color && that_present_color))
847
        return false;
848
      if (!this.color.equals(that.color))
849
        return false;
850
    }
851
 
852
    boolean this_present_itemNumber = true && this.isSetItemNumber();
853
    boolean that_present_itemNumber = true && that.isSetItemNumber();
854
    if (this_present_itemNumber || that_present_itemNumber) {
855
      if (!(this_present_itemNumber && that_present_itemNumber))
856
        return false;
857
      if (!this.itemNumber.equals(that.itemNumber))
858
        return false;
859
    }
860
 
861
    boolean this_present_quantity = true;
862
    boolean that_present_quantity = true;
863
    if (this_present_quantity || that_present_quantity) {
864
      if (!(this_present_quantity && that_present_quantity))
865
        return false;
866
      if (this.quantity != that.quantity)
867
        return false;
868
    }
869
 
870
    boolean this_present_unfulfilledQuantity = true;
871
    boolean that_present_unfulfilledQuantity = true;
872
    if (this_present_unfulfilledQuantity || that_present_unfulfilledQuantity) {
873
      if (!(this_present_unfulfilledQuantity && that_present_unfulfilledQuantity))
874
        return false;
875
      if (this.unfulfilledQuantity != that.unfulfilledQuantity)
876
        return false;
877
    }
878
 
879
    boolean this_present_createdAt = true;
880
    boolean that_present_createdAt = true;
881
    if (this_present_createdAt || that_present_createdAt) {
882
      if (!(this_present_createdAt && that_present_createdAt))
883
        return false;
884
      if (this.createdAt != that.createdAt)
885
        return false;
886
    }
887
 
888
    boolean this_present_unitPrice = true;
889
    boolean that_present_unitPrice = true;
890
    if (this_present_unitPrice || that_present_unitPrice) {
891
      if (!(this_present_unitPrice && that_present_unitPrice))
892
        return false;
893
      if (this.unitPrice != that.unitPrice)
894
        return false;
895
    }
896
 
897
    boolean this_present_fulfilled = true;
898
    boolean that_present_fulfilled = true;
899
    if (this_present_fulfilled || that_present_fulfilled) {
900
      if (!(this_present_fulfilled && that_present_fulfilled))
901
        return false;
902
      if (this.fulfilled != that.fulfilled)
903
        return false;
904
    }
905
 
906
    return true;
907
  }
908
 
909
  @Override
910
  public int hashCode() {
911
    return 0;
912
  }
913
 
914
  public int compareTo(LineItem other) {
915
    if (!getClass().equals(other.getClass())) {
916
      return getClass().getName().compareTo(other.getClass().getName());
917
    }
918
 
919
    int lastComparison = 0;
920
    LineItem typedOther = (LineItem)other;
921
 
922
    lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
923
    if (lastComparison != 0) {
924
      return lastComparison;
925
    }
926
    if (isSetOrderId()) {
927
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
928
      if (lastComparison != 0) {
929
        return lastComparison;
930
      }
931
    }
932
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
933
    if (lastComparison != 0) {
934
      return lastComparison;
935
    }
936
    if (isSetItemId()) {
937
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
938
      if (lastComparison != 0) {
939
        return lastComparison;
940
      }
941
    }
942
    lastComparison = Boolean.valueOf(isSetProductGroup()).compareTo(typedOther.isSetProductGroup());
943
    if (lastComparison != 0) {
944
      return lastComparison;
945
    }
946
    if (isSetProductGroup()) {
947
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.productGroup, typedOther.productGroup);
948
      if (lastComparison != 0) {
949
        return lastComparison;
950
      }
951
    }
952
    lastComparison = Boolean.valueOf(isSetBrand()).compareTo(typedOther.isSetBrand());
953
    if (lastComparison != 0) {
954
      return lastComparison;
955
    }
956
    if (isSetBrand()) {
957
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);
958
      if (lastComparison != 0) {
959
        return lastComparison;
960
      }
961
    }
962
    lastComparison = Boolean.valueOf(isSetModelNumber()).compareTo(typedOther.isSetModelNumber());
963
    if (lastComparison != 0) {
964
      return lastComparison;
965
    }
966
    if (isSetModelNumber()) {
967
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelNumber, typedOther.modelNumber);
968
      if (lastComparison != 0) {
969
        return lastComparison;
970
      }
971
    }
972
    lastComparison = Boolean.valueOf(isSetModelName()).compareTo(typedOther.isSetModelName());
973
    if (lastComparison != 0) {
974
      return lastComparison;
975
    }
976
    if (isSetModelName()) {
977
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, typedOther.modelName);
978
      if (lastComparison != 0) {
979
        return lastComparison;
980
      }
981
    }
982
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(typedOther.isSetColor());
983
    if (lastComparison != 0) {
984
      return lastComparison;
985
    }
986
    if (isSetColor()) {
987
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.color, typedOther.color);
988
      if (lastComparison != 0) {
989
        return lastComparison;
990
      }
991
    }
992
    lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
993
    if (lastComparison != 0) {
994
      return lastComparison;
995
    }
996
    if (isSetItemNumber()) {
997
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
998
      if (lastComparison != 0) {
999
        return lastComparison;
1000
      }
1001
    }
1002
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
1003
    if (lastComparison != 0) {
1004
      return lastComparison;
1005
    }
1006
    if (isSetQuantity()) {
1007
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
1008
      if (lastComparison != 0) {
1009
        return lastComparison;
1010
      }
1011
    }
1012
    lastComparison = Boolean.valueOf(isSetUnfulfilledQuantity()).compareTo(typedOther.isSetUnfulfilledQuantity());
1013
    if (lastComparison != 0) {
1014
      return lastComparison;
1015
    }
1016
    if (isSetUnfulfilledQuantity()) {
1017
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unfulfilledQuantity, typedOther.unfulfilledQuantity);
1018
      if (lastComparison != 0) {
1019
        return lastComparison;
1020
      }
1021
    }
1022
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
1023
    if (lastComparison != 0) {
1024
      return lastComparison;
1025
    }
1026
    if (isSetCreatedAt()) {
1027
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
1028
      if (lastComparison != 0) {
1029
        return lastComparison;
1030
      }
1031
    }
1032
    lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
1033
    if (lastComparison != 0) {
1034
      return lastComparison;
1035
    }
1036
    if (isSetUnitPrice()) {
1037
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
1038
      if (lastComparison != 0) {
1039
        return lastComparison;
1040
      }
1041
    }
1042
    lastComparison = Boolean.valueOf(isSetFulfilled()).compareTo(typedOther.isSetFulfilled());
1043
    if (lastComparison != 0) {
1044
      return lastComparison;
1045
    }
1046
    if (isSetFulfilled()) {
1047
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilled, typedOther.fulfilled);
1048
      if (lastComparison != 0) {
1049
        return lastComparison;
1050
      }
1051
    }
1052
    return 0;
1053
  }
1054
 
1055
  public _Fields fieldForId(int fieldId) {
1056
    return _Fields.findByThriftId(fieldId);
1057
  }
1058
 
1059
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1060
    org.apache.thrift.protocol.TField field;
1061
    iprot.readStructBegin();
1062
    while (true)
1063
    {
1064
      field = iprot.readFieldBegin();
1065
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1066
        break;
1067
      }
1068
      switch (field.id) {
1069
        case 1: // ORDER_ID
1070
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1071
            this.orderId = iprot.readI64();
1072
            setOrderIdIsSet(true);
1073
          } else { 
1074
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1075
          }
1076
          break;
1077
        case 2: // ITEM_ID
1078
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1079
            this.itemId = iprot.readI64();
1080
            setItemIdIsSet(true);
1081
          } else { 
1082
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1083
          }
1084
          break;
1085
        case 3: // PRODUCT_GROUP
1086
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1087
            this.productGroup = iprot.readString();
1088
          } else { 
1089
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1090
          }
1091
          break;
1092
        case 4: // BRAND
1093
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1094
            this.brand = iprot.readString();
1095
          } else { 
1096
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1097
          }
1098
          break;
1099
        case 5: // MODEL_NUMBER
1100
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1101
            this.modelNumber = iprot.readString();
1102
          } else { 
1103
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1104
          }
1105
          break;
1106
        case 6: // MODEL_NAME
1107
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1108
            this.modelName = iprot.readString();
1109
          } else { 
1110
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1111
          }
1112
          break;
1113
        case 7: // COLOR
1114
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1115
            this.color = iprot.readString();
1116
          } else { 
1117
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1118
          }
1119
          break;
1120
        case 8: // ITEM_NUMBER
1121
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1122
            this.itemNumber = iprot.readString();
1123
          } else { 
1124
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1125
          }
1126
          break;
1127
        case 9: // QUANTITY
1128
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1129
            this.quantity = iprot.readDouble();
1130
            setQuantityIsSet(true);
1131
          } else { 
1132
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1133
          }
1134
          break;
1135
        case 10: // UNFULFILLED_QUANTITY
1136
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1137
            this.unfulfilledQuantity = iprot.readDouble();
1138
            setUnfulfilledQuantityIsSet(true);
1139
          } else { 
1140
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1141
          }
1142
          break;
1143
        case 11: // CREATED_AT
1144
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1145
            this.createdAt = iprot.readI64();
1146
            setCreatedAtIsSet(true);
1147
          } else { 
1148
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1149
          }
1150
          break;
1151
        case 12: // UNIT_PRICE
1152
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1153
            this.unitPrice = iprot.readDouble();
1154
            setUnitPriceIsSet(true);
1155
          } else { 
1156
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1157
          }
1158
          break;
1159
        case 13: // FULFILLED
1160
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
1161
            this.fulfilled = iprot.readBool();
1162
            setFulfilledIsSet(true);
1163
          } else { 
1164
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1165
          }
1166
          break;
1167
        default:
1168
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1169
      }
1170
      iprot.readFieldEnd();
1171
    }
1172
    iprot.readStructEnd();
1173
    validate();
1174
  }
1175
 
1176
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1177
    validate();
1178
 
1179
    oprot.writeStructBegin(STRUCT_DESC);
1180
    oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
1181
    oprot.writeI64(this.orderId);
1182
    oprot.writeFieldEnd();
1183
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1184
    oprot.writeI64(this.itemId);
1185
    oprot.writeFieldEnd();
1186
    if (this.productGroup != null) {
1187
      oprot.writeFieldBegin(PRODUCT_GROUP_FIELD_DESC);
1188
      oprot.writeString(this.productGroup);
1189
      oprot.writeFieldEnd();
1190
    }
1191
    if (this.brand != null) {
1192
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
1193
      oprot.writeString(this.brand);
1194
      oprot.writeFieldEnd();
1195
    }
1196
    if (this.modelNumber != null) {
1197
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1198
      oprot.writeString(this.modelNumber);
1199
      oprot.writeFieldEnd();
1200
    }
1201
    if (this.modelName != null) {
1202
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1203
      oprot.writeString(this.modelName);
1204
      oprot.writeFieldEnd();
1205
    }
1206
    if (this.color != null) {
1207
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1208
      oprot.writeString(this.color);
1209
      oprot.writeFieldEnd();
1210
    }
1211
    if (this.itemNumber != null) {
1212
      oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1213
      oprot.writeString(this.itemNumber);
1214
      oprot.writeFieldEnd();
1215
    }
1216
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1217
    oprot.writeDouble(this.quantity);
1218
    oprot.writeFieldEnd();
1219
    oprot.writeFieldBegin(UNFULFILLED_QUANTITY_FIELD_DESC);
1220
    oprot.writeDouble(this.unfulfilledQuantity);
1221
    oprot.writeFieldEnd();
1222
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
1223
    oprot.writeI64(this.createdAt);
1224
    oprot.writeFieldEnd();
1225
    oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
1226
    oprot.writeDouble(this.unitPrice);
1227
    oprot.writeFieldEnd();
1228
    oprot.writeFieldBegin(FULFILLED_FIELD_DESC);
1229
    oprot.writeBool(this.fulfilled);
1230
    oprot.writeFieldEnd();
1231
    oprot.writeFieldStop();
1232
    oprot.writeStructEnd();
1233
  }
1234
 
1235
  @Override
1236
  public String toString() {
1237
    StringBuilder sb = new StringBuilder("LineItem(");
1238
    boolean first = true;
1239
 
1240
    sb.append("orderId:");
1241
    sb.append(this.orderId);
1242
    first = false;
1243
    if (!first) sb.append(", ");
1244
    sb.append("itemId:");
1245
    sb.append(this.itemId);
1246
    first = false;
1247
    if (!first) sb.append(", ");
1248
    sb.append("productGroup:");
1249
    if (this.productGroup == null) {
1250
      sb.append("null");
1251
    } else {
1252
      sb.append(this.productGroup);
1253
    }
1254
    first = false;
1255
    if (!first) sb.append(", ");
1256
    sb.append("brand:");
1257
    if (this.brand == null) {
1258
      sb.append("null");
1259
    } else {
1260
      sb.append(this.brand);
1261
    }
1262
    first = false;
1263
    if (!first) sb.append(", ");
1264
    sb.append("modelNumber:");
1265
    if (this.modelNumber == null) {
1266
      sb.append("null");
1267
    } else {
1268
      sb.append(this.modelNumber);
1269
    }
1270
    first = false;
1271
    if (!first) sb.append(", ");
1272
    sb.append("modelName:");
1273
    if (this.modelName == null) {
1274
      sb.append("null");
1275
    } else {
1276
      sb.append(this.modelName);
1277
    }
1278
    first = false;
1279
    if (!first) sb.append(", ");
1280
    sb.append("color:");
1281
    if (this.color == null) {
1282
      sb.append("null");
1283
    } else {
1284
      sb.append(this.color);
1285
    }
1286
    first = false;
1287
    if (!first) sb.append(", ");
1288
    sb.append("itemNumber:");
1289
    if (this.itemNumber == null) {
1290
      sb.append("null");
1291
    } else {
1292
      sb.append(this.itemNumber);
1293
    }
1294
    first = false;
1295
    if (!first) sb.append(", ");
1296
    sb.append("quantity:");
1297
    sb.append(this.quantity);
1298
    first = false;
1299
    if (!first) sb.append(", ");
1300
    sb.append("unfulfilledQuantity:");
1301
    sb.append(this.unfulfilledQuantity);
1302
    first = false;
1303
    if (!first) sb.append(", ");
1304
    sb.append("createdAt:");
1305
    sb.append(this.createdAt);
1306
    first = false;
1307
    if (!first) sb.append(", ");
1308
    sb.append("unitPrice:");
1309
    sb.append(this.unitPrice);
1310
    first = false;
1311
    if (!first) sb.append(", ");
1312
    sb.append("fulfilled:");
1313
    sb.append(this.fulfilled);
1314
    first = false;
1315
    sb.append(")");
1316
    return sb.toString();
1317
  }
1318
 
1319
  public void validate() throws org.apache.thrift.TException {
1320
    // check for required fields
1321
  }
1322
 
1323
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1324
    try {
1325
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1326
    } catch (org.apache.thrift.TException te) {
1327
      throw new java.io.IOException(te);
1328
    }
1329
  }
1330
 
1331
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1332
    try {
1333
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1334
      __isset_bit_vector = new BitSet(1);
1335
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1336
    } catch (org.apache.thrift.TException te) {
1337
      throw new java.io.IOException(te);
1338
    }
1339
  }
1340
 
1341
}
1342