Subversion Repositories SmartDukaan

Rev

Rev 16461 | Rev 18739 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14384 kshitij.so 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.dtr;
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
/**
24
 * Objects
25
 */
26
public class LivePricing implements org.apache.thrift.TBase<LivePricing, LivePricing._Fields>, java.io.Serializable, Cloneable {
27
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LivePricing");
28
 
29
  private static final org.apache.thrift.protocol.TField _ID_FIELD_DESC = new org.apache.thrift.protocol.TField("_id", org.apache.thrift.protocol.TType.I64, (short)1);
30
  private static final org.apache.thrift.protocol.TField AVAILABLE_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("available_price", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
31
  private static final org.apache.thrift.protocol.TField MARKET_PLACE_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("marketPlaceUrl", org.apache.thrift.protocol.TType.STRING, (short)3);
32
  private static final org.apache.thrift.protocol.TField IN_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("in_stock", org.apache.thrift.protocol.TType.I64, (short)4);
33
  private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("source_id", org.apache.thrift.protocol.TType.I64, (short)5);
34
  private static final org.apache.thrift.protocol.TField SOURCE_PRODUCT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("source_product_name", org.apache.thrift.protocol.TType.STRING, (short)6);
35
  private static final org.apache.thrift.protocol.TField THUMBNAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("thumbnail", org.apache.thrift.protocol.TType.STRING, (short)7);
14764 kshitij.so 36
  private static final org.apache.thrift.protocol.TField CASH_BACK_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back_type", org.apache.thrift.protocol.TType.I64, (short)8);
37
  private static final org.apache.thrift.protocol.TField CASH_BACK_FIELD_DESC = new org.apache.thrift.protocol.TField("cash_back", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
15903 kshitij.so 38
  private static final org.apache.thrift.protocol.TField COUPON_FIELD_DESC = new org.apache.thrift.protocol.TField("coupon", org.apache.thrift.protocol.TType.STRING, (short)10);
15943 kshitij.so 39
  private static final org.apache.thrift.protocol.TField COD_AVAILABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("codAvailable", org.apache.thrift.protocol.TType.I64, (short)11);
16117 kshitij.so 40
  private static final org.apache.thrift.protocol.TField TAGLINE_FIELD_DESC = new org.apache.thrift.protocol.TField("tagline", org.apache.thrift.protocol.TType.STRING, (short)12);
41
  private static final org.apache.thrift.protocol.TField OFFER_FIELD_DESC = new org.apache.thrift.protocol.TField("offer", org.apache.thrift.protocol.TType.STRING, (short)13);
16461 kshitij.so 42
  private static final org.apache.thrift.protocol.TField GROSS_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("gross_price", org.apache.thrift.protocol.TType.DOUBLE, (short)14);
18728 kshitij.so 43
  private static final org.apache.thrift.protocol.TField CHEAPEST_BULK_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("cheapestBulkPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)15);
14384 kshitij.so 44
 
45
  private long _id; // required
46
  private double available_price; // required
47
  private String marketPlaceUrl; // required
48
  private long in_stock; // required
49
  private long source_id; // required
50
  private String source_product_name; // required
51
  private String thumbnail; // required
14764 kshitij.so 52
  private long cash_back_type; // required
53
  private double cash_back; // required
15903 kshitij.so 54
  private String coupon; // required
15943 kshitij.so 55
  private long codAvailable; // required
16117 kshitij.so 56
  private String tagline; // required
57
  private String offer; // required
16461 kshitij.so 58
  private double gross_price; // required
18728 kshitij.so 59
  private double cheapestBulkPrice; // required
14384 kshitij.so 60
 
61
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
63
    _ID((short)1, "_id"),
64
    AVAILABLE_PRICE((short)2, "available_price"),
65
    MARKET_PLACE_URL((short)3, "marketPlaceUrl"),
66
    IN_STOCK((short)4, "in_stock"),
67
    SOURCE_ID((short)5, "source_id"),
68
    SOURCE_PRODUCT_NAME((short)6, "source_product_name"),
14764 kshitij.so 69
    THUMBNAIL((short)7, "thumbnail"),
70
    CASH_BACK_TYPE((short)8, "cash_back_type"),
15903 kshitij.so 71
    CASH_BACK((short)9, "cash_back"),
72
    COUPON((short)10, "coupon"),
16117 kshitij.so 73
    COD_AVAILABLE((short)11, "codAvailable"),
74
    TAGLINE((short)12, "tagline"),
16461 kshitij.so 75
    OFFER((short)13, "offer"),
18728 kshitij.so 76
    GROSS_PRICE((short)14, "gross_price"),
77
    CHEAPEST_BULK_PRICE((short)15, "cheapestBulkPrice");
14384 kshitij.so 78
 
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
 
81
    static {
82
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
83
        byName.put(field.getFieldName(), field);
84
      }
85
    }
86
 
87
    /**
88
     * Find the _Fields constant that matches fieldId, or null if its not found.
89
     */
90
    public static _Fields findByThriftId(int fieldId) {
91
      switch(fieldId) {
92
        case 1: // _ID
93
          return _ID;
94
        case 2: // AVAILABLE_PRICE
95
          return AVAILABLE_PRICE;
96
        case 3: // MARKET_PLACE_URL
97
          return MARKET_PLACE_URL;
98
        case 4: // IN_STOCK
99
          return IN_STOCK;
100
        case 5: // SOURCE_ID
101
          return SOURCE_ID;
102
        case 6: // SOURCE_PRODUCT_NAME
103
          return SOURCE_PRODUCT_NAME;
104
        case 7: // THUMBNAIL
105
          return THUMBNAIL;
14764 kshitij.so 106
        case 8: // CASH_BACK_TYPE
107
          return CASH_BACK_TYPE;
108
        case 9: // CASH_BACK
109
          return CASH_BACK;
15903 kshitij.so 110
        case 10: // COUPON
111
          return COUPON;
112
        case 11: // COD_AVAILABLE
113
          return COD_AVAILABLE;
16117 kshitij.so 114
        case 12: // TAGLINE
115
          return TAGLINE;
116
        case 13: // OFFER
117
          return OFFER;
16461 kshitij.so 118
        case 14: // GROSS_PRICE
119
          return GROSS_PRICE;
18728 kshitij.so 120
        case 15: // CHEAPEST_BULK_PRICE
121
          return CHEAPEST_BULK_PRICE;
14384 kshitij.so 122
        default:
123
          return null;
124
      }
125
    }
126
 
127
    /**
128
     * Find the _Fields constant that matches fieldId, throwing an exception
129
     * if it is not found.
130
     */
131
    public static _Fields findByThriftIdOrThrow(int fieldId) {
132
      _Fields fields = findByThriftId(fieldId);
133
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
134
      return fields;
135
    }
136
 
137
    /**
138
     * Find the _Fields constant that matches name, or null if its not found.
139
     */
140
    public static _Fields findByName(String name) {
141
      return byName.get(name);
142
    }
143
 
144
    private final short _thriftId;
145
    private final String _fieldName;
146
 
147
    _Fields(short thriftId, String fieldName) {
148
      _thriftId = thriftId;
149
      _fieldName = fieldName;
150
    }
151
 
152
    public short getThriftFieldId() {
153
      return _thriftId;
154
    }
155
 
156
    public String getFieldName() {
157
      return _fieldName;
158
    }
159
  }
160
 
161
  // isset id assignments
162
  private static final int ___ID_ISSET_ID = 0;
163
  private static final int __AVAILABLE_PRICE_ISSET_ID = 1;
164
  private static final int __IN_STOCK_ISSET_ID = 2;
165
  private static final int __SOURCE_ID_ISSET_ID = 3;
14764 kshitij.so 166
  private static final int __CASH_BACK_TYPE_ISSET_ID = 4;
167
  private static final int __CASH_BACK_ISSET_ID = 5;
15903 kshitij.so 168
  private static final int __CODAVAILABLE_ISSET_ID = 6;
16461 kshitij.so 169
  private static final int __GROSS_PRICE_ISSET_ID = 7;
18728 kshitij.so 170
  private static final int __CHEAPESTBULKPRICE_ISSET_ID = 8;
171
  private BitSet __isset_bit_vector = new BitSet(9);
14384 kshitij.so 172
 
173
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
174
  static {
175
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
176
    tmpMap.put(_Fields._ID, new org.apache.thrift.meta_data.FieldMetaData("_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
178
    tmpMap.put(_Fields.AVAILABLE_PRICE, new org.apache.thrift.meta_data.FieldMetaData("available_price", org.apache.thrift.TFieldRequirementType.DEFAULT, 
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
180
    tmpMap.put(_Fields.MARKET_PLACE_URL, new org.apache.thrift.meta_data.FieldMetaData("marketPlaceUrl", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
182
    tmpMap.put(_Fields.IN_STOCK, new org.apache.thrift.meta_data.FieldMetaData("in_stock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
184
    tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("source_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
186
    tmpMap.put(_Fields.SOURCE_PRODUCT_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_product_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
188
    tmpMap.put(_Fields.THUMBNAIL, new org.apache.thrift.meta_data.FieldMetaData("thumbnail", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14764 kshitij.so 190
    tmpMap.put(_Fields.CASH_BACK_TYPE, new org.apache.thrift.meta_data.FieldMetaData("cash_back_type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
192
    tmpMap.put(_Fields.CASH_BACK, new org.apache.thrift.meta_data.FieldMetaData("cash_back", org.apache.thrift.TFieldRequirementType.DEFAULT, 
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
15903 kshitij.so 194
    tmpMap.put(_Fields.COUPON, new org.apache.thrift.meta_data.FieldMetaData("coupon", org.apache.thrift.TFieldRequirementType.DEFAULT, 
195
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
196
    tmpMap.put(_Fields.COD_AVAILABLE, new org.apache.thrift.meta_data.FieldMetaData("codAvailable", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15943 kshitij.so 197
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16117 kshitij.so 198
    tmpMap.put(_Fields.TAGLINE, new org.apache.thrift.meta_data.FieldMetaData("tagline", org.apache.thrift.TFieldRequirementType.DEFAULT, 
199
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
200
    tmpMap.put(_Fields.OFFER, new org.apache.thrift.meta_data.FieldMetaData("offer", org.apache.thrift.TFieldRequirementType.DEFAULT, 
201
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
16461 kshitij.so 202
    tmpMap.put(_Fields.GROSS_PRICE, new org.apache.thrift.meta_data.FieldMetaData("gross_price", org.apache.thrift.TFieldRequirementType.DEFAULT, 
203
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
18728 kshitij.so 204
    tmpMap.put(_Fields.CHEAPEST_BULK_PRICE, new org.apache.thrift.meta_data.FieldMetaData("cheapestBulkPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
205
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
14384 kshitij.so 206
    metaDataMap = Collections.unmodifiableMap(tmpMap);
207
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LivePricing.class, metaDataMap);
208
  }
209
 
210
  public LivePricing() {
211
  }
212
 
213
  public LivePricing(
214
    long _id,
215
    double available_price,
216
    String marketPlaceUrl,
217
    long in_stock,
218
    long source_id,
219
    String source_product_name,
14764 kshitij.so 220
    String thumbnail,
221
    long cash_back_type,
15903 kshitij.so 222
    double cash_back,
223
    String coupon,
16117 kshitij.so 224
    long codAvailable,
225
    String tagline,
16461 kshitij.so 226
    String offer,
18728 kshitij.so 227
    double gross_price,
228
    double cheapestBulkPrice)
14384 kshitij.so 229
  {
230
    this();
231
    this._id = _id;
232
    set_idIsSet(true);
233
    this.available_price = available_price;
234
    setAvailable_priceIsSet(true);
235
    this.marketPlaceUrl = marketPlaceUrl;
236
    this.in_stock = in_stock;
237
    setIn_stockIsSet(true);
238
    this.source_id = source_id;
239
    setSource_idIsSet(true);
240
    this.source_product_name = source_product_name;
241
    this.thumbnail = thumbnail;
14764 kshitij.so 242
    this.cash_back_type = cash_back_type;
243
    setCash_back_typeIsSet(true);
244
    this.cash_back = cash_back;
245
    setCash_backIsSet(true);
15903 kshitij.so 246
    this.coupon = coupon;
247
    this.codAvailable = codAvailable;
248
    setCodAvailableIsSet(true);
16117 kshitij.so 249
    this.tagline = tagline;
250
    this.offer = offer;
16461 kshitij.so 251
    this.gross_price = gross_price;
252
    setGross_priceIsSet(true);
18728 kshitij.so 253
    this.cheapestBulkPrice = cheapestBulkPrice;
254
    setCheapestBulkPriceIsSet(true);
14384 kshitij.so 255
  }
256
 
257
  /**
258
   * Performs a deep copy on <i>other</i>.
259
   */
260
  public LivePricing(LivePricing other) {
261
    __isset_bit_vector.clear();
262
    __isset_bit_vector.or(other.__isset_bit_vector);
263
    this._id = other._id;
264
    this.available_price = other.available_price;
265
    if (other.isSetMarketPlaceUrl()) {
266
      this.marketPlaceUrl = other.marketPlaceUrl;
267
    }
268
    this.in_stock = other.in_stock;
269
    this.source_id = other.source_id;
270
    if (other.isSetSource_product_name()) {
271
      this.source_product_name = other.source_product_name;
272
    }
273
    if (other.isSetThumbnail()) {
274
      this.thumbnail = other.thumbnail;
275
    }
14764 kshitij.so 276
    this.cash_back_type = other.cash_back_type;
277
    this.cash_back = other.cash_back;
15903 kshitij.so 278
    if (other.isSetCoupon()) {
279
      this.coupon = other.coupon;
280
    }
281
    this.codAvailable = other.codAvailable;
16117 kshitij.so 282
    if (other.isSetTagline()) {
283
      this.tagline = other.tagline;
284
    }
285
    if (other.isSetOffer()) {
286
      this.offer = other.offer;
287
    }
16461 kshitij.so 288
    this.gross_price = other.gross_price;
18728 kshitij.so 289
    this.cheapestBulkPrice = other.cheapestBulkPrice;
14384 kshitij.so 290
  }
291
 
292
  public LivePricing deepCopy() {
293
    return new LivePricing(this);
294
  }
295
 
296
  @Override
297
  public void clear() {
298
    set_idIsSet(false);
299
    this._id = 0;
300
    setAvailable_priceIsSet(false);
301
    this.available_price = 0.0;
302
    this.marketPlaceUrl = null;
303
    setIn_stockIsSet(false);
304
    this.in_stock = 0;
305
    setSource_idIsSet(false);
306
    this.source_id = 0;
307
    this.source_product_name = null;
308
    this.thumbnail = null;
14764 kshitij.so 309
    setCash_back_typeIsSet(false);
310
    this.cash_back_type = 0;
311
    setCash_backIsSet(false);
312
    this.cash_back = 0.0;
15903 kshitij.so 313
    this.coupon = null;
314
    setCodAvailableIsSet(false);
15943 kshitij.so 315
    this.codAvailable = 0;
16117 kshitij.so 316
    this.tagline = null;
317
    this.offer = null;
16461 kshitij.so 318
    setGross_priceIsSet(false);
319
    this.gross_price = 0.0;
18728 kshitij.so 320
    setCheapestBulkPriceIsSet(false);
321
    this.cheapestBulkPrice = 0.0;
14384 kshitij.so 322
  }
323
 
324
  public long get_id() {
325
    return this._id;
326
  }
327
 
328
  public void set_id(long _id) {
329
    this._id = _id;
330
    set_idIsSet(true);
331
  }
332
 
333
  public void unset_id() {
334
    __isset_bit_vector.clear(___ID_ISSET_ID);
335
  }
336
 
337
  /** Returns true if field _id is set (has been assigned a value) and false otherwise */
338
  public boolean isSet_id() {
339
    return __isset_bit_vector.get(___ID_ISSET_ID);
340
  }
341
 
342
  public void set_idIsSet(boolean value) {
343
    __isset_bit_vector.set(___ID_ISSET_ID, value);
344
  }
345
 
346
  public double getAvailable_price() {
347
    return this.available_price;
348
  }
349
 
350
  public void setAvailable_price(double available_price) {
351
    this.available_price = available_price;
352
    setAvailable_priceIsSet(true);
353
  }
354
 
355
  public void unsetAvailable_price() {
356
    __isset_bit_vector.clear(__AVAILABLE_PRICE_ISSET_ID);
357
  }
358
 
359
  /** Returns true if field available_price is set (has been assigned a value) and false otherwise */
360
  public boolean isSetAvailable_price() {
361
    return __isset_bit_vector.get(__AVAILABLE_PRICE_ISSET_ID);
362
  }
363
 
364
  public void setAvailable_priceIsSet(boolean value) {
365
    __isset_bit_vector.set(__AVAILABLE_PRICE_ISSET_ID, value);
366
  }
367
 
368
  public String getMarketPlaceUrl() {
369
    return this.marketPlaceUrl;
370
  }
371
 
372
  public void setMarketPlaceUrl(String marketPlaceUrl) {
373
    this.marketPlaceUrl = marketPlaceUrl;
374
  }
375
 
376
  public void unsetMarketPlaceUrl() {
377
    this.marketPlaceUrl = null;
378
  }
379
 
380
  /** Returns true if field marketPlaceUrl is set (has been assigned a value) and false otherwise */
381
  public boolean isSetMarketPlaceUrl() {
382
    return this.marketPlaceUrl != null;
383
  }
384
 
385
  public void setMarketPlaceUrlIsSet(boolean value) {
386
    if (!value) {
387
      this.marketPlaceUrl = null;
388
    }
389
  }
390
 
391
  public long getIn_stock() {
392
    return this.in_stock;
393
  }
394
 
395
  public void setIn_stock(long in_stock) {
396
    this.in_stock = in_stock;
397
    setIn_stockIsSet(true);
398
  }
399
 
400
  public void unsetIn_stock() {
401
    __isset_bit_vector.clear(__IN_STOCK_ISSET_ID);
402
  }
403
 
404
  /** Returns true if field in_stock is set (has been assigned a value) and false otherwise */
405
  public boolean isSetIn_stock() {
406
    return __isset_bit_vector.get(__IN_STOCK_ISSET_ID);
407
  }
408
 
409
  public void setIn_stockIsSet(boolean value) {
410
    __isset_bit_vector.set(__IN_STOCK_ISSET_ID, value);
411
  }
412
 
413
  public long getSource_id() {
414
    return this.source_id;
415
  }
416
 
417
  public void setSource_id(long source_id) {
418
    this.source_id = source_id;
419
    setSource_idIsSet(true);
420
  }
421
 
422
  public void unsetSource_id() {
423
    __isset_bit_vector.clear(__SOURCE_ID_ISSET_ID);
424
  }
425
 
426
  /** Returns true if field source_id is set (has been assigned a value) and false otherwise */
427
  public boolean isSetSource_id() {
428
    return __isset_bit_vector.get(__SOURCE_ID_ISSET_ID);
429
  }
430
 
431
  public void setSource_idIsSet(boolean value) {
432
    __isset_bit_vector.set(__SOURCE_ID_ISSET_ID, value);
433
  }
434
 
435
  public String getSource_product_name() {
436
    return this.source_product_name;
437
  }
438
 
439
  public void setSource_product_name(String source_product_name) {
440
    this.source_product_name = source_product_name;
441
  }
442
 
443
  public void unsetSource_product_name() {
444
    this.source_product_name = null;
445
  }
446
 
447
  /** Returns true if field source_product_name is set (has been assigned a value) and false otherwise */
448
  public boolean isSetSource_product_name() {
449
    return this.source_product_name != null;
450
  }
451
 
452
  public void setSource_product_nameIsSet(boolean value) {
453
    if (!value) {
454
      this.source_product_name = null;
455
    }
456
  }
457
 
458
  public String getThumbnail() {
459
    return this.thumbnail;
460
  }
461
 
462
  public void setThumbnail(String thumbnail) {
463
    this.thumbnail = thumbnail;
464
  }
465
 
466
  public void unsetThumbnail() {
467
    this.thumbnail = null;
468
  }
469
 
470
  /** Returns true if field thumbnail is set (has been assigned a value) and false otherwise */
471
  public boolean isSetThumbnail() {
472
    return this.thumbnail != null;
473
  }
474
 
475
  public void setThumbnailIsSet(boolean value) {
476
    if (!value) {
477
      this.thumbnail = null;
478
    }
479
  }
480
 
14764 kshitij.so 481
  public long getCash_back_type() {
482
    return this.cash_back_type;
483
  }
484
 
485
  public void setCash_back_type(long cash_back_type) {
486
    this.cash_back_type = cash_back_type;
487
    setCash_back_typeIsSet(true);
488
  }
489
 
490
  public void unsetCash_back_type() {
491
    __isset_bit_vector.clear(__CASH_BACK_TYPE_ISSET_ID);
492
  }
493
 
494
  /** Returns true if field cash_back_type is set (has been assigned a value) and false otherwise */
495
  public boolean isSetCash_back_type() {
496
    return __isset_bit_vector.get(__CASH_BACK_TYPE_ISSET_ID);
497
  }
498
 
499
  public void setCash_back_typeIsSet(boolean value) {
500
    __isset_bit_vector.set(__CASH_BACK_TYPE_ISSET_ID, value);
501
  }
502
 
503
  public double getCash_back() {
504
    return this.cash_back;
505
  }
506
 
507
  public void setCash_back(double cash_back) {
508
    this.cash_back = cash_back;
509
    setCash_backIsSet(true);
510
  }
511
 
512
  public void unsetCash_back() {
513
    __isset_bit_vector.clear(__CASH_BACK_ISSET_ID);
514
  }
515
 
516
  /** Returns true if field cash_back is set (has been assigned a value) and false otherwise */
517
  public boolean isSetCash_back() {
518
    return __isset_bit_vector.get(__CASH_BACK_ISSET_ID);
519
  }
520
 
521
  public void setCash_backIsSet(boolean value) {
522
    __isset_bit_vector.set(__CASH_BACK_ISSET_ID, value);
523
  }
524
 
15903 kshitij.so 525
  public String getCoupon() {
526
    return this.coupon;
527
  }
528
 
529
  public void setCoupon(String coupon) {
530
    this.coupon = coupon;
531
  }
532
 
533
  public void unsetCoupon() {
534
    this.coupon = null;
535
  }
536
 
537
  /** Returns true if field coupon is set (has been assigned a value) and false otherwise */
538
  public boolean isSetCoupon() {
539
    return this.coupon != null;
540
  }
541
 
542
  public void setCouponIsSet(boolean value) {
543
    if (!value) {
544
      this.coupon = null;
545
    }
546
  }
547
 
15943 kshitij.so 548
  public long getCodAvailable() {
15903 kshitij.so 549
    return this.codAvailable;
550
  }
551
 
15943 kshitij.so 552
  public void setCodAvailable(long codAvailable) {
15903 kshitij.so 553
    this.codAvailable = codAvailable;
554
    setCodAvailableIsSet(true);
555
  }
556
 
557
  public void unsetCodAvailable() {
558
    __isset_bit_vector.clear(__CODAVAILABLE_ISSET_ID);
559
  }
560
 
561
  /** Returns true if field codAvailable is set (has been assigned a value) and false otherwise */
562
  public boolean isSetCodAvailable() {
563
    return __isset_bit_vector.get(__CODAVAILABLE_ISSET_ID);
564
  }
565
 
566
  public void setCodAvailableIsSet(boolean value) {
567
    __isset_bit_vector.set(__CODAVAILABLE_ISSET_ID, value);
568
  }
569
 
16117 kshitij.so 570
  public String getTagline() {
571
    return this.tagline;
572
  }
573
 
574
  public void setTagline(String tagline) {
575
    this.tagline = tagline;
576
  }
577
 
578
  public void unsetTagline() {
579
    this.tagline = null;
580
  }
581
 
582
  /** Returns true if field tagline is set (has been assigned a value) and false otherwise */
583
  public boolean isSetTagline() {
584
    return this.tagline != null;
585
  }
586
 
587
  public void setTaglineIsSet(boolean value) {
588
    if (!value) {
589
      this.tagline = null;
590
    }
591
  }
592
 
593
  public String getOffer() {
594
    return this.offer;
595
  }
596
 
597
  public void setOffer(String offer) {
598
    this.offer = offer;
599
  }
600
 
601
  public void unsetOffer() {
602
    this.offer = null;
603
  }
604
 
605
  /** Returns true if field offer is set (has been assigned a value) and false otherwise */
606
  public boolean isSetOffer() {
607
    return this.offer != null;
608
  }
609
 
610
  public void setOfferIsSet(boolean value) {
611
    if (!value) {
612
      this.offer = null;
613
    }
614
  }
615
 
16461 kshitij.so 616
  public double getGross_price() {
617
    return this.gross_price;
618
  }
619
 
620
  public void setGross_price(double gross_price) {
621
    this.gross_price = gross_price;
622
    setGross_priceIsSet(true);
623
  }
624
 
625
  public void unsetGross_price() {
626
    __isset_bit_vector.clear(__GROSS_PRICE_ISSET_ID);
627
  }
628
 
629
  /** Returns true if field gross_price is set (has been assigned a value) and false otherwise */
630
  public boolean isSetGross_price() {
631
    return __isset_bit_vector.get(__GROSS_PRICE_ISSET_ID);
632
  }
633
 
634
  public void setGross_priceIsSet(boolean value) {
635
    __isset_bit_vector.set(__GROSS_PRICE_ISSET_ID, value);
636
  }
637
 
18728 kshitij.so 638
  public double getCheapestBulkPrice() {
639
    return this.cheapestBulkPrice;
640
  }
641
 
642
  public void setCheapestBulkPrice(double cheapestBulkPrice) {
643
    this.cheapestBulkPrice = cheapestBulkPrice;
644
    setCheapestBulkPriceIsSet(true);
645
  }
646
 
647
  public void unsetCheapestBulkPrice() {
648
    __isset_bit_vector.clear(__CHEAPESTBULKPRICE_ISSET_ID);
649
  }
650
 
651
  /** Returns true if field cheapestBulkPrice is set (has been assigned a value) and false otherwise */
652
  public boolean isSetCheapestBulkPrice() {
653
    return __isset_bit_vector.get(__CHEAPESTBULKPRICE_ISSET_ID);
654
  }
655
 
656
  public void setCheapestBulkPriceIsSet(boolean value) {
657
    __isset_bit_vector.set(__CHEAPESTBULKPRICE_ISSET_ID, value);
658
  }
659
 
14384 kshitij.so 660
  public void setFieldValue(_Fields field, Object value) {
661
    switch (field) {
662
    case _ID:
663
      if (value == null) {
664
        unset_id();
665
      } else {
666
        set_id((Long)value);
667
      }
668
      break;
669
 
670
    case AVAILABLE_PRICE:
671
      if (value == null) {
672
        unsetAvailable_price();
673
      } else {
674
        setAvailable_price((Double)value);
675
      }
676
      break;
677
 
678
    case MARKET_PLACE_URL:
679
      if (value == null) {
680
        unsetMarketPlaceUrl();
681
      } else {
682
        setMarketPlaceUrl((String)value);
683
      }
684
      break;
685
 
686
    case IN_STOCK:
687
      if (value == null) {
688
        unsetIn_stock();
689
      } else {
690
        setIn_stock((Long)value);
691
      }
692
      break;
693
 
694
    case SOURCE_ID:
695
      if (value == null) {
696
        unsetSource_id();
697
      } else {
698
        setSource_id((Long)value);
699
      }
700
      break;
701
 
702
    case SOURCE_PRODUCT_NAME:
703
      if (value == null) {
704
        unsetSource_product_name();
705
      } else {
706
        setSource_product_name((String)value);
707
      }
708
      break;
709
 
710
    case THUMBNAIL:
711
      if (value == null) {
712
        unsetThumbnail();
713
      } else {
714
        setThumbnail((String)value);
715
      }
716
      break;
717
 
14764 kshitij.so 718
    case CASH_BACK_TYPE:
719
      if (value == null) {
720
        unsetCash_back_type();
721
      } else {
722
        setCash_back_type((Long)value);
723
      }
724
      break;
725
 
726
    case CASH_BACK:
727
      if (value == null) {
728
        unsetCash_back();
729
      } else {
730
        setCash_back((Double)value);
731
      }
732
      break;
733
 
15903 kshitij.so 734
    case COUPON:
735
      if (value == null) {
736
        unsetCoupon();
737
      } else {
738
        setCoupon((String)value);
739
      }
740
      break;
741
 
742
    case COD_AVAILABLE:
743
      if (value == null) {
744
        unsetCodAvailable();
745
      } else {
15943 kshitij.so 746
        setCodAvailable((Long)value);
15903 kshitij.so 747
      }
748
      break;
749
 
16117 kshitij.so 750
    case TAGLINE:
751
      if (value == null) {
752
        unsetTagline();
753
      } else {
754
        setTagline((String)value);
755
      }
756
      break;
757
 
758
    case OFFER:
759
      if (value == null) {
760
        unsetOffer();
761
      } else {
762
        setOffer((String)value);
763
      }
764
      break;
765
 
16461 kshitij.so 766
    case GROSS_PRICE:
767
      if (value == null) {
768
        unsetGross_price();
769
      } else {
770
        setGross_price((Double)value);
771
      }
772
      break;
773
 
18728 kshitij.so 774
    case CHEAPEST_BULK_PRICE:
775
      if (value == null) {
776
        unsetCheapestBulkPrice();
777
      } else {
778
        setCheapestBulkPrice((Double)value);
779
      }
780
      break;
781
 
14384 kshitij.so 782
    }
783
  }
784
 
785
  public Object getFieldValue(_Fields field) {
786
    switch (field) {
787
    case _ID:
788
      return Long.valueOf(get_id());
789
 
790
    case AVAILABLE_PRICE:
791
      return Double.valueOf(getAvailable_price());
792
 
793
    case MARKET_PLACE_URL:
794
      return getMarketPlaceUrl();
795
 
796
    case IN_STOCK:
797
      return Long.valueOf(getIn_stock());
798
 
799
    case SOURCE_ID:
800
      return Long.valueOf(getSource_id());
801
 
802
    case SOURCE_PRODUCT_NAME:
803
      return getSource_product_name();
804
 
805
    case THUMBNAIL:
806
      return getThumbnail();
807
 
14764 kshitij.so 808
    case CASH_BACK_TYPE:
809
      return Long.valueOf(getCash_back_type());
810
 
811
    case CASH_BACK:
812
      return Double.valueOf(getCash_back());
813
 
15903 kshitij.so 814
    case COUPON:
815
      return getCoupon();
816
 
817
    case COD_AVAILABLE:
15943 kshitij.so 818
      return Long.valueOf(getCodAvailable());
15903 kshitij.so 819
 
16117 kshitij.so 820
    case TAGLINE:
821
      return getTagline();
822
 
823
    case OFFER:
824
      return getOffer();
825
 
16461 kshitij.so 826
    case GROSS_PRICE:
827
      return Double.valueOf(getGross_price());
828
 
18728 kshitij.so 829
    case CHEAPEST_BULK_PRICE:
830
      return Double.valueOf(getCheapestBulkPrice());
831
 
14384 kshitij.so 832
    }
833
    throw new IllegalStateException();
834
  }
835
 
836
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
837
  public boolean isSet(_Fields field) {
838
    if (field == null) {
839
      throw new IllegalArgumentException();
840
    }
841
 
842
    switch (field) {
843
    case _ID:
844
      return isSet_id();
845
    case AVAILABLE_PRICE:
846
      return isSetAvailable_price();
847
    case MARKET_PLACE_URL:
848
      return isSetMarketPlaceUrl();
849
    case IN_STOCK:
850
      return isSetIn_stock();
851
    case SOURCE_ID:
852
      return isSetSource_id();
853
    case SOURCE_PRODUCT_NAME:
854
      return isSetSource_product_name();
855
    case THUMBNAIL:
856
      return isSetThumbnail();
14764 kshitij.so 857
    case CASH_BACK_TYPE:
858
      return isSetCash_back_type();
859
    case CASH_BACK:
860
      return isSetCash_back();
15903 kshitij.so 861
    case COUPON:
862
      return isSetCoupon();
863
    case COD_AVAILABLE:
864
      return isSetCodAvailable();
16117 kshitij.so 865
    case TAGLINE:
866
      return isSetTagline();
867
    case OFFER:
868
      return isSetOffer();
16461 kshitij.so 869
    case GROSS_PRICE:
870
      return isSetGross_price();
18728 kshitij.so 871
    case CHEAPEST_BULK_PRICE:
872
      return isSetCheapestBulkPrice();
14384 kshitij.so 873
    }
874
    throw new IllegalStateException();
875
  }
876
 
877
  @Override
878
  public boolean equals(Object that) {
879
    if (that == null)
880
      return false;
881
    if (that instanceof LivePricing)
882
      return this.equals((LivePricing)that);
883
    return false;
884
  }
885
 
886
  public boolean equals(LivePricing that) {
887
    if (that == null)
888
      return false;
889
 
890
    boolean this_present__id = true;
891
    boolean that_present__id = true;
892
    if (this_present__id || that_present__id) {
893
      if (!(this_present__id && that_present__id))
894
        return false;
895
      if (this._id != that._id)
896
        return false;
897
    }
898
 
899
    boolean this_present_available_price = true;
900
    boolean that_present_available_price = true;
901
    if (this_present_available_price || that_present_available_price) {
902
      if (!(this_present_available_price && that_present_available_price))
903
        return false;
904
      if (this.available_price != that.available_price)
905
        return false;
906
    }
907
 
908
    boolean this_present_marketPlaceUrl = true && this.isSetMarketPlaceUrl();
909
    boolean that_present_marketPlaceUrl = true && that.isSetMarketPlaceUrl();
910
    if (this_present_marketPlaceUrl || that_present_marketPlaceUrl) {
911
      if (!(this_present_marketPlaceUrl && that_present_marketPlaceUrl))
912
        return false;
913
      if (!this.marketPlaceUrl.equals(that.marketPlaceUrl))
914
        return false;
915
    }
916
 
917
    boolean this_present_in_stock = true;
918
    boolean that_present_in_stock = true;
919
    if (this_present_in_stock || that_present_in_stock) {
920
      if (!(this_present_in_stock && that_present_in_stock))
921
        return false;
922
      if (this.in_stock != that.in_stock)
923
        return false;
924
    }
925
 
926
    boolean this_present_source_id = true;
927
    boolean that_present_source_id = true;
928
    if (this_present_source_id || that_present_source_id) {
929
      if (!(this_present_source_id && that_present_source_id))
930
        return false;
931
      if (this.source_id != that.source_id)
932
        return false;
933
    }
934
 
935
    boolean this_present_source_product_name = true && this.isSetSource_product_name();
936
    boolean that_present_source_product_name = true && that.isSetSource_product_name();
937
    if (this_present_source_product_name || that_present_source_product_name) {
938
      if (!(this_present_source_product_name && that_present_source_product_name))
939
        return false;
940
      if (!this.source_product_name.equals(that.source_product_name))
941
        return false;
942
    }
943
 
944
    boolean this_present_thumbnail = true && this.isSetThumbnail();
945
    boolean that_present_thumbnail = true && that.isSetThumbnail();
946
    if (this_present_thumbnail || that_present_thumbnail) {
947
      if (!(this_present_thumbnail && that_present_thumbnail))
948
        return false;
949
      if (!this.thumbnail.equals(that.thumbnail))
950
        return false;
951
    }
952
 
14764 kshitij.so 953
    boolean this_present_cash_back_type = true;
954
    boolean that_present_cash_back_type = true;
955
    if (this_present_cash_back_type || that_present_cash_back_type) {
956
      if (!(this_present_cash_back_type && that_present_cash_back_type))
957
        return false;
958
      if (this.cash_back_type != that.cash_back_type)
959
        return false;
960
    }
961
 
962
    boolean this_present_cash_back = true;
963
    boolean that_present_cash_back = true;
964
    if (this_present_cash_back || that_present_cash_back) {
965
      if (!(this_present_cash_back && that_present_cash_back))
966
        return false;
967
      if (this.cash_back != that.cash_back)
968
        return false;
969
    }
970
 
15903 kshitij.so 971
    boolean this_present_coupon = true && this.isSetCoupon();
972
    boolean that_present_coupon = true && that.isSetCoupon();
973
    if (this_present_coupon || that_present_coupon) {
974
      if (!(this_present_coupon && that_present_coupon))
975
        return false;
976
      if (!this.coupon.equals(that.coupon))
977
        return false;
978
    }
979
 
980
    boolean this_present_codAvailable = true;
981
    boolean that_present_codAvailable = true;
982
    if (this_present_codAvailable || that_present_codAvailable) {
983
      if (!(this_present_codAvailable && that_present_codAvailable))
984
        return false;
985
      if (this.codAvailable != that.codAvailable)
986
        return false;
987
    }
988
 
16117 kshitij.so 989
    boolean this_present_tagline = true && this.isSetTagline();
990
    boolean that_present_tagline = true && that.isSetTagline();
991
    if (this_present_tagline || that_present_tagline) {
992
      if (!(this_present_tagline && that_present_tagline))
993
        return false;
994
      if (!this.tagline.equals(that.tagline))
995
        return false;
996
    }
997
 
998
    boolean this_present_offer = true && this.isSetOffer();
999
    boolean that_present_offer = true && that.isSetOffer();
1000
    if (this_present_offer || that_present_offer) {
1001
      if (!(this_present_offer && that_present_offer))
1002
        return false;
1003
      if (!this.offer.equals(that.offer))
1004
        return false;
1005
    }
1006
 
16461 kshitij.so 1007
    boolean this_present_gross_price = true;
1008
    boolean that_present_gross_price = true;
1009
    if (this_present_gross_price || that_present_gross_price) {
1010
      if (!(this_present_gross_price && that_present_gross_price))
1011
        return false;
1012
      if (this.gross_price != that.gross_price)
1013
        return false;
1014
    }
1015
 
18728 kshitij.so 1016
    boolean this_present_cheapestBulkPrice = true;
1017
    boolean that_present_cheapestBulkPrice = true;
1018
    if (this_present_cheapestBulkPrice || that_present_cheapestBulkPrice) {
1019
      if (!(this_present_cheapestBulkPrice && that_present_cheapestBulkPrice))
1020
        return false;
1021
      if (this.cheapestBulkPrice != that.cheapestBulkPrice)
1022
        return false;
1023
    }
1024
 
14384 kshitij.so 1025
    return true;
1026
  }
1027
 
1028
  @Override
1029
  public int hashCode() {
1030
    return 0;
1031
  }
1032
 
1033
  public int compareTo(LivePricing other) {
1034
    if (!getClass().equals(other.getClass())) {
1035
      return getClass().getName().compareTo(other.getClass().getName());
1036
    }
1037
 
1038
    int lastComparison = 0;
1039
    LivePricing typedOther = (LivePricing)other;
1040
 
1041
    lastComparison = Boolean.valueOf(isSet_id()).compareTo(typedOther.isSet_id());
1042
    if (lastComparison != 0) {
1043
      return lastComparison;
1044
    }
1045
    if (isSet_id()) {
1046
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._id, typedOther._id);
1047
      if (lastComparison != 0) {
1048
        return lastComparison;
1049
      }
1050
    }
1051
    lastComparison = Boolean.valueOf(isSetAvailable_price()).compareTo(typedOther.isSetAvailable_price());
1052
    if (lastComparison != 0) {
1053
      return lastComparison;
1054
    }
1055
    if (isSetAvailable_price()) {
1056
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.available_price, typedOther.available_price);
1057
      if (lastComparison != 0) {
1058
        return lastComparison;
1059
      }
1060
    }
1061
    lastComparison = Boolean.valueOf(isSetMarketPlaceUrl()).compareTo(typedOther.isSetMarketPlaceUrl());
1062
    if (lastComparison != 0) {
1063
      return lastComparison;
1064
    }
1065
    if (isSetMarketPlaceUrl()) {
1066
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.marketPlaceUrl, typedOther.marketPlaceUrl);
1067
      if (lastComparison != 0) {
1068
        return lastComparison;
1069
      }
1070
    }
1071
    lastComparison = Boolean.valueOf(isSetIn_stock()).compareTo(typedOther.isSetIn_stock());
1072
    if (lastComparison != 0) {
1073
      return lastComparison;
1074
    }
1075
    if (isSetIn_stock()) {
1076
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.in_stock, typedOther.in_stock);
1077
      if (lastComparison != 0) {
1078
        return lastComparison;
1079
      }
1080
    }
1081
    lastComparison = Boolean.valueOf(isSetSource_id()).compareTo(typedOther.isSetSource_id());
1082
    if (lastComparison != 0) {
1083
      return lastComparison;
1084
    }
1085
    if (isSetSource_id()) {
1086
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_id, typedOther.source_id);
1087
      if (lastComparison != 0) {
1088
        return lastComparison;
1089
      }
1090
    }
1091
    lastComparison = Boolean.valueOf(isSetSource_product_name()).compareTo(typedOther.isSetSource_product_name());
1092
    if (lastComparison != 0) {
1093
      return lastComparison;
1094
    }
1095
    if (isSetSource_product_name()) {
1096
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source_product_name, typedOther.source_product_name);
1097
      if (lastComparison != 0) {
1098
        return lastComparison;
1099
      }
1100
    }
1101
    lastComparison = Boolean.valueOf(isSetThumbnail()).compareTo(typedOther.isSetThumbnail());
1102
    if (lastComparison != 0) {
1103
      return lastComparison;
1104
    }
1105
    if (isSetThumbnail()) {
1106
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.thumbnail, typedOther.thumbnail);
1107
      if (lastComparison != 0) {
1108
        return lastComparison;
1109
      }
1110
    }
14764 kshitij.so 1111
    lastComparison = Boolean.valueOf(isSetCash_back_type()).compareTo(typedOther.isSetCash_back_type());
1112
    if (lastComparison != 0) {
1113
      return lastComparison;
1114
    }
1115
    if (isSetCash_back_type()) {
1116
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cash_back_type, typedOther.cash_back_type);
1117
      if (lastComparison != 0) {
1118
        return lastComparison;
1119
      }
1120
    }
1121
    lastComparison = Boolean.valueOf(isSetCash_back()).compareTo(typedOther.isSetCash_back());
1122
    if (lastComparison != 0) {
1123
      return lastComparison;
1124
    }
1125
    if (isSetCash_back()) {
1126
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cash_back, typedOther.cash_back);
1127
      if (lastComparison != 0) {
1128
        return lastComparison;
1129
      }
1130
    }
15903 kshitij.so 1131
    lastComparison = Boolean.valueOf(isSetCoupon()).compareTo(typedOther.isSetCoupon());
1132
    if (lastComparison != 0) {
1133
      return lastComparison;
1134
    }
1135
    if (isSetCoupon()) {
1136
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.coupon, typedOther.coupon);
1137
      if (lastComparison != 0) {
1138
        return lastComparison;
1139
      }
1140
    }
1141
    lastComparison = Boolean.valueOf(isSetCodAvailable()).compareTo(typedOther.isSetCodAvailable());
1142
    if (lastComparison != 0) {
1143
      return lastComparison;
1144
    }
1145
    if (isSetCodAvailable()) {
1146
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.codAvailable, typedOther.codAvailable);
1147
      if (lastComparison != 0) {
1148
        return lastComparison;
1149
      }
1150
    }
16117 kshitij.so 1151
    lastComparison = Boolean.valueOf(isSetTagline()).compareTo(typedOther.isSetTagline());
1152
    if (lastComparison != 0) {
1153
      return lastComparison;
1154
    }
1155
    if (isSetTagline()) {
1156
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tagline, typedOther.tagline);
1157
      if (lastComparison != 0) {
1158
        return lastComparison;
1159
      }
1160
    }
1161
    lastComparison = Boolean.valueOf(isSetOffer()).compareTo(typedOther.isSetOffer());
1162
    if (lastComparison != 0) {
1163
      return lastComparison;
1164
    }
1165
    if (isSetOffer()) {
1166
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offer, typedOther.offer);
1167
      if (lastComparison != 0) {
1168
        return lastComparison;
1169
      }
1170
    }
16461 kshitij.so 1171
    lastComparison = Boolean.valueOf(isSetGross_price()).compareTo(typedOther.isSetGross_price());
1172
    if (lastComparison != 0) {
1173
      return lastComparison;
1174
    }
1175
    if (isSetGross_price()) {
1176
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gross_price, typedOther.gross_price);
1177
      if (lastComparison != 0) {
1178
        return lastComparison;
1179
      }
1180
    }
18728 kshitij.so 1181
    lastComparison = Boolean.valueOf(isSetCheapestBulkPrice()).compareTo(typedOther.isSetCheapestBulkPrice());
1182
    if (lastComparison != 0) {
1183
      return lastComparison;
1184
    }
1185
    if (isSetCheapestBulkPrice()) {
1186
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cheapestBulkPrice, typedOther.cheapestBulkPrice);
1187
      if (lastComparison != 0) {
1188
        return lastComparison;
1189
      }
1190
    }
14384 kshitij.so 1191
    return 0;
1192
  }
1193
 
1194
  public _Fields fieldForId(int fieldId) {
1195
    return _Fields.findByThriftId(fieldId);
1196
  }
1197
 
1198
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1199
    org.apache.thrift.protocol.TField field;
1200
    iprot.readStructBegin();
1201
    while (true)
1202
    {
1203
      field = iprot.readFieldBegin();
1204
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1205
        break;
1206
      }
1207
      switch (field.id) {
1208
        case 1: // _ID
1209
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1210
            this._id = iprot.readI64();
1211
            set_idIsSet(true);
1212
          } else { 
1213
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1214
          }
1215
          break;
1216
        case 2: // AVAILABLE_PRICE
1217
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1218
            this.available_price = iprot.readDouble();
1219
            setAvailable_priceIsSet(true);
1220
          } else { 
1221
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1222
          }
1223
          break;
1224
        case 3: // MARKET_PLACE_URL
1225
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1226
            this.marketPlaceUrl = iprot.readString();
1227
          } else { 
1228
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1229
          }
1230
          break;
1231
        case 4: // IN_STOCK
1232
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1233
            this.in_stock = iprot.readI64();
1234
            setIn_stockIsSet(true);
1235
          } else { 
1236
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1237
          }
1238
          break;
1239
        case 5: // SOURCE_ID
1240
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1241
            this.source_id = iprot.readI64();
1242
            setSource_idIsSet(true);
1243
          } else { 
1244
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1245
          }
1246
          break;
1247
        case 6: // SOURCE_PRODUCT_NAME
1248
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1249
            this.source_product_name = iprot.readString();
1250
          } else { 
1251
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1252
          }
1253
          break;
1254
        case 7: // THUMBNAIL
1255
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1256
            this.thumbnail = iprot.readString();
1257
          } else { 
1258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1259
          }
1260
          break;
14764 kshitij.so 1261
        case 8: // CASH_BACK_TYPE
1262
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1263
            this.cash_back_type = iprot.readI64();
1264
            setCash_back_typeIsSet(true);
1265
          } else { 
1266
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1267
          }
1268
          break;
1269
        case 9: // CASH_BACK
1270
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1271
            this.cash_back = iprot.readDouble();
1272
            setCash_backIsSet(true);
1273
          } else { 
1274
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1275
          }
1276
          break;
15903 kshitij.so 1277
        case 10: // COUPON
1278
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1279
            this.coupon = iprot.readString();
1280
          } else { 
1281
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1282
          }
1283
          break;
1284
        case 11: // COD_AVAILABLE
15943 kshitij.so 1285
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1286
            this.codAvailable = iprot.readI64();
15903 kshitij.so 1287
            setCodAvailableIsSet(true);
1288
          } else { 
1289
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1290
          }
1291
          break;
16117 kshitij.so 1292
        case 12: // TAGLINE
1293
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1294
            this.tagline = iprot.readString();
1295
          } else { 
1296
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1297
          }
1298
          break;
1299
        case 13: // OFFER
1300
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1301
            this.offer = iprot.readString();
1302
          } else { 
1303
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1304
          }
1305
          break;
16461 kshitij.so 1306
        case 14: // GROSS_PRICE
1307
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1308
            this.gross_price = iprot.readDouble();
1309
            setGross_priceIsSet(true);
1310
          } else { 
1311
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1312
          }
1313
          break;
18728 kshitij.so 1314
        case 15: // CHEAPEST_BULK_PRICE
1315
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1316
            this.cheapestBulkPrice = iprot.readDouble();
1317
            setCheapestBulkPriceIsSet(true);
1318
          } else { 
1319
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1320
          }
