Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8532 vikram.rag 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 FbaItemPrices implements org.apache.thrift.TBase<FbaItemPrices, FbaItemPrices._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FbaItemPrices");
25
 
26
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField MIN_FBA_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("minFbaPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
28
  private static final org.apache.thrift.protocol.TField MIN_MFN_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("minMfnPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
29
  private static final org.apache.thrift.protocol.TField OUR_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
30
  private static final org.apache.thrift.protocol.TField SALE_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("salePrice", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
31
  private static final org.apache.thrift.protocol.TField MIN_FBA_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minFbaPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)6);
32
  private static final org.apache.thrift.protocol.TField MIN_MFN_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("minMfnPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField OUR_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ourPriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)8);
34
  private static final org.apache.thrift.protocol.TField SALE_PRICE_SNAPSHOT_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("salePriceSnapshotDate", org.apache.thrift.protocol.TType.I64, (short)9);
35
 
36
  private long item_id; // required
37
  private double minFbaPrice; // required
38
  private double minMfnPrice; // required
39
  private double ourPrice; // required
40
  private double salePrice; // required
41
  private long minFbaPriceSnapshotDate; // required
42
  private long minMfnPriceSnapshotDate; // required
43
  private long ourPriceSnapshotDate; // required
44
  private long salePriceSnapshotDate; // required
45
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
48
    ITEM_ID((short)1, "item_id"),
49
    MIN_FBA_PRICE((short)2, "minFbaPrice"),
50
    MIN_MFN_PRICE((short)3, "minMfnPrice"),
51
    OUR_PRICE((short)4, "ourPrice"),
52
    SALE_PRICE((short)5, "salePrice"),
53
    MIN_FBA_PRICE_SNAPSHOT_DATE((short)6, "minFbaPriceSnapshotDate"),
54
    MIN_MFN_PRICE_SNAPSHOT_DATE((short)7, "minMfnPriceSnapshotDate"),
55
    OUR_PRICE_SNAPSHOT_DATE((short)8, "ourPriceSnapshotDate"),
56
    SALE_PRICE_SNAPSHOT_DATE((short)9, "salePriceSnapshotDate");
57
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
60
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
        byName.put(field.getFieldName(), field);
63
      }
64
    }
65
 
66
    /**
67
     * Find the _Fields constant that matches fieldId, or null if its not found.
68
     */
69
    public static _Fields findByThriftId(int fieldId) {
70
      switch(fieldId) {
71
        case 1: // ITEM_ID
72
          return ITEM_ID;
73
        case 2: // MIN_FBA_PRICE
74
          return MIN_FBA_PRICE;
75
        case 3: // MIN_MFN_PRICE
76
          return MIN_MFN_PRICE;
77
        case 4: // OUR_PRICE
78
          return OUR_PRICE;
79
        case 5: // SALE_PRICE
80
          return SALE_PRICE;
81
        case 6: // MIN_FBA_PRICE_SNAPSHOT_DATE
82
          return MIN_FBA_PRICE_SNAPSHOT_DATE;
83
        case 7: // MIN_MFN_PRICE_SNAPSHOT_DATE
84
          return MIN_MFN_PRICE_SNAPSHOT_DATE;
85
        case 8: // OUR_PRICE_SNAPSHOT_DATE
86
          return OUR_PRICE_SNAPSHOT_DATE;
87
        case 9: // SALE_PRICE_SNAPSHOT_DATE
88
          return SALE_PRICE_SNAPSHOT_DATE;
89
        default:
90
          return null;
91
      }
92
    }
93
 
94
    /**
95
     * Find the _Fields constant that matches fieldId, throwing an exception
96
     * if it is not found.
97
     */
98
    public static _Fields findByThriftIdOrThrow(int fieldId) {
99
      _Fields fields = findByThriftId(fieldId);
100
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
101
      return fields;
102
    }
103
 
104
    /**
105
     * Find the _Fields constant that matches name, or null if its not found.
106
     */
107
    public static _Fields findByName(String name) {
108
      return byName.get(name);
109
    }
110
 
111
    private final short _thriftId;
112
    private final String _fieldName;
113
 
114
    _Fields(short thriftId, String fieldName) {
115
      _thriftId = thriftId;
116
      _fieldName = fieldName;
117
    }
118
 
119
    public short getThriftFieldId() {
120
      return _thriftId;
121
    }
122
 
123
    public String getFieldName() {
124
      return _fieldName;
125
    }
126
  }
127
 
128
  // isset id assignments
129
  private static final int __ITEM_ID_ISSET_ID = 0;
130
  private static final int __MINFBAPRICE_ISSET_ID = 1;
131
  private static final int __MINMFNPRICE_ISSET_ID = 2;
132
  private static final int __OURPRICE_ISSET_ID = 3;
133
  private static final int __SALEPRICE_ISSET_ID = 4;
