Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
483 rajveer 26
public class LineItem implements TBase<LineItem._Fields>, java.io.Serializable, Cloneable, Comparable<LineItem> {
68 ashish 27
  private static final TStruct STRUCT_DESC = new TStruct("LineItem");
28
 
483 rajveer 29
  private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
697 chandransh 30
  private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
957 chandransh 31
  private static final TField PRODUCT_GROUP_FIELD_DESC = new TField("productGroup", TType.STRING, (short)3);
32
  private static final TField BRAND_FIELD_DESC = new TField("brand", TType.STRING, (short)4);
33
  private static final TField MODEL_NUMBER_FIELD_DESC = new TField("model_number", TType.STRING, (short)5);
34
  private static final TField COLOR_FIELD_DESC = new TField("color", TType.STRING, (short)6);
35
  private static final TField MODEL_NAME_FIELD_DESC = new TField("model_name", TType.STRING, (short)7);
36
  private static final TField EXTRA_INFO_FIELD_DESC = new TField("extra_info", TType.STRING, (short)8);
37
  private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.DOUBLE, (short)9);
38
  private static final TField UNIT_PRICE_FIELD_DESC = new TField("unit_price", TType.DOUBLE, (short)10);
39
  private static final TField UNIT_WEIGHT_FIELD_DESC = new TField("unit_weight", TType.DOUBLE, (short)11);
40
  private static final TField TOTAL_PRICE_FIELD_DESC = new TField("total_price", TType.DOUBLE, (short)12);
1022 varun.gupt 41
  private static final TField TRANSFER_PRICE_FIELD_DESC = new TField("transfer_price", TType.DOUBLE, (short)13);
42
  private static final TField TOTAL_WEIGHT_FIELD_DESC = new TField("total_weight", TType.DOUBLE, (short)14);
1982 varun.gupt 43
  private static final TField DISCOUNTED_PRICE_FIELD_DESC = new TField("discounted_price", TType.DOUBLE, (short)15);
68 ashish 44
 
45
  private long id;
697 chandransh 46
  private long item_id;
957 chandransh 47
  private String productGroup;
483 rajveer 48
  private String brand;
49
  private String model_number;
957 chandransh 50
  private String color;
483 rajveer 51
  private String model_name;
52
  private String extra_info;
53
  private double quantity;
54
  private double unit_price;
55
  private double unit_weight;
56
  private double total_price;
1022 varun.gupt 57
  private double transfer_price;
483 rajveer 58
  private double total_weight;
1982 varun.gupt 59
  private double discounted_price;
68 ashish 60
 
61
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
62
  public enum _Fields implements TFieldIdEnum {
483 rajveer 63
    ID((short)1, "id"),
697 chandransh 64
    ITEM_ID((short)2, "item_id"),
957 chandransh 65
    PRODUCT_GROUP((short)3, "productGroup"),
66
    BRAND((short)4, "brand"),
67
    MODEL_NUMBER((short)5, "model_number"),
68
    COLOR((short)6, "color"),
69
    MODEL_NAME((short)7, "model_name"),
70
    EXTRA_INFO((short)8, "extra_info"),
71
    QUANTITY((short)9, "quantity"),
72
    UNIT_PRICE((short)10, "unit_price"),
73
    UNIT_WEIGHT((short)11, "unit_weight"),
74
    TOTAL_PRICE((short)12, "total_price"),
1022 varun.gupt 75
    TRANSFER_PRICE((short)13, "transfer_price"),
1982 varun.gupt 76
    TOTAL_WEIGHT((short)14, "total_weight"),
77
    DISCOUNTED_PRICE((short)15, "discounted_price");
68 ashish 78
 
79
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
80
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
81
 
82
    static {
83
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
84
        byId.put((int)field._thriftId, field);
85
        byName.put(field.getFieldName(), field);
86
      }
87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches fieldId, or null if its not found.
91
     */
92
    public static _Fields findByThriftId(int fieldId) {
93
      return byId.get(fieldId);
94
    }
95
 
96
    /**
97
     * Find the _Fields constant that matches fieldId, throwing an exception
98
     * if it is not found.
99
     */
100
    public static _Fields findByThriftIdOrThrow(int fieldId) {
101
      _Fields fields = findByThriftId(fieldId);
102
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
103
      return fields;
104
    }
105
 
106
    /**
107
     * Find the _Fields constant that matches name, or null if its not found.
108
     */
109
    public static _Fields findByName(String name) {
110
      return byName.get(name);
111
    }
112
 
113
    private final short _thriftId;
114
    private final String _fieldName;
115
 
116
    _Fields(short thriftId, String fieldName) {
117
      _thriftId = thriftId;
118
      _fieldName = fieldName;
119
    }
120
 
121
    public short getThriftFieldId() {
122
      return _thriftId;
123
    }
124
 
125
    public String getFieldName() {
126
      return _fieldName;
127
    }
128
  }
129
 
130
  // isset id assignments
131
  private static final int __ID_ISSET_ID = 0;
697 chandransh 132
  private static final int __ITEM_ID_ISSET_ID = 1;
133
  private static final int __QUANTITY_ISSET_ID = 2;
134
  private static final int __UNIT_PRICE_ISSET_ID = 3;
135
  private static final int __UNIT_WEIGHT_ISSET_ID = 4;
136
  private static final int __TOTAL_PRICE_ISSET_ID = 5;
1022 varun.gupt 137
  private static final int __TRANSFER_PRICE_ISSET_ID = 6;
138
  private static final int __TOTAL_WEIGHT_ISSET_ID = 7;
1982 varun.gupt 139
  private static final int __DISCOUNTED_PRICE_ISSET_ID = 8;
140
  private BitSet __isset_bit_vector = new BitSet(9);
68 ashish 141
 
142
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
143
    put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
144
        new FieldValueMetaData(TType.I64)));
697 chandransh 145
    put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
146
        new FieldValueMetaData(TType.I64)));
957 chandransh 147
    put(_Fields.PRODUCT_GROUP, new FieldMetaData("productGroup", TFieldRequirementType.DEFAULT, 
148
        new FieldValueMetaData(TType.STRING)));
483 rajveer 149
    put(_Fields.BRAND, new FieldMetaData("brand", TFieldRequirementType.DEFAULT, 
150
        new FieldValueMetaData(TType.STRING)));
151
    put(_Fields.MODEL_NUMBER, new FieldMetaData("model_number", TFieldRequirementType.DEFAULT, 
152
        new FieldValueMetaData(TType.STRING)));
957 chandransh 153
    put(_Fields.COLOR, new FieldMetaData("color", TFieldRequirementType.DEFAULT, 
154
        new FieldValueMetaData(TType.STRING)));
