Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14862 manish.sha 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.catalog;
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.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class VoiSnapdealItemInfo implements org.apache.thrift.TBase<VoiSnapdealItemInfo, VoiSnapdealItemInfo._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VoiSnapdealItemInfo");
25
 
26
  private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField VOI_SKU_AT_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("voiSkuAtSnapdeal", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField SELLING_PRICE_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("sellingPriceSnapdeal", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
29
  private static final org.apache.thrift.protocol.TField TRANSFER_PRICE_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("transferPriceSnapdeal", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
30
  private static final org.apache.thrift.protocol.TField FIXED_MARGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("fixedMargin", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
31
  private static final org.apache.thrift.protocol.TField FIXED_MARGIN_PERCENTAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("fixedMarginPercentage", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
32
  private static final org.apache.thrift.protocol.TField LOGISTIC_COST_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticCostSnapdeal", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
33
  private static final org.apache.thrift.protocol.TField WOODEN_PACKAGING_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("woodenPackagingCost", org.apache.thrift.protocol.TType.DOUBLE, (short)8);
34
  private static final org.apache.thrift.protocol.TField WEIGHT_SNAPDEAL_FIELD_DESC = new org.apache.thrift.protocol.TField("weightSnapdeal", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
35
 
36
  private long item_id; // required
37
  private String voiSkuAtSnapdeal; // required
38
  private double sellingPriceSnapdeal; // required
39
  private double transferPriceSnapdeal; // required
40
  private double fixedMargin; // required
41
  private double fixedMarginPercentage; // required
42
  private double logisticCostSnapdeal; // required
43
  private double woodenPackagingCost; // required
44
  private double weightSnapdeal; // required
45
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
48
    ITEM_ID((short)1, "item_id"),
49
    VOI_SKU_AT_SNAPDEAL((short)2, "voiSkuAtSnapdeal"),
50
    SELLING_PRICE_SNAPDEAL((short)3, "sellingPriceSnapdeal"),
51
    TRANSFER_PRICE_SNAPDEAL((short)4, "transferPriceSnapdeal"),
52
    FIXED_MARGIN((short)5, "fixedMargin"),
53
    FIXED_MARGIN_PERCENTAGE((short)6, "fixedMarginPercentage"),
54
    LOGISTIC_COST_SNAPDEAL((short)7, "logisticCostSnapdeal"),
55
    WOODEN_PACKAGING_COST((short)8, "woodenPackagingCost"),
56
    WEIGHT_SNAPDEAL((short)9, "weightSnapdeal");
57
 
58
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
59
 
60
    static {
61
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
62
        byName.put(field.getFieldName(), field);
63
      }
64
    }
65
 
66
    /**
67
     * Find the _Fields constant that matches fieldId, or null if its not found.
68
     */
69
    public static _Fields findByThriftId(int fieldId) {
70
      switch(fieldId) {
71
        case 1: // ITEM_ID
72
          return ITEM_ID;
73
        case 2: // VOI_SKU_AT_SNAPDEAL
74
          return VOI_SKU_AT_SNAPDEAL;
75
        case 3: // SELLING_PRICE_SNAPDEAL
76
          return SELLING_PRICE_SNAPDEAL;
77
        case 4: // TRANSFER_PRICE_SNAPDEAL
78
          return TRANSFER_PRICE_SNAPDEAL;
79
        case 5: // FIXED_MARGIN
80
          return FIXED_MARGIN;
81
        case 6: // FIXED_MARGIN_PERCENTAGE
82
          return FIXED_MARGIN_PERCENTAGE;
83
        case 7: // LOGISTIC_COST_SNAPDEAL
84
          return LOGISTIC_COST_SNAPDEAL;
85
        case 8: // WOODEN_PACKAGING_COST
86
          return WOODEN_PACKAGING_COST;
87
        case 9: // WEIGHT_SNAPDEAL
88
          return WEIGHT_SNAPDEAL;
89
        default:
90
          return null;
91
      }
92
    }
93
 
94
    /**
95
     * Find the _Fields constant that matches fieldId, throwing an exception
96
     * if it is not found.
97
     */
98
    public static _Fields findByThriftIdOrThrow(int fieldId) {
99
      _Fields fields = findByThriftId(fieldId);
100
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
101
      return fields;
102
    }
103
 
104
    /**
105
     * Find the _Fields constant that matches name, or null if its not found.
106
     */
107
    public static _Fields findByName(String name) {
108
      return byName.get(name);
109
    }
110
 
111
    private final short _thriftId;
112
    private final String _fieldName;
113
 
114
    _Fields(short thriftId, String fieldName) {
115
      _thriftId = thriftId;
116
      _fieldName = fieldName;
117
    }
118
 
119
    public short getThriftFieldId() {
120
      return _thriftId;
121
    }
122
 
123
    public String getFieldName() {
124
      return _fieldName;
125
    }
126
  }
127
 
128
  // isset id assignments
129
  private static final int __ITEM_ID_ISSET_ID = 0;
130
  private static final int __SELLINGPRICESNAPDEAL_ISSET_ID = 1;
131
  private static final int __TRANSFERPRICESNAPDEAL_ISSET_ID = 2;
132
  private static final int __FIXEDMARGIN_ISSET_ID = 3;
133
  private static final int __FIXEDMARGINPERCENTAGE_ISSET_ID = 4;
134
  private static final int __LOGISTICCOSTSNAPDEAL_ISSET_ID = 5;
135
  private static final int __WOODENPACKAGINGCOST_ISSET_ID = 6;
136
  private static final int __WEIGHTSNAPDEAL_ISSET_ID = 7;
137
  private BitSet __isset_bit_vector = new BitSet(8);
138
 
139
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
140
  static {
141
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
142
    tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
144
    tmpMap.put(_Fields.VOI_SKU_AT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("voiSkuAtSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
146
    tmpMap.put(_Fields.SELLING_PRICE_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("sellingPriceSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
148
    tmpMap.put(_Fields.TRANSFER_PRICE_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("transferPriceSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
150
    tmpMap.put(_Fields.FIXED_MARGIN, new org.apache.thrift.meta_data.FieldMetaData("fixedMargin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
152
    tmpMap.put(_Fields.FIXED_MARGIN_PERCENTAGE, new org.apache.thrift.meta_data.FieldMetaData("fixedMarginPercentage", org.apache.thrift.TFieldRequirementType.DEFAULT, 
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
154
    tmpMap.put(_Fields.LOGISTIC_COST_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("logisticCostSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
155
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
156
    tmpMap.put(_Fields.WOODEN_PACKAGING_COST, new org.apache.thrift.meta_data.FieldMetaData("woodenPackagingCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
158
    tmpMap.put(_Fields.WEIGHT_SNAPDEAL, new org.apache.thrift.meta_data.FieldMetaData("weightSnapdeal", org.apache.thrift.TFieldRequirementType.DEFAULT, 
159
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
160
    metaDataMap = Collections.unmodifiableMap(tmpMap);
161
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(VoiSnapdealItemInfo.class, metaDataMap);
162
  }
163
 
164
  public VoiSnapdealItemInfo() {
165
  }
166
 
167
  public VoiSnapdealItemInfo(
168
    long item_id,
169
    String voiSkuAtSnapdeal,
170
    double sellingPriceSnapdeal,
171
    double transferPriceSnapdeal,
172
    double fixedMargin,
173
    double fixedMarginPercentage,
174
    double logisticCostSnapdeal,
175
    double woodenPackagingCost,
176
    double weightSnapdeal)
177
  {
178
    this();
179
    this.item_id = item_id;
180
    setItem_idIsSet(true);
181
    this.voiSkuAtSnapdeal = voiSkuAtSnapdeal;
182
    this.sellingPriceSnapdeal = sellingPriceSnapdeal;
183
    setSellingPriceSnapdealIsSet(true);
184
    this.transferPriceSnapdeal = transferPriceSnapdeal;
185
    setTransferPriceSnapdealIsSet(true);
186
    this.fixedMargin = fixedMargin;
187
    setFixedMarginIsSet(true);
188
    this.fixedMarginPercentage = fixedMarginPercentage;
189
    setFixedMarginPercentageIsSet(true);
190
    this.logisticCostSnapdeal = logisticCostSnapdeal;
191
    setLogisticCostSnapdealIsSet(true);
192
    this.woodenPackagingCost = woodenPackagingCost;
193
    setWoodenPackagingCostIsSet(true);
194
    this.weightSnapdeal = weightSnapdeal;
195
    setWeightSnapdealIsSet(true);
196
  }
197
 
198
  /**
199
   * Performs a deep copy on <i>other</i>.
200
   */
201
  public VoiSnapdealItemInfo(VoiSnapdealItemInfo other) {
202
    __isset_bit_vector.clear();
203
    __isset_bit_vector.or(other.__isset_bit_vector);
204
    this.item_id = other.item_id;
205
    if (other.isSetVoiSkuAtSnapdeal()) {
206
      this.voiSkuAtSnapdeal = other.voiSkuAtSnapdeal;
207
    }
208
    this.sellingPriceSnapdeal = other.sellingPriceSnapdeal;
209
    this.transferPriceSnapdeal = other.transferPriceSnapdeal;
210
    this.fixedMargin = other.fixedMargin;
211
    this.fixedMarginPercentage = other.fixedMarginPercentage;
212
    this.logisticCostSnapdeal = other.logisticCostSnapdeal;
213
    this.woodenPackagingCost = other.woodenPackagingCost;
214
    this.weightSnapdeal = other.weightSnapdeal;
215
  }
216
 
217
  public VoiSnapdealItemInfo deepCopy() {
218
    return new VoiSnapdealItemInfo(this);
219
  }
220
 
221
  @Override
222
  public void clear() {
223
    setItem_idIsSet(false);
224
    this.item_id = 0;
225
    this.voiSkuAtSnapdeal = null;
226
    setSellingPriceSnapdealIsSet(false);
227
    this.sellingPriceSnapdeal = 0.0;
228
    setTransferPriceSnapdealIsSet(false);
229
    this.transferPriceSnapdeal = 0.0;
230
    setFixedMarginIsSet(false);
231
    this.fixedMargin = 0.0;
232
    setFixedMarginPercentageIsSet(false);
233
    this.fixedMarginPercentage = 0.0;
234
    setLogisticCostSnapdealIsSet(false);
235
    this.logisticCostSnapdeal = 0.0;
236
    setWoodenPackagingCostIsSet(false);
237
    this.woodenPackagingCost = 0.0;
238
    setWeightSnapdealIsSet(false);
239
    this.weightSnapdeal = 0.0;
240
  }
241
 
242
  public long getItem_id() {
243
    return this.item_id;
244
  }
245
 
246
  public void setItem_id(long item_id) {
247
    this.item_id = item_id;
248
    setItem_idIsSet(true);
249
  }
250
 
251
  public void unsetItem_id() {
252
    __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
253
  }
254
 
255
  /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
256
  public boolean isSetItem_id() {
257
    return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
258
  }
259
 
260
  public void setItem_idIsSet(boolean value) {
261
    __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
262
  }
263
 
264
  public String getVoiSkuAtSnapdeal() {
265
    return this.voiSkuAtSnapdeal;
266
  }
267
 
268
  public void setVoiSkuAtSnapdeal(String voiSkuAtSnapdeal) {
269
    this.voiSkuAtSnapdeal = voiSkuAtSnapdeal;
270
  }
271
 
272
  public void unsetVoiSkuAtSnapdeal() {
273
    this.voiSkuAtSnapdeal = null;
274
  }
275
 
276
  /** Returns true if field voiSkuAtSnapdeal is set (has been assigned a value) and false otherwise */
277
  public boolean isSetVoiSkuAtSnapdeal() {
278
    return this.voiSkuAtSnapdeal != null;
279
  }
280
 
281
  public void setVoiSkuAtSnapdealIsSet(boolean value) {
282
    if (!value) {
283
      this.voiSkuAtSnapdeal = null;
284
    }
285
  }
286
 
287
  public double getSellingPriceSnapdeal() {
288
    return this.sellingPriceSnapdeal;
289
  }
290
 
291
  public void setSellingPriceSnapdeal(double sellingPriceSnapdeal) {
292
    this.sellingPriceSnapdeal = sellingPriceSnapdeal;
293
    setSellingPriceSnapdealIsSet(true);
294
  }
295
 
296
  public void unsetSellingPriceSnapdeal() {
297
    __isset_bit_vector.clear(__SELLINGPRICESNAPDEAL_ISSET_ID);
298
  }
299
 
300
  /** Returns true if field sellingPriceSnapdeal is set (has been assigned a value) and false otherwise */
301
  public boolean isSetSellingPriceSnapdeal() {
302
    return __isset_bit_vector.get(__SELLINGPRICESNAPDEAL_ISSET_ID);
303
  }
304
 
305
  public void setSellingPriceSnapdealIsSet(boolean value) {
306
    __isset_bit_vector.set(__SELLINGPRICESNAPDEAL_ISSET_ID, value);
307
  }
308
 
309
  public double getTransferPriceSnapdeal() {
310
    return this.transferPriceSnapdeal;
311
  }
312
 
313
  public void setTransferPriceSnapdeal(double transferPriceSnapdeal) {
314
    this.transferPriceSnapdeal = transferPriceSnapdeal;
315
    setTransferPriceSnapdealIsSet(true);
316
  }
317
 
318
  public void unsetTransferPriceSnapdeal() {
319
    __isset_bit_vector.clear(__TRANSFERPRICESNAPDEAL_ISSET_ID);
320
  }
321
 
322
  /** Returns true if field transferPriceSnapdeal is set (has been assigned a value) and false otherwise */
323
  public boolean isSetTransferPriceSnapdeal() {
324
    return __isset_bit_vector.get(__TRANSFERPRICESNAPDEAL_ISSET_ID);
325
  }
326
 
327
  public void setTransferPriceSnapdealIsSet(boolean value) {
328
    __isset_bit_vector.set(__TRANSFERPRICESNAPDEAL_ISSET_ID, value);
329
  }
330
 
331
  public double getFixedMargin() {
332
    return this.fixedMargin;
333
  }
334
 
335
  public void setFixedMargin(double fixedMargin) {
336
    this.fixedMargin = fixedMargin;
337
    setFixedMarginIsSet(true);
338
  }
339
 
340
  public void unsetFixedMargin() {
341
    __isset_bit_vector.clear(__FIXEDMARGIN_ISSET_ID);
342
  }
343
 
344
  /** Returns true if field fixedMargin is set (has been assigned a value) and false otherwise */
345
  public boolean isSetFixedMargin() {
346
    return __isset_bit_vector.get(__FIXEDMARGIN_ISSET_ID);
347
  }
348
 
349
  public void setFixedMarginIsSet(boolean value) {
350
    __isset_bit_vector.set(__FIXEDMARGIN_ISSET_ID, value);
351
  }
352
 
353
  public double getFixedMarginPercentage() {
354
    return this.fixedMarginPercentage;
355
  }
356
 
357
  public void setFixedMarginPercentage(double fixedMarginPercentage) {
358
    this.fixedMarginPercentage = fixedMarginPercentage;
359
    setFixedMarginPercentageIsSet(true);
360
  }
361
 
362
  public void unsetFixedMarginPercentage() {
363
    __isset_bit_vector.clear(__FIXEDMARGINPERCENTAGE_ISSET_ID);
364
  }
365
 
366
  /** Returns true if field fixedMarginPercentage is set (has been assigned a value) and false otherwise */
367
  public boolean isSetFixedMarginPercentage() {
368
    return __isset_bit_vector.get(__FIXEDMARGINPERCENTAGE_ISSET_ID);
369
  }
370
 
371
  public void setFixedMarginPercentageIsSet(boolean value) {
372
    __isset_bit_vector.set(__FIXEDMARGINPERCENTAGE_ISSET_ID, value);
373
  }
374
 
375
  public double getLogisticCostSnapdeal() {
376
    return this.logisticCostSnapdeal;
377
  }
378
 
379
  public void setLogisticCostSnapdeal(double logisticCostSnapdeal) {
380
    this.logisticCostSnapdeal = logisticCostSnapdeal;
381
    setLogisticCostSnapdealIsSet(true);
382
  }
383
 
384
  public void unsetLogisticCostSnapdeal() {
385
    __isset_bit_vector.clear(__LOGISTICCOSTSNAPDEAL_ISSET_ID);
386
  }
387
 
388
  /** Returns true if field logisticCostSnapdeal is set (has been assigned a value) and false otherwise */
389
  public boolean isSetLogisticCostSnapdeal() {
390
    return __isset_bit_vector.get(__LOGISTICCOSTSNAPDEAL_ISSET_ID);
391
  }
392
 
393
  public void setLogisticCostSnapdealIsSet(boolean value) {
394
    __isset_bit_vector.set(__LOGISTICCOSTSNAPDEAL_ISSET_ID, value);
395
  }
396
 
397
  public double getWoodenPackagingCost() {
398
    return this.woodenPackagingCost;
399
  }
400
 
401
  public void setWoodenPackagingCost(double woodenPackagingCost) {
402
    this.woodenPackagingCost = woodenPackagingCost;
403
    setWoodenPackagingCostIsSet(true);
404
  }
405
 
406
  public void unsetWoodenPackagingCost() {
407
    __isset_bit_vector.clear(__WOODENPACKAGINGCOST_ISSET_ID);
408
  }
409
 
410
  /** Returns true if field woodenPackagingCost is set (has been assigned a value) and false otherwise */
411
  public boolean isSetWoodenPackagingCost() {
412
    return __isset_bit_vector.get(__WOODENPACKAGINGCOST_ISSET_ID);
413
  }
414
 
415
  public void setWoodenPackagingCostIsSet(boolean value) {
416
    __isset_bit_vector.set(__WOODENPACKAGINGCOST_ISSET_ID, value);
417
  }
418
 
419
  public double getWeightSnapdeal() {
420
    return this.weightSnapdeal;
421
  }
422
 
423
  public void setWeightSnapdeal(double weightSnapdeal) {
424
    this.weightSnapdeal = weightSnapdeal;
425
    setWeightSnapdealIsSet(true);
426
  }
427
 
428
  public void unsetWeightSnapdeal() {
429
    __isset_bit_vector.clear(__WEIGHTSNAPDEAL_ISSET_ID);
430
  }
431
 
432
  /** Returns true if field weightSnapdeal is set (has been assigned a value) and false otherwise */
433
  public boolean isSetWeightSnapdeal() {
434
    return __isset_bit_vector.get(__WEIGHTSNAPDEAL_ISSET_ID);
435
  }
436
 
437
  public void setWeightSnapdealIsSet(boolean value) {
438
    __isset_bit_vector.set(__WEIGHTSNAPDEAL_ISSET_ID, value);
439
  }
440
 
441
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
443
    case ITEM_ID:
444
      if (value == null) {
445
        unsetItem_id();
446
      } else {
447
        setItem_id((Long)value);
448
      }
449
      break;
450
 
451
    case VOI_SKU_AT_SNAPDEAL:
452
      if (value == null) {
453
        unsetVoiSkuAtSnapdeal();
454
      } else {
455
        setVoiSkuAtSnapdeal((String)value);
456
      }
457
      break;
458
 
459
    case SELLING_PRICE_SNAPDEAL:
460
      if (value == null) {
461
        unsetSellingPriceSnapdeal();
462
      } else {
463
        setSellingPriceSnapdeal((Double)value);
464
      }
465
      break;
466
 
467
    case TRANSFER_PRICE_SNAPDEAL:
468
      if (value == null) {
469
        unsetTransferPriceSnapdeal();
470
      } else {
471
        setTransferPriceSnapdeal((Double)value);
472
      }
473
      break;
474
 
475
    case FIXED_MARGIN:
476
      if (value == null) {
477
        unsetFixedMargin();
478
      } else {
479
        setFixedMargin((Double)value);
480
      }
481
      break;
482
 
483
    case FIXED_MARGIN_PERCENTAGE:
484
      if (value == null) {
485
        unsetFixedMarginPercentage();
486
      } else {
487
        setFixedMarginPercentage((Double)value);
488
      }
489
      break;
490
 
491
    case LOGISTIC_COST_SNAPDEAL:
492
      if (value == null) {
493
        unsetLogisticCostSnapdeal();
494
      } else {
495
        setLogisticCostSnapdeal((Double)value);
496
      }
497
      break;
498
 
499
    case WOODEN_PACKAGING_COST:
500
      if (value == null) {
501
        unsetWoodenPackagingCost();
502
      } else {
503
        setWoodenPackagingCost((Double)value);
504
      }
505
      break;
506
 
507
    case WEIGHT_SNAPDEAL:
508
      if (value == null) {
509
        unsetWeightSnapdeal();
510
      } else {
511
        setWeightSnapdeal((Double)value);
512
      }
513
      break;
514
 
515
    }
516
  }
517
 
518
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
520
    case ITEM_ID:
521
      return Long.valueOf(getItem_id());
522
 
523
    case VOI_SKU_AT_SNAPDEAL:
524
      return getVoiSkuAtSnapdeal();
525
 
526
    case SELLING_PRICE_SNAPDEAL:
527
      return Double.valueOf(getSellingPriceSnapdeal());
528
 
529
    case TRANSFER_PRICE_SNAPDEAL:
530
      return Double.valueOf(getTransferPriceSnapdeal());
531
 
532
    case FIXED_MARGIN:
533
      return Double.valueOf(getFixedMargin());
534
 
535
    case FIXED_MARGIN_PERCENTAGE:
536
      return Double.valueOf(getFixedMarginPercentage());
537
 
538
    case LOGISTIC_COST_SNAPDEAL:
539
      return Double.valueOf(getLogisticCostSnapdeal());
540
 
541
    case WOODEN_PACKAGING_COST:
542
      return Double.valueOf(getWoodenPackagingCost());
543
 
544
    case WEIGHT_SNAPDEAL:
545
      return Double.valueOf(getWeightSnapdeal());
546
 
547
    }
548
    throw new IllegalStateException();
549
  }
550
 
551
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
552
  public boolean isSet(_Fields field) {
553
    if (field == null) {
554
      throw new IllegalArgumentException();
555
    }
556
 
557
    switch (field) {
558
    case ITEM_ID:
559
      return isSetItem_id();
560
    case VOI_SKU_AT_SNAPDEAL:
561
      return isSetVoiSkuAtSnapdeal();
562
    case SELLING_PRICE_SNAPDEAL:
563
      return isSetSellingPriceSnapdeal();
564
    case TRANSFER_PRICE_SNAPDEAL:
565
      return isSetTransferPriceSnapdeal();
566
    case FIXED_MARGIN:
567
      return isSetFixedMargin();
568
    case FIXED_MARGIN_PERCENTAGE:
569
      return isSetFixedMarginPercentage();
570
    case LOGISTIC_COST_SNAPDEAL:
571
      return isSetLogisticCostSnapdeal();
572
    case WOODEN_PACKAGING_COST:
573
      return isSetWoodenPackagingCost();
574
    case WEIGHT_SNAPDEAL:
575
      return isSetWeightSnapdeal();
576
    }
577
    throw new IllegalStateException();
578
  }
579
 
580
  @Override
581
  public boolean equals(Object that) {
582
    if (that == null)
583
      return false;
584
    if (that instanceof VoiSnapdealItemInfo)
585
      return this.equals((VoiSnapdealItemInfo)that);
586
    return false;
587
  }
588
 
589
  public boolean equals(VoiSnapdealItemInfo that) {
590
    if (that == null)
591
      return false;
592
 
593
    boolean this_present_item_id = true;
594
    boolean that_present_item_id = true;
595
    if (this_present_item_id || that_present_item_id) {
596
      if (!(this_present_item_id && that_present_item_id))
597
        return false;
598
      if (this.item_id != that.item_id)
599
        return false;
600
    }
601
 
602
    boolean this_present_voiSkuAtSnapdeal = true && this.isSetVoiSkuAtSnapdeal();
603
    boolean that_present_voiSkuAtSnapdeal = true && that.isSetVoiSkuAtSnapdeal();
604
    if (this_present_voiSkuAtSnapdeal || that_present_voiSkuAtSnapdeal) {
605
      if (!(this_present_voiSkuAtSnapdeal && that_present_voiSkuAtSnapdeal))
606
        return false;
607
      if (!this.voiSkuAtSnapdeal.equals(that.voiSkuAtSnapdeal))
608
        return false;
609
    }
610
 
611
    boolean this_present_sellingPriceSnapdeal = true;
612
    boolean that_present_sellingPriceSnapdeal = true;
613
    if (this_present_sellingPriceSnapdeal || that_present_sellingPriceSnapdeal) {
614
      if (!(this_present_sellingPriceSnapdeal && that_present_sellingPriceSnapdeal))
615
        return false;
616
      if (this.sellingPriceSnapdeal != that.sellingPriceSnapdeal)
617
        return false;
618
    }
619
 
620
    boolean this_present_transferPriceSnapdeal = true;
621
    boolean that_present_transferPriceSnapdeal = true;
622
    if (this_present_transferPriceSnapdeal || that_present_transferPriceSnapdeal) {
623
      if (!(this_present_transferPriceSnapdeal && that_present_transferPriceSnapdeal))
624
        return false;
625
      if (this.transferPriceSnapdeal != that.transferPriceSnapdeal)
626
        return false;
627
    }
628
 
629
    boolean this_present_fixedMargin = true;
630
    boolean that_present_fixedMargin = true;
631
    if (this_present_fixedMargin || that_present_fixedMargin) {
632
      if (!(this_present_fixedMargin && that_present_fixedMargin))
633
        return false;
634
      if (this.fixedMargin != that.fixedMargin)
635
        return false;
636
    }
637
 
638
    boolean this_present_fixedMarginPercentage = true;
639
    boolean that_present_fixedMarginPercentage = true;
640
    if (this_present_fixedMarginPercentage || that_present_fixedMarginPercentage) {
641
      if (!(this_present_fixedMarginPercentage && that_present_fixedMarginPercentage))
642
        return false;
643
      if (this.fixedMarginPercentage != that.fixedMarginPercentage)
644
        return false;
645
    }
646
 
647
    boolean this_present_logisticCostSnapdeal = true;
648
    boolean that_present_logisticCostSnapdeal = true;
649
    if (this_present_logisticCostSnapdeal || that_present_logisticCostSnapdeal) {
650
      if (!(this_present_logisticCostSnapdeal && that_present_logisticCostSnapdeal))
651
        return false;
652
      if (this.logisticCostSnapdeal != that.logisticCostSnapdeal)
653
        return false;
654
    }
655
 
656
    boolean this_present_woodenPackagingCost = true;
657
    boolean that_present_woodenPackagingCost = true;
658
    if (this_present_woodenPackagingCost || that_present_woodenPackagingCost) {
659
      if (!(this_present_woodenPackagingCost && that_present_woodenPackagingCost))
660
        return false;
661
      if (this.woodenPackagingCost != that.woodenPackagingCost)
662
        return false;
663
    }
664
 
665
    boolean this_present_weightSnapdeal = true;
666
    boolean that_present_weightSnapdeal = true;
667
    if (this_present_weightSnapdeal || that_present_weightSnapdeal) {
668
      if (!(this_present_weightSnapdeal && that_present_weightSnapdeal))
669
        return false;
670
      if (this.weightSnapdeal != that.weightSnapdeal)
671
        return false;
672
    }
673
 
674
    return true;
675
  }
676
 
677
  @Override
678
  public int hashCode() {
679
    return 0;
680
  }
681
 
682
  public int compareTo(VoiSnapdealItemInfo other) {
683
    if (!getClass().equals(other.getClass())) {
684
      return getClass().getName().compareTo(other.getClass().getName());
685
    }
686
 
687
    int lastComparison = 0;
688
    VoiSnapdealItemInfo typedOther = (VoiSnapdealItemInfo)other;
689
 
690
    lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
691
    if (lastComparison != 0) {
692
      return lastComparison;
693
    }
694
    if (isSetItem_id()) {
695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
696
      if (lastComparison != 0) {
697
        return lastComparison;
698
      }
699
    }
700
    lastComparison = Boolean.valueOf(isSetVoiSkuAtSnapdeal()).compareTo(typedOther.isSetVoiSkuAtSnapdeal());
701
    if (lastComparison != 0) {
702
      return lastComparison;
703
    }
704
    if (isSetVoiSkuAtSnapdeal()) {
705
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.voiSkuAtSnapdeal, typedOther.voiSkuAtSnapdeal);
706
      if (lastComparison != 0) {
707
        return lastComparison;
708
      }
709
    }
710
    lastComparison = Boolean.valueOf(isSetSellingPriceSnapdeal()).compareTo(typedOther.isSetSellingPriceSnapdeal());
711
    if (lastComparison != 0) {
712
      return lastComparison;
713
    }
714
    if (isSetSellingPriceSnapdeal()) {
715
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sellingPriceSnapdeal, typedOther.sellingPriceSnapdeal);
716
      if (lastComparison != 0) {
717
        return lastComparison;
718
      }
719
    }
720
    lastComparison = Boolean.valueOf(isSetTransferPriceSnapdeal()).compareTo(typedOther.isSetTransferPriceSnapdeal());
721
    if (lastComparison != 0) {
722
      return lastComparison;
723
    }
724
    if (isSetTransferPriceSnapdeal()) {
725
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transferPriceSnapdeal, typedOther.transferPriceSnapdeal);
726
      if (lastComparison != 0) {
727
        return lastComparison;
728
      }
729
    }
730
    lastComparison = Boolean.valueOf(isSetFixedMargin()).compareTo(typedOther.isSetFixedMargin());
731
    if (lastComparison != 0) {
732
      return lastComparison;
733
    }
734
    if (isSetFixedMargin()) {
735
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fixedMargin, typedOther.fixedMargin);
736
      if (lastComparison != 0) {
737
        return lastComparison;
738
      }
739
    }
740
    lastComparison = Boolean.valueOf(isSetFixedMarginPercentage()).compareTo(typedOther.isSetFixedMarginPercentage());
741
    if (lastComparison != 0) {
742
      return lastComparison;
743
    }
744
    if (isSetFixedMarginPercentage()) {
745
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fixedMarginPercentage, typedOther.fixedMarginPercentage);
746
      if (lastComparison != 0) {
747
        return lastComparison;
748
      }
749
    }
750
    lastComparison = Boolean.valueOf(isSetLogisticCostSnapdeal()).compareTo(typedOther.isSetLogisticCostSnapdeal());
751
    if (lastComparison != 0) {
752
      return lastComparison;
753
    }
754
    if (isSetLogisticCostSnapdeal()) {
755
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticCostSnapdeal, typedOther.logisticCostSnapdeal);
756
      if (lastComparison != 0) {
757
        return lastComparison;
758
      }
759
    }
760
    lastComparison = Boolean.valueOf(isSetWoodenPackagingCost()).compareTo(typedOther.isSetWoodenPackagingCost());
761
    if (lastComparison != 0) {
762
      return lastComparison;
763
    }
764
    if (isSetWoodenPackagingCost()) {
765
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.woodenPackagingCost, typedOther.woodenPackagingCost);
766
      if (lastComparison != 0) {
767
        return lastComparison;
768
      }
769
    }
770
    lastComparison = Boolean.valueOf(isSetWeightSnapdeal()).compareTo(typedOther.isSetWeightSnapdeal());
771
    if (lastComparison != 0) {
772
      return lastComparison;
773
    }
774
    if (isSetWeightSnapdeal()) {
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.weightSnapdeal, typedOther.weightSnapdeal);
776
      if (lastComparison != 0) {
777
        return lastComparison;
778
      }
779
    }
780
    return 0;
781
  }
782
 
783
  public _Fields fieldForId(int fieldId) {
784
    return _Fields.findByThriftId(fieldId);
785
  }
786
 
787
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
788
    org.apache.thrift.protocol.TField field;
789
    iprot.readStructBegin();
790
    while (true)
791
    {
792
      field = iprot.readFieldBegin();
793
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
794
        break;
795
      }
796
      switch (field.id) {
797
        case 1: // ITEM_ID
798
          if (field.type == org.apache.thrift.protocol.TType.I64) {
799
            this.item_id = iprot.readI64();
800
            setItem_idIsSet(true);
801
          } else { 
802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
803
          }
804
          break;
805
        case 2: // VOI_SKU_AT_SNAPDEAL
806
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
807
            this.voiSkuAtSnapdeal = iprot.readString();
808
          } else { 
809
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
810
          }
811
          break;
812
        case 3: // SELLING_PRICE_SNAPDEAL
813
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
814
            this.sellingPriceSnapdeal = iprot.readDouble();
815
            setSellingPriceSnapdealIsSet(true);
816
          } else { 
817
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
818
          }
819
          break;
820
        case 4: // TRANSFER_PRICE_SNAPDEAL
821
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
822
            this.transferPriceSnapdeal = iprot.readDouble();
823
            setTransferPriceSnapdealIsSet(true);
824
          } else { 
825
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
826
          }
827
          break;
828
        case 5: // FIXED_MARGIN
829
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
830
            this.fixedMargin = iprot.readDouble();
831
            setFixedMarginIsSet(true);
832
          } else { 
833
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
834
          }
835
          break;
836
        case 6: // FIXED_MARGIN_PERCENTAGE
837
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
838
            this.fixedMarginPercentage = iprot.readDouble();
839
            setFixedMarginPercentageIsSet(true);
840
          } else { 
841
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
842
          }
843
          break;
844
        case 7: // LOGISTIC_COST_SNAPDEAL
845
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
846
            this.logisticCostSnapdeal = iprot.readDouble();
847
            setLogisticCostSnapdealIsSet(true);
848
          } else { 
849
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
850
          }
851
          break;
852
        case 8: // WOODEN_PACKAGING_COST
853
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
854
            this.woodenPackagingCost = iprot.readDouble();
855
            setWoodenPackagingCostIsSet(true);
856
          } else { 
857
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
858
          }
859
          break;
860
        case 9: // WEIGHT_SNAPDEAL
861
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
862
            this.weightSnapdeal = iprot.readDouble();
863
            setWeightSnapdealIsSet(true);
864
          } else { 
865
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
866
          }
867
          break;
868
        default:
869
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
870
      }
