Subversion Repositories SmartDukaan

Rev

Rev 6736 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
553 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
553 chandransh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
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;
3430 rajveer 18
import java.nio.ByteBuffer;
553 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
3430 rajveer 23
public class Cart implements org.apache.thrift.TBase<Cart, Cart._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Cart");
553 chandransh 25
 
3430 rajveer 26
  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);
27
  private static final org.apache.thrift.protocol.TField LINES_FIELD_DESC = new org.apache.thrift.protocol.TField("lines", org.apache.thrift.protocol.TType.LIST, (short)2);
28
  private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.I32, (short)3);
29
  private static final org.apache.thrift.protocol.TField CREATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("createdOn", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField UPDATED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedOn", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField CHECKED_OUT_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("checkedOutOn", org.apache.thrift.protocol.TType.I64, (short)6);
5327 rajveer 32
  private static final org.apache.thrift.protocol.TField ADDRESS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("addressId", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField TOTAL_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("totalPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
34
  private static final org.apache.thrift.protocol.TField DISCOUNTED_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("discountedPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
  private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)10);
5553 rajveer 36
  private static final org.apache.thrift.protocol.TField PICKUP_STORE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("pickupStoreId", org.apache.thrift.protocol.TType.I64, (short)11);
6736 amit.gupta 37
  private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)12);
20873 kshitij.so 38
  private static final org.apache.thrift.protocol.TField WALLET_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("wallet_amount", org.apache.thrift.protocol.TType.DOUBLE, (short)13);
553 chandransh 39
 
3430 rajveer 40
  private long id; // required
41
  private List<Line> lines; // required
42
  private CartStatus status; // required
43
  private long createdOn; // required
44
  private long updatedOn; // required
45
  private long checkedOutOn; // required
46
  private long addressId; // required
47
  private double totalPrice; // required
48
  private double discountedPrice; // required
49
  private String couponCode; // required
5553 rajveer 50
  private long pickupStoreId; // required
6736 amit.gupta 51
  private String message; // required
20873 kshitij.so 52
  private double wallet_amount; // required
553 chandransh 53
 
54
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 55
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
553 chandransh 56
    ID((short)1, "id"),
57
    LINES((short)2, "lines"),
58
    /**
59
     * 
60
     * @see CartStatus
61
     */
62
    STATUS((short)3, "status"),
63
    CREATED_ON((short)4, "createdOn"),
64
    UPDATED_ON((short)5, "updatedOn"),
688 chandransh 65
    CHECKED_OUT_ON((short)6, "checkedOutOn"),
5327 rajveer 66
    ADDRESS_ID((short)7, "addressId"),
67
    TOTAL_PRICE((short)8, "totalPrice"),
68
    DISCOUNTED_PRICE((short)9, "discountedPrice"),
5553 rajveer 69
    COUPON_CODE((short)10, "couponCode"),
6736 amit.gupta 70
    PICKUP_STORE_ID((short)11, "pickupStoreId"),
20873 kshitij.so 71
    MESSAGE((short)12, "message"),
72
    WALLET_AMOUNT((short)13, "wallet_amount");
553 chandransh 73
 
74
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
75
 
76
    static {
77
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
78
        byName.put(field.getFieldName(), field);
79
      }
80
    }
81
 
82
    /**
83
     * Find the _Fields constant that matches fieldId, or null if its not found.
84
     */
85
    public static _Fields findByThriftId(int fieldId) {
3430 rajveer 86
      switch(fieldId) {
87
        case 1: // ID
88
          return ID;
89
        case 2: // LINES
90
          return LINES;
91
        case 3: // STATUS
92
          return STATUS;
93
        case 4: // CREATED_ON
94
          return CREATED_ON;
95
        case 5: // UPDATED_ON
96
          return UPDATED_ON;
97
        case 6: // CHECKED_OUT_ON
98
          return CHECKED_OUT_ON;
5327 rajveer 99
        case 7: // ADDRESS_ID
3430 rajveer 100
          return ADDRESS_ID;
5327 rajveer 101
        case 8: // TOTAL_PRICE
3430 rajveer 102
          return TOTAL_PRICE;
5327 rajveer 103
        case 9: // DISCOUNTED_PRICE
3430 rajveer 104
          return DISCOUNTED_PRICE;
5327 rajveer 105
        case 10: // COUPON_CODE
3430 rajveer 106
          return COUPON_CODE;
5553 rajveer 107
        case 11: // PICKUP_STORE_ID
108
          return PICKUP_STORE_ID;
6736 amit.gupta 109
        case 12: // MESSAGE
110
          return MESSAGE;
20873 kshitij.so 111
        case 13: // WALLET_AMOUNT
112
          return WALLET_AMOUNT;
3430 rajveer 113
        default:
114
          return null;
115
      }
553 chandransh 116
    }
117
 
118
    /**
119
     * Find the _Fields constant that matches fieldId, throwing an exception
120
     * if it is not found.
121
     */
122
    public static _Fields findByThriftIdOrThrow(int fieldId) {
123
      _Fields fields = findByThriftId(fieldId);
124
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
125
      return fields;
126
    }
127
 
128
    /**
129
     * Find the _Fields constant that matches name, or null if its not found.
130
     */
131
    public static _Fields findByName(String name) {
132
      return byName.get(name);
133
    }
134
 
135
    private final short _thriftId;
136
    private final String _fieldName;
137
 
138
    _Fields(short thriftId, String fieldName) {
139
      _thriftId = thriftId;
140
      _fieldName = fieldName;
141
    }
142
 
143
    public short getThriftFieldId() {
144
      return _thriftId;
145
    }
146
 
147
    public String getFieldName() {
148
      return _fieldName;
149
    }
150
  }
151
 
152
  // isset id assignments
153
  private static final int __ID_ISSET_ID = 0;
154
  private static final int __CREATEDON_ISSET_ID = 1;
155
  private static final int __UPDATEDON_ISSET_ID = 2;
688 chandransh 156
  private static final int __CHECKEDOUTON_ISSET_ID = 3;
5327 rajveer 157
  private static final int __ADDRESSID_ISSET_ID = 4;
158
  private static final int __TOTALPRICE_ISSET_ID = 5;
159
  private static final int __DISCOUNTEDPRICE_ISSET_ID = 6;
5553 rajveer 160
  private static final int __PICKUPSTOREID_ISSET_ID = 7;