483 rajveer 155
    put(_Fields.MODEL_NAME, new FieldMetaData("model_name", TFieldRequirementType.DEFAULT, 
156
        new FieldValueMetaData(TType.STRING)));
157
    put(_Fields.EXTRA_INFO, new FieldMetaData("extra_info", TFieldRequirementType.DEFAULT, 
158
        new FieldValueMetaData(TType.STRING)));
159
    put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
160
        new FieldValueMetaData(TType.DOUBLE)));
161
    put(_Fields.UNIT_PRICE, new FieldMetaData("unit_price", TFieldRequirementType.DEFAULT, 
162
        new FieldValueMetaData(TType.DOUBLE)));
163
    put(_Fields.UNIT_WEIGHT, new FieldMetaData("unit_weight", TFieldRequirementType.DEFAULT, 
164
        new FieldValueMetaData(TType.DOUBLE)));
165
    put(_Fields.TOTAL_PRICE, new FieldMetaData("total_price", TFieldRequirementType.DEFAULT, 
166
        new FieldValueMetaData(TType.DOUBLE)));
1022 varun.gupt 167
    put(_Fields.TRANSFER_PRICE, new FieldMetaData("transfer_price", TFieldRequirementType.DEFAULT, 
168
        new FieldValueMetaData(TType.DOUBLE)));
483 rajveer 169
    put(_Fields.TOTAL_WEIGHT, new FieldMetaData("total_weight", TFieldRequirementType.DEFAULT, 
170
        new FieldValueMetaData(TType.DOUBLE)));
1982 varun.gupt 171
    put(_Fields.DISCOUNTED_PRICE, new FieldMetaData("discounted_price", TFieldRequirementType.DEFAULT, 
172
        new FieldValueMetaData(TType.DOUBLE)));
68 ashish 173
  }});
174
 
175
  static {
176
    FieldMetaData.addStructMetaDataMap(LineItem.class, metaDataMap);
177
  }
178
 
179
  public LineItem() {
180
  }
181
 
182
  public LineItem(
183
    long id,
697 chandransh 184
    long item_id,
957 chandransh 185
    String productGroup,
483 rajveer 186
    String brand,
187
    String model_number,
957 chandransh 188
    String color,
483 rajveer 189
    String model_name,
190
    String extra_info,
191
    double quantity,
192
    double unit_price,
193
    double unit_weight,
194
    double total_price,
1022 varun.gupt 195
    double transfer_price,
1982 varun.gupt 196
    double total_weight,
197
    double discounted_price)
68 ashish 198
  {
199
    this();
200
    this.id = id;
201
    setIdIsSet(true);
697 chandransh 202
    this.item_id = item_id;
203
    setItem_idIsSet(true);
957 chandransh 204
    this.productGroup = productGroup;
483 rajveer 205
    this.brand = brand;
206
    this.model_number = model_number;
957 chandransh 207
    this.color = color;
483 rajveer 208
    this.model_name = model_name;
209
    this.extra_info = extra_info;
210
    this.quantity = quantity;
211
    setQuantityIsSet(true);
212
    this.unit_price = unit_price;
213
    setUnit_priceIsSet(true);
214
    this.unit_weight = unit_weight;
215
    setUnit_weightIsSet(true);
216
    this.total_price = total_price;
217
    setTotal_priceIsSet(true);
1022 varun.gupt 218
    this.transfer_price = transfer_price;
219
    setTransfer_priceIsSet(true);
483 rajveer 220
    this.total_weight = total_weight;
221
    setTotal_weightIsSet(true);
1982 varun.gupt 222
    this.discounted_price = discounted_price;
223
    setDiscounted_priceIsSet(true);
68 ashish 224
  }
225
 
226
  /**
227
   * Performs a deep copy on <i>other</i>.
228
   */
229
  public LineItem(LineItem other) {
230
    __isset_bit_vector.clear();
231
    __isset_bit_vector.or(other.__isset_bit_vector);
232
    this.id = other.id;
697 chandransh 233
    this.item_id = other.item_id;
957 chandransh 234
    if (other.isSetProductGroup()) {
235
      this.productGroup = other.productGroup;
236
    }
483 rajveer 237
    if (other.isSetBrand()) {
238
      this.brand = other.brand;
239
    }
240
    if (other.isSetModel_number()) {
241
      this.model_number = other.model_number;
242
    }
957 chandransh 243
    if (other.isSetColor()) {
244
      this.color = other.color;
245
    }
483 rajveer 246
    if (other.isSetModel_name()) {
247
      this.model_name = other.model_name;
248
    }
249
    if (other.isSetExtra_info()) {
250
      this.extra_info = other.extra_info;
251
    }
252
    this.quantity = other.quantity;
253
    this.unit_price = other.unit_price;
254
    this.unit_weight = other.unit_weight;
255
    this.total_price = other.total_price;
1022 varun.gupt 256
    this.transfer_price = other.transfer_price;
483 rajveer 257
    this.total_weight = other.total_weight;
1982 varun.gupt 258
    this.discounted_price = other.discounted_price;
68 ashish 259
  }
260
 
261
  public LineItem deepCopy() {
262
    return new LineItem(this);
263
  }
264
 
265
  @Deprecated
266
  public LineItem clone() {
267
    return new LineItem(this);
268
  }
269
 
483 rajveer 270
  public long getId() {
271
    return this.id;
68 ashish 272
  }
273
 
483 rajveer 274
  public LineItem setId(long id) {
275
    this.id = id;
276
    setIdIsSet(true);
68 ashish 277
    return this;
278
  }
279
 
483 rajveer 280
  public void unsetId() {
281
    __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 282
  }
283
 
483 rajveer 284
  /** Returns true if field id is set (has been asigned a value) and false otherwise */
285
  public boolean isSetId() {
286
    return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 287
  }
288
 
483 rajveer 289
  public void setIdIsSet(boolean value) {
290
    __isset_bit_vector.set(__ID_ISSET_ID, value);
291
  }
292
 
697 chandransh 293
  public long getItem_id() {
294
    return this.item_id;
483 rajveer 295
  }
296
 
697 chandransh 297
  public LineItem setItem_id(long item_id) {
298
    this.item_id = item_id;
299
    setItem_idIsSet(true);
483 rajveer 300
    return this;
301
  }
302
 
697 chandransh 303
  public void unsetItem_id() {
304
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
483 rajveer 305
  }
306
 
697 chandransh 307
  /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
308
  public boolean isSetItem_id() {
309
    return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
483 rajveer 310
  }
311
 
697 chandransh 312
  public void setItem_idIsSet(boolean value) {
313
    __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
68 ashish 314
  }
315
 
957 chandransh 316
  public String getProductGroup() {
317
    return this.productGroup;
318
  }
319
 
