Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
10689 manish.sha 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.warehouse;
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 AmazonTransferredSkuDetail implements org.apache.thrift.TBase<AmazonTransferredSkuDetail, AmazonTransferredSkuDetail._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AmazonTransferredSkuDetail");
25
 
26
  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)1);
27
  private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField PURCHASE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseDate", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)4);
30
  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)5);
31
  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)6);
32
  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)7);
33
  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)8);
34
  private static final org.apache.thrift.protocol.TField CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("category", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  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)10);
36
 
37
  private long itemId; // required
38
  private long purchaseId; // required
39
  private long purchaseDate; // required
40
  private long quantity; // required
41
  private double unitPrice; // required
42
  private String brand; // required
43
  private String modelName; // required
44
  private String modelNumber; // required
45
  private String category; // required
46
  private String color; // required
47
 
48
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
49
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
50
    ITEM_ID((short)1, "itemId"),
51
    PURCHASE_ID((short)2, "purchaseId"),
52
    PURCHASE_DATE((short)3, "purchaseDate"),
53
    QUANTITY((short)4, "quantity"),
54
    UNIT_PRICE((short)5, "unitPrice"),
55
    BRAND((short)6, "brand"),
56
    MODEL_NAME((short)7, "modelName"),
57
    MODEL_NUMBER((short)8, "modelNumber"),
58
    CATEGORY((short)9, "category"),
59
    COLOR((short)10, "color");
60
 
61
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
62
 
63
    static {
64
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
65
        byName.put(field.getFieldName(), field);
66
      }
67
    }
68
 
69
    /**
70
     * Find the _Fields constant that matches fieldId, or null if its not found.
71
     */
72
    public static _Fields findByThriftId(int fieldId) {
73
      switch(fieldId) {
74
        case 1: // ITEM_ID
75
          return ITEM_ID;
76
        case 2: // PURCHASE_ID
77
          return PURCHASE_ID;
78
        case 3: // PURCHASE_DATE
79
          return PURCHASE_DATE;
80
        case 4: // QUANTITY
81
          return QUANTITY;
82
        case 5: // UNIT_PRICE
83
          return UNIT_PRICE;
84
        case 6: // BRAND
85
          return BRAND;
86
        case 7: // MODEL_NAME
87
          return MODEL_NAME;
88
        case 8: // MODEL_NUMBER
89
          return MODEL_NUMBER;
90
        case 9: // CATEGORY
91
          return CATEGORY;
92
        case 10: // COLOR
93
          return COLOR;
94
        default:
95
          return null;
96
      }
97
    }
98
 
99
    /**
100
     * Find the _Fields constant that matches fieldId, throwing an exception
101
     * if it is not found.
102
     */
103
    public static _Fields findByThriftIdOrThrow(int fieldId) {
104
      _Fields fields = findByThriftId(fieldId);
105
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
106
      return fields;
107
    }
108
 
109
    /**
110
     * Find the _Fields constant that matches name, or null if its not found.
111
     */
112
    public static _Fields findByName(String name) {
113
      return byName.get(name);
114
    }
115
 
116
    private final short _thriftId;
117
    private final String _fieldName;
118
 
119
    _Fields(short thriftId, String fieldName) {
120
      _thriftId = thriftId;
121
      _fieldName = fieldName;
122
    }
123
 
124
    public short getThriftFieldId() {
125
      return _thriftId;
126
    }
127
 
128
    public String getFieldName() {
129
      return _fieldName;
130
    }
131
  }
132
 
133
  // isset id assignments
134
  private static final int __ITEMID_ISSET_ID = 0;
135
  private static final int __PURCHASEID_ISSET_ID = 1;
136
  private static final int __PURCHASEDATE_ISSET_ID = 2;
137
  private static final int __QUANTITY_ISSET_ID = 3;
138
  private static final int __UNITPRICE_ISSET_ID = 4;
139
  private BitSet __isset_bit_vector = new BitSet(5);
140
 