1321
          break;
14384 kshitij.so 1322
        default:
1323
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1324
      }
1325
      iprot.readFieldEnd();
1326
    }
1327
    iprot.readStructEnd();
1328
    validate();
1329
  }
1330
 
1331
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1332
    validate();
1333
 
1334
    oprot.writeStructBegin(STRUCT_DESC);
1335
    oprot.writeFieldBegin(_ID_FIELD_DESC);
1336
    oprot.writeI64(this._id);
1337
    oprot.writeFieldEnd();
1338
    oprot.writeFieldBegin(AVAILABLE_PRICE_FIELD_DESC);
1339
    oprot.writeDouble(this.available_price);
1340
    oprot.writeFieldEnd();
1341
    if (this.marketPlaceUrl != null) {
1342
      oprot.writeFieldBegin(MARKET_PLACE_URL_FIELD_DESC);
1343
      oprot.writeString(this.marketPlaceUrl);
1344
      oprot.writeFieldEnd();
1345
    }
1346
    oprot.writeFieldBegin(IN_STOCK_FIELD_DESC);
1347
    oprot.writeI64(this.in_stock);
1348
    oprot.writeFieldEnd();
1349
    oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
1350
    oprot.writeI64(this.source_id);
1351
    oprot.writeFieldEnd();