320
  public LineItem setProductGroup(String productGroup) {
321
    this.productGroup = productGroup;
322
    return this;
323
  }
324
 
325
  public void unsetProductGroup() {
326
    this.productGroup = null;
327
  }
328
 
329
  /** Returns true if field productGroup is set (has been asigned a value) and false otherwise */
330
  public boolean isSetProductGroup() {
331
    return this.productGroup != null;
332
  }
333
 
334
  public void setProductGroupIsSet(boolean value) {
335
    if (!value) {
336
      this.productGroup = null;
337
    }
338
  }
339
 
483 rajveer 340
  public String getBrand() {
341
    return this.brand;
68 ashish 342
  }
343
 
483 rajveer 344
  public LineItem setBrand(String brand) {
345
    this.brand = brand;
68 ashish 346
    return this;
347
  }
348
 
483 rajveer 349
  public void unsetBrand() {
350
    this.brand = null;
68 ashish 351
  }
352
 
483 rajveer 353
  /** Returns true if field brand is set (has been asigned a value) and false otherwise */
354
  public boolean isSetBrand() {
355
    return this.brand != null;
68 ashish 356
  }
357
 
483 rajveer 358
  public void setBrandIsSet(boolean value) {
359
    if (!value) {
360
      this.brand = null;
361
    }
68 ashish 362
  }
363
 
483 rajveer 364
  public String getModel_number() {
365
    return this.model_number;
68 ashish 366
  }
367
 
483 rajveer 368
  public LineItem setModel_number(String model_number) {
369
    this.model_number = model_number;
68 ashish 370
    return this;
371
  }
372
 
483 rajveer 373
  public void unsetModel_number() {
374
    this.model_number = null;
68 ashish 375
  }
376
 
483 rajveer 377
  /** Returns true if field model_number is set (has been asigned a value) and false otherwise */
378
  public boolean isSetModel_number() {
379
    return this.model_number != null;
68 ashish 380
  }
381
 
483 rajveer 382
  public void setModel_numberIsSet(boolean value) {
383
    if (!value) {
384
      this.model_number = null;
385
    }
68 ashish 386
  }
387
 
957 chandransh 388
  public String getColor() {
389
    return this.color;
390
  }
391
 
392
  public LineItem setColor(String color) {
393
    this.color = color;
394
    return this;
395
  }
396
 
397
  public void unsetColor() {
398
    this.color = null;
399
  }
400
 
401
  /** Returns true if field color is set (has been asigned a value) and false otherwise */
402
  public boolean isSetColor() {
403
    return this.color != null;
404
  }
405
 
406
  public void setColorIsSet(boolean value) {
407
    if (!value) {
408
      this.color = null;
409
    }
410
  }
411
 
483 rajveer 412
  public String getModel_name() {
413
    return this.model_name;
68 ashish 414
  }
415
 
483 rajveer 416
  public LineItem setModel_name(String model_name) {
417
    this.model_name = model_name;
418
    return this;
419
  }
420
 
421
  public void unsetModel_name() {
422
    this.model_name = null;
423
  }
424
 
425
  /** Returns true if field model_name is set (has been asigned a value) and false otherwise */
426
  public boolean isSetModel_name() {
427
    return this.model_name != null;
428
  }
429
 
430
  public void setModel_nameIsSet(boolean value) {
431
    if (!value) {
432
      this.model_name = null;
68 ashish 433
    }
434
  }
435
 
483 rajveer 436
  public String getExtra_info() {
437
    return this.extra_info;
68 ashish 438
  }
439
 
483 rajveer 440
  public LineItem setExtra_info(String extra_info) {
441
    this.extra_info = extra_info;
68 ashish 442
    return this;
443
  }
444
 
483 rajveer 445
  public void unsetExtra_info() {
446
    this.extra_info = null;
68 ashish 447
  }
448
 
483 rajveer 449
  /** Returns true if field extra_info is set (has been asigned a value) and false otherwise */
450
  public boolean isSetExtra_info() {
451
    return this.extra_info != null;
68 ashish 452
  }
453
 
483 rajveer 454
  public void setExtra_infoIsSet(boolean value) {
68 ashish 455
    if (!value) {
483 rajveer 456
      this.extra_info = null;
68 ashish 457
    }
458
  }
459
 
483 rajveer 460
  public double getQuantity() {
461
    return this.quantity;
462
  }
463
 
464
  public LineItem setQuantity(double quantity) {
465
    this.quantity = quantity;
466
    setQuantityIsSet(true);
467
    return this;
468
  }
469
 
470
  public void unsetQuantity() {
471
    __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
472
  }
473
 
474
  /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
475
  public boolean isSetQuantity() {
476
    return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
477
  }
478
 
479
  public void setQuantityIsSet(boolean value) {
480
    __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
481
  }
482
 
483
  public double getUnit_price() {
484
    return this.unit_price;
485
  }
486
 
487
  public LineItem setUnit_price(double unit_price) {
488
    this.unit_price = unit_price;
489
    setUnit_priceIsSet(true);
490
    return this;
491
  }
492
 
493
  public void unsetUnit_price() {
494
    __isset_bit_vector.clear(__UNIT_PRICE_ISSET_ID);
495
  }
496
 
497
  /** Returns true if field unit_price is set (has been asigned a value) and false otherwise */
498
  public boolean isSetUnit_price() {
499
    return __isset_bit_vector.get(__UNIT_PRICE_ISSET_ID);
500
  }
501
 
502
  public void setUnit_priceIsSet(boolean value) {
503
    __isset_bit_vector.set(__UNIT_PRICE_ISSET_ID, value);
504
  }
505
 
506
  public double getUnit_weight() {
507
    return this.unit_weight;
508
  }
509
 
510
  public LineItem setUnit_weight(double unit_weight) {
511
    this.unit_weight = unit_weight;
512
    setUnit_weightIsSet(true);
513
    return this;
514
  }
515
 
516
  public void unsetUnit_weight() {
517
    __isset_bit_vector.clear(__UNIT_WEIGHT_ISSET_ID);
518
  }
519
 
520
  /** Returns true if field unit_weight is set (has been asigned a value) and false otherwise */
521
  public boolean isSetUnit_weight() {
522
    return __isset_bit_vector.get(__UNIT_WEIGHT_ISSET_ID);
523
  }
524
 
525
  public void setUnit_weightIsSet(boolean value) {
526
    __isset_bit_vector.set(__UNIT_WEIGHT_ISSET_ID, value);
527
  }
528
 
529
  public double getTotal_price() {
530
    return this.total_price;
531
  }
532
 
533
  public LineItem setTotal_price(double total_price) {
534
    this.total_price = total_price;
535
    setTotal_priceIsSet(true);
536
    return this;
537
  }
