Subversion Repositories SmartDukaan

Rev

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