134
  private static final int __MINFBAPRICESNAPSHOTDATE_ISSET_ID = 5;
135
  private static final int __MINMFNPRICESNAPSHOTDATE_ISSET_ID = 6;
136
  private static final int __OURPRICESNAPSHOTDATE_ISSET_ID = 7;
137
  private static final int __SALEPRICESNAPSHOTDATE_ISSET_ID = 8;
138
  private BitSet __isset_bit_vector = new BitSet(9);
139
 
140
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
141
  static {
142
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
143
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
145
    tmpMap.put(_Fields.MIN_FBA_PRICE, new org.apache.thrift.meta_data.FieldMetaData("minFbaPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
147
    tmpMap.put(_Fields.MIN_MFN_PRICE, new org.apache.thrift.meta_data.FieldMetaData("minMfnPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
149
    tmpMap.put(_Fields.OUR_PRICE, new org.apache.thrift.meta_data.FieldMetaData("ourPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
151
    tmpMap.put(_Fields.SALE_PRICE, new org.apache.thrift.meta_data.FieldMetaData("salePrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
152
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
153
    tmpMap.put(_Fields.MIN_FBA_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("minFbaPriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
154
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
155
    tmpMap.put(_Fields.MIN_MFN_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("minMfnPriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
156
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
157
    tmpMap.put(_Fields.OUR_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("ourPriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
158
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
159
    tmpMap.put(_Fields.SALE_PRICE_SNAPSHOT_DATE, new org.apache.thrift.meta_data.FieldMetaData("salePriceSnapshotDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
160
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
161
    metaDataMap = Collections.unmodifiableMap(tmpMap);
162
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FbaItemPrices.class, metaDataMap);
163
  }
164
 
165
  public FbaItemPrices() {
166
  }
167
 
168
  public FbaItemPrices(
169
    long item_id,
170
    double minFbaPrice,
171
    double minMfnPrice,
172
    double ourPrice,
173
    double salePrice,
174
    long minFbaPriceSnapshotDate,
175
    long minMfnPriceSnapshotDate,
176
    long ourPriceSnapshotDate,
177
    long salePriceSnapshotDate)
178
  {
179
    this();
180
    this.item_id = item_id;
181
    setItem_idIsSet(true);
182
    this.minFbaPrice = minFbaPrice;
183
    setMinFbaPriceIsSet(true);
184
    this.minMfnPrice = minMfnPrice;
185
    setMinMfnPriceIsSet(true);
186
    this.ourPrice = ourPrice;
187
    setOurPriceIsSet(true);
188
    this.salePrice = salePrice;
189
    setSalePriceIsSet(true);
190
    this.minFbaPriceSnapshotDate = minFbaPriceSnapshotDate;
191
    setMinFbaPriceSnapshotDateIsSet(true);
192
    this.minMfnPriceSnapshotDate = minMfnPriceSnapshotDate;
193
    setMinMfnPriceSnapshotDateIsSet(true);
194
    this.ourPriceSnapshotDate = ourPriceSnapshotDate;
195
    setOurPriceSnapshotDateIsSet(true);
196
    this.salePriceSnapshotDate = salePriceSnapshotDate;
197
    setSalePriceSnapshotDateIsSet(true);
198
  }
199
 
200
  /**
201
   * Performs a deep copy on <i>other</i>.
202
   */
203
  public FbaItemPrices(FbaItemPrices other) {
204
    __isset_bit_vector.clear();
205
    __isset_bit_vector.or(other.__isset_bit_vector);
206
    this.item_id = other.item_id;
207
    this.minFbaPrice = other.minFbaPrice;
208
    this.minMfnPrice = other.minMfnPrice;
209
    this.ourPrice = other.ourPrice;
210
    this.salePrice = other.salePrice;
211
    this.minFbaPriceSnapshotDate = other.minFbaPriceSnapshotDate;
212
    this.minMfnPriceSnapshotDate = other.minMfnPriceSnapshotDate;
213
    this.ourPriceSnapshotDate = other.ourPriceSnapshotDate;
214
    this.salePriceSnapshotDate = other.salePriceSnapshotDate;
215
  }
216
 
217
  public FbaItemPrices deepCopy() {
218
    return new FbaItemPrices(this);
219
  }
220
 
221
  @Override
222
  public void clear() {
223
    setItem_idIsSet(false);
224
    this.item_id = 0;
225
    setMinFbaPriceIsSet(false);
226
    this.minFbaPrice = 0.0;
227
    setMinMfnPriceIsSet(false);
228
    this.minMfnPrice = 0.0;
229
    setOurPriceIsSet(false);
230
    this.ourPrice = 0.0;
231
    setSalePriceIsSet(false);
232
    this.salePrice = 0.0;
233
    setMinFbaPriceSnapshotDateIsSet(false);
234
    this.minFbaPriceSnapshotDate = 0;
235
    setMinMfnPriceSnapshotDateIsSet(false);
236
    this.minMfnPriceSnapshotDate = 0;
237
    setOurPriceSnapshotDateIsSet(false);
238
    this.ourPriceSnapshotDate = 0;
239
    setSalePriceSnapshotDateIsSet(false);
240
    this.salePriceSnapshotDate = 0;
241
  }
242
 
243
  public long getItem_id() {
244
    return this.item_id;
245
  }
246
 
247
  public void setItem_id(long item_id) {
248
    this.item_id = item_id;
249
    setItem_idIsSet(true);
250
  }
251
 
252
  public void unsetItem_id() {
253
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
254
  }
255
 
256
  /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
257
  public boolean isSetItem_id() {
258
    return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
259
  }
260
 
261
  public void setItem_idIsSet(boolean value) {
262
    __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
263
  }
264
 
265
  public double getMinFbaPrice() {
266
    return this.minFbaPrice;
267
  }
268
 
269
  public void setMinFbaPrice(double minFbaPrice) {
270
    this.minFbaPrice = minFbaPrice;
271
    setMinFbaPriceIsSet(true);
272
  }
273
 
274
  public void unsetMinFbaPrice() {
275
    __isset_bit_vector.clear(__MINFBAPRICE_ISSET_ID);
276
  }
277
 
278
  /** Returns true if field minFbaPrice is set (has been assigned a value) and false otherwise */
279
  public boolean isSetMinFbaPrice() {
280
    return __isset_bit_vector.get(__MINFBAPRICE_ISSET_ID);
281
  }
282
 
283
  public void setMinFbaPriceIsSet(boolean value) {
284
    __isset_bit_vector.set(__MINFBAPRICE_ISSET_ID, value);
285
  }
286
 
287
  public double getMinMfnPrice() {
288
    return this.minMfnPrice;
289
  }
290
 
291
  public void setMinMfnPrice(double minMfnPrice) {
292
    this.minMfnPrice = minMfnPrice;
293
    setMinMfnPriceIsSet(true);
294
  }
295
 
296
  public void unsetMinMfnPrice() {
297
    __isset_bit_vector.clear(__MINMFNPRICE_ISSET_ID);
298
  }
299
 
300
  /** Returns true if field minMfnPrice is set (has been assigned a value) and false otherwise */
301
  public boolean isSetMinMfnPrice() {
302
    return __isset_bit_vector.get(__MINMFNPRICE_ISSET_ID);
303
  }
304
 
305
  public void setMinMfnPriceIsSet(boolean value) {
306
    __isset_bit_vector.set(__MINMFNPRICE_ISSET_ID, value);
307
  }
308
 
309
  public double getOurPrice() {
310
    return this.ourPrice;
311
  }
312
 
313
  public void setOurPrice(double ourPrice) {
314
    this.ourPrice = ourPrice;
315
    setOurPriceIsSet(true);
316
  }
317
 
318
  public void unsetOurPrice() {
319
    __isset_bit_vector.clear(__OURPRICE_ISSET_ID);
320
  }
321
 
322
  /** Returns true if field ourPrice is set (has been assigned a value) and false otherwise */
323
  public boolean isSetOurPrice() {
324
    return __isset_bit_vector.get(__OURPRICE_ISSET_ID);
325
  }
326
 
327
  public void setOurPriceIsSet(boolean value) {
328
    __isset_bit_vector.set(__OURPRICE_ISSET_ID, value);
329
  }
330
 
331
  public double getSalePrice() {
332
    return this.salePrice;
333
  }
334
 
335
  public void setSalePrice(double salePrice) {
336
    this.salePrice = salePrice;
337
    setSalePriceIsSet(true);
338
  }
339
 
340
  public void unsetSalePrice() {
341
    __isset_bit_vector.clear(__SALEPRICE_ISSET_ID);
342
  }
343
 
344
  /** Returns true if field salePrice is set (has been assigned a value) and false otherwise */
345
  public boolean isSetSalePrice() {
346
    return __isset_bit_vector.get(__SALEPRICE_ISSET_ID);
347
  }
348
 
349
  public void setSalePriceIsSet(boolean value) {
350
    __isset_bit_vector.set(__SALEPRICE_ISSET_ID, value);
351
  }
352
 
353
  public long getMinFbaPriceSnapshotDate() {
354
    return this.minFbaPriceSnapshotDate;
355
  }
356
 
357
  public void setMinFbaPriceSnapshotDate(long minFbaPriceSnapshotDate) {
358
    this.minFbaPriceSnapshotDate = minFbaPriceSnapshotDate;
359
    setMinFbaPriceSnapshotDateIsSet(true);
360
  }
361
 
362
  public void unsetMinFbaPriceSnapshotDate() {
363
    __isset_bit_vector.clear(__MINFBAPRICESNAPSHOTDATE_ISSET_ID);
364
  }
365
 
366
  /** Returns true if field minFbaPriceSnapshotDate is set (has been assigned a value) and false otherwise */
367
  public boolean isSetMinFbaPriceSnapshotDate() {
368
    return __isset_bit_vector.get(__MINFBAPRICESNAPSHOTDATE_ISSET_ID);
369
  }
370
 
371
  public void setMinFbaPriceSnapshotDateIsSet(boolean value) {
372
    __isset_bit_vector.set(__MINFBAPRICESNAPSHOTDATE_ISSET_ID, value);
373
  }
374
 
375
  public long getMinMfnPriceSnapshotDate() {
376
    return this.minMfnPriceSnapshotDate;
377
  }
378
 
379
  public void setMinMfnPriceSnapshotDate(long minMfnPriceSnapshotDate) {
380
    this.minMfnPriceSnapshotDate = minMfnPriceSnapshotDate;
381
    setMinMfnPriceSnapshotDateIsSet(true);
382
  }
383
 
384
  public void unsetMinMfnPriceSnapshotDate() {
385
    __isset_bit_vector.clear(__MINMFNPRICESNAPSHOTDATE_ISSET_ID);
386
  }
387
 
388
  /** Returns true if field minMfnPriceSnapshotDate is set (has been assigned a value) and false otherwise */
389
  public boolean isSetMinMfnPriceSnapshotDate() {
390
    return __isset_bit_vector.get(__MINMFNPRICESNAPSHOTDATE_ISSET_ID);
391
  }
392
 
393
  public void setMinMfnPriceSnapshotDateIsSet(boolean value) {
394
    __isset_bit_vector.set(__MINMFNPRICESNAPSHOTDATE_ISSET_ID, value);
395
  }
396
 
397
  public long getOurPriceSnapshotDate() {
398
    return this.ourPriceSnapshotDate;
399
  }
400
 
401
  public void setOurPriceSnapshotDate(long ourPriceSnapshotDate) {
402
    this.ourPriceSnapshotDate = ourPriceSnapshotDate;
403
    setOurPriceSnapshotDateIsSet(true);
404
  }
405
 
406
  public void unsetOurPriceSnapshotDate() {
407
    __isset_bit_vector.clear(__OURPRICESNAPSHOTDATE_ISSET_ID);
408
  }
409
 
410
  /** Returns true if field ourPriceSnapshotDate is set (has been assigned a value) and false otherwise */
411
  public boolean isSetOurPriceSnapshotDate() {
412
    return __isset_bit_vector.get(__OURPRICESNAPSHOTDATE_ISSET_ID);
413
  }
414
 
415
  public void setOurPriceSnapshotDateIsSet(boolean value) {
416
    __isset_bit_vector.set(__OURPRICESNAPSHOTDATE_ISSET_ID, value);
417
  }
418
 
419
  public long getSalePriceSnapshotDate() {
420
    return this.salePriceSnapshotDate;
421
  }
422
 
423
  public void setSalePriceSnapshotDate(long salePriceSnapshotDate) {
424
    this.salePriceSnapshotDate = salePriceSnapshotDate;
425
    setSalePriceSnapshotDateIsSet(true);
426
  }
427
 
428
  public void unsetSalePriceSnapshotDate() {
429
    __isset_bit_vector.clear(__SALEPRICESNAPSHOTDATE_ISSET_ID);
430
  }
431
 
432
  /** Returns true if field salePriceSnapshotDate is set (has been assigned a value) and false otherwise */
433
  public boolean isSetSalePriceSnapshotDate() {
434
    return __isset_bit_vector.get(__SALEPRICESNAPSHOTDATE_ISSET_ID);
435
  }
436
 
437
  public void setSalePriceSnapshotDateIsSet(boolean value) {
438
    __isset_bit_vector.set(__SALEPRICESNAPSHOTDATE_ISSET_ID, value);
439
  }
440
 
441
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
443
    case ITEM_ID:
444
      if (value == null) {
445
        unsetItem_id();
446
      } else {
447
        setItem_id((Long)value);
448
      }
449
      break;
450
 
451
    case MIN_FBA_PRICE:
452
      if (value == null) {
453
        unsetMinFbaPrice();
454
      } else {
455
        setMinFbaPrice((Double)value);
456
      }
457
      break;
458
 
459
    case MIN_MFN_PRICE:
460
      if (value == null) {
461
        unsetMinMfnPrice();
462
      } else {
463
        setMinMfnPrice((Double)value);
464
      }
465
      break;
466
 
467
    case OUR_PRICE:
468
      if (value == null) {
469
        unsetOurPrice();
470
      } else {
471
        setOurPrice((Double)value);
472
      }
473
      break;
474
 
475
    case SALE_PRICE:
476
      if (value == null) {
477
        unsetSalePrice();
478
      } else {
479
        setSalePrice((Double)value);
480
      }
481
      break;
482
 
483
    case MIN_FBA_PRICE_SNAPSHOT_DATE:
484
      if (value == null) {
485
        unsetMinFbaPriceSnapshotDate();
486
      } else {
487
        setMinFbaPriceSnapshotDate((Long)value);
488
      }
489
      break;
490
 
491
    case MIN_MFN_PRICE_SNAPSHOT_DATE:
492
      if (value == null) {
493
        unsetMinMfnPriceSnapshotDate();
494
      } else {
495
        setMinMfnPriceSnapshotDate((Long)value);
496
      }
497
      break;
498
 
499
    case OUR_PRICE_SNAPSHOT_DATE:
500
      if (value == null) {
501
        unsetOurPriceSnapshotDate();
502
      } else {
503
        setOurPriceSnapshotDate((Long)value);
504
      }
505
      break;
506
 
507
    case SALE_PRICE_SNAPSHOT_DATE:
508
      if (value == null) {
509
        unsetSalePriceSnapshotDate();
510
      } else {
511
        setSalePriceSnapshotDate((Long)value);
512
      }
513
      break;
514
 
515
    }
516
  }
517
 
518
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
520
    case ITEM_ID:
521
      return Long.valueOf(getItem_id());
522
 
523
    case MIN_FBA_PRICE:
524
      return Double.valueOf(getMinFbaPrice());
525
 
526
    case MIN_MFN_PRICE:
527
      return Double.valueOf(getMinMfnPrice());
528
 
529
    case OUR_PRICE:
530
      return Double.valueOf(getOurPrice());
531
 
532
    case SALE_PRICE:
533
      return Double.valueOf(getSalePrice());
534
 
535
    case MIN_FBA_PRICE_SNAPSHOT_DATE:
536
      return Long.valueOf(getMinFbaPriceSnapshotDate());
537
 
538
    case MIN_MFN_PRICE_SNAPSHOT_DATE:
539
      return Long.valueOf(getMinMfnPriceSnapshotDate());
540
 
541
    case OUR_PRICE_SNAPSHOT_DATE:
542
      return Long.valueOf(getOurPriceSnapshotDate());
543
 
544
    case SALE_PRICE_SNAPSHOT_DATE:
545
      return Long.valueOf(getSalePriceSnapshotDate());
546
 
547
    }
548
    throw new IllegalStateException();
549
  }
550
 
551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
552
  public boolean isSet(_Fields field) {
553
    if (field == null) {
554
      throw new IllegalArgumentException();
555
    }
556
 
557
    switch (field) {
558
    case ITEM_ID:
559
      return isSetItem_id();
560
    case MIN_FBA_PRICE:
561
      return isSetMinFbaPrice();
562
    case MIN_MFN_PRICE:
563
      return isSetMinMfnPrice();
564
    case OUR_PRICE:
565
      return isSetOurPrice();
566
    case SALE_PRICE:
567
      return isSetSalePrice();
568
    case MIN_FBA_PRICE_SNAPSHOT_DATE:
569
      return isSetMinFbaPriceSnapshotDate();
570
    case MIN_MFN_PRICE_SNAPSHOT_DATE:
571
      return isSetMinMfnPriceSnapshotDate();
572
    case OUR_PRICE_SNAPSHOT_DATE:
573
      return isSetOurPriceSnapshotDate();
574
    case SALE_PRICE_SNAPSHOT_DATE:
575
      return isSetSalePriceSnapshotDate();
576
    }
577
    throw new IllegalStateException();
578
  }
579
 
580
  @Override
581
  public boolean equals(Object that) {
582
    if (that == null)
583
      return false;
584
    if (that instanceof FbaItemPrices)
585
      return this.equals((FbaItemPrices)that);
586
    return false;
587
  }
588
 
589
  public boolean equals(FbaItemPrices that) {
590
    if (that == null)
591
      return false;
592
 
593
    boolean this_present_item_id = true;
594
    boolean that_present_item_id = true;
595
    if (this_present_item_id || that_present_item_id) {
596
      if (!(this_present_item_id && that_present_item_id))
597
        return false;
598
      if (this.item_id != that.item_id)
599
        return false;
600
    }
601
 
602
    boolean this_present_minFbaPrice = true;
603
    boolean that_present_minFbaPrice = true;
604
    if (this_present_minFbaPrice || that_present_minFbaPrice) {
605
      if (!(this_present_minFbaPrice && that_present_minFbaPrice))
606
        return false;
607
      if (this.minFbaPrice != that.minFbaPrice)
608
        return false;
609
    }
610
 
611
    boolean this_present_minMfnPrice = true;
612
    boolean that_present_minMfnPrice = true;
613
    if (this_present_minMfnPrice || that_present_minMfnPrice) {
614
      if (!(this_present_minMfnPrice && that_present_minMfnPrice))
615
        return false;
616
      if (this.minMfnPrice != that.minMfnPrice)
617
        return false;
618
    }
619
 
620
    boolean this_present_ourPrice = true;
621
    boolean that_present_ourPrice = true;
622
    if (this_present_ourPrice || that_present_ourPrice) {
623
      if (!(this_present_ourPrice && that_present_ourPrice))
624
        return false;
625
      if (this.ourPrice != that.ourPrice)
626
        return false;
627
    }
628
 
629
    boolean this_present_salePrice = true;
630
    boolean that_present_salePrice = true;
631
    if (this_present_salePrice || that_present_salePrice) {
632
      if (!(this_present_salePrice && that_present_salePrice))
633
        return false;
634
      if (this.salePrice != that.salePrice)
635
        return false;
636
    }
637
 
638
    boolean this_present_minFbaPriceSnapshotDate = true;
639
    boolean that_present_minFbaPriceSnapshotDate = true;
640
    if (this_present_minFbaPriceSnapshotDate || that_present_minFbaPriceSnapshotDate) {
641
      if (!(this_present_minFbaPriceSnapshotDate && that_present_minFbaPriceSnapshotDate))
642
        return false;
643
      if (this.minFbaPriceSnapshotDate != that.minFbaPriceSnapshotDate)
644
        return false;
645
    }
646
 
647
    boolean this_present_minMfnPriceSnapshotDate = true;
648
    boolean that_present_minMfnPriceSnapshotDate = true;
649
    if (this_present_minMfnPriceSnapshotDate || that_present_minMfnPriceSnapshotDate) {
650
      if (!(this_present_minMfnPriceSnapshotDate && that_present_minMfnPriceSnapshotDate))
651
        return false;
652
      if (this.minMfnPriceSnapshotDate != that.minMfnPriceSnapshotDate)
653
        return false;
654
    }
655
 
656
    boolean this_present_ourPriceSnapshotDate = true;
657
    boolean that_present_ourPriceSnapshotDate = true;
658
    if (this_present_ourPriceSnapshotDate || that_present_ourPriceSnapshotDate) {
659
      if (!(this_present_ourPriceSnapshotDate && that_present_ourPriceSnapshotDate))
660
        return false;
661
      if (this.ourPriceSnapshotDate != that.ourPriceSnapshotDate)
662
        return false;
663
    }
664
 
665
    boolean this_present_salePriceSnapshotDate = true;
666
    boolean that_present_salePriceSnapshotDate = true;
667
    if (this_present_salePriceSnapshotDate || that_present_salePriceSnapshotDate) {
668
      if (!(this_present_salePriceSnapshotDate && that_present_salePriceSnapshotDate))
669
        return false;
670
      if (this.salePriceSnapshotDate != that.salePriceSnapshotDate)
671
        return false;
672
    }
673
 
674
    return true;
675
  }
676
 
677
  @Override
678
  public int hashCode() {
679
    return 0;
680
  }
681
 
682
  public int compareTo(FbaItemPrices other) {
683
    if (!getClass().equals(other.getClass())) {
684
      return getClass().getName().compareTo(other.getClass().getName());
685
    }
686
 
687
    int lastComparison = 0;
688
    FbaItemPrices typedOther = (FbaItemPrices)other;
689
 
690
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
691
    if (lastComparison != 0) {
692
      return lastComparison;
693
    }
694
    if (isSetItem_id()) {
695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
696
      if (lastComparison != 0) {
697
        return lastComparison;
698
      }
699
    }
700
    lastComparison = Boolean.valueOf(isSetMinFbaPrice()).compareTo(typedOther.isSetMinFbaPrice());
701
    if (lastComparison != 0) {
702
      return lastComparison;
703
    }
704
    if (isSetMinFbaPrice()) {
705
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minFbaPrice, typedOther.minFbaPrice);
706
      if (lastComparison != 0) {
707
        return lastComparison;
708
      }
709
    }
710
    lastComparison = Boolean.valueOf(isSetMinMfnPrice()).compareTo(typedOther.isSetMinMfnPrice());
711
    if (lastComparison != 0) {
712
      return lastComparison;
713
    }
714
    if (isSetMinMfnPrice()) {
715
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minMfnPrice, typedOther.minMfnPrice);
716
      if (lastComparison != 0) {
717
        return lastComparison;
718
      }
719
    }
720
    lastComparison = Boolean.valueOf(isSetOurPrice()).compareTo(typedOther.isSetOurPrice());
721
    if (lastComparison != 0) {
722
      return lastComparison;
723
    }
724
    if (isSetOurPrice()) {
725
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ourPrice, typedOther.ourPrice);
726
      if (lastComparison != 0) {
727
        return lastComparison;
728
      }
729
    }
730
    lastComparison = Boolean.valueOf(isSetSalePrice()).compareTo(typedOther.isSetSalePrice());
731
    if (lastComparison != 0) {
732
      return lastComparison;
733
    }
734
    if (isSetSalePrice()) {
735
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salePrice, typedOther.salePrice);
736
      if (lastComparison != 0) {
737
        return lastComparison;
738
      }
739
    }
740
    lastComparison = Boolean.valueOf(isSetMinFbaPriceSnapshotDate()).compareTo(typedOther.isSetMinFbaPriceSnapshotDate());
741
    if (lastComparison != 0) {
742
      return lastComparison;
743
    }
744
    if (isSetMinFbaPriceSnapshotDate()) {
745
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minFbaPriceSnapshotDate, typedOther.minFbaPriceSnapshotDate);
746
      if (lastComparison != 0) {
747
        return lastComparison;
748
      }
749
    }
750
    lastComparison = Boolean.valueOf(isSetMinMfnPriceSnapshotDate()).compareTo(typedOther.isSetMinMfnPriceSnapshotDate());
751
    if (lastComparison != 0) {
752
      return lastComparison;
753
    }
754
    if (isSetMinMfnPriceSnapshotDate()) {
755
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minMfnPriceSnapshotDate, typedOther.minMfnPriceSnapshotDate);
756
      if (lastComparison != 0) {
757
        return lastComparison;
758
      }
759
    }
760
    lastComparison = Boolean.valueOf(isSetOurPriceSnapshotDate()).compareTo(typedOther.isSetOurPriceSnapshotDate());
761
    if (lastComparison != 0) {
762
      return lastComparison;
763
    }
764
    if (isSetOurPriceSnapshotDate()) {
765
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ourPriceSnapshotDate, typedOther.ourPriceSnapshotDate);
766
      if (lastComparison != 0) {
767
        return lastComparison;
768
      }
769
    }
770
    lastComparison = Boolean.valueOf(isSetSalePriceSnapshotDate()).compareTo(typedOther.isSetSalePriceSnapshotDate());
771
    if (lastComparison != 0) {
772
      return lastComparison;
773
    }
774
    if (isSetSalePriceSnapshotDate()) {
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.salePriceSnapshotDate, typedOther.salePriceSnapshotDate);
776
      if (lastComparison != 0) {
777
        return lastComparison;
778
      }
779
    }
780
    return 0;
781
  }
782
 
783
  public _Fields fieldForId(int fieldId) {
784
    return _Fields.findByThriftId(fieldId);
785
  }
786
 
787
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
788
    org.apache.thrift.protocol.TField field;
789
    iprot.readStructBegin();
790
    while (true)
791
    {
792
      field = iprot.readFieldBegin();
793
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
794
        break;
795
      }
796
      switch (field.id) {
797
        case 1: // ITEM_ID
798
          if (field.type == org.apache.thrift.protocol.TType.I64) {
799
            this.item_id = iprot.readI64();
800
            setItem_idIsSet(true);
801
          } else { 
802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
803
          }
804
          break;
805
        case 2: // MIN_FBA_PRICE
806
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
807
            this.minFbaPrice = iprot.readDouble();
808
            setMinFbaPriceIsSet(true);
809
          } else { 
810
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
811
          }
812
          break;
813
        case 3: // MIN_MFN_PRICE
814
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
815
            this.minMfnPrice = iprot.readDouble();
816
            setMinMfnPriceIsSet(true);
817
          } else { 
818
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
819
          }
820
          break;
821
        case 4: // OUR_PRICE
822
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
823
            this.ourPrice = iprot.readDouble();
824
            setOurPriceIsSet(true);
825
          } else { 
826
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
827
          }
828
          break;
829
        case 5: // SALE_PRICE
830
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
831
            this.salePrice = iprot.readDouble();
832
            setSalePriceIsSet(true);
833
          } else { 
834
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
835
          }