538
 
539
  public void unsetTotal_price() {
540
    __isset_bit_vector.clear(__TOTAL_PRICE_ISSET_ID);
541
  }
542
 
543
  /** Returns true if field total_price is set (has been asigned a value) and false otherwise */
544
  public boolean isSetTotal_price() {
545
    return __isset_bit_vector.get(__TOTAL_PRICE_ISSET_ID);
546
  }
547
 
548
  public void setTotal_priceIsSet(boolean value) {
549
    __isset_bit_vector.set(__TOTAL_PRICE_ISSET_ID, value);
550
  }
551
 
1022 varun.gupt 552
  public double getTransfer_price() {
553
    return this.transfer_price;
554
  }
555
 
556
  public LineItem setTransfer_price(double transfer_price) {
557
    this.transfer_price = transfer_price;
558
    setTransfer_priceIsSet(true);
559
    return this;
560
  }
561
 
562
  public void unsetTransfer_price() {
563
    __isset_bit_vector.clear(__TRANSFER_PRICE_ISSET_ID);
564
  }
565
 
566
  /** Returns true if field transfer_price is set (has been asigned a value) and false otherwise */
567
  public boolean isSetTransfer_price() {
568
    return __isset_bit_vector.get(__TRANSFER_PRICE_ISSET_ID);
569
  }
570
 
571
  public void setTransfer_priceIsSet(boolean value) {
572
    __isset_bit_vector.set(__TRANSFER_PRICE_ISSET_ID, value);
573
  }
574
 
483 rajveer 575
  public double getTotal_weight() {
576
    return this.total_weight;
577
  }
578
 
579
  public LineItem setTotal_weight(double total_weight) {
580
    this.total_weight = total_weight;
581
    setTotal_weightIsSet(true);
582
    return this;
583
  }
584
 
585
  public void unsetTotal_weight() {
586
    __isset_bit_vector.clear(__TOTAL_WEIGHT_ISSET_ID);
587
  }
588
 
589
  /** Returns true if field total_weight is set (has been asigned a value) and false otherwise */
590
  public boolean isSetTotal_weight() {
591
    return __isset_bit_vector.get(__TOTAL_WEIGHT_ISSET_ID);
592
  }
593
 
594
  public void setTotal_weightIsSet(boolean value) {
595
    __isset_bit_vector.set(__TOTAL_WEIGHT_ISSET_ID, value);
596
  }
597
 
1982 varun.gupt 598
  public double getDiscounted_price() {
599
    return this.discounted_price;
600
  }
601
 
602
  public LineItem setDiscounted_price(double discounted_price) {
603
    this.discounted_price = discounted_price;
604
    setDiscounted_priceIsSet(true);
605
    return this;
606
  }
607
 
608
  public void unsetDiscounted_price() {
609
    __isset_bit_vector.clear(__DISCOUNTED_PRICE_ISSET_ID);
610
  }
611
 
612
  /** Returns true if field discounted_price is set (has been asigned a value) and false otherwise */
613
  public boolean isSetDiscounted_price() {
614
    return __isset_bit_vector.get(__DISCOUNTED_PRICE_ISSET_ID);
615
  }
616
 
617
  public void setDiscounted_priceIsSet(boolean value) {
618
    __isset_bit_vector.set(__DISCOUNTED_PRICE_ISSET_ID, value);
619
  }
620
 
68 ashish 621
  public void setFieldValue(_Fields field, Object value) {
622
    switch (field) {
483 rajveer 623
    case ID:
68 ashish 624
      if (value == null) {
483 rajveer 625
        unsetId();
68 ashish 626
      } else {
483 rajveer 627
        setId((Long)value);
68 ashish 628
      }
629
      break;
630
 
697 chandransh 631
    case ITEM_ID:
68 ashish 632
      if (value == null) {
697 chandransh 633
        unsetItem_id();
68 ashish 634
      } else {
697 chandransh 635
        setItem_id((Long)value);
68 ashish 636
      }
637
      break;
638
 
957 chandransh 639
    case PRODUCT_GROUP:
640
      if (value == null) {
641
        unsetProductGroup();
642
      } else {
643
        setProductGroup((String)value);
644
      }
645
      break;
646
 
483 rajveer 647
    case BRAND:
68 ashish 648
      if (value == null) {
483 rajveer 649
        unsetBrand();
68 ashish 650
      } else {
483 rajveer 651
        setBrand((String)value);
68 ashish 652
      }
653
      break;
654
 
483 rajveer 655
    case MODEL_NUMBER:
68 ashish 656
      if (value == null) {
483 rajveer 657
        unsetModel_number();
68 ashish 658
      } else {
483 rajveer 659
        setModel_number((String)value);
68 ashish 660
      }
661
      break;
662
 
957 chandransh 663
    case COLOR:
664
      if (value == null) {
665
        unsetColor();
666
      } else {
667
        setColor((String)value);
668
      }
669
      break;
670
 
483 rajveer 671
    case MODEL_NAME:
672
      if (value == null) {
673
        unsetModel_name();
674
      } else {
675
        setModel_name((String)value);
676
      }
677
      break;
678
 
679
    case EXTRA_INFO:
680
      if (value == null) {
681
        unsetExtra_info();
682
      } else {
683
        setExtra_info((String)value);
684
      }
685
      break;
686
 
687
    case QUANTITY:
688
      if (value == null) {
689
        unsetQuantity();
690
      } else {
691
        setQuantity((Double)value);
692
      }
693
      break;
694
 
695
    case UNIT_PRICE:
696
      if (value == null) {
697
        unsetUnit_price();
698
      } else {
699
        setUnit_price((Double)value);
700
      }
701
      break;
702
 
703
    case UNIT_WEIGHT:
704
      if (value == null) {
705
        unsetUnit_weight();
706
      } else {
707
        setUnit_weight((Double)value);
708
      }
709
      break;
710
 
711
    case TOTAL_PRICE:
712
      if (value == null) {
713
        unsetTotal_price();
714
      } else {
715
        setTotal_price((Double)value);
716
      }
717
      break;
718
 
1022 varun.gupt 719
    case TRANSFER_PRICE:
720
      if (value == null) {
721
        unsetTransfer_price();
722
      } else {
723
        setTransfer_price((Double)value);
724
      }
725
      break;
726
 
483 rajveer 727
    case TOTAL_WEIGHT:
728
      if (value == null) {
729
        unsetTotal_weight();
730
      } else {
731
        setTotal_weight((Double)value);
732
      }
733
      break;
734
 
1982 varun.gupt 735
    case DISCOUNTED_PRICE:
736
      if (value == null) {
737
        unsetDiscounted_price();
738
      } else {
739
        setDiscounted_price((Double)value);
740
      }
741
      break;
742
 
68 ashish 743
    }
744
  }