141
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
142
  static {
143
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
144
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
146
    tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
148
    tmpMap.put(_Fields.PURCHASE_DATE, new org.apache.thrift.meta_data.FieldMetaData("purchaseDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
150
    tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
152
    tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
154
    tmpMap.put(_Fields.BRAND, new org.apache.thrift.meta_data.FieldMetaData("brand", org.apache.thrift.TFieldRequirementType.DEFAULT, 
155
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
156
    tmpMap.put(_Fields.MODEL_NAME, new org.apache.thrift.meta_data.FieldMetaData("modelName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
158
    tmpMap.put(_Fields.MODEL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("modelNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
159
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
160
    tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
161
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
162
    tmpMap.put(_Fields.COLOR, new org.apache.thrift.meta_data.FieldMetaData("color", org.apache.thrift.TFieldRequirementType.DEFAULT, 
163
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
164
    metaDataMap = Collections.unmodifiableMap(tmpMap);
165
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AmazonTransferredSkuDetail.class, metaDataMap);
166
  }
167
 
168
  public AmazonTransferredSkuDetail() {
169
  }
170
 
171
  public AmazonTransferredSkuDetail(
172
    long itemId,
173
    long purchaseId,
174
    long purchaseDate,
175
    long quantity,
176
    double unitPrice,
177
    String brand,
178
    String modelName,
179
    String modelNumber,
180
    String category,
181
    String color)
182
  {
183
    this();
184
    this.itemId = itemId;
185
    setItemIdIsSet(true);
186
    this.purchaseId = purchaseId;
187
    setPurchaseIdIsSet(true);
188
    this.purchaseDate = purchaseDate;
189
    setPurchaseDateIsSet(true);
190
    this.quantity = quantity;
191
    setQuantityIsSet(true);
192
    this.unitPrice = unitPrice;
193
    setUnitPriceIsSet(true);
194
    this.brand = brand;
195
    this.modelName = modelName;
196
    this.modelNumber = modelNumber;
197
    this.category = category;
198
    this.color = color;
199
  }
200
 
201
  /**
202
   * Performs a deep copy on <i>other</i>.
203
   */
204
  public AmazonTransferredSkuDetail(AmazonTransferredSkuDetail other) {
205
    __isset_bit_vector.clear();
206
    __isset_bit_vector.or(other.__isset_bit_vector);
207
    this.itemId = other.itemId;
208
    this.purchaseId = other.purchaseId;
209
    this.purchaseDate = other.purchaseDate;
210
    this.quantity = other.quantity;
211
    this.unitPrice = other.unitPrice;
212
    if (other.isSetBrand()) {
213
      this.brand = other.brand;
214
    }
215
    if (other.isSetModelName()) {
216
      this.modelName = other.modelName;
217
    }
218
    if (other.isSetModelNumber()) {
219
      this.modelNumber = other.modelNumber;
220
    }
221
    if (other.isSetCategory()) {
222
      this.category = other.category;
223
    }
224
    if (other.isSetColor()) {
225
      this.color = other.color;
226
    }
227
  }
228
 
229
  public AmazonTransferredSkuDetail deepCopy() {
230
    return new AmazonTransferredSkuDetail(this);
231
  }
232
 
233
  @Override
234
  public void clear() {
235
    setItemIdIsSet(false);
236
    this.itemId = 0;
237
    setPurchaseIdIsSet(false);
238
    this.purchaseId = 0;
239
    setPurchaseDateIsSet(false);
240
    this.purchaseDate = 0;
241
    setQuantityIsSet(false);
242
    this.quantity = 0;
243
    setUnitPriceIsSet(false);
244
    this.unitPrice = 0.0;
245
    this.brand = null;
246
    this.modelName = null;
247
    this.modelNumber = null;
248
    this.category = null;
249
    this.color = null;
250
  }
251
 
252
  public long getItemId() {
253
    return this.itemId;
254
  }
255
 
256
  public void setItemId(long itemId) {
257
    this.itemId = itemId;
258
    setItemIdIsSet(true);
259
  }
260
 
261
  public void unsetItemId() {
262
    __isset_bit_vector.clear(__ITEMID_ISSET_ID);
263
  }
264
 
265
  /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
266
  public boolean isSetItemId() {
267
    return __isset_bit_vector.get(__ITEMID_ISSET_ID);
268
  }
269
 
270
  public void setItemIdIsSet(boolean value) {
271
    __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
272
  }
273
 
274
  public long getPurchaseId() {
275
    return this.purchaseId;
276
  }
277
 
278
  public void setPurchaseId(long purchaseId) {
279
    this.purchaseId = purchaseId;
280
    setPurchaseIdIsSet(true);
281
  }
282
 
283
  public void unsetPurchaseId() {
284
    __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
285
  }
286
 
287
  /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
288
  public boolean isSetPurchaseId() {
289
    return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
290
  }
291
 
292
  public void setPurchaseIdIsSet(boolean value) {
293
    __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
294
  }
295
 
296
  public long getPurchaseDate() {
297
    return this.purchaseDate;
298
  }
299
 
300
  public void setPurchaseDate(long purchaseDate) {
301
    this.purchaseDate = purchaseDate;
302
    setPurchaseDateIsSet(true);
303
  }
304
 
305
  public void unsetPurchaseDate() {
306
    __isset_bit_vector.clear(__PURCHASEDATE_ISSET_ID);
307
  }
308
 
309
  /** Returns true if field purchaseDate is set (has been assigned a value) and false otherwise */
310
  public boolean isSetPurchaseDate() {
311
    return __isset_bit_vector.get(__PURCHASEDATE_ISSET_ID);
312
  }
313
 
314
  public void setPurchaseDateIsSet(boolean value) {
315
    __isset_bit_vector.set(__PURCHASEDATE_ISSET_ID, value);
316
  }
317
 
318
  public long getQuantity() {
319
    return this.quantity;
320
  }
321
 
322
  public void setQuantity(long quantity) {
323
    this.quantity = quantity;
324
    setQuantityIsSet(true);
325
  }
326
 
327
  public void unsetQuantity() {
328
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
329
  }
330
 
331
  /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
332
  public boolean isSetQuantity() {
333
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
334
  }
335
 
336
  public void setQuantityIsSet(boolean value) {
337
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
338
  }
339
 
340
  public double getUnitPrice() {
341
    return this.unitPrice;
342
  }
343
 
344
  public void setUnitPrice(double unitPrice) {
345
    this.unitPrice = unitPrice;
346
    setUnitPriceIsSet(true);
347
  }
348
 
349
  public void unsetUnitPrice() {
350
    __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
351
  }
352
 
353
  /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
354
  public boolean isSetUnitPrice() {
355
    return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
356
  }
357
 
358
  public void setUnitPriceIsSet(boolean value) {
359
    __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
360
  }
361
 
362
  public String getBrand() {
363
    return this.brand;
364
  }
365
 
366
  public void setBrand(String brand) {
367
    this.brand = brand;
368
  }
369
 
370
  public void unsetBrand() {
371
    this.brand = null;
372
  }
373
 
374
  /** Returns true if field brand is set (has been assigned a value) and false otherwise */
375
  public boolean isSetBrand() {
376
    return this.brand != null;
377
  }
378
 
379
  public void setBrandIsSet(boolean value) {
380
    if (!value) {
381
      this.brand = null;
382
    }
383
  }
384
 
385
  public String getModelName() {
386
    return this.modelName;
387
  }
388
 
389
  public void setModelName(String modelName) {
390
    this.modelName = modelName;
391
  }
392
 
393
  public void unsetModelName() {
394
    this.modelName = null;
395
  }
396
 
397
  /** Returns true if field modelName is set (has been assigned a value) and false otherwise */
398
  public boolean isSetModelName() {
399
    return this.modelName != null;
400
  }
401
 
402
  public void setModelNameIsSet(boolean value) {
403
    if (!value) {
404
      this.modelName = null;
405
    }
406
  }
407
 
408
  public String getModelNumber() {
409
    return this.modelNumber;
410
  }
411
 
412
  public void setModelNumber(String modelNumber) {
413
    this.modelNumber = modelNumber;
414
  }
415
 
416
  public void unsetModelNumber() {
417
    this.modelNumber = null;
418
  }
419
 
420
  /** Returns true if field modelNumber is set (has been assigned a value) and false otherwise */
421
  public boolean isSetModelNumber() {
422
    return this.modelNumber != null;
423
  }
424
 
425
  public void setModelNumberIsSet(boolean value) {
426
    if (!value) {
427
      this.modelNumber = null;
428
    }
429
  }
430
 
431
  public String getCategory() {
432
    return this.category;
433
  }
434
 
435
  public void setCategory(String category) {
436
    this.category = category;
437
  }
438
 
439
  public void unsetCategory() {
440
    this.category = null;
441
  }
442
 
443
  /** Returns true if field category is set (has been assigned a value) and false otherwise */
444
  public boolean isSetCategory() {
445
    return this.category != null;
446
  }
447
 
448
  public void setCategoryIsSet(boolean value) {
449
    if (!value) {
450
      this.category = null;
451
    }
452
  }
453
 
454
  public String getColor() {
455
    return this.color;
456
  }
457
 
458
  public void setColor(String color) {
459
    this.color = color;
460
  }
461
 
462
  public void unsetColor() {
463
    this.color = null;
464
  }
465
 
466
  /** Returns true if field color is set (has been assigned a value) and false otherwise */
467
  public boolean isSetColor() {
468
    return this.color != null;
469
  }
470
 
471
  public void setColorIsSet(boolean value) {
472
    if (!value) {
473
      this.color = null;
474
    }
475
  }
476
 
477
  public void setFieldValue(_Fields field, Object value) {
478
    switch (field) {
479
    case ITEM_ID:
480
      if (value == null) {
481
        unsetItemId();
482
      } else {
483
        setItemId((Long)value);
484
      }
485
      break;
486
 
487
    case PURCHASE_ID:
488
      if (value == null) {
489
        unsetPurchaseId();
490
      } else {
491
        setPurchaseId((Long)value);
492
      }
493
      break;
494
 
495
    case PURCHASE_DATE:
496
      if (value == null) {
497
        unsetPurchaseDate();
498
      } else {
499
        setPurchaseDate((Long)value);
500
      }
501
      break;
502
 
503
    case QUANTITY:
504
      if (value == null) {
505
        unsetQuantity();
506
      } else {
507
        setQuantity((Long)value);
508
      }
509
      break;
510
 
511
    case UNIT_PRICE:
512
      if (value == null) {
513
        unsetUnitPrice();
514
      } else {
515
        setUnitPrice((Double)value);
516
      }
517
      break;
518
 
519
    case BRAND:
520
      if (value == null) {
521
        unsetBrand();
522
      } else {
523
        setBrand((String)value);
524
      }
525
      break;
526
 
527
    case MODEL_NAME:
528
      if (value == null) {
529
        unsetModelName();
530
      } else {
531
        setModelName((String)value);
532
      }
533
      break;
534
 
535
    case MODEL_NUMBER:
536
      if (value == null) {
537
        unsetModelNumber();
538
      } else {
539
        setModelNumber((String)value);
540
      }
541
      break;
542
 
543
    case CATEGORY:
544
      if (value == null) {
545
        unsetCategory();
546
      } else {
547
        setCategory((String)value);
548
      }
549
      break;
550
 
551
    case COLOR:
552
      if (value == null) {
553
        unsetColor();
554
      } else {
555
        setColor((String)value);
556
      }
557
      break;
558
 
559
    }
560
  }
561
 
562
  public Object getFieldValue(_Fields field) {
563
    switch (field) {
564
    case ITEM_ID:
565
      return Long.valueOf(getItemId());
566
 
567
    case PURCHASE_ID:
568
      return Long.valueOf(getPurchaseId());
569
 
570
    case PURCHASE_DATE:
571
      return Long.valueOf(getPurchaseDate());
572
 
573
    case QUANTITY:
574
      return Long.valueOf(getQuantity());
575
 
576
    case UNIT_PRICE:
577
      return Double.valueOf(getUnitPrice());
578
 
579
    case BRAND:
580
      return getBrand();
581
 
582
    case MODEL_NAME:
583
      return getModelName();
584
 
585
    case MODEL_NUMBER:
586
      return getModelNumber();
587
 
588
    case CATEGORY:
589
      return getCategory();
590
 
591
    case COLOR:
592
      return getColor();
593
 
594
    }
595
    throw new IllegalStateException();
596
  }
597
 
598
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
599
  public boolean isSet(_Fields field) {
600
    if (field == null) {
601
      throw new IllegalArgumentException();
602
    }
603
 
604
    switch (field) {
605
    case ITEM_ID:
606
      return isSetItemId();
607
    case PURCHASE_ID:
608
      return isSetPurchaseId();
609
    case PURCHASE_DATE:
610
      return isSetPurchaseDate();
611
    case QUANTITY:
612
      return isSetQuantity();
613
    case UNIT_PRICE:
614
      return isSetUnitPrice();
615
    case BRAND:
616
      return isSetBrand();
617
    case MODEL_NAME:
618
      return isSetModelName();
619
    case MODEL_NUMBER:
620
      return isSetModelNumber();
621
    case CATEGORY:
622
      return isSetCategory();
623
    case COLOR:
624
      return isSetColor();
625
    }
626
    throw new IllegalStateException();
627
  }
628
 
629
  @Override
630
  public boolean equals(Object that) {
631
    if (that == null)
632
      return false;
633
    if (that instanceof AmazonTransferredSkuDetail)
634
      return this.equals((AmazonTransferredSkuDetail)that);
635
    return false;
636
  }
637
 
638
  public boolean equals(AmazonTransferredSkuDetail that) {
639
    if (that == null)
640
      return false;
641
 
642
    boolean this_present_itemId = true;
643
    boolean that_present_itemId = true;
644
    if (this_present_itemId || that_present_itemId) {
645
      if (!(this_present_itemId && that_present_itemId))
646
        return false;
647
      if (this.itemId != that.itemId)
648
        return false;
649
    }
650
 
651
    boolean this_present_purchaseId = true;
652
    boolean that_present_purchaseId = true;
653
    if (this_present_purchaseId || that_present_purchaseId) {
654
      if (!(this_present_purchaseId && that_present_purchaseId))
655
        return false;
656
      if (this.purchaseId != that.purchaseId)
657
        return false;
658
    }
659
 
660
    boolean this_present_purchaseDate = true;
661
    boolean that_present_purchaseDate = true;
662
    if (this_present_purchaseDate || that_present_purchaseDate) {
663
      if (!(this_present_purchaseDate && that_present_purchaseDate))
664
        return false;
665
      if (this.purchaseDate != that.purchaseDate)
666
        return false;
667
    }
668
 
669
    boolean this_present_quantity = true;
670
    boolean that_present_quantity = true;
671
    if (this_present_quantity || that_present_quantity) {
672
      if (!(this_present_quantity && that_present_quantity))
673
        return false;
674
      if (this.quantity != that.quantity)
675
        return false;
676
    }
677
 
678
    boolean this_present_unitPrice = true;
679
    boolean that_present_unitPrice = true;
680
    if (this_present_unitPrice || that_present_unitPrice) {
681
      if (!(this_present_unitPrice && that_present_unitPrice))
682
        return false;
683
      if (this.unitPrice != that.unitPrice)
684
        return false;
685
    }
686
 
687
    boolean this_present_brand = true && this.isSetBrand();
688
    boolean that_present_brand = true && that.isSetBrand();
689
    if (this_present_brand || that_present_brand) {
690
      if (!(this_present_brand && that_present_brand))
691
        return false;
692
      if (!this.brand.equals(that.brand))
693
        return false;
694
    }
695
 
696
    boolean this_present_modelName = true && this.isSetModelName();
697
    boolean that_present_modelName = true && that.isSetModelName();
698
    if (this_present_modelName || that_present_modelName) {
699
      if (!(this_present_modelName && that_present_modelName))
700
        return false;
701
      if (!this.modelName.equals(that.modelName))
702
        return false;
703
    }
704
 
705
    boolean this_present_modelNumber = true && this.isSetModelNumber();
706
    boolean that_present_modelNumber = true && that.isSetModelNumber();
707
    if (this_present_modelNumber || that_present_modelNumber) {
708
      if (!(this_present_modelNumber && that_present_modelNumber))
709
        return false;
710
      if (!this.modelNumber.equals(that.modelNumber))
711
        return false;
712
    }
713
 
714
    boolean this_present_category = true && this.isSetCategory();
715
    boolean that_present_category = true && that.isSetCategory();
716
    if (this_present_category || that_present_category) {
717
      if (!(this_present_category && that_present_category))
718
        return false;
719
      if (!this.category.equals(that.category))
720
        return false;
721
    }
722
 
723
    boolean this_present_color = true && this.isSetColor();
724
    boolean that_present_color = true && that.isSetColor();
725
    if (this_present_color || that_present_color) {
726
      if (!(this_present_color && that_present_color))
727
        return false;
728
      if (!this.color.equals(that.color))
729
        return false;
730
    }
731
 
732
    return true;
733
  }
734
 
735
  @Override
736
  public int hashCode() {
737
    return 0;
738
  }
739
 
740
  public int compareTo(AmazonTransferredSkuDetail other) {
741
    if (!getClass().equals(other.getClass())) {
742
      return getClass().getName().compareTo(other.getClass().getName());
743
    }
744
 
745
    int lastComparison = 0;
746
    AmazonTransferredSkuDetail typedOther = (AmazonTransferredSkuDetail)other;
747
 
748
    lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
749
    if (lastComparison != 0) {
750
      return lastComparison;
751
    }
752
    if (isSetItemId()) {
753
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
754
      if (lastComparison != 0) {
755
        return lastComparison;
756
      }
757
    }
758
    lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
759
    if (lastComparison != 0) {
760
      return lastComparison;
761
    }
762
    if (isSetPurchaseId()) {
763
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
764
      if (lastComparison != 0) {
765
        return lastComparison;
766
      }
767
    }
768
    lastComparison = Boolean.valueOf(isSetPurchaseDate()).compareTo(typedOther.isSetPurchaseDate());
769
    if (lastComparison != 0) {
770
      return lastComparison;
771
    }
772
    if (isSetPurchaseDate()) {
773
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseDate, typedOther.purchaseDate);
774
      if (lastComparison != 0) {
775
        return lastComparison;
776
      }
777
    }
778
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
779
    if (lastComparison != 0) {
780
      return lastComparison;
781
    }
782
    if (isSetQuantity()) {
783
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
784
      if (lastComparison != 0) {
785
        return lastComparison;
786
      }
787
    }
788
    lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
789
    if (lastComparison != 0) {
790
      return lastComparison;
791
    }
792
    if (isSetUnitPrice()) {
793
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
794
      if (lastComparison != 0) {
795
        return lastComparison;
796
      }
797
    }
798
    lastComparison = Boolean.valueOf(isSetBrand()).compareTo(typedOther.isSetBrand());
799
    if (lastComparison != 0) {
800
      return lastComparison;
801
    }
802
    if (isSetBrand()) {
803
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.brand, typedOther.brand);
804
      if (lastComparison != 0) {
805
        return lastComparison;
806
      }
807
    }
808
    lastComparison = Boolean.valueOf(isSetModelName()).compareTo(typedOther.isSetModelName());
809
    if (lastComparison != 0) {
810
      return lastComparison;
811
    }
812
    if (isSetModelName()) {
813
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelName, typedOther.modelName);
814
      if (lastComparison != 0) {
815
        return lastComparison;
816
      }
817
    }
818
    lastComparison = Boolean.valueOf(isSetModelNumber()).compareTo(typedOther.isSetModelNumber());
819
    if (lastComparison != 0) {
820
      return lastComparison;
821
    }
822
    if (isSetModelNumber()) {
823
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modelNumber, typedOther.modelNumber);
824
      if (lastComparison != 0) {
825
        return lastComparison;
826
      }
827
    }
828
    lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
829
    if (lastComparison != 0) {
830
      return lastComparison;
831
    }
832
    if (isSetCategory()) {
833
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
834
      if (lastComparison != 0) {
835
        return lastComparison;
836
      }
837
    }
838
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(typedOther.isSetColor());
839
    if (lastComparison != 0) {
840
      return lastComparison;
841
    }
842
    if (isSetColor()) {
843
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.color, typedOther.color);
844
      if (lastComparison != 0) {
845
        return lastComparison;
846
      }
847
    }
848
    return 0;
849
  }
850
 
851
  public _Fields fieldForId(int fieldId) {
852
    return _Fields.findByThriftId(fieldId);
853
  }
854
 
855
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
856
    org.apache.thrift.protocol.TField field;
857
    iprot.readStructBegin();
858
    while (true)
859
    {
860
      field = iprot.readFieldBegin();
861
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
862
        break;
863
      }
864
      switch (field.id) {
865
        case 1: // ITEM_ID
866
          if (field.type == org.apache.thrift.protocol.TType.I64) {
867
            this.itemId = iprot.readI64();
868
            setItemIdIsSet(true);
869
          } else { 
870
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
871
          }
872
          break;
873
        case 2: // PURCHASE_ID
874
          if (field.type == org.apache.thrift.protocol.TType.I64) {
875
            this.purchaseId = iprot.readI64();
876
            setPurchaseIdIsSet(true);
877
          } else { 
878
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
879
          }
880
          break;
881
        case 3: // PURCHASE_DATE
882
          if (field.type == org.apache.thrift.protocol.TType.I64) {
883
            this.purchaseDate = iprot.readI64();
884
            setPurchaseDateIsSet(true);
885
          } else { 
886
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
887
          }
888
          break;
889
        case 4: // QUANTITY
890
          if (field.type == org.apache.thrift.protocol.TType.I64) {
891
            this.quantity = iprot.readI64();
892
            setQuantityIsSet(true);
893
          } else { 
894
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
895
          }
896
          break;
897
        case 5: // UNIT_PRICE
898
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
899
            this.unitPrice = iprot.readDouble();
900
            setUnitPriceIsSet(true);
901
          } else { 
902
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
903
          }
904
          break;
905
        case 6: // BRAND
906
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
907
            this.brand = iprot.readString();
908
          } else { 
909
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
910
          }
911
          break;
912
        case 7: // MODEL_NAME
913
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
914
            this.modelName = iprot.readString();
915
          } else { 
916
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
917
          }
918
          break;
919
        case 8: // MODEL_NUMBER
920
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
921
            this.modelNumber = iprot.readString();
922
          } else { 
923
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
924
          }
925
          break;
926
        case 9: // CATEGORY
927
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
928
            this.category = iprot.readString();
929
          } else { 
930
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
931
          }