836
          break;
837
        case 6: // MIN_FBA_PRICE_SNAPSHOT_DATE
838
          if (field.type == org.apache.thrift.protocol.TType.I64) {
839
            this.minFbaPriceSnapshotDate = iprot.readI64();
840
            setMinFbaPriceSnapshotDateIsSet(true);
841
          } else { 
842
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
843
          }
844
          break;
845
        case 7: // MIN_MFN_PRICE_SNAPSHOT_DATE
846
          if (field.type == org.apache.thrift.protocol.TType.I64) {
847
            this.minMfnPriceSnapshotDate = iprot.readI64();
848
            setMinMfnPriceSnapshotDateIsSet(true);
849
          } else { 
850
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
851
          }
852
          break;
853
        case 8: // OUR_PRICE_SNAPSHOT_DATE
854
          if (field.type == org.apache.thrift.protocol.TType.I64) {
855
            this.ourPriceSnapshotDate = iprot.readI64();
856
            setOurPriceSnapshotDateIsSet(true);
857
          } else { 
858
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
859
          }
860
          break;
861
        case 9: // SALE_PRICE_SNAPSHOT_DATE
862
          if (field.type == org.apache.thrift.protocol.TType.I64) {
863
            this.salePriceSnapshotDate = iprot.readI64();
864
            setSalePriceSnapshotDateIsSet(true);
865
          } else { 
866
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
867
          }