745
 
746
  public void setFieldValue(int fieldID, Object value) {
747
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
748
  }
749
 
750
  public Object getFieldValue(_Fields field) {
751
    switch (field) {
752
    case ID:
753
      return new Long(getId());
754
 
697 chandransh 755
    case ITEM_ID:
756
      return new Long(getItem_id());
68 ashish 757
 
957 chandransh 758
    case PRODUCT_GROUP:
759
      return getProductGroup();
760
 
483 rajveer 761
    case BRAND:
762
      return getBrand();
68 ashish 763
 
483 rajveer 764
    case MODEL_NUMBER:
765
      return getModel_number();
766
 
957 chandransh 767
    case COLOR:
768
      return getColor();
769
 
483 rajveer 770
    case MODEL_NAME:
771
      return getModel_name();
772
 
773
    case EXTRA_INFO:
774
      return getExtra_info();
775
 
776
    case QUANTITY:
777
      return new Double(getQuantity());
778
 
779
    case UNIT_PRICE:
780
      return new Double(getUnit_price());
781
 
782
    case UNIT_WEIGHT:
783
      return new Double(getUnit_weight());
784
 
785
    case TOTAL_PRICE:
786
      return new Double(getTotal_price());
787
 
1022 varun.gupt 788
    case TRANSFER_PRICE:
789
      return new Double(getTransfer_price());
790
 
483 rajveer 791
    case TOTAL_WEIGHT:
792
      return new Double(getTotal_weight());
793
 
1982 varun.gupt 794
    case DISCOUNTED_PRICE:
795
      return new Double(getDiscounted_price());
796
 
68 ashish 797
    }
798
    throw new IllegalStateException();
799
  }
800
 
801
  public Object getFieldValue(int fieldId) {
802
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
803
  }
804
 
805
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
806
  public boolean isSet(_Fields field) {
807
    switch (field) {
808
    case ID:
809
      return isSetId();
697 chandransh 810
    case ITEM_ID:
811
      return isSetItem_id();
957 chandransh 812
    case PRODUCT_GROUP:
813
      return isSetProductGroup();
483 rajveer 814
    case BRAND:
815
      return isSetBrand();
816
    case MODEL_NUMBER:
817
      return isSetModel_number();
957 chandransh 818
    case COLOR:
819
      return isSetColor();
483 rajveer 820
    case MODEL_NAME:
821
      return isSetModel_name();
822
    case EXTRA_INFO:
823
      return isSetExtra_info();
824
    case QUANTITY:
825
      return isSetQuantity();
826
    case UNIT_PRICE:
827
      return isSetUnit_price();
828
    case UNIT_WEIGHT:
829
      return isSetUnit_weight();
830
    case TOTAL_PRICE:
831
      return isSetTotal_price();
1022 varun.gupt 832
    case TRANSFER_PRICE:
833
      return isSetTransfer_price();
483 rajveer 834
    case TOTAL_WEIGHT:
835
      return isSetTotal_weight();
1982 varun.gupt 836
    case DISCOUNTED_PRICE:
837
      return isSetDiscounted_price();
68 ashish 838
    }
839
    throw new IllegalStateException();
840
  }
841
 
842
  public boolean isSet(int fieldID) {
843
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
844
  }
845
 
846
  @Override
847
  public boolean equals(Object that) {
848
    if (that == null)
849
      return false;
850
    if (that instanceof LineItem)
851
      return this.equals((LineItem)that);
852
    return false;
853
  }
854
 
855
  public boolean equals(LineItem that) {
856
    if (that == null)
857
      return false;
858
 
859
    boolean this_present_id = true;
860
    boolean that_present_id = true;
861
    if (this_present_id || that_present_id) {
862
      if (!(this_present_id && that_present_id))
863
        return false;
864
      if (this.id != that.id)
865
        return false;
866
    }
867
 
697 chandransh 868
    boolean this_present_item_id = true;
869
    boolean that_present_item_id = true;
870
    if (this_present_item_id || that_present_item_id) {
871
      if (!(this_present_item_id && that_present_item_id))
68 ashish 872
        return false;
697 chandransh 873
      if (this.item_id != that.item_id)
68 ashish 874
        return false;
875
    }
876
 
957 chandransh 877
    boolean this_present_productGroup = true && this.isSetProductGroup();
878
    boolean that_present_productGroup = true && that.isSetProductGroup();
879
    if (this_present_productGroup || that_present_productGroup) {
880
      if (!(this_present_productGroup && that_present_productGroup))
881
        return false;
882
      if (!this.productGroup.equals(that.productGroup))
883
        return false;
884
    }
885
 
483 rajveer 886
    boolean this_present_brand = true && this.isSetBrand();
887
    boolean that_present_brand = true && that.isSetBrand();
888
    if (this_present_brand || that_present_brand) {
889
      if (!(this_present_brand && that_present_brand))
68 ashish 890
        return false;
483 rajveer 891
      if (!this.brand.equals(that.brand))
68 ashish 892
        return false;
893
    }
894
 
483 rajveer 895
    boolean this_present_model_number = true && this.isSetModel_number();
896
    boolean that_present_model_number = true && that.isSetModel_number();
897
    if (this_present_model_number || that_present_model_number) {
898
      if (!(this_present_model_number && that_present_model_number))
899
        return false;
900
      if (!this.model_number.equals(that.model_number))
901
        return false;
902
    }
903
 
957 chandransh 904
    boolean this_present_color = true && this.isSetColor();
905
    boolean that_present_color = true && that.isSetColor();
906
    if (this_present_color || that_present_color) {
907
      if (!(this_present_color && that_present_color))
908
        return false;
909
      if (!this.color.equals(that.color))
910
        return false;
911
    }
912
 
483 rajveer 913
    boolean this_present_model_name = true && this.isSetModel_name();
914
    boolean that_present_model_name = true && that.isSetModel_name();
915
    if (this_present_model_name || that_present_model_name) {
916
      if (!(this_present_model_name && that_present_model_name))
917
        return false;
918
      if (!this.model_name.equals(that.model_name))
919
        return false;
920
    }
921
 
922
    boolean this_present_extra_info = true && this.isSetExtra_info();
923
    boolean that_present_extra_info = true && that.isSetExtra_info();
924
    if (this_present_extra_info || that_present_extra_info) {
925
      if (!(this_present_extra_info && that_present_extra_info))
926
        return false;
927
      if (!this.extra_info.equals(that.extra_info))
928
        return false;
929
    }
930
 
931
    boolean this_present_quantity = true;
932
    boolean that_present_quantity = true;
933
    if (this_present_quantity || that_present_quantity) {
934
      if (!(this_present_quantity && that_present_quantity))
935
        return false;
936
      if (this.quantity != that.quantity)
937
        return false;
938
    }
939
 
940
    boolean this_present_unit_price = true;
941
    boolean that_present_unit_price = true;
942
    if (this_present_unit_price || that_present_unit_price) {
943
      if (!(this_present_unit_price && that_present_unit_price))
944
        return false;
945
      if (this.unit_price != that.unit_price)
946
        return false;
947
    }
948
 
949
    boolean this_present_unit_weight = true;
950
    boolean that_present_unit_weight = true;
951
    if (this_present_unit_weight || that_present_unit_weight) {
952
      if (!(this_present_unit_weight && that_present_unit_weight))
953
        return false;
954
      if (this.unit_weight != that.unit_weight)
955
        return false;
956
    }
957
 
958
    boolean this_present_total_price = true;
959
    boolean that_present_total_price = true;
960
    if (this_present_total_price || that_present_total_price) {
961
      if (!(this_present_total_price && that_present_total_price))
962
        return false;
963
      if (this.total_price != that.total_price)
964
        return false;
965
    }
966
 
1022 varun.gupt 967
    boolean this_present_transfer_price = true;
968
    boolean that_present_transfer_price = true;
969
    if (this_present_transfer_price || that_present_transfer_price) {
970
      if (!(this_present_transfer_price && that_present_transfer_price))
971
        return false;
972
      if (this.transfer_price != that.transfer_price)
973
        return false;
974
    }
975
 
483 rajveer 976
    boolean this_present_total_weight = true;
977
    boolean that_present_total_weight = true;
978
    if (this_present_total_weight || that_present_total_weight) {
979
      if (!(this_present_total_weight && that_present_total_weight))
980
        return false;
981
      if (this.total_weight != that.total_weight)
982
        return false;
983
    }
984
 
1982 varun.gupt 985
    boolean this_present_discounted_price = true;
986
    boolean that_present_discounted_price = true;
987
    if (this_present_discounted_price || that_present_discounted_price) {
988
      if (!(this_present_discounted_price && that_present_discounted_price))
989
        return false;
990
      if (this.discounted_price != that.discounted_price)
991
        return false;
992
    }
993
 
68 ashish 994
    return true;
995
  }