20873 kshitij.so 161
  private static final int __WALLET_AMOUNT_ISSET_ID = 8;
162
  private BitSet __isset_bit_vector = new BitSet(9);
553 chandransh 163
 
3430 rajveer 164
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
553 chandransh 165
  static {
3430 rajveer 166
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
167
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
168
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
169
    tmpMap.put(_Fields.LINES, new org.apache.thrift.meta_data.FieldMetaData("lines", org.apache.thrift.TFieldRequirementType.DEFAULT, 
170
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
171
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Line.class))));
172
    tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
173
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CartStatus.class)));
174
    tmpMap.put(_Fields.CREATED_ON, new org.apache.thrift.meta_data.FieldMetaData("createdOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
175
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
176
    tmpMap.put(_Fields.UPDATED_ON, new org.apache.thrift.meta_data.FieldMetaData("updatedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
177
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
178
    tmpMap.put(_Fields.CHECKED_OUT_ON, new org.apache.thrift.meta_data.FieldMetaData("checkedOutOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
180
    tmpMap.put(_Fields.ADDRESS_ID, new org.apache.thrift.meta_data.FieldMetaData("addressId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
182
    tmpMap.put(_Fields.TOTAL_PRICE, new org.apache.thrift.meta_data.FieldMetaData("totalPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
184
    tmpMap.put(_Fields.DISCOUNTED_PRICE, new org.apache.thrift.meta_data.FieldMetaData("discountedPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
186
    tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
187
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
5553 rajveer 188
    tmpMap.put(_Fields.PICKUP_STORE_ID, new org.apache.thrift.meta_data.FieldMetaData("pickupStoreId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
189
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6736 amit.gupta 190
    tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
191
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
20873 kshitij.so 192
    tmpMap.put(_Fields.WALLET_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("wallet_amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
193
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
3430 rajveer 194
    metaDataMap = Collections.unmodifiableMap(tmpMap);
195
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Cart.class, metaDataMap);
553 chandransh 196
  }
197
 
198
  public Cart() {
199
  }
200
 
201
  public Cart(
202
    long id,
203
    List<Line> lines,
204
    CartStatus status,
205
    long createdOn,
206
    long updatedOn,
688 chandransh 207
    long checkedOutOn,
1982 varun.gupt 208
    long addressId,
209
    double totalPrice,
210
    double discountedPrice,
5553 rajveer 211
    String couponCode,
6736 amit.gupta 212
    long pickupStoreId,
20873 kshitij.so 213
    String message,
214
    double wallet_amount)
553 chandransh 215
  {
216
    this();
217
    this.id = id;
218
    setIdIsSet(true);
219
    this.lines = lines;
220
    this.status = status;
221
    this.createdOn = createdOn;
222
    setCreatedOnIsSet(true);
223
    this.updatedOn = updatedOn;
224
    setUpdatedOnIsSet(true);
688 chandransh 225
    this.checkedOutOn = checkedOutOn;
226
    setCheckedOutOnIsSet(true);
553 chandransh 227
    this.addressId = addressId;
228
    setAddressIdIsSet(true);
1982 varun.gupt 229
    this.totalPrice = totalPrice;
230
    setTotalPriceIsSet(true);
231
    this.discountedPrice = discountedPrice;
232
    setDiscountedPriceIsSet(true);
233
    this.couponCode = couponCode;
5553 rajveer 234
    this.pickupStoreId = pickupStoreId;
235
    setPickupStoreIdIsSet(true);
6736 amit.gupta 236
    this.message = message;
20873 kshitij.so 237
    this.wallet_amount = wallet_amount;
238
    setWallet_amountIsSet(true);
553 chandransh 239
  }
240
 
241
  /**
242
   * Performs a deep copy on <i>other</i>.
243
   */
244
  public Cart(Cart other) {
245
    __isset_bit_vector.clear();
246
    __isset_bit_vector.or(other.__isset_bit_vector);
247
    this.id = other.id;
248
    if (other.isSetLines()) {
249
      List<Line> __this__lines = new ArrayList<Line>();
250
      for (Line other_element : other.lines) {
251
        __this__lines.add(new Line(other_element));
252
      }
253
      this.lines = __this__lines;
254
    }
255
    if (other.isSetStatus()) {
256
      this.status = other.status;
257
    }
258
    this.createdOn = other.createdOn;
259
    this.updatedOn = other.updatedOn;
688 chandransh 260
    this.checkedOutOn = other.checkedOutOn;
553 chandransh 261
    this.addressId = other.addressId;
1982 varun.gupt 262
    this.totalPrice = other.totalPrice;
263
    this.discountedPrice = other.discountedPrice;
264
    if (other.isSetCouponCode()) {
265
      this.couponCode = other.couponCode;
266
    }
5553 rajveer 267
    this.pickupStoreId = other.pickupStoreId;
6736 amit.gupta 268
    if (other.isSetMessage()) {
269
      this.message = other.message;
270
    }
20873 kshitij.so 271
    this.wallet_amount = other.wallet_amount;
553 chandransh 272
  }
273
 
274
  public Cart deepCopy() {
275
    return new Cart(this);
276
  }
277
 
3430 rajveer 278
  @Override
279
  public void clear() {
280
    setIdIsSet(false);
281
    this.id = 0;
282
    this.lines = null;
283
    this.status = null;
284
    setCreatedOnIsSet(false);
285
    this.createdOn = 0;
286
    setUpdatedOnIsSet(false);
287
    this.updatedOn = 0;
288
    setCheckedOutOnIsSet(false);
289
    this.checkedOutOn = 0;
290
    setAddressIdIsSet(false);
291
    this.addressId = 0;
292
    setTotalPriceIsSet(false);
293
    this.totalPrice = 0.0;
294
    setDiscountedPriceIsSet(false);
295
    this.discountedPrice = 0.0;
296
    this.couponCode = null;
5553 rajveer 297
    setPickupStoreIdIsSet(false);
298
    this.pickupStoreId = 0;
6736 amit.gupta 299
    this.message = null;
20873 kshitij.so 300
    setWallet_amountIsSet(false);
301
    this.wallet_amount = 0.0;
553 chandransh 302
  }
303
 
304
  public long getId() {
305
    return this.id;
306
  }
307
 
3430 rajveer 308
  public void setId(long id) {
553 chandransh 309
    this.id = id;
310
    setIdIsSet(true);
311
  }
312
 
313
  public void unsetId() {
314
    __isset_bit_vector.clear(__ID_ISSET_ID);
315
  }
316
 
3430 rajveer 317
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
553 chandransh 318
  public boolean isSetId() {
319
    return __isset_bit_vector.get(__ID_ISSET_ID);
320
  }
321
 
322
  public void setIdIsSet(boolean value) {
323
    __isset_bit_vector.set(__ID_ISSET_ID, value);
324
  }
325
 
326
  public int getLinesSize() {
327
    return (this.lines == null) ? 0 : this.lines.size();
328
  }
329
 
330
  public java.util.Iterator<Line> getLinesIterator() {
331
    return (this.lines == null) ? null : this.lines.iterator();
332
  }
333
 
334
  public void addToLines(Line elem) {
335
    if (this.lines == null) {
336
      this.lines = new ArrayList<Line>();
337
    }
338
    this.lines.add(elem);
339
  }
340
 
341
  public List<Line> getLines() {
342
    return this.lines;
343
  }
344
 
3430 rajveer 345
  public void setLines(List<Line> lines) {
553 chandransh 346
    this.lines = lines;
347
  }
348
 
349
  public void unsetLines() {
350
    this.lines = null;
351
  }
352
 
3430 rajveer 353
  /** Returns true if field lines is set (has been assigned a value) and false otherwise */
553 chandransh 354
  public boolean isSetLines() {
355
    return this.lines != null;
356
  }
357
 
358
  public void setLinesIsSet(boolean value) {
359
    if (!value) {
360
      this.lines = null;
361
    }
362
  }
363
 
364
  /**
365
   * 
366
   * @see CartStatus
367
   */
368
  public CartStatus getStatus() {
369
    return this.status;
370
  }
371
 
372
  /**
373
   * 
374
   * @see CartStatus
375
   */
3430 rajveer 376
  public void setStatus(CartStatus status) {
553 chandransh 377
    this.status = status;
378
  }
379
 
380
  public void unsetStatus() {
381
    this.status = null;
382
  }
383
 
3430 rajveer 384
  /** Returns true if field status is set (has been assigned a value) and false otherwise */
553 chandransh 385
  public boolean isSetStatus() {
386
    return this.status != null;
387
  }
388
 
389
  public void setStatusIsSet(boolean value) {
390
    if (!value) {
391
      this.status = null;
392
    }
393
  }
394
 
395
  public long getCreatedOn() {
396
    return this.createdOn;
397
  }
398
 
3430 rajveer 399
  public void setCreatedOn(long createdOn) {
553 chandransh 400
    this.createdOn = createdOn;
401
    setCreatedOnIsSet(true);
402
  }
403
 
404
  public void unsetCreatedOn() {
405
    __isset_bit_vector.clear(__CREATEDON_ISSET_ID);
406
  }
407
 
3430 rajveer 408
  /** Returns true if field createdOn is set (has been assigned a value) and false otherwise */
553 chandransh 409
  public boolean isSetCreatedOn() {
410
    return __isset_bit_vector.get(__CREATEDON_ISSET_ID);
411
  }
412
 
413
  public void setCreatedOnIsSet(boolean value) {
414
    __isset_bit_vector.set(__CREATEDON_ISSET_ID, value);
415
  }
416
 
417
  public long getUpdatedOn() {
418
    return this.updatedOn;
419
  }
420
 
3430 rajveer 421
  public void setUpdatedOn(long updatedOn) {
553 chandransh 422
    this.updatedOn = updatedOn;
423
    setUpdatedOnIsSet(true);
424
  }
425
 
426
  public void unsetUpdatedOn() {
427
    __isset_bit_vector.clear(__UPDATEDON_ISSET_ID);
428
  }
429
 
3430 rajveer 430
  /** Returns true if field updatedOn is set (has been assigned a value) and false otherwise */
553 chandransh 431
  public boolean isSetUpdatedOn() {
432
    return __isset_bit_vector.get(__UPDATEDON_ISSET_ID);
433
  }
434
 
435
  public void setUpdatedOnIsSet(boolean value) {
436
    __isset_bit_vector.set(__UPDATEDON_ISSET_ID, value);
437
  }
438
 
688 chandransh 439
  public long getCheckedOutOn() {
440
    return this.checkedOutOn;
553 chandransh 441
  }
442
 
3430 rajveer 443
  public void setCheckedOutOn(long checkedOutOn) {
688 chandransh 444
    this.checkedOutOn = checkedOutOn;
445
    setCheckedOutOnIsSet(true);
553 chandransh 446
  }
447
 
688 chandransh 448
  public void unsetCheckedOutOn() {
449
    __isset_bit_vector.clear(__CHECKEDOUTON_ISSET_ID);
553 chandransh 450
  }
451
 
3430 rajveer 452
  /** Returns true if field checkedOutOn is set (has been assigned a value) and false otherwise */
688 chandransh 453
  public boolean isSetCheckedOutOn() {
454
    return __isset_bit_vector.get(__CHECKEDOUTON_ISSET_ID);
553 chandransh 455
  }
456
 
688 chandransh 457
  public void setCheckedOutOnIsSet(boolean value) {
458
    __isset_bit_vector.set(__CHECKEDOUTON_ISSET_ID, value);
553 chandransh 459
  }
460
 
461
  public long getAddressId() {
462
    return this.addressId;
463
  }
464
 
3430 rajveer 465
  public void setAddressId(long addressId) {
553 chandransh 466
    this.addressId = addressId;
467
    setAddressIdIsSet(true);
468
  }
469
 
470
  public void unsetAddressId() {
471
    __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
472
  }
473
 
3430 rajveer 474
  /** Returns true if field addressId is set (has been assigned a value) and false otherwise */
553 chandransh 475
  public boolean isSetAddressId() {
476
    return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
477
  }
478
 
479
  public void setAddressIdIsSet(boolean value) {
480
    __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
481
  }
482
 
1982 varun.gupt 483
  public double getTotalPrice() {
484
    return this.totalPrice;
485
  }
486
 
3430 rajveer 487
  public void setTotalPrice(double totalPrice) {
1982 varun.gupt 488
    this.totalPrice = totalPrice;
489
    setTotalPriceIsSet(true);
490
  }
491
 
492
  public void unsetTotalPrice() {
493
    __isset_bit_vector.clear(__TOTALPRICE_ISSET_ID);
494
  }
495
 
3430 rajveer 496
  /** Returns true if field totalPrice is set (has been assigned a value) and false otherwise */
1982 varun.gupt 497
  public boolean isSetTotalPrice() {
498
    return __isset_bit_vector.get(__TOTALPRICE_ISSET_ID);
499
  }
500
 
501
  public void setTotalPriceIsSet(boolean value) {
502
    __isset_bit_vector.set(__TOTALPRICE_ISSET_ID, value);
503
  }
504
 
505
  public double getDiscountedPrice() {
506
    return this.discountedPrice;
507
  }
508
 
3430 rajveer 509
  public void setDiscountedPrice(double discountedPrice) {
1982 varun.gupt 510
    this.discountedPrice = discountedPrice;
511
    setDiscountedPriceIsSet(true);
512
  }
513
 
514
  public void unsetDiscountedPrice() {
515
    __isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);
516
  }
517
 
3430 rajveer 518
  /** Returns true if field discountedPrice is set (has been assigned a value) and false otherwise */
1982 varun.gupt 519
  public boolean isSetDiscountedPrice() {
520
    return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);
521
  }
522
 
523
  public void setDiscountedPriceIsSet(boolean value) {
524
    __isset_bit_vector.set(__DISCOUNTEDPRICE_ISSET_ID, value);
525
  }
526
 
527
  public String getCouponCode() {
528
    return this.couponCode;
529
  }
530
 
3430 rajveer 531
  public void setCouponCode(String couponCode) {
1982 varun.gupt 532
    this.couponCode = couponCode;
533
  }
534
 
535
  public void unsetCouponCode() {
536
    this.couponCode = null;
537
  }
538
 
3430 rajveer 539
  /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
1982 varun.gupt 540
  public boolean isSetCouponCode() {
541
    return this.couponCode != null;
542
  }
543
 
544
  public void setCouponCodeIsSet(boolean value) {
545
    if (!value) {
546
      this.couponCode = null;
547
    }
548
  }
549
 
5553 rajveer 550
  public long getPickupStoreId() {
551
    return this.pickupStoreId;
552
  }
553
 
554
  public void setPickupStoreId(long pickupStoreId) {
555
    this.pickupStoreId = pickupStoreId;
556
    setPickupStoreIdIsSet(true);
557
  }
558
 
559
  public void unsetPickupStoreId() {
560
    __isset_bit_vector.clear(__PICKUPSTOREID_ISSET_ID);
561
  }
562
 
563
  /** Returns true if field pickupStoreId is set (has been assigned a value) and false otherwise */
564
  public boolean isSetPickupStoreId() {
565
    return __isset_bit_vector.get(__PICKUPSTOREID_ISSET_ID);
566
  }
567
 
568
  public void setPickupStoreIdIsSet(boolean value) {
569
    __isset_bit_vector.set(__PICKUPSTOREID_ISSET_ID, value);
570
  }
571
 
6736 amit.gupta 572
  public String getMessage() {
573
    return this.message;
574
  }
575
 
576
  public void setMessage(String message) {
577
    this.message = message;
578
  }
579
 
580
  public void unsetMessage() {
581
    this.message = null;
582
  }
583
 
584
  /** Returns true if field message is set (has been assigned a value) and false otherwise */
585
  public boolean isSetMessage() {
586
    return this.message != null;
587
  }
588
 
589
  public void setMessageIsSet(boolean value) {
590
    if (!value) {
591
      this.message = null;
592
    }
593
  }
594
 
20873 kshitij.so 595
  public double getWallet_amount() {
596
    return this.wallet_amount;
597
  }
598
 
599
  public void setWallet_amount(double wallet_amount) {
600
    this.wallet_amount = wallet_amount;
601
    setWallet_amountIsSet(true);
602
  }
603
 
604
  public void unsetWallet_amount() {
605
    __isset_bit_vector.clear(__WALLET_AMOUNT_ISSET_ID);
606
  }
607
 
608
  /** Returns true if field wallet_amount is set (has been assigned a value) and false otherwise */
609
  public boolean isSetWallet_amount() {
610
    return __isset_bit_vector.get(__WALLET_AMOUNT_ISSET_ID);
611
  }
612
 
613
  public void setWallet_amountIsSet(boolean value) {
614
    __isset_bit_vector.set(__WALLET_AMOUNT_ISSET_ID, value);
615
  }
616
 
553 chandransh 617
  public void setFieldValue(_Fields field, Object value) {
618
    switch (field) {
619
    case ID:
620
      if (value == null) {
621
        unsetId();
622
      } else {
623
        setId((Long)value);
624
      }
625
      break;
626
 
627
    case LINES:
628
      if (value == null) {
629
        unsetLines();
630
      } else {
631
        setLines((List<Line>)value);
632
      }
633
      break;
634
 
635
    case STATUS:
636
      if (value == null) {
637
        unsetStatus();
638
      } else {
639
        setStatus((CartStatus)value);
640
      }
641
      break;
642
 
643
    case CREATED_ON:
644
      if (value == null) {
645
        unsetCreatedOn();
646
      } else {
647
        setCreatedOn((Long)value);
648
      }
649
      break;
650
 
651
    case UPDATED_ON:
652
      if (value == null) {
653
        unsetUpdatedOn();
654
      } else {
655
        setUpdatedOn((Long)value);
656
      }
657
      break;
658
 
688 chandransh 659
    case CHECKED_OUT_ON:
553 chandransh 660
      if (value == null) {
688 chandransh 661
        unsetCheckedOutOn();
553 chandransh 662
      } else {
688 chandransh 663
        setCheckedOutOn((Long)value);
553 chandransh 664
      }
665
      break;
666
 
667
    case ADDRESS_ID:
668
      if (value == null) {
669
        unsetAddressId();
670
      } else {
671
        setAddressId((Long)value);
672
      }
673
      break;
674
 
1982 varun.gupt 675
    case TOTAL_PRICE:
676
      if (value == null) {
677
        unsetTotalPrice();
678
      } else {
679
        setTotalPrice((Double)value);
680
      }
681
      break;
682
 
683
    case DISCOUNTED_PRICE:
684
      if (value == null) {
685
        unsetDiscountedPrice();
686
      } else {
687
        setDiscountedPrice((Double)value);
688
      }
689
      break;
690
 
691
    case COUPON_CODE:
692
      if (value == null) {
693
        unsetCouponCode();
694
      } else {
695
        setCouponCode((String)value);
696
      }
697
      break;
698
 
5553 rajveer 699
    case PICKUP_STORE_ID:
700
      if (value == null) {
701
        unsetPickupStoreId();
702
      } else {
703
        setPickupStoreId((Long)value);
704
      }
705
      break;
706
 
6736 amit.gupta 707
    case MESSAGE:
708
      if (value == null) {
709
        unsetMessage();
710
      } else {
711
        setMessage((String)value);
712
      }
713
      break;
714
 
20873 kshitij.so 715
    case WALLET_AMOUNT:
716
      if (value == null) {
717
        unsetWallet_amount();
718
      } else {
719
        setWallet_amount((Double)value);
720
      }
721
      break;
722
 
553 chandransh 723
    }
724
  }
725
 
726
  public Object getFieldValue(_Fields field) {
727
    switch (field) {
728
    case ID:
3430 rajveer 729
      return Long.valueOf(getId());
553 chandransh 730
 
731
    case LINES:
732
      return getLines();
733
 
734
    case STATUS:
735
      return getStatus();
736
 
737
    case CREATED_ON:
3430 rajveer 738
      return Long.valueOf(getCreatedOn());
553 chandransh 739
 
740
    case UPDATED_ON:
3430 rajveer 741
      return Long.valueOf(getUpdatedOn());
553 chandransh 742
 
688 chandransh 743
    case CHECKED_OUT_ON:
3430 rajveer 744
      return Long.valueOf(getCheckedOutOn());
553 chandransh 745
 
746
    case ADDRESS_ID:
3430 rajveer 747
      return Long.valueOf(getAddressId());
553 chandransh 748
 
1982 varun.gupt 749
    case TOTAL_PRICE:
3430 rajveer 750
      return Double.valueOf(getTotalPrice());
1982 varun.gupt 751
 
752
    case DISCOUNTED_PRICE:
3430 rajveer 753
      return Double.valueOf(getDiscountedPrice());
1982 varun.gupt 754
 
755
    case COUPON_CODE:
756
      return getCouponCode();
757
 
5553 rajveer 758
    case PICKUP_STORE_ID:
759
      return Long.valueOf(getPickupStoreId());
760
 
6736 amit.gupta 761
    case MESSAGE:
762
      return getMessage();
763
 
20873 kshitij.so 764
    case WALLET_AMOUNT:
765
      return Double.valueOf(getWallet_amount());
766
 
553 chandransh 767
    }
768
    throw new IllegalStateException();
769
  }
770
 
3430 rajveer 771
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
772
  public boolean isSet(_Fields field) {
773
    if (field == null) {
774
      throw new IllegalArgumentException();
775
    }
553 chandransh 776
 
777
    switch (field) {
778
    case ID:
779
      return isSetId();
780
    case LINES:
781
      return isSetLines();
782
    case STATUS:
783
      return isSetStatus();
784
    case CREATED_ON:
785
      return isSetCreatedOn();
786
    case UPDATED_ON:
787
      return isSetUpdatedOn();
688 chandransh 788
    case CHECKED_OUT_ON:
789
      return isSetCheckedOutOn();
553 chandransh 790
    case ADDRESS_ID:
791
      return isSetAddressId();
1982 varun.gupt 792
    case TOTAL_PRICE:
793
      return isSetTotalPrice();
794
    case DISCOUNTED_PRICE:
795
      return isSetDiscountedPrice();
796
    case COUPON_CODE:
797
      return isSetCouponCode();
5553 rajveer 798
    case PICKUP_STORE_ID:
799
      return isSetPickupStoreId();
6736 amit.gupta 800
    case MESSAGE:
801
      return isSetMessage();
20873 kshitij.so 802
    case WALLET_AMOUNT:
803
      return isSetWallet_amount();
553 chandransh 804
    }
805
    throw new IllegalStateException();
806
  }
807
 
808
  @Override
809
  public boolean equals(Object that) {
810
    if (that == null)
811
      return false;
812
    if (that instanceof Cart)
813
      return this.equals((Cart)that);
814
    return false;
815
  }
816
 
817
  public boolean equals(Cart that) {
818
    if (that == null)
819
      return false;
820
 
821
    boolean this_present_id = true;
822
    boolean that_present_id = true;
823
    if (this_present_id || that_present_id) {
824
      if (!(this_present_id && that_present_id))
825
        return false;
826
      if (this.id != that.id)
827
        return false;
828
    }
829
 
830
    boolean this_present_lines = true && this.isSetLines();
831
    boolean that_present_lines = true && that.isSetLines();
832
    if (this_present_lines || that_present_lines) {
833
      if (!(this_present_lines && that_present_lines))
834
        return false;
835
      if (!this.lines.equals(that.lines))
836
        return false;
837
    }
838
 
839
    boolean this_present_status = true && this.isSetStatus();
840
    boolean that_present_status = true && that.isSetStatus();
841
    if (this_present_status || that_present_status) {
842
      if (!(this_present_status && that_present_status))
843
        return false;
844
      if (!this.status.equals(that.status))
845
        return false;
846
    }
847
 
848
    boolean this_present_createdOn = true;
849
    boolean that_present_createdOn = true;
850
    if (this_present_createdOn || that_present_createdOn) {
851
      if (!(this_present_createdOn && that_present_createdOn))
852
        return false;
853
      if (this.createdOn != that.createdOn)
854
        return false;
855
    }
856
 
857
    boolean this_present_updatedOn = true;
858
    boolean that_present_updatedOn = true;
859
    if (this_present_updatedOn || that_present_updatedOn) {
860
      if (!(this_present_updatedOn && that_present_updatedOn))
861
        return false;
862
      if (this.updatedOn != that.updatedOn)
863
        return false;
864
    }
865
 
688 chandransh 866
    boolean this_present_checkedOutOn = true;
867
    boolean that_present_checkedOutOn = true;
868
    if (this_present_checkedOutOn || that_present_checkedOutOn) {
869
      if (!(this_present_checkedOutOn && that_present_checkedOutOn))
553 chandransh 870
        return false;
688 chandransh 871
      if (this.checkedOutOn != that.checkedOutOn)
553 chandransh 872
        return false;
873
    }
874
 
875
    boolean this_present_addressId = true;
876
    boolean that_present_addressId = true;
877
    if (this_present_addressId || that_present_addressId) {
878
      if (!(this_present_addressId && that_present_addressId))
879
        return false;
880
      if (this.addressId != that.addressId)
881
        return false;
882
    }
883
 
1982 varun.gupt 884
    boolean this_present_totalPrice = true;
885
    boolean that_present_totalPrice = true;
886
    if (this_present_totalPrice || that_present_totalPrice) {
887
      if (!(this_present_totalPrice && that_present_totalPrice))
888
        return false;
889
      if (this.totalPrice != that.totalPrice)
890
        return false;
891
    }
892
 
893
    boolean this_present_discountedPrice = true;
894
    boolean that_present_discountedPrice = true;
895
    if (this_present_discountedPrice || that_present_discountedPrice) {
896
      if (!(this_present_discountedPrice && that_present_discountedPrice))
897
        return false;
898
      if (this.discountedPrice != that.discountedPrice)
899
        return false;
900
    }
901
 
902
    boolean this_present_couponCode = true && this.isSetCouponCode();
903
    boolean that_present_couponCode = true && that.isSetCouponCode();
904
    if (this_present_couponCode || that_present_couponCode) {
905
      if (!(this_present_couponCode && that_present_couponCode))
906
        return false;
907
      if (!this.couponCode.equals(that.couponCode))
908
        return false;
909
    }
910
 
5553 rajveer 911
    boolean this_present_pickupStoreId = true;
912
    boolean that_present_pickupStoreId = true;
913
    if (this_present_pickupStoreId || that_present_pickupStoreId) {
914
      if (!(this_present_pickupStoreId && that_present_pickupStoreId))
915
        return false;
916
      if (this.pickupStoreId != that.pickupStoreId)
917
        return false;
918
    }
919
 
6736 amit.gupta 920
    boolean this_present_message = true && this.isSetMessage();
921
    boolean that_present_message = true && that.isSetMessage();
922
    if (this_present_message || that_present_message) {
923
      if (!(this_present_message && that_present_message))
924
        return false;
925
      if (!this.message.equals(that.message))
926
        return false;
927
    }
928
 
20873 kshitij.so 929
    boolean this_present_wallet_amount = true;
930
    boolean that_present_wallet_amount = true;
931
    if (this_present_wallet_amount || that_present_wallet_amount) {
932
      if (!(this_present_wallet_amount && that_present_wallet_amount))
933
        return false;
934
      if (this.wallet_amount != that.wallet_amount)
935
        return false;
936
    }
937
 
553 chandransh 938
    return true;
939
  }
940
 
941
  @Override
942
  public int hashCode() {
943
    return 0;
944
  }
945
 
946
  public int compareTo(Cart other) {
947
    if (!getClass().equals(other.getClass())) {
948
      return getClass().getName().compareTo(other.getClass().getName());
949
    }
950
 
951
    int lastComparison = 0;
952
    Cart typedOther = (Cart)other;
953
 
3430 rajveer 954
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
553 chandransh 955
    if (lastComparison != 0) {
956
      return lastComparison;
957
    }
3430 rajveer 958
    if (isSetId()) {
959
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
960
      if (lastComparison != 0) {
961
        return lastComparison;
962
      }
553 chandransh 963
    }
3430 rajveer 964
    lastComparison = Boolean.valueOf(isSetLines()).compareTo(typedOther.isSetLines());
553 chandransh 965
    if (lastComparison != 0) {
966
      return lastComparison;
967
    }
3430 rajveer 968
    if (isSetLines()) {
969
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lines, typedOther.lines);
970
      if (lastComparison != 0) {
971
        return lastComparison;
972
      }
553 chandransh 973
    }
3430 rajveer 974
    lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
553 chandransh 975
    if (lastComparison != 0) {
976
      return lastComparison;
977
    }
3430 rajveer 978
    if (isSetStatus()) {
979
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
980
      if (lastComparison != 0) {
981
        return lastComparison;
982
      }
553 chandransh 983
    }
3430 rajveer 984
    lastComparison = Boolean.valueOf(isSetCreatedOn()).compareTo(typedOther.isSetCreatedOn());
553 chandransh 985
    if (lastComparison != 0) {
986
      return lastComparison;
987
    }
3430 rajveer 988
    if (isSetCreatedOn()) {
989
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdOn, typedOther.createdOn);
990
      if (lastComparison != 0) {
991
        return lastComparison;
992
      }
553 chandransh 993
    }
3430 rajveer 994
    lastComparison = Boolean.valueOf(isSetUpdatedOn()).compareTo(typedOther.isSetUpdatedOn());
553 chandransh 995
    if (lastComparison != 0) {
996
      return lastComparison;
997
    }
3430 rajveer 998
    if (isSetUpdatedOn()) {
999
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedOn, typedOther.updatedOn);
1000
      if (lastComparison != 0) {
1001
        return lastComparison;
1002
      }
553 chandransh 1003
    }
3430 rajveer 1004
    lastComparison = Boolean.valueOf(isSetCheckedOutOn()).compareTo(typedOther.isSetCheckedOutOn());
553 chandransh 1005
    if (lastComparison != 0) {
1006
      return lastComparison;
1007
    }
3430 rajveer 1008
    if (isSetCheckedOutOn()) {
1009
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.checkedOutOn, typedOther.checkedOutOn);
1010
      if (lastComparison != 0) {
1011
        return lastComparison;
1012
      }
553 chandransh 1013
    }
3430 rajveer 1014
    lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(typedOther.isSetAddressId());
553 chandransh 1015
    if (lastComparison != 0) {
1016
      return lastComparison;
1017
    }
3430 rajveer 1018
    if (isSetAddressId()) {
1019
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addressId, typedOther.addressId);
1020
      if (lastComparison != 0) {
1021
        return lastComparison;
1022
      }
553 chandransh 1023
    }
3430 rajveer 1024
    lastComparison = Boolean.valueOf(isSetTotalPrice()).compareTo(typedOther.isSetTotalPrice());
1982 varun.gupt 1025
    if (lastComparison != 0) {
1026
      return lastComparison;
1027
    }
3430 rajveer 1028
    if (isSetTotalPrice()) {
1029
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalPrice, typedOther.totalPrice);
1030
      if (lastComparison != 0) {
1031
        return lastComparison;
1032
      }
1982 varun.gupt 1033
    }
3430 rajveer 1034
    lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(typedOther.isSetDiscountedPrice());
1982 varun.gupt 1035
    if (lastComparison != 0) {
1036
      return lastComparison;
1037
    }
3430 rajveer 1038
    if (isSetDiscountedPrice()) {
1039
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discountedPrice, typedOther.discountedPrice);
1040
      if (lastComparison != 0) {
1041
        return lastComparison;
1042
      }
1982 varun.gupt 1043
    }
3430 rajveer 1044
    lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
1982 varun.gupt 1045
    if (lastComparison != 0) {
1046
      return lastComparison;
1047
    }
3430 rajveer 1048
    if (isSetCouponCode()) {
1049
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
1050
      if (lastComparison != 0) {
1051
        return lastComparison;
1052
      }
1982 varun.gupt 1053
    }
5553 rajveer 1054
    lastComparison = Boolean.valueOf(isSetPickupStoreId()).compareTo(typedOther.isSetPickupStoreId());
1055
    if (lastComparison != 0) {
1056
      return lastComparison;
1057
    }
1058
    if (isSetPickupStoreId()) {
1059
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pickupStoreId, typedOther.pickupStoreId);
1060
      if (lastComparison != 0) {
1061
        return lastComparison;
1062
      }
1063
    }
6736 amit.gupta 1064
    lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage());
1065
    if (lastComparison != 0) {
1066
      return lastComparison;
1067
    }
1068
    if (isSetMessage()) {
1069
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
1070
      if (lastComparison != 0) {
1071
        return lastComparison;
1072
      }
1073
    }
20873 kshitij.so 1074
    lastComparison = Boolean.valueOf(isSetWallet_amount()).compareTo(typedOther.isSetWallet_amount());
1075
    if (lastComparison != 0) {
1076
      return lastComparison;
1077
    }
1078
    if (isSetWallet_amount()) {
1079
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wallet_amount, typedOther.wallet_amount);
1080
      if (lastComparison != 0) {
1081
        return lastComparison;
1082
      }
1083
    }
553 chandransh 1084
    return 0;
1085
  }
1086
 
3430 rajveer 1087
  public _Fields fieldForId(int fieldId) {
1088
    return _Fields.findByThriftId(fieldId);
1089
  }
1090
 
1091
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1092
    org.apache.thrift.protocol.TField field;
553 chandransh 1093
    iprot.readStructBegin();
1094
    while (true)
1095
    {
1096
      field = iprot.readFieldBegin();
3430 rajveer 1097
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
553 chandransh 1098
        break;
1099
      }
3430 rajveer 1100
      switch (field.id) {
1101
        case 1: // ID
1102
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1103
            this.id = iprot.readI64();
1104
            setIdIsSet(true);
1105
          } else { 
1106
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1107
          }
1108
          break;
1109
        case 2: // LINES
1110
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
1111
            {
5327 rajveer 1112
              org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
1113
              this.lines = new ArrayList<Line>(_list8.size);
1114
              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
553 chandransh 1115
              {
5327 rajveer 1116
                Line _elem10; // required
1117
                _elem10 = new Line();
1118
                _elem10.read(iprot);
1119
                this.lines.add(_elem10);
553 chandransh 1120
              }
3430 rajveer 1121
              iprot.readListEnd();
553 chandransh 1122
            }
3430 rajveer 1123
          } else { 
1124
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1125
          }
1126
          break;
1127
        case 3: // STATUS
1128
          if (field.type == org.apache.thrift.protocol.TType.I32) {
1129
            this.status = CartStatus.findByValue(iprot.readI32());
1130
          } else { 
1131
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1132
          }
1133
          break;
1134
        case 4: // CREATED_ON
1135
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1136
            this.createdOn = iprot.readI64();
1137
            setCreatedOnIsSet(true);
1138
          } else { 
1139
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1140
          }
