Subversion Repositories SmartDukaan

Rev

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