871
      iprot.readFieldEnd();
872
    }
873
    iprot.readStructEnd();
874
    validate();
875
  }
876
 
877
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
878
    validate();
879
 
880
    oprot.writeStructBegin(STRUCT_DESC);
881
    oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
882
    oprot.writeI64(this.item_id);
883
    oprot.writeFieldEnd();
884
    if (this.voiSkuAtSnapdeal != null) {
885
      oprot.writeFieldBegin(VOI_SKU_AT_SNAPDEAL_FIELD_DESC);
886
      oprot.writeString(this.voiSkuAtSnapdeal);
887
      oprot.writeFieldEnd();
888
    }
889
    oprot.writeFieldBegin(SELLING_PRICE_SNAPDEAL_FIELD_DESC);
890
    oprot.writeDouble(this.sellingPriceSnapdeal);
891
    oprot.writeFieldEnd();
892
    oprot.writeFieldBegin(TRANSFER_PRICE_SNAPDEAL_FIELD_DESC);
893
    oprot.writeDouble(this.transferPriceSnapdeal);
894
    oprot.writeFieldEnd();
895
    oprot.writeFieldBegin(FIXED_MARGIN_FIELD_DESC);
896
    oprot.writeDouble(this.fixedMargin);
897
    oprot.writeFieldEnd();