1352
    if (this.source_product_name != null) {
1353
      oprot.writeFieldBegin(SOURCE_PRODUCT_NAME_FIELD_DESC);
1354
      oprot.writeString(this.source_product_name);
1355
      oprot.writeFieldEnd();
1356
    }
1357
    if (this.thumbnail != null) {
1358
      oprot.writeFieldBegin(THUMBNAIL_FIELD_DESC);
1359
      oprot.writeString(this.thumbnail);
1360
      oprot.writeFieldEnd();
1361
    }
14764 kshitij.so 1362
    oprot.writeFieldBegin(CASH_BACK_TYPE_FIELD_DESC);
1363
    oprot.writeI64(this.cash_back_type);
1364
    oprot.writeFieldEnd();
1365
    oprot.writeFieldBegin(CASH_BACK_FIELD_DESC);
1366
    oprot.writeDouble(this.cash_back);
1367
    oprot.writeFieldEnd();
15903 kshitij.so 1368
    if (this.coupon != null) {
1369
      oprot.writeFieldBegin(COUPON_FIELD_DESC);
1370
      oprot.writeString(this.coupon);
1371
      oprot.writeFieldEnd();
1372
    }
1373
    oprot.writeFieldBegin(COD_AVAILABLE_FIELD_DESC);
15943 kshitij.so 1374
    oprot.writeI64(this.codAvailable);