1141
          break;
1142
        case 5: // UPDATED_ON
1143
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1144
            this.updatedOn = iprot.readI64();
1145
            setUpdatedOnIsSet(true);
1146
          } else { 
1147
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1148
          }
1149
          break;
1150
        case 6: // CHECKED_OUT_ON
1151
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1152
            this.checkedOutOn = iprot.readI64();
1153
            setCheckedOutOnIsSet(true);
1154
          } else { 
1155
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1156
          }
1157
          break;
5327 rajveer 1158
        case 7: // ADDRESS_ID
3430 rajveer 1159
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1160
            this.addressId = iprot.readI64();
1161
            setAddressIdIsSet(true);
1162
          } else { 
1163
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1164
          }
1165
          break;
5327 rajveer 1166
        case 8: // TOTAL_PRICE
3430 rajveer 1167
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1168
            this.totalPrice = iprot.readDouble();
1169
            setTotalPriceIsSet(true);
1170
          } else { 
1171
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1172
          }
1173
          break;
5327 rajveer 1174
        case 9: // DISCOUNTED_PRICE
3430 rajveer 1175
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1176
            this.discountedPrice = iprot.readDouble();
1177
            setDiscountedPriceIsSet(true);
1178
          } else { 
1179
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1180
          }
1181
          break;
