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 FbaSkuSaleReturnDetail implements org.apache.thrift.TBase<FbaSkuSaleReturnDetail, FbaSkuSaleReturnDetail._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FbaSkuSaleReturnDetail");
25
 
26
  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)1);
27
  private static final org.apache.thrift.protocol.TField TOTAL_SOLD_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalSoldQuantity", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField TOTAL_RETURN_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("totalReturnQuantity", org.apache.thrift.protocol.TType.I64, (short)3);
29
  private static final org.apache.thrift.protocol.TField TOTAL_SELLABLE_RETURN_FIELD_DESC = new org.apache.thrift.protocol.TField("totalSellableReturn", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField TOTAL_NON_SELLABLE_RETURN_FIELD_DESC = new org.apache.thrift.protocol.TField("totalNonSellableReturn", org.apache.thrift.protocol.TType.I64, (short)5);
31
 
32
  private long sku; // required
33
  private long totalSoldQuantity; // required
34
  private long totalReturnQuantity; // required
35
  private long totalSellableReturn; // required
36
  private long totalNonSellableReturn; // required
37
 
38
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
39
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
40
    SKU((short)1, "sku"),
41
    TOTAL_SOLD_QUANTITY((short)2, "totalSoldQuantity"),
42
    TOTAL_RETURN_QUANTITY((short)3, "totalReturnQuantity"),
43
    TOTAL_SELLABLE_RETURN((short)4, "totalSellableReturn"),
44
    TOTAL_NON_SELLABLE_RETURN((short)5, "totalNonSellableReturn");
45
 
46
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
 
48
    static {
49
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
50
        byName.put(field.getFieldName(), field);
51
      }
52
    }
53
 
54
    /**
55
     * Find the _Fields constant that matches fieldId, or null if its not found.
56
     */
57
    public static _Fields findByThriftId(int fieldId) {
58
      switch(fieldId) {
59
        case 1: // SKU
60
          return SKU;
61
        case 2: // TOTAL_SOLD_QUANTITY
62
          return TOTAL_SOLD_QUANTITY;
63
        case 3: // TOTAL_RETURN_QUANTITY
64
          return TOTAL_RETURN_QUANTITY;
65
        case 4: // TOTAL_SELLABLE_RETURN
66
          return TOTAL_SELLABLE_RETURN;
67
        case 5: // TOTAL_NON_SELLABLE_RETURN
68
          return TOTAL_NON_SELLABLE_RETURN;
69
        default:
70
          return null;
71
      }
72
    }
73
 
74
    /**
75
     * Find the _Fields constant that matches fieldId, throwing an exception
76
     * if it is not found.
77
     */
78
    public static _Fields findByThriftIdOrThrow(int fieldId) {
79
      _Fields fields = findByThriftId(fieldId);
80
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
81
      return fields;
82
    }
83
 
84
    /**
85
     * Find the _Fields constant that matches name, or null if its not found.
86
     */
87
    public static _Fields findByName(String name) {
88
      return byName.get(name);
89
    }
90
 
91
    private final short _thriftId;
92
    private final String _fieldName;
93
 
94
    _Fields(short thriftId, String fieldName) {
95
      _thriftId = thriftId;
96
      _fieldName = fieldName;
97
    }
98
 
99
    public short getThriftFieldId() {
100
      return _thriftId;
101
    }
102
 
103
    public String getFieldName() {
104
      return _fieldName;
105
    }
106
  }
107
 
108
  // isset id assignments
109
  private static final int __SKU_ISSET_ID = 0;
110
  private static final int __TOTALSOLDQUANTITY_ISSET_ID = 1;
111
  private static final int __TOTALRETURNQUANTITY_ISSET_ID = 2;
112
  private static final int __TOTALSELLABLERETURN_ISSET_ID = 3;
113
  private static final int __TOTALNONSELLABLERETURN_ISSET_ID = 4;
114
  private BitSet __isset_bit_vector = new BitSet(5);
115
 