996
 
997
  @Override
998
  public int hashCode() {
999
    return 0;
1000
  }
1001
 
483 rajveer 1002
  public int compareTo(LineItem other) {
1003
    if (!getClass().equals(other.getClass())) {
1004
      return getClass().getName().compareTo(other.getClass().getName());
1005
    }
1006
 
1007
    int lastComparison = 0;
1008
    LineItem typedOther = (LineItem)other;
1009
 
1010
    lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
1011
    if (lastComparison != 0) {
1012
      return lastComparison;
1013
    }
1014
    lastComparison = TBaseHelper.compareTo(id, typedOther.id);
1015
    if (lastComparison != 0) {
1016
      return lastComparison;
1017
    }
697 chandransh 1018
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
483 rajveer 1019
    if (lastComparison != 0) {
1020
      return lastComparison;
1021
    }
697 chandransh 1022
    lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
483 rajveer 1023
    if (lastComparison != 0) {
1024
      return lastComparison;
1025
    }
957 chandransh 1026
    lastComparison = Boolean.valueOf(isSetProductGroup()).compareTo(isSetProductGroup());
1027
    if (lastComparison != 0) {
1028
      return lastComparison;
1029
    }
1030
    lastComparison = TBaseHelper.compareTo(productGroup, typedOther.productGroup);
1031
    if (lastComparison != 0) {
1032
      return lastComparison;
1033
    }
483 rajveer 1034
    lastComparison = Boolean.valueOf(isSetBrand()).compareTo(isSetBrand());
1035
    if (lastComparison != 0) {
1036
      return lastComparison;
1037
    }
1038
    lastComparison = TBaseHelper.compareTo(brand, typedOther.brand);
1039
    if (lastComparison != 0) {
1040
      return lastComparison;
1041
    }
1042
    lastComparison = Boolean.valueOf(isSetModel_number()).compareTo(isSetModel_number());
1043
    if (lastComparison != 0) {
1044
      return lastComparison;
1045
    }
1046
    lastComparison = TBaseHelper.compareTo(model_number, typedOther.model_number);
1047
    if (lastComparison != 0) {
1048
      return lastComparison;
1049
    }
957 chandransh 1050
    lastComparison = Boolean.valueOf(isSetColor()).compareTo(isSetColor());
1051
    if (lastComparison != 0) {
1052
      return lastComparison;
1053
    }
1054
    lastComparison = TBaseHelper.compareTo(color, typedOther.color);
1055
    if (lastComparison != 0) {
1056
      return lastComparison;
1057
    }
483 rajveer 1058
    lastComparison = Boolean.valueOf(isSetModel_name()).compareTo(isSetModel_name());
1059
    if (lastComparison != 0) {
1060
      return lastComparison;
1061
    }
1062
    lastComparison = TBaseHelper.compareTo(model_name, typedOther.model_name);
1063
    if (lastComparison != 0) {
1064
      return lastComparison;
1065
    }
1066
    lastComparison = Boolean.valueOf(isSetExtra_info()).compareTo(isSetExtra_info());
1067
    if (lastComparison != 0) {
1068
      return lastComparison;
1069
    }
1070
    lastComparison = TBaseHelper.compareTo(extra_info, typedOther.extra_info);
1071
    if (lastComparison != 0) {
1072
      return lastComparison;
1073
    }
1074
    lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
1075
    if (lastComparison != 0) {
1076
      return lastComparison;
1077
    }
1078
    lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
1079
    if (lastComparison != 0) {
1080
      return lastComparison;
1081
    }
1082
    lastComparison = Boolean.valueOf(isSetUnit_price()).compareTo(isSetUnit_price());
1083
    if (lastComparison != 0) {
1084
      return lastComparison;
1085
    }
1086
    lastComparison = TBaseHelper.compareTo(unit_price, typedOther.unit_price);
1087
    if (lastComparison != 0) {
1088
      return lastComparison;
1089
    }
1090
    lastComparison = Boolean.valueOf(isSetUnit_weight()).compareTo(isSetUnit_weight());
1091
    if (lastComparison != 0) {
1092
      return lastComparison;
1093
    }
1094
    lastComparison = TBaseHelper.compareTo(unit_weight, typedOther.unit_weight);
1095
    if (lastComparison != 0) {
1096
      return lastComparison;
1097
    }
1098
    lastComparison = Boolean.valueOf(isSetTotal_price()).compareTo(isSetTotal_price());
1099
    if (lastComparison != 0) {
1100
      return lastComparison;
1101
    }
1102
    lastComparison = TBaseHelper.compareTo(total_price, typedOther.total_price);
1103
    if (lastComparison != 0) {
1104
      return lastComparison;
1105
    }
1022 varun.gupt 1106
    lastComparison = Boolean.valueOf(isSetTransfer_price()).compareTo(isSetTransfer_price());
1107
    if (lastComparison != 0) {
1108
      return lastComparison;
1109
    }
1110
    lastComparison = TBaseHelper.compareTo(transfer_price, typedOther.transfer_price);
1111
    if (lastComparison != 0) {
1112
      return lastComparison;
1113
    }
483 rajveer 1114
    lastComparison = Boolean.valueOf(isSetTotal_weight()).compareTo(isSetTotal_weight());
1115
    if (lastComparison != 0) {
1116
      return lastComparison;
1117
    }
1118
    lastComparison = TBaseHelper.compareTo(total_weight, typedOther.total_weight);
1119
    if (lastComparison != 0) {
1120
      return lastComparison;
1121
    }
1982 varun.gupt 1122
    lastComparison = Boolean.valueOf(isSetDiscounted_price()).compareTo(isSetDiscounted_price());
1123
    if (lastComparison != 0) {
1124
      return lastComparison;
1125
    }
1126
    lastComparison = TBaseHelper.compareTo(discounted_price, typedOther.discounted_price);
1127
    if (lastComparison != 0) {
1128
      return lastComparison;
1129
    }
483 rajveer 1130
    return 0;
1131
  }