5327 rajveer 1182
        case 10: // COUPON_CODE
3430 rajveer 1183
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1184
            this.couponCode = iprot.readString();
1185
          } else { 
1186
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1187
          }
1188
          break;
5553 rajveer 1189
        case 11: // PICKUP_STORE_ID
1190
          if (field.type == org.apache.thrift.protocol.TType.I64) {
1191
            this.pickupStoreId = iprot.readI64();
1192
            setPickupStoreIdIsSet(true);
1193
          } else { 
1194
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1195
          }
1196
          break;
6736 amit.gupta 1197
        case 12: // MESSAGE
1198
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
1199
            this.message = iprot.readString();
1200
          } else { 
1201
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1202
          }
1203
          break;
20873 kshitij.so 1204
        case 13: // WALLET_AMOUNT
1205
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
1206
            this.wallet_amount = iprot.readDouble();
1207
            setWallet_amountIsSet(true);
1208
          } else { 
1209
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1210
          }
1211
          break;
3430 rajveer 1212
        default:
1213
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
553 chandransh 1214
      }
3430 rajveer 1215
      iprot.readFieldEnd();
553 chandransh 1216
    }
1217
    iprot.readStructEnd();
1218
    validate();
1219
  }
1220
 
3430 rajveer 1221
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
553 chandransh 1222
    validate();