116
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
117
  static {
118
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
119
    tmpMap.put(_Fields.SKU, new org.apache.thrift.meta_data.FieldMetaData("sku", org.apache.thrift.TFieldRequirementType.DEFAULT, 
120
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
121
    tmpMap.put(_Fields.TOTAL_SOLD_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("totalSoldQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
122
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
123
    tmpMap.put(_Fields.TOTAL_RETURN_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("totalReturnQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
125
    tmpMap.put(_Fields.TOTAL_SELLABLE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("totalSellableReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
127
    tmpMap.put(_Fields.TOTAL_NON_SELLABLE_RETURN, new org.apache.thrift.meta_data.FieldMetaData("totalNonSellableReturn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
129
    metaDataMap = Collections.unmodifiableMap(tmpMap);
130
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FbaSkuSaleReturnDetail.class, metaDataMap);
131
  }
132
 
133
  public FbaSkuSaleReturnDetail() {
134
  }
135
 
136
  public FbaSkuSaleReturnDetail(
137
    long sku,
138
    long totalSoldQuantity,
139
    long totalReturnQuantity,
140
    long totalSellableReturn,
141
    long totalNonSellableReturn)
142
  {
143
    this();
144
    this.sku = sku;
145
    setSkuIsSet(true);
146
    this.totalSoldQuantity = totalSoldQuantity;
147
    setTotalSoldQuantityIsSet(true);
148
    this.totalReturnQuantity = totalReturnQuantity;
149
    setTotalReturnQuantityIsSet(true);
150
    this.totalSellableReturn = totalSellableReturn;
151
    setTotalSellableReturnIsSet(true);
152
    this.totalNonSellableReturn = totalNonSellableReturn;
153
    setTotalNonSellableReturnIsSet(true);
154
  }
155
 
156
  /**
157
   * Performs a deep copy on <i>other</i>.
158
   */
159
  public FbaSkuSaleReturnDetail(FbaSkuSaleReturnDetail other) {
160
    __isset_bit_vector.clear();
161
    __isset_bit_vector.or(other.__isset_bit_vector);
162
    this.sku = other.sku;
163
    this.totalSoldQuantity = other.totalSoldQuantity;
164
    this.totalReturnQuantity = other.totalReturnQuantity;
165
    this.totalSellableReturn = other.totalSellableReturn;
166
    this.totalNonSellableReturn = other.totalNonSellableReturn;
167
  }
168
 
169
  public FbaSkuSaleReturnDetail deepCopy() {
170
    return new FbaSkuSaleReturnDetail(this);
171
  }
172
 
173
  @Override
174
  public void clear() {
175
    setSkuIsSet(false);
176
    this.sku = 0;
177
    setTotalSoldQuantityIsSet(false);
178
    this.totalSoldQuantity = 0;
179
    setTotalReturnQuantityIsSet(false);
180
    this.totalReturnQuantity = 0;
181
    setTotalSellableReturnIsSet(false);
182
    this.totalSellableReturn = 0;
183
    setTotalNonSellableReturnIsSet(false);
184
    this.totalNonSellableReturn = 0;
185
  }
186
 
187
  public long getSku() {
188
    return this.sku;
189
  }
190
 
191
  public void setSku(long sku) {
192
    this.sku = sku;
193
    setSkuIsSet(true);
194
  }
195
 
196
  public void unsetSku() {
197
    __isset_bit_vector.clear(__SKU_ISSET_ID);
198
  }
199
 
200
  /** Returns true if field sku is set (has been assigned a value) and false otherwise */
201
  public boolean isSetSku() {
202
    return __isset_bit_vector.get(__SKU_ISSET_ID);
203
  }
204
 
205
  public void setSkuIsSet(boolean value) {
206
    __isset_bit_vector.set(__SKU_ISSET_ID, value);
207
  }
208
 
209
  public long getTotalSoldQuantity() {
210
    return this.totalSoldQuantity;
211
  }
212
 
213
  public void setTotalSoldQuantity(long totalSoldQuantity) {
214
    this.totalSoldQuantity = totalSoldQuantity;
215
    setTotalSoldQuantityIsSet(true);
216
  }
217
 
218
  public void unsetTotalSoldQuantity() {
219
    __isset_bit_vector.clear(__TOTALSOLDQUANTITY_ISSET_ID);
220
  }
221
 
222
  /** Returns true if field totalSoldQuantity is set (has been assigned a value) and false otherwise */
223
  public boolean isSetTotalSoldQuantity() {
224
    return __isset_bit_vector.get(__TOTALSOLDQUANTITY_ISSET_ID);
225
  }
226
 
227
  public void setTotalSoldQuantityIsSet(boolean value) {
228
    __isset_bit_vector.set(__TOTALSOLDQUANTITY_ISSET_ID, value);
229
  }
230
 
231
  public long getTotalReturnQuantity() {
232
    return this.totalReturnQuantity;
233
  }
234
 
235
  public void setTotalReturnQuantity(long totalReturnQuantity) {
236
    this.totalReturnQuantity = totalReturnQuantity;
237
    setTotalReturnQuantityIsSet(true);
238
  }
239
 
240
  public void unsetTotalReturnQuantity() {
241
    __isset_bit_vector.clear(__TOTALRETURNQUANTITY_ISSET_ID);
242
  }
243
 
244
  /** Returns true if field totalReturnQuantity is set (has been assigned a value) and false otherwise */
245
  public boolean isSetTotalReturnQuantity() {
246
    return __isset_bit_vector.get(__TOTALRETURNQUANTITY_ISSET_ID);
247
  }
248
 
249
  public void setTotalReturnQuantityIsSet(boolean value) {
250
    __isset_bit_vector.set(__TOTALRETURNQUANTITY_ISSET_ID, value);
251
  }
252
 
253
  public long getTotalSellableReturn() {
254
    return this.totalSellableReturn;
255
  }
256
 
257
  public void setTotalSellableReturn(long totalSellableReturn) {
258
    this.totalSellableReturn = totalSellableReturn;
259
    setTotalSellableReturnIsSet(true);
260
  }
261
 
262
  public void unsetTotalSellableReturn() {
263
    __isset_bit_vector.clear(__TOTALSELLABLERETURN_ISSET_ID);
264
  }
265
 
266
  /** Returns true if field totalSellableReturn is set (has been assigned a value) and false otherwise */
267
  public boolean isSetTotalSellableReturn() {
268
    return __isset_bit_vector.get(__TOTALSELLABLERETURN_ISSET_ID);
269
  }
270
 
271
  public void setTotalSellableReturnIsSet(boolean value) {
272
    __isset_bit_vector.set(__TOTALSELLABLERETURN_ISSET_ID, value);
273
  }
274
 
275
  public long getTotalNonSellableReturn() {
276
    return this.totalNonSellableReturn;
277
  }
278
 
279
  public void setTotalNonSellableReturn(long totalNonSellableReturn) {
280
    this.totalNonSellableReturn = totalNonSellableReturn;
281
    setTotalNonSellableReturnIsSet(true);
282
  }
283
 
284
  public void unsetTotalNonSellableReturn() {
285
    __isset_bit_vector.clear(__TOTALNONSELLABLERETURN_ISSET_ID);
286
  }
287
 
288
  /** Returns true if field totalNonSellableReturn is set (has been assigned a value) and false otherwise */
289
  public boolean isSetTotalNonSellableReturn() {
290
    return __isset_bit_vector.get(__TOTALNONSELLABLERETURN_ISSET_ID);
291
  }
292
 
293
  public void setTotalNonSellableReturnIsSet(boolean value) {
294
    __isset_bit_vector.set(__TOTALNONSELLABLERETURN_ISSET_ID, value);
295
  }
296
 
297
  public void setFieldValue(_Fields field, Object value) {
298
    switch (field) {
299
    case SKU:
300
      if (value == null) {
301
        unsetSku();
302
      } else {
303
        setSku((Long)value);
304
      }
305
      break;
306
 
307
    case TOTAL_SOLD_QUANTITY:
308
      if (value == null) {
309
        unsetTotalSoldQuantity();
310
      } else {
311
        setTotalSoldQuantity((Long)value);
312
      }
313
      break;
314
 
315
    case TOTAL_RETURN_QUANTITY:
316
      if (value == null) {
317
        unsetTotalReturnQuantity();
318
      } else {
319
        setTotalReturnQuantity((Long)value);
320
      }
321
      break;
322
 
323
    case TOTAL_SELLABLE_RETURN:
324
      if (value == null) {
325
        unsetTotalSellableReturn();
326
      } else {
327
        setTotalSellableReturn((Long)value);
328
      }
329
      break;
330
 
331
    case TOTAL_NON_SELLABLE_RETURN:
332
      if (value == null) {
333
        unsetTotalNonSellableReturn();
334
      } else {
335
        setTotalNonSellableReturn((Long)value);
336
      }
337
      break;
338
 
339
    }
340
  }
341
 
342
  public Object getFieldValue(_Fields field) {
343
    switch (field) {
344
    case SKU:
345
      return Long.valueOf(getSku());
346
 
347
    case TOTAL_SOLD_QUANTITY:
348
      return Long.valueOf(getTotalSoldQuantity());
349
 
350
    case TOTAL_RETURN_QUANTITY:
351
      return Long.valueOf(getTotalReturnQuantity());
352
 
353
    case TOTAL_SELLABLE_RETURN:
354
      return Long.valueOf(getTotalSellableReturn());
355
 
356
    case TOTAL_NON_SELLABLE_RETURN:
357
      return Long.valueOf(getTotalNonSellableReturn());
358
 
359
    }
360
    throw new IllegalStateException();
361
  }
362
 
363
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
364
  public boolean isSet(_Fields field) {
365
    if (field == null) {
366
      throw new IllegalArgumentException();
367
    }
368
 
369
    switch (field) {
370
    case SKU:
371
      return isSetSku();
372
    case TOTAL_SOLD_QUANTITY:
373
      return isSetTotalSoldQuantity();
374
    case TOTAL_RETURN_QUANTITY:
375
      return isSetTotalReturnQuantity();
376
    case TOTAL_SELLABLE_RETURN:
377
      return isSetTotalSellableReturn();
378
    case TOTAL_NON_SELLABLE_RETURN:
379
      return isSetTotalNonSellableReturn();
380
    }
381
    throw new IllegalStateException();
382
  }
383
 
384
  @Override
385
  public boolean equals(Object that) {
386
    if (that == null)
387
      return false;
388
    if (that instanceof FbaSkuSaleReturnDetail)
389
      return this.equals((FbaSkuSaleReturnDetail)that);
390
    return false;
391
  }
392
 
393
  public boolean equals(FbaSkuSaleReturnDetail that) {
394
    if (that == null)
395
      return false;
396
 
397
    boolean this_present_sku = true;
398
    boolean that_present_sku = true;
399
    if (this_present_sku || that_present_sku) {
400
      if (!(this_present_sku && that_present_sku))
401
        return false;
402
      if (this.sku != that.sku)
403
        return false;
404
    }
405
 
406
    boolean this_present_totalSoldQuantity = true;
407
    boolean that_present_totalSoldQuantity = true;
408
    if (this_present_totalSoldQuantity || that_present_totalSoldQuantity) {
409
      if (!(this_present_totalSoldQuantity && that_present_totalSoldQuantity))
410
        return false;
411
      if (this.totalSoldQuantity != that.totalSoldQuantity)
412
        return false;
413
    }
414
 
415
    boolean this_present_totalReturnQuantity = true;
416
    boolean that_present_totalReturnQuantity = true;
417
    if (this_present_totalReturnQuantity || that_present_totalReturnQuantity) {
418
      if (!(this_present_totalReturnQuantity && that_present_totalReturnQuantity))
419
        return false;
420
      if (this.totalReturnQuantity != that.totalReturnQuantity)
421
        return false;
422
    }
423
 
424
    boolean this_present_totalSellableReturn = true;
425
    boolean that_present_totalSellableReturn = true;
426
    if (this_present_totalSellableReturn || that_present_totalSellableReturn) {
427
      if (!(this_present_totalSellableReturn && that_present_totalSellableReturn))
428
        return false;
429
      if (this.totalSellableReturn != that.totalSellableReturn)
430
        return false;
431
    }
432
 
433
    boolean this_present_totalNonSellableReturn = true;
434
    boolean that_present_totalNonSellableReturn = true;
435
    if (this_present_totalNonSellableReturn || that_present_totalNonSellableReturn) {
436
      if (!(this_present_totalNonSellableReturn && that_present_totalNonSellableReturn))
437
        return false;
438
      if (this.totalNonSellableReturn != that.totalNonSellableReturn)
439
        return false;
440
    }
441
 
442
    return true;
443
  }
444
 
445
  @Override
446
  public int hashCode() {
447
    return 0;
448
  }
449
 
450
  public int compareTo(FbaSkuSaleReturnDetail other) {
451
    if (!getClass().equals(other.getClass())) {
452
      return getClass().getName().compareTo(other.getClass().getName());
453
    }
454
 
455
    int lastComparison = 0;
456
    FbaSkuSaleReturnDetail typedOther = (FbaSkuSaleReturnDetail)other;
457
 
458
    lastComparison = Boolean.valueOf(isSetSku()).compareTo(typedOther.isSetSku());
459
    if (lastComparison != 0) {
460
      return lastComparison;
461
    }
462
    if (isSetSku()) {
463
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sku, typedOther.sku);
464
      if (lastComparison != 0) {
465
        return lastComparison;
466
      }
467
    }
468
    lastComparison = Boolean.valueOf(isSetTotalSoldQuantity()).compareTo(typedOther.isSetTotalSoldQuantity());
469
    if (lastComparison != 0) {
470
      return lastComparison;
471
    }
472
    if (isSetTotalSoldQuantity()) {
473
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalSoldQuantity, typedOther.totalSoldQuantity);
474
      if (lastComparison != 0) {
475
        return lastComparison;
476
      }
477
    }
478
    lastComparison = Boolean.valueOf(isSetTotalReturnQuantity()).compareTo(typedOther.isSetTotalReturnQuantity());
479
    if (lastComparison != 0) {
480
      return lastComparison;
481
    }
482
    if (isSetTotalReturnQuantity()) {
483
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalReturnQuantity, typedOther.totalReturnQuantity);
484
      if (lastComparison != 0) {
485
        return lastComparison;
486
      }
487
    }
488
    lastComparison = Boolean.valueOf(isSetTotalSellableReturn()).compareTo(typedOther.isSetTotalSellableReturn());
489
    if (lastComparison != 0) {
490
      return lastComparison;
491
    }
492
    if (isSetTotalSellableReturn()) {
493
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalSellableReturn, typedOther.totalSellableReturn);
494
      if (lastComparison != 0) {
495
        return lastComparison;
496
      }
497
    }
498
    lastComparison = Boolean.valueOf(isSetTotalNonSellableReturn()).compareTo(typedOther.isSetTotalNonSellableReturn());
499
    if (lastComparison != 0) {
500
      return lastComparison;
501
    }
502
    if (isSetTotalNonSellableReturn()) {
503
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalNonSellableReturn, typedOther.totalNonSellableReturn);
504
      if (lastComparison != 0) {
505
        return lastComparison;
506
      }
507
    }
508
    return 0;
509
  }
510
 
511
  public _Fields fieldForId(int fieldId) {
512
    return _Fields.findByThriftId(fieldId);
513
  }
514
 
515
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
516
    org.apache.thrift.protocol.TField field;
517
    iprot.readStructBegin();
518
    while (true)
519
    {
520
      field = iprot.readFieldBegin();
521
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
522
        break;
523
      }
524
      switch (field.id) {
525
        case 1: // SKU
526
          if (field.type == org.apache.thrift.protocol.TType.I64) {
527
            this.sku = iprot.readI64();
528
            setSkuIsSet(true);
529
          } else { 
530
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
531
          }
532
          break;
533
        case 2: // TOTAL_SOLD_QUANTITY
534
          if (field.type == org.apache.thrift.protocol.TType.I64) {
535
            this.totalSoldQuantity = iprot.readI64();
536
            setTotalSoldQuantityIsSet(true);
537
          } else { 
538
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
539
          }
540
          break;
541
        case 3: // TOTAL_RETURN_QUANTITY
542
          if (field.type == org.apache.thrift.protocol.TType.I64) {
543
            this.totalReturnQuantity = iprot.readI64();
544
            setTotalReturnQuantityIsSet(true);
545
          } else { 
546
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
547
          }
548
          break;
549
        case 4: // TOTAL_SELLABLE_RETURN
550
          if (field.type == org.apache.thrift.protocol.TType.I64) {
551
            this.totalSellableReturn = iprot.readI64();
552
            setTotalSellableReturnIsSet(true);
553
          } else { 
554
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
555
          }
556
          break;
557
        case 5: // TOTAL_NON_SELLABLE_RETURN
558
          if (field.type == org.apache.thrift.protocol.TType.I64) {
559
            this.totalNonSellableReturn = iprot.readI64();
560
            setTotalNonSellableReturnIsSet(true);
561
          } else { 
562
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
563
          }
564
          break;
565
        default:
566
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
567
      }
568
      iprot.readFieldEnd();
569
    }
570
    iprot.readStructEnd();
571
    validate();
572
  }
573
 
574
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
575
    validate();
576
 
577
    oprot.writeStructBegin(STRUCT_DESC);
578
    oprot.writeFieldBegin(SKU_FIELD_DESC);
579
    oprot.writeI64(this.sku);
580
    oprot.writeFieldEnd();
581
    oprot.writeFieldBegin(TOTAL_SOLD_QUANTITY_FIELD_DESC);
582
    oprot.writeI64(this.totalSoldQuantity);
583
    oprot.writeFieldEnd();
584
    oprot.writeFieldBegin(TOTAL_RETURN_QUANTITY_FIELD_DESC);
585
    oprot.writeI64(this.totalReturnQuantity);
586
    oprot.writeFieldEnd();
587
    oprot.writeFieldBegin(TOTAL_SELLABLE_RETURN_FIELD_DESC);
588
    oprot.writeI64(this.totalSellableReturn);
589
    oprot.writeFieldEnd();
590
    oprot.writeFieldBegin(TOTAL_NON_SELLABLE_RETURN_FIELD_DESC);
591
    oprot.writeI64(this.totalNonSellableReturn);
592
    oprot.writeFieldEnd();
593
    oprot.writeFieldStop();
594
    oprot.writeStructEnd();
595
  }
596
 
597
  @Override
598
  public String toString() {
599
    StringBuilder sb = new StringBuilder("FbaSkuSaleReturnDetail(");
600
    boolean first = true;
601
 
602
    sb.append("sku:");
603
    sb.append(this.sku);
604
    first = false;
605
    if (!first) sb.append(", ");
606
    sb.append("totalSoldQuantity:");
607
    sb.append(this.totalSoldQuantity);
608
    first = false;
609
    if (!first) sb.append(", ");
610
    sb.append("totalReturnQuantity:");
611
    sb.append(this.totalReturnQuantity);
612
    first = false;
613
    if (!first) sb.append(", ");
614
    sb.append("totalSellableReturn:");
615
    sb.append(this.totalSellableReturn);
616
    first = false;
617
    if (!first) sb.append(", ");
618
    sb.append("totalNonSellableReturn:");
619
    sb.append(this.totalNonSellableReturn);
620
    first = false;
621
    sb.append(")");
622
    return sb.toString();
623
  }
624
 
625
  public void validate() throws org.apache.thrift.TException {
626
    // check for required fields
627
  }
628
 
629
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
630
    try {
631
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
632
    } catch (org.apache.thrift.TException te) {
633
      throw new java.io.IOException(te);
634
    }
635
  }
636
 
637
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
638
    try {
639
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
640
      __isset_bit_vector = new BitSet(1);
641
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
642
    } catch (org.apache.thrift.TException te) {
643
      throw new java.io.IOException(te);
644
    }
645
  }
646
 
647
}
648