868
          break;
869
        default:
870
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
871
      }
872
      iprot.readFieldEnd();
873
    }
874
    iprot.readStructEnd();
875
    validate();
876
  }
877
 
878
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
879
    validate();
880
 
881
    oprot.writeStructBegin(STRUCT_DESC);
882
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
883
    oprot.writeI64(this.item_id);
884
    oprot.writeFieldEnd();
885
    oprot.writeFieldBegin(MIN_FBA_PRICE_FIELD_DESC);
886
    oprot.writeDouble(this.minFbaPrice);
887
    oprot.writeFieldEnd();
888
    oprot.writeFieldBegin(MIN_MFN_PRICE_FIELD_DESC);
889
    oprot.writeDouble(this.minMfnPrice);
890
    oprot.writeFieldEnd();
891
    oprot.writeFieldBegin(OUR_PRICE_FIELD_DESC);
892
    oprot.writeDouble(this.ourPrice);
893
    oprot.writeFieldEnd();
894
    oprot.writeFieldBegin(SALE_PRICE_FIELD_DESC);
895
    oprot.writeDouble(this.salePrice);
896
    oprot.writeFieldEnd();
897
    oprot.writeFieldBegin(MIN_FBA_PRICE_SNAPSHOT_DATE_FIELD_DESC);