932
          break;
933
        case 10: // COLOR
934
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
935
            this.color = iprot.readString();
936
          } else { 
937
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
938
          }
939
          break;
940
        default:
941
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
942
      }
943
      iprot.readFieldEnd();
944
    }
945
    iprot.readStructEnd();
946
    validate();
947
  }
948
 
949
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
950
    validate();
951
 
952
    oprot.writeStructBegin(STRUCT_DESC);
953
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
954
    oprot.writeI64(this.itemId);
955
    oprot.writeFieldEnd();
956
    oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
957
    oprot.writeI64(this.purchaseId);
958
    oprot.writeFieldEnd();
959
    oprot.writeFieldBegin(PURCHASE_DATE_FIELD_DESC);
960
    oprot.writeI64(this.purchaseDate);
961
    oprot.writeFieldEnd();
962
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
963
    oprot.writeI64(this.quantity);
964
    oprot.writeFieldEnd();
965
    oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
966
    oprot.writeDouble(this.unitPrice);
967
    oprot.writeFieldEnd();
968
    if (this.brand != null) {
969
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
970
      oprot.writeString(this.brand);
971
      oprot.writeFieldEnd();
972
    }
973
    if (this.modelName != null) {
974
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
975
      oprot.writeString(this.modelName);
976
      oprot.writeFieldEnd();
977
    }