1223
 
1224
    oprot.writeStructBegin(STRUCT_DESC);
1225
    oprot.writeFieldBegin(ID_FIELD_DESC);
1226
    oprot.writeI64(this.id);
1227
    oprot.writeFieldEnd();
1228
    if (this.lines != null) {
1229
      oprot.writeFieldBegin(LINES_FIELD_DESC);
1230
      {
3430 rajveer 1231
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lines.size()));
5327 rajveer 1232
        for (Line _iter11 : this.lines)
553 chandransh 1233
        {
5327 rajveer 1234
          _iter11.write(oprot);
553 chandransh 1235
        }
1236
        oprot.writeListEnd();
1237
      }
1238
      oprot.writeFieldEnd();
1239
    }
1240
    if (this.status != null) {
1241
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
1242
      oprot.writeI32(this.status.getValue());
1243
      oprot.writeFieldEnd();
1244
    }
1245
    oprot.writeFieldBegin(CREATED_ON_FIELD_DESC);
1246
    oprot.writeI64(this.createdOn);
1247
    oprot.writeFieldEnd();
1248
    oprot.writeFieldBegin(UPDATED_ON_FIELD_DESC);
1249
    oprot.writeI64(this.updatedOn);
1250
    oprot.writeFieldEnd();
688 chandransh 1251
    oprot.writeFieldBegin(CHECKED_OUT_ON_FIELD_DESC);
