Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9776 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.catalog;
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 MarketPlaceItemPrice implements org.apache.thrift.TBase<MarketPlaceItemPrice, MarketPlaceItemPrice._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MarketPlaceItemPrice");
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 SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField SELLING_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("sellingPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
29
  private static final org.apache.thrift.protocol.TField LAST_UPDATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUpdatedOn", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField LAST_UPDATED_ON_MARKETPLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastUpdatedOnMarketplace", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField IS_PRICE_OVERRIDE_FIELD_DESC = new org.apache.thrift.protocol.TField("isPriceOverride", org.apache.thrift.protocol.TType.BOOL, (short)6);
32
  private static final org.apache.thrift.protocol.TField IS_LISTED_ON_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("isListedOnSource", org.apache.thrift.protocol.TType.BOOL, (short)7);
33
 
34
  private long item_id; // required
35
  private long source; // required
36
  private double sellingPrice; // required
37
  private long lastUpdatedOn; // required
38
  private long lastUpdatedOnMarketplace; // required
39
  private boolean isPriceOverride; // required
40
  private boolean isListedOnSource; // 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
    ITEM_ID((short)1, "item_id"),
45
    SOURCE((short)2, "source"),
46
    SELLING_PRICE((short)3, "sellingPrice"),
47
    LAST_UPDATED_ON((short)4, "lastUpdatedOn"),
48
    LAST_UPDATED_ON_MARKETPLACE((short)5, "lastUpdatedOnMarketplace"),
49
    IS_PRICE_OVERRIDE((short)6, "isPriceOverride"),
50
    IS_LISTED_ON_SOURCE((short)7, "isListedOnSource");
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: // ITEM_ID
66
          return ITEM_ID;
67
        case 2: // SOURCE
68
          return SOURCE;
69
        case 3: // SELLING_PRICE
70
          return SELLING_PRICE;
71
        case 4: // LAST_UPDATED_ON
72
          return LAST_UPDATED_ON;
73
        case 5: // LAST_UPDATED_ON_MARKETPLACE
74
          return LAST_UPDATED_ON_MARKETPLACE;
75
        case 6: // IS_PRICE_OVERRIDE
76
          return IS_PRICE_OVERRIDE;
77
        case 7: // IS_LISTED_ON_SOURCE
78
          return IS_LISTED_ON_SOURCE;
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 __ITEM_ID_ISSET_ID = 0;
120
  private static final int __SOURCE_ISSET_ID = 1;
121
  private static final int __SELLINGPRICE_ISSET_ID = 2;
122
  private static final int __LASTUPDATEDON_ISSET_ID = 3;
123
  private static final int __LASTUPDATEDONMARKETPLACE_ISSET_ID = 4;
124
  private static final int __ISPRICEOVERRIDE_ISSET_ID = 5;
125
  private static final int __ISLISTEDONSOURCE_ISSET_ID = 6;
126
  private BitSet __isset_bit_vector = new BitSet(7);
127
 
128
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
129
  static {
130
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
131
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
133
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
135
    tmpMap.put(_Fields.SELLING_PRICE, new org.apache.thrift.meta_data.FieldMetaData("sellingPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
137
    tmpMap.put(_Fields.LAST_UPDATED_ON, new org.apache.thrift.meta_data.FieldMetaData("lastUpdatedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
139
    tmpMap.put(_Fields.LAST_UPDATED_ON_MARKETPLACE, new org.apache.thrift.meta_data.FieldMetaData("lastUpdatedOnMarketplace", org.apache.thrift.TFieldRequirementType.DEFAULT, 
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
141
    tmpMap.put(_Fields.IS_PRICE_OVERRIDE, new org.apache.thrift.meta_data.FieldMetaData("isPriceOverride", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
143
    tmpMap.put(_Fields.IS_LISTED_ON_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("isListedOnSource", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
145
    metaDataMap = Collections.unmodifiableMap(tmpMap);
146
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MarketPlaceItemPrice.class, metaDataMap);
147
  }
148
 
149
  public MarketPlaceItemPrice() {
150
  }
151
 
152
  public MarketPlaceItemPrice(
153
    long item_id,
154
    long source,
155
    double sellingPrice,
156
    long lastUpdatedOn,
157
    long lastUpdatedOnMarketplace,
158
    boolean isPriceOverride,
159
    boolean isListedOnSource)
160
  {
161
    this();
162
    this.item_id = item_id;
163
    setItem_idIsSet(true);
164
    this.source = source;
165
    setSourceIsSet(true);
166
    this.sellingPrice = sellingPrice;
167
    setSellingPriceIsSet(true);
168
    this.lastUpdatedOn = lastUpdatedOn;
169
    setLastUpdatedOnIsSet(true);
170
    this.lastUpdatedOnMarketplace = lastUpdatedOnMarketplace;
171
    setLastUpdatedOnMarketplaceIsSet(true);
172
    this.isPriceOverride = isPriceOverride;
173
    setIsPriceOverrideIsSet(true);
174
    this.isListedOnSource = isListedOnSource;
175
    setIsListedOnSourceIsSet(true);
176
  }
177
 
178
  /**
179
   * Performs a deep copy on <i>other</i>.
180
   */
181
  public MarketPlaceItemPrice(MarketPlaceItemPrice other) {
182
    __isset_bit_vector.clear();
183
    __isset_bit_vector.or(other.__isset_bit_vector);
184
    this.item_id = other.item_id;
185
    this.source = other.source;
186
    this.sellingPrice = other.sellingPrice;
187
    this.lastUpdatedOn = other.lastUpdatedOn;
188
    this.lastUpdatedOnMarketplace = other.lastUpdatedOnMarketplace;
189
    this.isPriceOverride = other.isPriceOverride;
190
    this.isListedOnSource = other.isListedOnSource;
191
  }
192
 
193
  public MarketPlaceItemPrice deepCopy() {
194
    return new MarketPlaceItemPrice(this);
195
  }
196
 
197
  @Override
198
  public void clear() {
199
    setItem_idIsSet(false);
200
    this.item_id = 0;
201
    setSourceIsSet(false);
202
    this.source = 0;
203
    setSellingPriceIsSet(false);
204
    this.sellingPrice = 0.0;
205
    setLastUpdatedOnIsSet(false);
206
    this.lastUpdatedOn = 0;
207
    setLastUpdatedOnMarketplaceIsSet(false);
208
    this.lastUpdatedOnMarketplace = 0;
209
    setIsPriceOverrideIsSet(false);
210
    this.isPriceOverride = false;
211
    setIsListedOnSourceIsSet(false);
212
    this.isListedOnSource = false;
213
  }
214
 
215
  public long getItem_id() {
216
    return this.item_id;
217
  }
218
 
219
  public void setItem_id(long item_id) {
220
    this.item_id = item_id;
221
    setItem_idIsSet(true);
222
  }
223
 
224
  public void unsetItem_id() {
225
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
226
  }
227
 
228
  /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
229
  public boolean isSetItem_id() {
230
    return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
231
  }
232
 
233
  public void setItem_idIsSet(boolean value) {
234
    __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
235
  }
236
 
237
  public long getSource() {
238
    return this.source;
239
  }
240
 
241
  public void setSource(long source) {
242
    this.source = source;
243
    setSourceIsSet(true);
244
  }
245
 
246
  public void unsetSource() {
247
    __isset_bit_vector.clear(__SOURCE_ISSET_ID);
248
  }
249
 
250
  /** Returns true if field source is set (has been assigned a value) and false otherwise */
251
  public boolean isSetSource() {
252
    return __isset_bit_vector.get(__SOURCE_ISSET_ID);
253
  }
254
 
255
  public void setSourceIsSet(boolean value) {
256
    __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
257
  }
258
 
259
  public double getSellingPrice() {
260
    return this.sellingPrice;
261
  }
262
 
263
  public void setSellingPrice(double sellingPrice) {
264
    this.sellingPrice = sellingPrice;
265
    setSellingPriceIsSet(true);
266
  }
267
 
268
  public void unsetSellingPrice() {
269
    __isset_bit_vector.clear(__SELLINGPRICE_ISSET_ID);
270
  }
271
 
272
  /** Returns true if field sellingPrice is set (has been assigned a value) and false otherwise */
273
  public boolean isSetSellingPrice() {
274
    return __isset_bit_vector.get(__SELLINGPRICE_ISSET_ID);
275
  }
276
 
277
  public void setSellingPriceIsSet(boolean value) {
278
    __isset_bit_vector.set(__SELLINGPRICE_ISSET_ID, value);
279
  }
280
 
281
  public long getLastUpdatedOn() {
282
    return this.lastUpdatedOn;
283
  }
284
 
285
  public void setLastUpdatedOn(long lastUpdatedOn) {
286
    this.lastUpdatedOn = lastUpdatedOn;
287
    setLastUpdatedOnIsSet(true);
288
  }
289
 
290
  public void unsetLastUpdatedOn() {
291
    __isset_bit_vector.clear(__LASTUPDATEDON_ISSET_ID);
292
  }
293
 
294
  /** Returns true if field lastUpdatedOn is set (has been assigned a value) and false otherwise */
295
  public boolean isSetLastUpdatedOn() {
296
    return __isset_bit_vector.get(__LASTUPDATEDON_ISSET_ID);
297
  }
298
 
299
  public void setLastUpdatedOnIsSet(boolean value) {
300
    __isset_bit_vector.set(__LASTUPDATEDON_ISSET_ID, value);
301
  }
302
 
303
  public long getLastUpdatedOnMarketplace() {
304
    return this.lastUpdatedOnMarketplace;
305
  }
306
 
307
  public void setLastUpdatedOnMarketplace(long lastUpdatedOnMarketplace) {
308
    this.lastUpdatedOnMarketplace = lastUpdatedOnMarketplace;
309
    setLastUpdatedOnMarketplaceIsSet(true);
310
  }
311
 
312
  public void unsetLastUpdatedOnMarketplace() {
313
    __isset_bit_vector.clear(__LASTUPDATEDONMARKETPLACE_ISSET_ID);
314
  }
315
 
316
  /** Returns true if field lastUpdatedOnMarketplace is set (has been assigned a value) and false otherwise */
317
  public boolean isSetLastUpdatedOnMarketplace() {
318
    return __isset_bit_vector.get(__LASTUPDATEDONMARKETPLACE_ISSET_ID);
319
  }
320
 
321
  public void setLastUpdatedOnMarketplaceIsSet(boolean value) {
322
    __isset_bit_vector.set(__LASTUPDATEDONMARKETPLACE_ISSET_ID, value);
323
  }
324
 
325
  public boolean isIsPriceOverride() {
326
    return this.isPriceOverride;
327
  }
328
 
329
  public void setIsPriceOverride(boolean isPriceOverride) {
330
    this.isPriceOverride = isPriceOverride;
331
    setIsPriceOverrideIsSet(true);
332
  }
333
 
334
  public void unsetIsPriceOverride() {
335
    __isset_bit_vector.clear(__ISPRICEOVERRIDE_ISSET_ID);
336
  }
337
 
338
  /** Returns true if field isPriceOverride is set (has been assigned a value) and false otherwise */
339
  public boolean isSetIsPriceOverride() {
340
    return __isset_bit_vector.get(__ISPRICEOVERRIDE_ISSET_ID);
341
  }
342
 
343
  public void setIsPriceOverrideIsSet(boolean value) {
344
    __isset_bit_vector.set(__ISPRICEOVERRIDE_ISSET_ID, value);
345
  }
346
 
347
  public boolean isIsListedOnSource() {
348
    return this.isListedOnSource;
349
  }
350
 
351
  public void setIsListedOnSource(boolean isListedOnSource) {
352
    this.isListedOnSource = isListedOnSource;
353
    setIsListedOnSourceIsSet(true);
354
  }
355
 
356
  public void unsetIsListedOnSource() {
357
    __isset_bit_vector.clear(__ISLISTEDONSOURCE_ISSET_ID);
358
  }
359
 
360
  /** Returns true if field isListedOnSource is set (has been assigned a value) and false otherwise */
361
  public boolean isSetIsListedOnSource() {
362
    return __isset_bit_vector.get(__ISLISTEDONSOURCE_ISSET_ID);
363
  }
364
 
365
  public void setIsListedOnSourceIsSet(boolean value) {
366
    __isset_bit_vector.set(__ISLISTEDONSOURCE_ISSET_ID, value);
367
  }
368
 
369
  public void setFieldValue(_Fields field, Object value) {
370
    switch (field) {
371
    case ITEM_ID:
372
      if (value == null) {
373
        unsetItem_id();
374
      } else {
375
        setItem_id((Long)value);
376
      }
377
      break;
378
 
379
    case SOURCE:
380
      if (value == null) {
381
        unsetSource();
382
      } else {
383
        setSource((Long)value);
384
      }
385
      break;
386
 
387
    case SELLING_PRICE:
388
      if (value == null) {
389
        unsetSellingPrice();
390
      } else {
391
        setSellingPrice((Double)value);
392
      }
393
      break;
394
 
395
    case LAST_UPDATED_ON:
396
      if (value == null) {
397
        unsetLastUpdatedOn();
398
      } else {
399
        setLastUpdatedOn((Long)value);
400
      }
401
      break;
402
 
403
    case LAST_UPDATED_ON_MARKETPLACE:
404
      if (value == null) {
405
        unsetLastUpdatedOnMarketplace();
406
      } else {
407
        setLastUpdatedOnMarketplace((Long)value);
408
      }
409
      break;
410
 
411
    case IS_PRICE_OVERRIDE:
412
      if (value == null) {
413
        unsetIsPriceOverride();
414
      } else {
415
        setIsPriceOverride((Boolean)value);
416
      }
417
      break;
418
 
419
    case IS_LISTED_ON_SOURCE:
420
      if (value == null) {
421
        unsetIsListedOnSource();
422
      } else {
423
        setIsListedOnSource((Boolean)value);
424
      }
425
      break;
426
 
427
    }
428
  }
429
 
430
  public Object getFieldValue(_Fields field) {
431
    switch (field) {
432
    case ITEM_ID:
433
      return Long.valueOf(getItem_id());
434
 
435
    case SOURCE:
436
      return Long.valueOf(getSource());
437
 
438
    case SELLING_PRICE:
439
      return Double.valueOf(getSellingPrice());
440
 
441
    case LAST_UPDATED_ON:
442
      return Long.valueOf(getLastUpdatedOn());
443
 
444
    case LAST_UPDATED_ON_MARKETPLACE:
445
      return Long.valueOf(getLastUpdatedOnMarketplace());
446
 
447
    case IS_PRICE_OVERRIDE:
448
      return Boolean.valueOf(isIsPriceOverride());
449
 
450
    case IS_LISTED_ON_SOURCE:
451
      return Boolean.valueOf(isIsListedOnSource());
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 ITEM_ID:
465
      return isSetItem_id();
466
    case SOURCE:
467
      return isSetSource();
468
    case SELLING_PRICE:
469
      return isSetSellingPrice();
470
    case LAST_UPDATED_ON:
471
      return isSetLastUpdatedOn();
472
    case LAST_UPDATED_ON_MARKETPLACE:
473
      return isSetLastUpdatedOnMarketplace();
474
    case IS_PRICE_OVERRIDE:
475
      return isSetIsPriceOverride();
476
    case IS_LISTED_ON_SOURCE:
477
      return isSetIsListedOnSource();
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 MarketPlaceItemPrice)
487
      return this.equals((MarketPlaceItemPrice)that);
488
    return false;
489
  }
490
 
491
  public boolean equals(MarketPlaceItemPrice that) {
492
    if (that == null)
493
      return false;
494
 
495
    boolean this_present_item_id = true;
496
    boolean that_present_item_id = true;
497
    if (this_present_item_id || that_present_item_id) {
498
      if (!(this_present_item_id && that_present_item_id))
499
        return false;
500
      if (this.item_id != that.item_id)
501
        return false;
502
    }
503
 
504
    boolean this_present_source = true;
505
    boolean that_present_source = true;
506
    if (this_present_source || that_present_source) {
507
      if (!(this_present_source && that_present_source))
508
        return false;
509
      if (this.source != that.source)
510
        return false;
511
    }
512
 
513
    boolean this_present_sellingPrice = true;
514
    boolean that_present_sellingPrice = true;
515
    if (this_present_sellingPrice || that_present_sellingPrice) {
516
      if (!(this_present_sellingPrice && that_present_sellingPrice))
517
        return false;
518
      if (this.sellingPrice != that.sellingPrice)
519
        return false;
520
    }
521
 
522
    boolean this_present_lastUpdatedOn = true;
523
    boolean that_present_lastUpdatedOn = true;
524
    if (this_present_lastUpdatedOn || that_present_lastUpdatedOn) {
525
      if (!(this_present_lastUpdatedOn && that_present_lastUpdatedOn))
526
        return false;
527
      if (this.lastUpdatedOn != that.lastUpdatedOn)
528
        return false;
529
    }
530
 
531
    boolean this_present_lastUpdatedOnMarketplace = true;
532
    boolean that_present_lastUpdatedOnMarketplace = true;
533
    if (this_present_lastUpdatedOnMarketplace || that_present_lastUpdatedOnMarketplace) {
534
      if (!(this_present_lastUpdatedOnMarketplace && that_present_lastUpdatedOnMarketplace))
535
        return false;
536
      if (this.lastUpdatedOnMarketplace != that.lastUpdatedOnMarketplace)
537
        return false;
538
    }
539
 
540
    boolean this_present_isPriceOverride = true;
541
    boolean that_present_isPriceOverride = true;
542
    if (this_present_isPriceOverride || that_present_isPriceOverride) {
543
      if (!(this_present_isPriceOverride && that_present_isPriceOverride))
544
        return false;
545
      if (this.isPriceOverride != that.isPriceOverride)
546
        return false;
547
    }
548
 
549
    boolean this_present_isListedOnSource = true;
550
    boolean that_present_isListedOnSource = true;
551
    if (this_present_isListedOnSource || that_present_isListedOnSource) {
552
      if (!(this_present_isListedOnSource && that_present_isListedOnSource))
553
        return false;
554
      if (this.isListedOnSource != that.isListedOnSource)
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(MarketPlaceItemPrice other) {
567
    if (!getClass().equals(other.getClass())) {
568
      return getClass().getName().compareTo(other.getClass().getName());
569
    }
570
 
571
    int lastComparison = 0;
572
    MarketPlaceItemPrice typedOther = (MarketPlaceItemPrice)other;
573
 
574
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
575
    if (lastComparison != 0) {
576
      return lastComparison;
577
    }
578
    if (isSetItem_id()) {
579
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
580
      if (lastComparison != 0) {
581
        return lastComparison;
582
      }
583
    }
584
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
585
    if (lastComparison != 0) {
586
      return lastComparison;
587
    }
588
    if (isSetSource()) {
589
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
590
      if (lastComparison != 0) {
591
        return lastComparison;
592
      }
593
    }
594
    lastComparison = Boolean.valueOf(isSetSellingPrice()).compareTo(typedOther.isSetSellingPrice());
595
    if (lastComparison != 0) {
596
      return lastComparison;
597
    }
598
    if (isSetSellingPrice()) {
599
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sellingPrice, typedOther.sellingPrice);
600
      if (lastComparison != 0) {
601
        return lastComparison;
602
      }
603
    }
604
    lastComparison = Boolean.valueOf(isSetLastUpdatedOn()).compareTo(typedOther.isSetLastUpdatedOn());
605
    if (lastComparison != 0) {
606
      return lastComparison;
607
    }
608
    if (isSetLastUpdatedOn()) {
609
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastUpdatedOn, typedOther.lastUpdatedOn);
610
      if (lastComparison != 0) {
611
        return lastComparison;
612
      }
613
    }
614
    lastComparison = Boolean.valueOf(isSetLastUpdatedOnMarketplace()).compareTo(typedOther.isSetLastUpdatedOnMarketplace());
615
    if (lastComparison != 0) {
616
      return lastComparison;
617
    }
618
    if (isSetLastUpdatedOnMarketplace()) {
619
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastUpdatedOnMarketplace, typedOther.lastUpdatedOnMarketplace);
620
      if (lastComparison != 0) {
621
        return lastComparison;
622
      }
623
    }
624
    lastComparison = Boolean.valueOf(isSetIsPriceOverride()).compareTo(typedOther.isSetIsPriceOverride());
625
    if (lastComparison != 0) {
626
      return lastComparison;
627
    }
628
    if (isSetIsPriceOverride()) {
629
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isPriceOverride, typedOther.isPriceOverride);
630
      if (lastComparison != 0) {
631
        return lastComparison;
632
      }
633
    }
634
    lastComparison = Boolean.valueOf(isSetIsListedOnSource()).compareTo(typedOther.isSetIsListedOnSource());
635
    if (lastComparison != 0) {
636
      return lastComparison;
637
    }
638
    if (isSetIsListedOnSource()) {
639
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isListedOnSource, typedOther.isListedOnSource);
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: // ITEM_ID
662
          if (field.type == org.apache.thrift.protocol.TType.I64) {
663
            this.item_id = iprot.readI64();
664
            setItem_idIsSet(true);
665
          } else { 
666
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
667
          }
668
          break;
669
        case 2: // SOURCE
670
          if (field.type == org.apache.thrift.protocol.TType.I64) {
671
            this.source = iprot.readI64();
672
            setSourceIsSet(true);
673
          } else { 
674
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
675
          }
676
          break;
677
        case 3: // SELLING_PRICE
678
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
679
            this.sellingPrice = iprot.readDouble();
680
            setSellingPriceIsSet(true);
681
          } else { 
682
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
683
          }
684
          break;
685
        case 4: // LAST_UPDATED_ON
686
          if (field.type == org.apache.thrift.protocol.TType.I64) {
687
            this.lastUpdatedOn = iprot.readI64();
688
            setLastUpdatedOnIsSet(true);
689
          } else { 
690
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
691
          }
692
          break;
693
        case 5: // LAST_UPDATED_ON_MARKETPLACE
694
          if (field.type == org.apache.thrift.protocol.TType.I64) {
695
            this.lastUpdatedOnMarketplace = iprot.readI64();
696
            setLastUpdatedOnMarketplaceIsSet(true);
697
          } else { 
698
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
699
          }
700
          break;
701
        case 6: // IS_PRICE_OVERRIDE
702
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
703
            this.isPriceOverride = iprot.readBool();
704
            setIsPriceOverrideIsSet(true);
705
          } else { 
706
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
707
          }
708
          break;
709
        case 7: // IS_LISTED_ON_SOURCE
710
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
711
            this.isListedOnSource = iprot.readBool();
712
            setIsListedOnSourceIsSet(true);
713
          } else { 
714
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
715
          }
716
          break;
717
        default:
718
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
719
      }
720
      iprot.readFieldEnd();
721
    }
722
    iprot.readStructEnd();
723
    validate();
724
  }
725
 
726
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
727
    validate();
728
 
729
    oprot.writeStructBegin(STRUCT_DESC);
730
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
731
    oprot.writeI64(this.item_id);
732
    oprot.writeFieldEnd();
733
    oprot.writeFieldBegin(SOURCE_FIELD_DESC);
734
    oprot.writeI64(this.source);
735
    oprot.writeFieldEnd();
736
    oprot.writeFieldBegin(SELLING_PRICE_FIELD_DESC);
737
    oprot.writeDouble(this.sellingPrice);
738
    oprot.writeFieldEnd();
739
    oprot.writeFieldBegin(LAST_UPDATED_ON_FIELD_DESC);
740
    oprot.writeI64(this.lastUpdatedOn);
741
    oprot.writeFieldEnd();
742
    oprot.writeFieldBegin(LAST_UPDATED_ON_MARKETPLACE_FIELD_DESC);
743
    oprot.writeI64(this.lastUpdatedOnMarketplace);
744
    oprot.writeFieldEnd();
745
    oprot.writeFieldBegin(IS_PRICE_OVERRIDE_FIELD_DESC);
746
    oprot.writeBool(this.isPriceOverride);
747
    oprot.writeFieldEnd();
748
    oprot.writeFieldBegin(IS_LISTED_ON_SOURCE_FIELD_DESC);
749
    oprot.writeBool(this.isListedOnSource);
750
    oprot.writeFieldEnd();
751
    oprot.writeFieldStop();
752
    oprot.writeStructEnd();
753
  }
754
 
755
  @Override
756
  public String toString() {
757
    StringBuilder sb = new StringBuilder("MarketPlaceItemPrice(");
758
    boolean first = true;
759
 
760
    sb.append("item_id:");
761
    sb.append(this.item_id);
762
    first = false;
763
    if (!first) sb.append(", ");
764
    sb.append("source:");
765
    sb.append(this.source);
766
    first = false;
767
    if (!first) sb.append(", ");
768
    sb.append("sellingPrice:");
769
    sb.append(this.sellingPrice);
770
    first = false;
771
    if (!first) sb.append(", ");
772
    sb.append("lastUpdatedOn:");
773
    sb.append(this.lastUpdatedOn);
774
    first = false;
775
    if (!first) sb.append(", ");
776
    sb.append("lastUpdatedOnMarketplace:");
777
    sb.append(this.lastUpdatedOnMarketplace);
778
    first = false;
779
    if (!first) sb.append(", ");
780
    sb.append("isPriceOverride:");
781
    sb.append(this.isPriceOverride);
782
    first = false;
783
    if (!first) sb.append(", ");
784
    sb.append("isListedOnSource:");
785
    sb.append(this.isListedOnSource);
786
    first = false;
787
    sb.append(")");
788
    return sb.toString();
789
  }
790
 
791
  public void validate() throws org.apache.thrift.TException {
792
    // check for required fields
793
  }
794
 
795
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
796
    try {
797
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
798
    } catch (org.apache.thrift.TException te) {
799
      throw new java.io.IOException(te);
800
    }
801
  }
802
 
803
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
804
    try {
805
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
806
      __isset_bit_vector = new BitSet(1);
807
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
808
    } catch (org.apache.thrift.TException te) {
809
      throw new java.io.IOException(te);
810
    }
811
  }
812
 
813
}
814