Subversion Repositories SmartDukaan

Rev

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