978
    if (this.modelNumber != null) {
979
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
980
      oprot.writeString(this.modelNumber);
981
      oprot.writeFieldEnd();
982
    }
983
    if (this.category != null) {
984
      oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
985
      oprot.writeString(this.category);
986
      oprot.writeFieldEnd();
987
    }
988
    if (this.color != null) {
989
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
990
      oprot.writeString(this.color);
991
      oprot.writeFieldEnd();
992
    }
993
    oprot.writeFieldStop();
994
    oprot.writeStructEnd();
995
  }
996
 
997
  @Override
998
  public String toString() {
999
    StringBuilder sb = new StringBuilder("AmazonTransferredSkuDetail(");
1000
    boolean first = true;
1001
 
1002
    sb.append("itemId:");
1003
    sb.append(this.itemId);
1004
    first = false;
1005
    if (!first) sb.append(", ");
1006
    sb.append("purchaseId:");
1007
    sb.append(this.purchaseId);
1008
    first = false;
1009
    if (!first) sb.append(", ");
1010
    sb.append("purchaseDate:");
1011
    sb.append(this.purchaseDate);
1012
    first = false;
1013
    if (!first) sb.append(", ");
1014
    sb.append("quantity:");
1015
    sb.append(this.quantity);
1016
    first = false;
1017
    if (!first) sb.append(", ");
1018
    sb.append("unitPrice:");
1019
    sb.append(this.unitPrice);
1020
    first = false;
1021
    if (!first) sb.append(", ");
1022
    sb.append("brand:");
1023
    if (this.brand == null) {
1024
      sb.append("null");
1025
    } else {
1026
      sb.append(this.brand);
1027
    }
1028
    first = false;
1029
    if (!first) sb.append(", ");
1030
    sb.append("modelName:");
1031
    if (this.modelName == null) {
1032
      sb.append("null");
1033
    } else {
1034
      sb.append(this.modelName);
1035
    }
1036
    first = false;
1037
    if (!first) sb.append(", ");
1038
    sb.append("modelNumber:");
1039
    if (this.modelNumber == null) {
1040
      sb.append("null");
1041
    } else {
1042
      sb.append(this.modelNumber);
1043
    }
1044
    first = false;
1045
    if (!first) sb.append(", ");
1046
    sb.append("category:");
1047
    if (this.category == null) {
1048
      sb.append("null");
1049
    } else {
1050
      sb.append(this.category);
1051
    }
1052
    first = false;
1053
    if (!first) sb.append(", ");
1054
    sb.append("color:");
1055
    if (this.color == null) {
1056
      sb.append("null");
1057
    } else {
1058
      sb.append(this.color);
1059
    }
1060
    first = false;
1061
    sb.append(")");
1062
    return sb.toString();
1063
  }
1064
 
1065
  public void validate() throws org.apache.thrift.TException {
1066
    // check for required fields
1067
  }
1068
 
1069
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1070
    try {
1071
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1072
    } catch (org.apache.thrift.TException te) {
1073
      throw new java.io.IOException(te);
1074
    }
1075
  }
1076
 
1077
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1078
    try {
1079
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1080
      __isset_bit_vector = new BitSet(1);
1081
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1082
    } catch (org.apache.thrift.TException te) {
1083
      throw new java.io.IOException(te);
1084
    }
1085
  }
1086
 
1087
}
1088