1252
    oprot.writeI64(this.checkedOutOn);
553 chandransh 1253
    oprot.writeFieldEnd();
1254
    oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
1255
    oprot.writeI64(this.addressId);
1256
    oprot.writeFieldEnd();
1982 varun.gupt 1257
    oprot.writeFieldBegin(TOTAL_PRICE_FIELD_DESC);
1258
    oprot.writeDouble(this.totalPrice);
1259
    oprot.writeFieldEnd();
1260
    oprot.writeFieldBegin(DISCOUNTED_PRICE_FIELD_DESC);
1261
    oprot.writeDouble(this.discountedPrice);
1262
    oprot.writeFieldEnd();
1263
    if (this.couponCode != null) {
1264
      oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
1265
      oprot.writeString(this.couponCode);
1266
      oprot.writeFieldEnd();
1267
    }
5553 rajveer 1268
    oprot.writeFieldBegin(PICKUP_STORE_ID_FIELD_DESC);
1269
    oprot.writeI64(this.pickupStoreId);
1270
    oprot.writeFieldEnd();
6736 amit.gupta 1271
    if (this.message != null) {
1272
      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
1273
      oprot.writeString(this.message);
1274
      oprot.writeFieldEnd();
1275
    }
20873 kshitij.so 1276
    oprot.writeFieldBegin(WALLET_AMOUNT_FIELD_DESC);
