Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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