1132
 
68 ashish 1133
  public void read(TProtocol iprot) throws TException {
1134
    TField field;
1135
    iprot.readStructBegin();
1136
    while (true)
1137
    {
1138
      field = iprot.readFieldBegin();
1139
      if (field.type == TType.STOP) { 
1140
        break;
1141
      }
1142
      _Fields fieldId = _Fields.findByThriftId(field.id);
1143
      if (fieldId == null) {
1144
        TProtocolUtil.skip(iprot, field.type);
1145
      } else {
1146
        switch (fieldId) {
1147
          case ID:
1148
            if (field.type == TType.I64) {
1149
              this.id = iprot.readI64();
1150
              setIdIsSet(true);
1151
            } else { 
1152
              TProtocolUtil.skip(iprot, field.type);
1153
            }
1154
            break;
697 chandransh 1155
          case ITEM_ID:
1156
            if (field.type == TType.I64) {
1157
              this.item_id = iprot.readI64();
1158
              setItem_idIsSet(true);
68 ashish 1159
            } else { 
1160
              TProtocolUtil.skip(iprot, field.type);
1161
            }
1162
            break;
957 chandransh 1163
          case PRODUCT_GROUP:
1164
            if (field.type == TType.STRING) {
1165
              this.productGroup = iprot.readString();
1166
            } else { 
1167
              TProtocolUtil.skip(iprot, field.type);
1168
            }
1169
            break;
483 rajveer 1170
          case BRAND:
1171
            if (field.type == TType.STRING) {
1172
              this.brand = iprot.readString();
68 ashish 1173
            } else { 
1174
              TProtocolUtil.skip(iprot, field.type);
1175
            }
1176
            break;
483 rajveer 1177
          case MODEL_NUMBER:
1178
            if (field.type == TType.STRING) {
1179
              this.model_number = iprot.readString();
1180
            } else { 
1181
              TProtocolUtil.skip(iprot, field.type);
1182
            }
1183
            break;
957 chandransh 1184
          case COLOR:
1185
            if (field.type == TType.STRING) {
1186
              this.color = iprot.readString();
1187
            } else { 
1188
              TProtocolUtil.skip(iprot, field.type);
1189
            }
1190
            break;
483 rajveer 1191
          case MODEL_NAME:
1192
            if (field.type == TType.STRING) {
1193
              this.model_name = iprot.readString();
1194
            } else { 
1195
              TProtocolUtil.skip(iprot, field.type);
1196
            }
1197
            break;
1198
          case EXTRA_INFO:
1199
            if (field.type == TType.STRING) {
1200
              this.extra_info = iprot.readString();
1201
            } else { 
1202
              TProtocolUtil.skip(iprot, field.type);
1203
            }
1204
            break;
1205
          case QUANTITY:
1206
            if (field.type == TType.DOUBLE) {
1207
              this.quantity = iprot.readDouble();
1208
              setQuantityIsSet(true);
1209
            } else { 
1210
              TProtocolUtil.skip(iprot, field.type);
1211
            }
1212
            break;
1213
          case UNIT_PRICE:
1214
            if (field.type == TType.DOUBLE) {
1215
              this.unit_price = iprot.readDouble();
1216
              setUnit_priceIsSet(true);
1217
            } else { 
1218
              TProtocolUtil.skip(iprot, field.type);
1219
            }
1220
            break;
1221
          case UNIT_WEIGHT:
1222
            if (field.type == TType.DOUBLE) {
1223
              this.unit_weight = iprot.readDouble();
1224
              setUnit_weightIsSet(true);
1225
            } else { 
1226
              TProtocolUtil.skip(iprot, field.type);
1227
            }
1228
            break;
1229
          case TOTAL_PRICE:
1230
            if (field.type == TType.DOUBLE) {
1231
              this.total_price = iprot.readDouble();
1232
              setTotal_priceIsSet(true);
1233
            } else { 
1234
              TProtocolUtil.skip(iprot, field.type);
1235
            }
1236
            break;
1022 varun.gupt 1237
          case TRANSFER_PRICE:
1238
            if (field.type == TType.DOUBLE) {
1239
              this.transfer_price = iprot.readDouble();
1240
              setTransfer_priceIsSet(true);
1241
            } else { 
1242
              TProtocolUtil.skip(iprot, field.type);
1243
            }
1244
            break;
483 rajveer 1245
          case TOTAL_WEIGHT:
1246
            if (field.type == TType.DOUBLE) {
1247
              this.total_weight = iprot.readDouble();
1248
              setTotal_weightIsSet(true);
1249
            } else { 
1250
              TProtocolUtil.skip(iprot, field.type);
1251
            }
1252
            break;
1982 varun.gupt 1253
          case DISCOUNTED_PRICE:
1254
            if (field.type == TType.DOUBLE) {
1255
              this.discounted_price = iprot.readDouble();
1256
              setDiscounted_priceIsSet(true);
1257
            } else { 
1258
              TProtocolUtil.skip(iprot, field.type);
1259
            }
1260
            break;
68 ashish 1261
        }
1262
        iprot.readFieldEnd();
1263
      }
1264
    }
1265
    iprot.readStructEnd();
1266
    validate();
1267
  }
1268
 