1277
    oprot.writeDouble(this.wallet_amount);
1278
    oprot.writeFieldEnd();
553 chandransh 1279
    oprot.writeFieldStop();
1280
    oprot.writeStructEnd();
1281
  }
1282
 
1283
  @Override
1284
  public String toString() {
1285
    StringBuilder sb = new StringBuilder("Cart(");
1286
    boolean first = true;
1287
 
1288
    sb.append("id:");
1289
    sb.append(this.id);
1290
    first = false;
1291
    if (!first) sb.append(", ");
1292
    sb.append("lines:");
1293
    if (this.lines == null) {
1294
      sb.append("null");
1295
    } else {
1296
      sb.append(this.lines);
1297
    }
1298
    first = false;
1299
    if (!first) sb.append(", ");
1300
    sb.append("status:");
1301
    if (this.status == null) {
1302
      sb.append("null");
1303
    } else {
1304
      sb.append(this.status);
1305
    }
1306
    first = false;
1307
    if (!first) sb.append(", ");
1308
    sb.append("createdOn:");
1309
    sb.append(this.createdOn);
1310
    first = false;
1311
    if (!first) sb.append(", ");
1312
    sb.append("updatedOn:");
1313
    sb.append(this.updatedOn);
1314
    first = false;
1315
    if (!first) sb.append(", ");
688 chandransh 1316
    sb.append("checkedOutOn:");
1317
    sb.append(this.checkedOutOn);
553 chandransh 1318
    first = false;
1319
    if (!first) sb.append(", ");
1320
    sb.append("addressId:");
1321
    sb.append(this.addressId);
1322
    first = false;
1982 varun.gupt 1323
    if (!first) sb.append(", ");
1324
    sb.append("totalPrice:");
1325
    sb.append(this.totalPrice);
1326
    first = false;
1327
    if (!first) sb.append(", ");
1328
    sb.append("discountedPrice:");
1329
    sb.append(this.discountedPrice);
1330
    first = false;
1331
    if (!first) sb.append(", ");
1332
    sb.append("couponCode:");
1333
    if (this.couponCode == null) {
1334
      sb.append("null");
1335
    } else {
1336
      sb.append(this.couponCode);
1337
    }
1338
    first = false;
5553 rajveer 1339
    if (!first) sb.append(", ");
1340
    sb.append("pickupStoreId:");
1341
    sb.append(this.pickupStoreId);
1342
    first = false;
6736 amit.gupta 1343
    if (!first) sb.append(", ");
1344
    sb.append("message:");
1345
    if (this.message == null) {
1346
      sb.append("null");
1347
    } else {
1348
      sb.append(this.message);
1349
    }
1350
    first = false;
20873 kshitij.so 1351
    if (!first) sb.append(", ");
1352
    sb.append("wallet_amount:");
1353
    sb.append(this.wallet_amount);
1354
    first = false;
553 chandransh 1355
    sb.append(")");
1356
    return sb.toString();
1357
  }
1358
 
3430 rajveer 1359
  public void validate() throws org.apache.thrift.TException {
553 chandransh 1360
    // check for required fields
1361
  }
1362
 
3430 rajveer 1363
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1364
    try {
1365
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1366
    } catch (org.apache.thrift.TException te) {
1367
      throw new java.io.IOException(te);
1368
    }
1369
  }
1370
 
1371
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1372
    try {
1373
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1374
      __isset_bit_vector = new BitSet(1);
1375
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1376
    } catch (org.apache.thrift.TException te) {
1377
      throw new java.io.IOException(te);
1378
    }
1379
  }
1380
 
553 chandransh 1381
}
1382