898
    oprot.writeI64(this.minFbaPriceSnapshotDate);
899
    oprot.writeFieldEnd();
900
    oprot.writeFieldBegin(MIN_MFN_PRICE_SNAPSHOT_DATE_FIELD_DESC);
901
    oprot.writeI64(this.minMfnPriceSnapshotDate);
902
    oprot.writeFieldEnd();
903
    oprot.writeFieldBegin(OUR_PRICE_SNAPSHOT_DATE_FIELD_DESC);
904
    oprot.writeI64(this.ourPriceSnapshotDate);
905
    oprot.writeFieldEnd();
906
    oprot.writeFieldBegin(SALE_PRICE_SNAPSHOT_DATE_FIELD_DESC);
907
    oprot.writeI64(this.salePriceSnapshotDate);
908
    oprot.writeFieldEnd();
909
    oprot.writeFieldStop();
910
    oprot.writeStructEnd();
911
  }
912
 
913
  @Override
914
  public String toString() {
915
    StringBuilder sb = new StringBuilder("FbaItemPrices(");
916
    boolean first = true;
917
 
918
    sb.append("item_id:");
919
    sb.append(this.item_id);
920
    first = false;
921
    if (!first) sb.append(", ");
922
    sb.append("minFbaPrice:");
923
    sb.append(this.minFbaPrice);
924
    first = false;
925
    if (!first) sb.append(", ");
926
    sb.append("minMfnPrice:");
927
    sb.append(this.minMfnPrice);
928
    first = false;
929
    if (!first) sb.append(", ");
930
    sb.append("ourPrice:");
931
    sb.append(this.ourPrice);
932
    first = false;
933
    if (!first) sb.append(", ");
934
    sb.append("salePrice:");
935
    sb.append(this.salePrice);
936
    first = false;
937
    if (!first) sb.append(", ");
938
    sb.append("minFbaPriceSnapshotDate:");
939
    sb.append(this.minFbaPriceSnapshotDate);
940
    first = false;
941
    if (!first) sb.append(", ");
942
    sb.append("minMfnPriceSnapshotDate:");
943
    sb.append(this.minMfnPriceSnapshotDate);
944
    first = false;
945
    if (!first) sb.append(", ");
946
    sb.append("ourPriceSnapshotDate:");
947
    sb.append(this.ourPriceSnapshotDate);
948
    first = false;
949
    if (!first) sb.append(", ");
950
    sb.append("salePriceSnapshotDate:");
951
    sb.append(this.salePriceSnapshotDate);
952
    first = false;
953
    sb.append(")");
954
    return sb.toString();
955
  }
956
 
957
  public void validate() throws org.apache.thrift.TException {
958
    // check for required fields
959
  }
960
 
961
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
962
    try {
963
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
964
    } catch (org.apache.thrift.TException te) {
965
      throw new java.io.IOException(te);
966
    }
967
  }
968
 
969
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
970
    try {
971
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
972
      __isset_bit_vector = new BitSet(1);
973
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
974
    } catch (org.apache.thrift.TException te) {
975
      throw new java.io.IOException(te);
976
    }
977
  }
978
 
979
}
980