Subversion Repositories SmartDukaan

Rev

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