1269
  public void write(TProtocol oprot) throws TException {
1270
    validate();
1271
 
1272
    oprot.writeStructBegin(STRUCT_DESC);
1273
    oprot.writeFieldBegin(ID_FIELD_DESC);
1274
    oprot.writeI64(this.id);
1275
    oprot.writeFieldEnd();
697 chandransh 1276
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1277
    oprot.writeI64(this.item_id);
1278
    oprot.writeFieldEnd();
957 chandransh 1279
    if (this.productGroup != null) {
1280
      oprot.writeFieldBegin(PRODUCT_GROUP_FIELD_DESC);
1281
      oprot.writeString(this.productGroup);
1282
      oprot.writeFieldEnd();
1283
    }
483 rajveer 1284
    if (this.brand != null) {
1285
      oprot.writeFieldBegin(BRAND_FIELD_DESC);
1286
      oprot.writeString(this.brand);
1287
      oprot.writeFieldEnd();
1288
    }
1289
    if (this.model_number != null) {
1290
      oprot.writeFieldBegin(MODEL_NUMBER_FIELD_DESC);
1291
      oprot.writeString(this.model_number);
1292
      oprot.writeFieldEnd();
1293
    }
957 chandransh 1294
    if (this.color != null) {
1295
      oprot.writeFieldBegin(COLOR_FIELD_DESC);
1296
      oprot.writeString(this.color);
1297
      oprot.writeFieldEnd();
1298
    }
483 rajveer 1299
    if (this.model_name != null) {
1300
      oprot.writeFieldBegin(MODEL_NAME_FIELD_DESC);
1301
      oprot.writeString(this.model_name);
1302
      oprot.writeFieldEnd();
1303
    }
1304
    if (this.extra_info != null) {
1305
      oprot.writeFieldBegin(EXTRA_INFO_FIELD_DESC);
1306
      oprot.writeString(this.extra_info);
1307
      oprot.writeFieldEnd();
1308
    }
1309
    oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
1310
    oprot.writeDouble(this.quantity);
1311
    oprot.writeFieldEnd();
1312
    oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
1313
    oprot.writeDouble(this.unit_price);
1314
    oprot.writeFieldEnd();
1315
    oprot.writeFieldBegin(UNIT_WEIGHT_FIELD_DESC);
1316
    oprot.writeDouble(this.unit_weight);
1317
    oprot.writeFieldEnd();
1318
    oprot.writeFieldBegin(TOTAL_PRICE_FIELD_DESC);
1319
    oprot.writeDouble(this.total_price);
1320
    oprot.writeFieldEnd();
1022 varun.gupt 1321
    oprot.writeFieldBegin(TRANSFER_PRICE_FIELD_DESC);
1322
    oprot.writeDouble(this.transfer_price);
1323
    oprot.writeFieldEnd();
483 rajveer 1324
    oprot.writeFieldBegin(TOTAL_WEIGHT_FIELD_DESC);
1325
    oprot.writeDouble(this.total_weight);
1326
    oprot.writeFieldEnd();
1982 varun.gupt 1327
    oprot.writeFieldBegin(DISCOUNTED_PRICE_FIELD_DESC);
1328
    oprot.writeDouble(this.discounted_price);
1329
    oprot.writeFieldEnd();
68 ashish 1330
    oprot.writeFieldStop();
1331
    oprot.writeStructEnd();
1332
  }
1333
 
1334
  @Override
1335
  public String toString() {
1336
    StringBuilder sb = new StringBuilder("LineItem(");
1337
    boolean first = true;
1338
 
483 rajveer 1339
    sb.append("id:");
1340
    sb.append(this.id);
1341
    first = false;
1342
    if (!first) sb.append(", ");
697 chandransh 1343
    sb.append("item_id:");
1344
    sb.append(this.item_id);
68 ashish 1345
    first = false;
1346
    if (!first) sb.append(", ");
957 chandransh 1347
    sb.append("productGroup:");
1348
    if (this.productGroup == null) {
1349
      sb.append("null");
1350
    } else {
1351
      sb.append(this.productGroup);
1352
    }
1353
    first = false;
1354
    if (!first) sb.append(", ");
483 rajveer 1355
    sb.append("brand:");
1356
    if (this.brand == null) {
1357
      sb.append("null");
1358
    } else {
1359
      sb.append(this.brand);
1360
    }
68 ashish 1361
    first = false;
1362
    if (!first) sb.append(", ");
483 rajveer 1363
    sb.append("model_number:");
1364
    if (this.model_number == null) {
1365
      sb.append("null");
1366
    } else {
1367
      sb.append(this.model_number);
1368
    }
68 ashish 1369
    first = false;
1370
    if (!first) sb.append(", ");
957 chandransh 1371
    sb.append("color:");
1372
    if (this.color == null) {
1373
      sb.append("null");
1374
    } else {
1375
      sb.append(this.color);
1376
    }
1377
    first = false;
1378
    if (!first) sb.append(", ");
483 rajveer 1379
    sb.append("model_name:");
1380
    if (this.model_name == null) {
68 ashish 1381
      sb.append("null");
1382
    } else {
483 rajveer 1383
      sb.append(this.model_name);
68 ashish 1384
    }
1385
    first = false;
483 rajveer 1386
    if (!first) sb.append(", ");
1387
    sb.append("extra_info:");
1388
    if (this.extra_info == null) {
1389
      sb.append("null");
1390
    } else {
1391
      sb.append(this.extra_info);
1392
    }
1393
    first = false;
1394
    if (!first) sb.append(", ");
1395
    sb.append("quantity:");
1396
    sb.append(this.quantity);
1397
    first = false;
1398
    if (!first) sb.append(", ");
1399
    sb.append("unit_price:");
1400
    sb.append(this.unit_price);
1401
    first = false;
1402
    if (!first) sb.append(", ");
1403
    sb.append("unit_weight:");
1404
    sb.append(this.unit_weight);
1405
    first = false;
1406
    if (!first) sb.append(", ");
1407
    sb.append("total_price:");
1408
    sb.append(this.total_price);
1409
    first = false;
1410
    if (!first) sb.append(", ");
1022 varun.gupt 1411
    sb.append("transfer_price:");
1412
    sb.append(this.transfer_price);
1413
    first = false;
1414
    if (!first) sb.append(", ");
483 rajveer 1415
    sb.append("total_weight:");
1416
    sb.append(this.total_weight);
1417
    first = false;
1982 varun.gupt 1418
    if (!first) sb.append(", ");
1419
    sb.append("discounted_price:");
1420
    sb.append(this.discounted_price);
1421
    first = false;
68 ashish 1422
    sb.append(")");
1423
    return sb.toString();
1424
  }
1425
 
1426
  public void validate() throws TException {
1427
    // check for required fields
1428
  }
1429
 
1430
}
1431