15903 kshitij.so 1375
    oprot.writeFieldEnd();
16117 kshitij.so 1376
    if (this.tagline != null) {
1377
      oprot.writeFieldBegin(TAGLINE_FIELD_DESC);
1378
      oprot.writeString(this.tagline);
1379
      oprot.writeFieldEnd();
1380
    }
1381
    if (this.offer != null) {
1382
      oprot.writeFieldBegin(OFFER_FIELD_DESC);
1383
      oprot.writeString(this.offer);
1384
      oprot.writeFieldEnd();
1385
    }
16461 kshitij.so 1386
    oprot.writeFieldBegin(GROSS_PRICE_FIELD_DESC);
1387
    oprot.writeDouble(this.gross_price);
1388
    oprot.writeFieldEnd();
18728 kshitij.so 1389
    oprot.writeFieldBegin(CHEAPEST_BULK_PRICE_FIELD_DESC);
1390
    oprot.writeDouble(this.cheapestBulkPrice);
1391
    oprot.writeFieldEnd();
14384 kshitij.so 1392
    oprot.writeFieldStop();
1393
    oprot.writeStructEnd();
1394
  }
1395
 
1396
  @Override
1397
  public String toString() {
1398
    StringBuilder sb = new StringBuilder("LivePricing(");
1399
    boolean first = true;
1400
 
1401
    sb.append("_id:");
1402
    sb.append(this._id);
1403
    first = false;
1404
    if (!first) sb.append(", ");
1405
    sb.append("available_price:");
1406
    sb.append(this.available_price);
1407
    first = false;
1408
    if (!first) sb.append(", ");
1409
    sb.append("marketPlaceUrl:");
1410
    if (this.marketPlaceUrl == null) {
1411
      sb.append("null");
1412
    } else {
1413
      sb.append(this.marketPlaceUrl);
1414
    }
1415
    first = false;
1416
    if (!first) sb.append(", ");
1417
    sb.append("in_stock:");
1418
    sb.append(this.in_stock);
1419
    first = false;
1420
    if (!first) sb.append(", ");
1421
    sb.append("source_id:");
1422
    sb.append(this.source_id);
1423
    first = false;
1424
    if (!first) sb.append(", ");
1425
    sb.append("source_product_name:");
1426
    if (this.source_product_name == null) {
1427
      sb.append("null");
1428
    } else {
1429
      sb.append(this.source_product_name);
1430
    }
1431
    first = false;
1432
    if (!first) sb.append(", ");
1433
    sb.append("thumbnail:");
1434
    if (this.thumbnail == null) {
1435
      sb.append("null");
1436
    } else {
1437
      sb.append(this.thumbnail);
1438
    }
1439
    first = false;
14764 kshitij.so 1440
    if (!first) sb.append(", ");
1441
    sb.append("cash_back_type:");
1442
    sb.append(this.cash_back_type);
1443
    first = false;
1444
    if (!first) sb.append(", ");
1445
    sb.append("cash_back:");
1446
    sb.append(this.cash_back);
1447
    first = false;
15903 kshitij.so 1448
    if (!first) sb.append(", ");
1449
    sb.append("coupon:");
1450
    if (this.coupon == null) {
1451
      sb.append("null");
1452
    } else {
1453
      sb.append(this.coupon);
1454
    }
1455
    first = false;
1456
    if (!first) sb.append(", ");
1457
    sb.append("codAvailable:");
1458
    sb.append(this.codAvailable);
1459
    first = false;
16117 kshitij.so 1460
    if (!first) sb.append(", ");
1461
    sb.append("tagline:");
1462
    if (this.tagline == null) {
1463
      sb.append("null");
1464
    } else {
1465
      sb.append(this.tagline);
1466
    }
1467
    first = false;
1468
    if (!first) sb.append(", ");
1469
    sb.append("offer:");
1470
    if (this.offer == null) {
1471
      sb.append("null");
1472
    } else {
1473
      sb.append(this.offer);
1474
    }
1475
    first = false;
16461 kshitij.so 1476
    if (!first) sb.append(", ");
1477
    sb.append("gross_price:");
1478
    sb.append(this.gross_price);
1479
    first = false;
18728 kshitij.so 1480
    if (!first) sb.append(", ");
1481
    sb.append("cheapestBulkPrice:");
1482
    sb.append(this.cheapestBulkPrice);
1483
    first = false;
14384 kshitij.so 1484
    sb.append(")");
1485
    return sb.toString();
1486
  }
1487
 
1488
  public void validate() throws org.apache.thrift.TException {
1489
    // check for required fields
1490
  }
1491
 
1492
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1493
    try {
1494
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1495
    } catch (org.apache.thrift.TException te) {
1496
      throw new java.io.IOException(te);
1497
    }
1498
  }
1499
 
1500
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1501
    try {
1502
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1503
      __isset_bit_vector = new BitSet(1);
1504
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1505
    } catch (org.apache.thrift.TException te) {
1506
      throw new java.io.IOException(te);
1507
    }
1508
  }
1509
 
1510
}
1511