898
    oprot.writeFieldBegin(FIXED_MARGIN_PERCENTAGE_FIELD_DESC);
899
    oprot.writeDouble(this.fixedMarginPercentage);
900
    oprot.writeFieldEnd();
901
    oprot.writeFieldBegin(LOGISTIC_COST_SNAPDEAL_FIELD_DESC);
902
    oprot.writeDouble(this.logisticCostSnapdeal);
903
    oprot.writeFieldEnd();
904
    oprot.writeFieldBegin(WOODEN_PACKAGING_COST_FIELD_DESC);
905
    oprot.writeDouble(this.woodenPackagingCost);
906
    oprot.writeFieldEnd();
907
    oprot.writeFieldBegin(WEIGHT_SNAPDEAL_FIELD_DESC);
908
    oprot.writeDouble(this.weightSnapdeal);
909
    oprot.writeFieldEnd();
910
    oprot.writeFieldStop();
911
    oprot.writeStructEnd();
912
  }
913
 
914
  @Override
915
  public String toString() {
916
    StringBuilder sb = new StringBuilder("VoiSnapdealItemInfo(");
917
    boolean first = true;
918
 
919
    sb.append("item_id:");
920
    sb.append(this.item_id);
921
    first = false;
922
    if (!first) sb.append(", ");
923
    sb.append("voiSkuAtSnapdeal:");
924
    if (this.voiSkuAtSnapdeal == null) {
925
      sb.append("null");
926
    } else {
927
      sb.append(this.voiSkuAtSnapdeal);
928
    }
929
    first = false;
930
    if (!first) sb.append(", ");
931
    sb.append("sellingPriceSnapdeal:");
932
    sb.append(this.sellingPriceSnapdeal);
933
    first = false;
934
    if (!first) sb.append(", ");
935
    sb.append("transferPriceSnapdeal:");
936
    sb.append(this.transferPriceSnapdeal);
937
    first = false;
938
    if (!first) sb.append(", ");
939
    sb.append("fixedMargin:");
940
    sb.append(this.fixedMargin);
941
    first = false;
942
    if (!first) sb.append(", ");
943
    sb.append("fixedMarginPercentage:");
944
    sb.append(this.fixedMarginPercentage);
945
    first = false;
946
    if (!first) sb.append(", ");
947
    sb.append("logisticCostSnapdeal:");
948
    sb.append(this.logisticCostSnapdeal);
949
    first = false;
950
    if (!first) sb.append(", ");
951
    sb.append("woodenPackagingCost:");
952
    sb.append(this.woodenPackagingCost);
953
    first = false;
954
    if (!first) sb.append(", ");
955
    sb.append("weightSnapdeal:");
956
    sb.append(this.weightSnapdeal);
957
    first = false;
958
    sb.append(")");
959
    return sb.toString();
960
  }
961
 
962
  public void validate() throws org.apache.thrift.TException {
963
    // check for required fields
964
  }
965
 
966
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
967
    try {
968
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
969
    } catch (org.apache.thrift.TException te) {
970
      throw new java.io.IOException(te);
971
    }
972
  }
973
 
974
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
975
    try {
976
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
977
      __isset_bit_vector = new BitSet(1);
978
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
979
    } catch (org.apache.thrift.TException te) {
980
      throw new java.io.IOException(te);
981
    }
982
  }
983
 
984
}
985