Subversion Repositories SmartDukaan

Rev

Rev 19474 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19474 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.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.nio.ByteBuffer;
19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class ShipmentLogisticsCostDetail implements org.apache.thrift.TBase<ShipmentLogisticsCostDetail, ShipmentLogisticsCostDetail._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ShipmentLogisticsCostDetail");
25
 
26
  private static final org.apache.thrift.protocol.TField LOGISTICS_TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("logisticsTransactionId", org.apache.thrift.protocol.TType.STRING, (short)1);
27
  private static final org.apache.thrift.protocol.TField AIRWAY_BILL_NO_FIELD_DESC = new org.apache.thrift.protocol.TField("airwayBillNo", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField SHIPMENT_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("shipmentAmount", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
29
  private static final org.apache.thrift.protocol.TField SHIPMENT_WEIGHT_FIELD_DESC = new org.apache.thrift.protocol.TField("shipmentWeight", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
30
  private static final org.apache.thrift.protocol.TField SHIPMENT_LOGSITICS_COST_FIELD_DESC = new org.apache.thrift.protocol.TField("shipmentLogsiticsCost", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
31
  private static final org.apache.thrift.protocol.TField SHIPMENT_COD_COLLECTION_CHARGES_FIELD_DESC = new org.apache.thrift.protocol.TField("shipmentCodCollectionCharges", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
32
  private static final org.apache.thrift.protocol.TField CREATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("createdAt", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField UPDATED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("updatedAt", org.apache.thrift.protocol.TType.I64, (short)8);
20744 kshitij.so 34
  private static final org.apache.thrift.protocol.TField PACKAGE_DIMENSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("packageDimensions", org.apache.thrift.protocol.TType.STRING, (short)9);
19474 manish.sha 35
 
36
  private String logisticsTransactionId; // required
37
  private String airwayBillNo; // required
38
  private double shipmentAmount; // required
39
  private double shipmentWeight; // required
40
  private double shipmentLogsiticsCost; // required
41
  private double shipmentCodCollectionCharges; // required
42
  private long createdAt; // required
43
  private long updatedAt; // required
20744 kshitij.so 44
  private String packageDimensions; // required
19474 manish.sha 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
    LOGISTICS_TRANSACTION_ID((short)1, "logisticsTransactionId"),
49
    AIRWAY_BILL_NO((short)2, "airwayBillNo"),
50
    SHIPMENT_AMOUNT((short)3, "shipmentAmount"),
51
    SHIPMENT_WEIGHT((short)4, "shipmentWeight"),
52
    SHIPMENT_LOGSITICS_COST((short)5, "shipmentLogsiticsCost"),
53
    SHIPMENT_COD_COLLECTION_CHARGES((short)6, "shipmentCodCollectionCharges"),
54
    CREATED_AT((short)7, "createdAt"),
20744 kshitij.so 55
    UPDATED_AT((short)8, "updatedAt"),
56
    PACKAGE_DIMENSIONS((short)9, "packageDimensions");
19474 manish.sha 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: // LOGISTICS_TRANSACTION_ID
72
          return LOGISTICS_TRANSACTION_ID;
73
        case 2: // AIRWAY_BILL_NO
74
          return AIRWAY_BILL_NO;
75
        case 3: // SHIPMENT_AMOUNT
76
          return SHIPMENT_AMOUNT;
77
        case 4: // SHIPMENT_WEIGHT
78
          return SHIPMENT_WEIGHT;
79
        case 5: // SHIPMENT_LOGSITICS_COST
80
          return SHIPMENT_LOGSITICS_COST;
81
        case 6: // SHIPMENT_COD_COLLECTION_CHARGES
82
          return SHIPMENT_COD_COLLECTION_CHARGES;
83
        case 7: // CREATED_AT
84
          return CREATED_AT;
85
        case 8: // UPDATED_AT
86
          return UPDATED_AT;
20744 kshitij.so 87
        case 9: // PACKAGE_DIMENSIONS
88
          return PACKAGE_DIMENSIONS;
19474 manish.sha 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 __SHIPMENTAMOUNT_ISSET_ID = 0;
130
  private static final int __SHIPMENTWEIGHT_ISSET_ID = 1;
131
  private static final int __SHIPMENTLOGSITICSCOST_ISSET_ID = 2;
132
  private static final int __SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID = 3;
133
  private static final int __CREATEDAT_ISSET_ID = 4;
134
  private static final int __UPDATEDAT_ISSET_ID = 5;
135
  private BitSet __isset_bit_vector = new BitSet(6);
136
 
137
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
138
  static {
139
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
140
    tmpMap.put(_Fields.LOGISTICS_TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("logisticsTransactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
141
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
142
    tmpMap.put(_Fields.AIRWAY_BILL_NO, new org.apache.thrift.meta_data.FieldMetaData("airwayBillNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
143
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
144
    tmpMap.put(_Fields.SHIPMENT_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("shipmentAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
145
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
146
    tmpMap.put(_Fields.SHIPMENT_WEIGHT, new org.apache.thrift.meta_data.FieldMetaData("shipmentWeight", org.apache.thrift.TFieldRequirementType.DEFAULT, 
147
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
148
    tmpMap.put(_Fields.SHIPMENT_LOGSITICS_COST, new org.apache.thrift.meta_data.FieldMetaData("shipmentLogsiticsCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
149
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
150
    tmpMap.put(_Fields.SHIPMENT_COD_COLLECTION_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("shipmentCodCollectionCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
151
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
152
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
153
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
154
    tmpMap.put(_Fields.UPDATED_AT, new org.apache.thrift.meta_data.FieldMetaData("updatedAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
155
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20744 kshitij.so 156
    tmpMap.put(_Fields.PACKAGE_DIMENSIONS, new org.apache.thrift.meta_data.FieldMetaData("packageDimensions", org.apache.thrift.TFieldRequirementType.DEFAULT, 
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19474 manish.sha 158
    metaDataMap = Collections.unmodifiableMap(tmpMap);
159
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShipmentLogisticsCostDetail.class, metaDataMap);
160
  }
161
 
162
  public ShipmentLogisticsCostDetail() {
163
  }
164
 
165
  public ShipmentLogisticsCostDetail(
166
    String logisticsTransactionId,
167
    String airwayBillNo,
168
    double shipmentAmount,
169
    double shipmentWeight,
170
    double shipmentLogsiticsCost,
171
    double shipmentCodCollectionCharges,
172
    long createdAt,
20744 kshitij.so 173
    long updatedAt,
174
    String packageDimensions)
19474 manish.sha 175
  {
176
    this();
177
    this.logisticsTransactionId = logisticsTransactionId;
178
    this.airwayBillNo = airwayBillNo;
179
    this.shipmentAmount = shipmentAmount;
180
    setShipmentAmountIsSet(true);
181
    this.shipmentWeight = shipmentWeight;
182
    setShipmentWeightIsSet(true);
183
    this.shipmentLogsiticsCost = shipmentLogsiticsCost;
184
    setShipmentLogsiticsCostIsSet(true);
185
    this.shipmentCodCollectionCharges = shipmentCodCollectionCharges;
186
    setShipmentCodCollectionChargesIsSet(true);
187
    this.createdAt = createdAt;
188
    setCreatedAtIsSet(true);
189
    this.updatedAt = updatedAt;
190
    setUpdatedAtIsSet(true);
20744 kshitij.so 191
    this.packageDimensions = packageDimensions;
19474 manish.sha 192
  }
193
 
194
  /**
195
   * Performs a deep copy on <i>other</i>.
196
   */
197
  public ShipmentLogisticsCostDetail(ShipmentLogisticsCostDetail other) {
198
    __isset_bit_vector.clear();
199
    __isset_bit_vector.or(other.__isset_bit_vector);
200
    if (other.isSetLogisticsTransactionId()) {
201
      this.logisticsTransactionId = other.logisticsTransactionId;
202
    }
203
    if (other.isSetAirwayBillNo()) {
204
      this.airwayBillNo = other.airwayBillNo;
205
    }
206
    this.shipmentAmount = other.shipmentAmount;
207
    this.shipmentWeight = other.shipmentWeight;
208
    this.shipmentLogsiticsCost = other.shipmentLogsiticsCost;
209
    this.shipmentCodCollectionCharges = other.shipmentCodCollectionCharges;
210
    this.createdAt = other.createdAt;
211
    this.updatedAt = other.updatedAt;
20744 kshitij.so 212
    if (other.isSetPackageDimensions()) {
213
      this.packageDimensions = other.packageDimensions;
214
    }
19474 manish.sha 215
  }
216
 
217
  public ShipmentLogisticsCostDetail deepCopy() {
218
    return new ShipmentLogisticsCostDetail(this);
219
  }
220
 
221
  @Override
222
  public void clear() {
223
    this.logisticsTransactionId = null;
224
    this.airwayBillNo = null;
225
    setShipmentAmountIsSet(false);
226
    this.shipmentAmount = 0.0;
227
    setShipmentWeightIsSet(false);
228
    this.shipmentWeight = 0.0;
229
    setShipmentLogsiticsCostIsSet(false);
230
    this.shipmentLogsiticsCost = 0.0;
231
    setShipmentCodCollectionChargesIsSet(false);
232
    this.shipmentCodCollectionCharges = 0.0;
233
    setCreatedAtIsSet(false);
234
    this.createdAt = 0;
235
    setUpdatedAtIsSet(false);
236
    this.updatedAt = 0;
20744 kshitij.so 237
    this.packageDimensions = null;
19474 manish.sha 238
  }
239
 
240
  public String getLogisticsTransactionId() {
241
    return this.logisticsTransactionId;
242
  }
243
 
244
  public void setLogisticsTransactionId(String logisticsTransactionId) {
245
    this.logisticsTransactionId = logisticsTransactionId;
246
  }
247
 
248
  public void unsetLogisticsTransactionId() {
249
    this.logisticsTransactionId = null;
250
  }
251
 
252
  /** Returns true if field logisticsTransactionId is set (has been assigned a value) and false otherwise */
253
  public boolean isSetLogisticsTransactionId() {
254
    return this.logisticsTransactionId != null;
255
  }
256
 
257
  public void setLogisticsTransactionIdIsSet(boolean value) {
258
    if (!value) {
259
      this.logisticsTransactionId = null;
260
    }
261
  }
262
 
263
  public String getAirwayBillNo() {
264
    return this.airwayBillNo;
265
  }
266
 
267
  public void setAirwayBillNo(String airwayBillNo) {
268
    this.airwayBillNo = airwayBillNo;
269
  }
270
 
271
  public void unsetAirwayBillNo() {
272
    this.airwayBillNo = null;
273
  }
274
 
275
  /** Returns true if field airwayBillNo is set (has been assigned a value) and false otherwise */
276
  public boolean isSetAirwayBillNo() {
277
    return this.airwayBillNo != null;
278
  }
279
 
280
  public void setAirwayBillNoIsSet(boolean value) {
281
    if (!value) {
282
      this.airwayBillNo = null;
283
    }
284
  }
285
 
286
  public double getShipmentAmount() {
287
    return this.shipmentAmount;
288
  }
289
 
290
  public void setShipmentAmount(double shipmentAmount) {
291
    this.shipmentAmount = shipmentAmount;
292
    setShipmentAmountIsSet(true);
293
  }
294
 
295
  public void unsetShipmentAmount() {
296
    __isset_bit_vector.clear(__SHIPMENTAMOUNT_ISSET_ID);
297
  }
298
 
299
  /** Returns true if field shipmentAmount is set (has been assigned a value) and false otherwise */
300
  public boolean isSetShipmentAmount() {
301
    return __isset_bit_vector.get(__SHIPMENTAMOUNT_ISSET_ID);
302
  }
303
 
304
  public void setShipmentAmountIsSet(boolean value) {
305
    __isset_bit_vector.set(__SHIPMENTAMOUNT_ISSET_ID, value);
306
  }
307
 
308
  public double getShipmentWeight() {
309
    return this.shipmentWeight;
310
  }
311
 
312
  public void setShipmentWeight(double shipmentWeight) {
313
    this.shipmentWeight = shipmentWeight;
314
    setShipmentWeightIsSet(true);
315
  }
316
 
317
  public void unsetShipmentWeight() {
318
    __isset_bit_vector.clear(__SHIPMENTWEIGHT_ISSET_ID);
319
  }
320
 
321
  /** Returns true if field shipmentWeight is set (has been assigned a value) and false otherwise */
322
  public boolean isSetShipmentWeight() {
323
    return __isset_bit_vector.get(__SHIPMENTWEIGHT_ISSET_ID);
324
  }
325
 
326
  public void setShipmentWeightIsSet(boolean value) {
327
    __isset_bit_vector.set(__SHIPMENTWEIGHT_ISSET_ID, value);
328
  }
329
 
330
  public double getShipmentLogsiticsCost() {
331
    return this.shipmentLogsiticsCost;
332
  }
333
 
334
  public void setShipmentLogsiticsCost(double shipmentLogsiticsCost) {
335
    this.shipmentLogsiticsCost = shipmentLogsiticsCost;
336
    setShipmentLogsiticsCostIsSet(true);
337
  }
338
 
339
  public void unsetShipmentLogsiticsCost() {
340
    __isset_bit_vector.clear(__SHIPMENTLOGSITICSCOST_ISSET_ID);
341
  }
342
 
343
  /** Returns true if field shipmentLogsiticsCost is set (has been assigned a value) and false otherwise */
344
  public boolean isSetShipmentLogsiticsCost() {
345
    return __isset_bit_vector.get(__SHIPMENTLOGSITICSCOST_ISSET_ID);
346
  }
347
 
348
  public void setShipmentLogsiticsCostIsSet(boolean value) {
349
    __isset_bit_vector.set(__SHIPMENTLOGSITICSCOST_ISSET_ID, value);
350
  }
351
 
352
  public double getShipmentCodCollectionCharges() {
353
    return this.shipmentCodCollectionCharges;
354
  }
355
 
356
  public void setShipmentCodCollectionCharges(double shipmentCodCollectionCharges) {
357
    this.shipmentCodCollectionCharges = shipmentCodCollectionCharges;
358
    setShipmentCodCollectionChargesIsSet(true);
359
  }
360
 
361
  public void unsetShipmentCodCollectionCharges() {
362
    __isset_bit_vector.clear(__SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID);
363
  }
364
 
365
  /** Returns true if field shipmentCodCollectionCharges is set (has been assigned a value) and false otherwise */
366
  public boolean isSetShipmentCodCollectionCharges() {
367
    return __isset_bit_vector.get(__SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID);
368
  }
369
 
370
  public void setShipmentCodCollectionChargesIsSet(boolean value) {
371
    __isset_bit_vector.set(__SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID, value);
372
  }
373
 
374
  public long getCreatedAt() {
375
    return this.createdAt;
376
  }
377
 
378
  public void setCreatedAt(long createdAt) {
379
    this.createdAt = createdAt;
380
    setCreatedAtIsSet(true);
381
  }
382
 
383
  public void unsetCreatedAt() {
384
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
385
  }
386
 
387
  /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
388
  public boolean isSetCreatedAt() {
389
    return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
390
  }
391
 
392
  public void setCreatedAtIsSet(boolean value) {
393
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
394
  }
395
 
396
  public long getUpdatedAt() {
397
    return this.updatedAt;
398
  }
399
 
400
  public void setUpdatedAt(long updatedAt) {
401
    this.updatedAt = updatedAt;
402
    setUpdatedAtIsSet(true);
403
  }
404
 
405
  public void unsetUpdatedAt() {
406
    __isset_bit_vector.clear(__UPDATEDAT_ISSET_ID);
407
  }
408
 
409
  /** Returns true if field updatedAt is set (has been assigned a value) and false otherwise */
410
  public boolean isSetUpdatedAt() {
411
    return __isset_bit_vector.get(__UPDATEDAT_ISSET_ID);
412
  }
413
 
414
  public void setUpdatedAtIsSet(boolean value) {
415
    __isset_bit_vector.set(__UPDATEDAT_ISSET_ID, value);
416
  }
417
 
20744 kshitij.so 418
  public String getPackageDimensions() {
419
    return this.packageDimensions;
420
  }
421
 
422
  public void setPackageDimensions(String packageDimensions) {
423
    this.packageDimensions = packageDimensions;
424
  }
425
 
426
  public void unsetPackageDimensions() {
427
    this.packageDimensions = null;
428
  }
429
 
430
  /** Returns true if field packageDimensions is set (has been assigned a value) and false otherwise */
431
  public boolean isSetPackageDimensions() {
432
    return this.packageDimensions != null;
433
  }
434
 
435
  public void setPackageDimensionsIsSet(boolean value) {
436
    if (!value) {
437
      this.packageDimensions = null;
438
    }
439
  }
440
 
19474 manish.sha 441
  public void setFieldValue(_Fields field, Object value) {
442
    switch (field) {
443
    case LOGISTICS_TRANSACTION_ID:
444
      if (value == null) {
445
        unsetLogisticsTransactionId();
446
      } else {
447
        setLogisticsTransactionId((String)value);
448
      }
449
      break;
450
 
451
    case AIRWAY_BILL_NO:
452
      if (value == null) {
453
        unsetAirwayBillNo();
454
      } else {
455
        setAirwayBillNo((String)value);
456
      }
457
      break;
458
 
459
    case SHIPMENT_AMOUNT:
460
      if (value == null) {
461
        unsetShipmentAmount();
462
      } else {
463
        setShipmentAmount((Double)value);
464
      }
465
      break;
466
 
467
    case SHIPMENT_WEIGHT:
468
      if (value == null) {
469
        unsetShipmentWeight();
470
      } else {
471
        setShipmentWeight((Double)value);
472
      }
473
      break;
474
 
475
    case SHIPMENT_LOGSITICS_COST:
476
      if (value == null) {
477
        unsetShipmentLogsiticsCost();
478
      } else {
479
        setShipmentLogsiticsCost((Double)value);
480
      }
481
      break;
482
 
483
    case SHIPMENT_COD_COLLECTION_CHARGES:
484
      if (value == null) {
485
        unsetShipmentCodCollectionCharges();
486
      } else {
487
        setShipmentCodCollectionCharges((Double)value);
488
      }
489
      break;
490
 
491
    case CREATED_AT:
492
      if (value == null) {
493
        unsetCreatedAt();
494
      } else {
495
        setCreatedAt((Long)value);
496
      }
497
      break;
498
 
499
    case UPDATED_AT:
500
      if (value == null) {
501
        unsetUpdatedAt();
502
      } else {
503
        setUpdatedAt((Long)value);
504
      }
505
      break;
506
 
20744 kshitij.so 507
    case PACKAGE_DIMENSIONS:
508
      if (value == null) {
509
        unsetPackageDimensions();
510
      } else {
511
        setPackageDimensions((String)value);
512
      }
513
      break;
514
 
19474 manish.sha 515
    }
516
  }
517
 
518
  public Object getFieldValue(_Fields field) {
519
    switch (field) {
520
    case LOGISTICS_TRANSACTION_ID:
521
      return getLogisticsTransactionId();
522
 
523
    case AIRWAY_BILL_NO:
524
      return getAirwayBillNo();
525
 
526
    case SHIPMENT_AMOUNT:
527
      return Double.valueOf(getShipmentAmount());
528
 
529
    case SHIPMENT_WEIGHT:
530
      return Double.valueOf(getShipmentWeight());
531
 
532
    case SHIPMENT_LOGSITICS_COST:
533
      return Double.valueOf(getShipmentLogsiticsCost());
534
 
535
    case SHIPMENT_COD_COLLECTION_CHARGES:
536
      return Double.valueOf(getShipmentCodCollectionCharges());
537
 
538
    case CREATED_AT:
539
      return Long.valueOf(getCreatedAt());
540
 
541
    case UPDATED_AT:
542
      return Long.valueOf(getUpdatedAt());
543
 
20744 kshitij.so 544
    case PACKAGE_DIMENSIONS:
545
      return getPackageDimensions();
546
 
19474 manish.sha 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 LOGISTICS_TRANSACTION_ID:
559
      return isSetLogisticsTransactionId();
560
    case AIRWAY_BILL_NO:
561
      return isSetAirwayBillNo();
562
    case SHIPMENT_AMOUNT:
563
      return isSetShipmentAmount();
564
    case SHIPMENT_WEIGHT:
565
      return isSetShipmentWeight();
566
    case SHIPMENT_LOGSITICS_COST:
567
      return isSetShipmentLogsiticsCost();
568
    case SHIPMENT_COD_COLLECTION_CHARGES:
569
      return isSetShipmentCodCollectionCharges();
570
    case CREATED_AT:
571
      return isSetCreatedAt();
572
    case UPDATED_AT:
573
      return isSetUpdatedAt();
20744 kshitij.so 574
    case PACKAGE_DIMENSIONS:
575
      return isSetPackageDimensions();
19474 manish.sha 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 ShipmentLogisticsCostDetail)
585
      return this.equals((ShipmentLogisticsCostDetail)that);
586
    return false;
587
  }
588
 
589
  public boolean equals(ShipmentLogisticsCostDetail that) {
590
    if (that == null)
591
      return false;
592
 
593
    boolean this_present_logisticsTransactionId = true && this.isSetLogisticsTransactionId();
594
    boolean that_present_logisticsTransactionId = true && that.isSetLogisticsTransactionId();
595
    if (this_present_logisticsTransactionId || that_present_logisticsTransactionId) {
596
      if (!(this_present_logisticsTransactionId && that_present_logisticsTransactionId))
597
        return false;
598
      if (!this.logisticsTransactionId.equals(that.logisticsTransactionId))
599
        return false;
600
    }
601
 
602
    boolean this_present_airwayBillNo = true && this.isSetAirwayBillNo();
603
    boolean that_present_airwayBillNo = true && that.isSetAirwayBillNo();
604
    if (this_present_airwayBillNo || that_present_airwayBillNo) {
605
      if (!(this_present_airwayBillNo && that_present_airwayBillNo))
606
        return false;
607
      if (!this.airwayBillNo.equals(that.airwayBillNo))
608
        return false;
609
    }
610
 
611
    boolean this_present_shipmentAmount = true;
612
    boolean that_present_shipmentAmount = true;
613
    if (this_present_shipmentAmount || that_present_shipmentAmount) {
614
      if (!(this_present_shipmentAmount && that_present_shipmentAmount))
615
        return false;
616
      if (this.shipmentAmount != that.shipmentAmount)
617
        return false;
618
    }
619
 
620
    boolean this_present_shipmentWeight = true;
621
    boolean that_present_shipmentWeight = true;
622
    if (this_present_shipmentWeight || that_present_shipmentWeight) {
623
      if (!(this_present_shipmentWeight && that_present_shipmentWeight))
624
        return false;
625
      if (this.shipmentWeight != that.shipmentWeight)
626
        return false;
627
    }
628
 
629
    boolean this_present_shipmentLogsiticsCost = true;
630
    boolean that_present_shipmentLogsiticsCost = true;
631
    if (this_present_shipmentLogsiticsCost || that_present_shipmentLogsiticsCost) {
632
      if (!(this_present_shipmentLogsiticsCost && that_present_shipmentLogsiticsCost))
633
        return false;
634
      if (this.shipmentLogsiticsCost != that.shipmentLogsiticsCost)
635
        return false;
636
    }
637
 
638
    boolean this_present_shipmentCodCollectionCharges = true;
639
    boolean that_present_shipmentCodCollectionCharges = true;
640
    if (this_present_shipmentCodCollectionCharges || that_present_shipmentCodCollectionCharges) {
641
      if (!(this_present_shipmentCodCollectionCharges && that_present_shipmentCodCollectionCharges))
642
        return false;
643
      if (this.shipmentCodCollectionCharges != that.shipmentCodCollectionCharges)
644
        return false;
645
    }
646
 
647
    boolean this_present_createdAt = true;
648
    boolean that_present_createdAt = true;
649
    if (this_present_createdAt || that_present_createdAt) {
650
      if (!(this_present_createdAt && that_present_createdAt))
651
        return false;
652
      if (this.createdAt != that.createdAt)
653
        return false;
654
    }
655
 
656
    boolean this_present_updatedAt = true;
657
    boolean that_present_updatedAt = true;
658
    if (this_present_updatedAt || that_present_updatedAt) {
659
      if (!(this_present_updatedAt && that_present_updatedAt))
660
        return false;
661
      if (this.updatedAt != that.updatedAt)
662
        return false;
663
    }
664
 
20744 kshitij.so 665
    boolean this_present_packageDimensions = true && this.isSetPackageDimensions();
666
    boolean that_present_packageDimensions = true && that.isSetPackageDimensions();
667
    if (this_present_packageDimensions || that_present_packageDimensions) {
668
      if (!(this_present_packageDimensions && that_present_packageDimensions))
669
        return false;
670
      if (!this.packageDimensions.equals(that.packageDimensions))
671
        return false;
672
    }
673
 
19474 manish.sha 674
    return true;
675
  }
676
 
677
  @Override
678
  public int hashCode() {
679
    return 0;
680
  }
681
 
682
  public int compareTo(ShipmentLogisticsCostDetail other) {
683
    if (!getClass().equals(other.getClass())) {
684
      return getClass().getName().compareTo(other.getClass().getName());
685
    }
686
 
687
    int lastComparison = 0;
688
    ShipmentLogisticsCostDetail typedOther = (ShipmentLogisticsCostDetail)other;
689
 
690
    lastComparison = Boolean.valueOf(isSetLogisticsTransactionId()).compareTo(typedOther.isSetLogisticsTransactionId());
691
    if (lastComparison != 0) {
692
      return lastComparison;
693
    }
694
    if (isSetLogisticsTransactionId()) {
695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsTransactionId, typedOther.logisticsTransactionId);
696
      if (lastComparison != 0) {
697
        return lastComparison;
698
      }
699
    }
700
    lastComparison = Boolean.valueOf(isSetAirwayBillNo()).compareTo(typedOther.isSetAirwayBillNo());
701
    if (lastComparison != 0) {
702
      return lastComparison;
703
    }
704
    if (isSetAirwayBillNo()) {
705
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airwayBillNo, typedOther.airwayBillNo);
706
      if (lastComparison != 0) {
707
        return lastComparison;
708
      }
709
    }
710
    lastComparison = Boolean.valueOf(isSetShipmentAmount()).compareTo(typedOther.isSetShipmentAmount());
711
    if (lastComparison != 0) {
712
      return lastComparison;
713
    }
714
    if (isSetShipmentAmount()) {
715
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentAmount, typedOther.shipmentAmount);
716
      if (lastComparison != 0) {
717
        return lastComparison;
718
      }
719
    }
720
    lastComparison = Boolean.valueOf(isSetShipmentWeight()).compareTo(typedOther.isSetShipmentWeight());
721
    if (lastComparison != 0) {
722
      return lastComparison;
723
    }
724
    if (isSetShipmentWeight()) {
725
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentWeight, typedOther.shipmentWeight);
726
      if (lastComparison != 0) {
727
        return lastComparison;
728
      }
729
    }
730
    lastComparison = Boolean.valueOf(isSetShipmentLogsiticsCost()).compareTo(typedOther.isSetShipmentLogsiticsCost());
731
    if (lastComparison != 0) {
732
      return lastComparison;
733
    }
734
    if (isSetShipmentLogsiticsCost()) {
735
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentLogsiticsCost, typedOther.shipmentLogsiticsCost);
736
      if (lastComparison != 0) {
737
        return lastComparison;
738
      }
739
    }
740
    lastComparison = Boolean.valueOf(isSetShipmentCodCollectionCharges()).compareTo(typedOther.isSetShipmentCodCollectionCharges());
741
    if (lastComparison != 0) {
742
      return lastComparison;
743
    }
744
    if (isSetShipmentCodCollectionCharges()) {
745
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentCodCollectionCharges, typedOther.shipmentCodCollectionCharges);
746
      if (lastComparison != 0) {
747
        return lastComparison;
748
      }
749
    }
750
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
751
    if (lastComparison != 0) {
752
      return lastComparison;
753
    }
754
    if (isSetCreatedAt()) {
755
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
756
      if (lastComparison != 0) {
757
        return lastComparison;
758
      }
759
    }
760
    lastComparison = Boolean.valueOf(isSetUpdatedAt()).compareTo(typedOther.isSetUpdatedAt());
761
    if (lastComparison != 0) {
762
      return lastComparison;
763
    }
764
    if (isSetUpdatedAt()) {
765
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedAt, typedOther.updatedAt);
766
      if (lastComparison != 0) {
767
        return lastComparison;
768
      }
769
    }
20744 kshitij.so 770
    lastComparison = Boolean.valueOf(isSetPackageDimensions()).compareTo(typedOther.isSetPackageDimensions());
771
    if (lastComparison != 0) {
772
      return lastComparison;
773
    }
774
    if (isSetPackageDimensions()) {
775
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.packageDimensions, typedOther.packageDimensions);
776
      if (lastComparison != 0) {
777
        return lastComparison;
778
      }
779
    }
19474 manish.sha 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: // LOGISTICS_TRANSACTION_ID
798
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
799
            this.logisticsTransactionId = iprot.readString();
800
          } else { 
801
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
802
          }
803
          break;
804
        case 2: // AIRWAY_BILL_NO
805
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
806
            this.airwayBillNo = iprot.readString();
807
          } else { 
808
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
809
          }
810
          break;
811
        case 3: // SHIPMENT_AMOUNT
812
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
813
            this.shipmentAmount = iprot.readDouble();
814
            setShipmentAmountIsSet(true);
815
          } else { 
816
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
817
          }
818
          break;
819
        case 4: // SHIPMENT_WEIGHT
820
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
821
            this.shipmentWeight = iprot.readDouble();
822
            setShipmentWeightIsSet(true);
823
          } else { 
824
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
825
          }
826
          break;
827
        case 5: // SHIPMENT_LOGSITICS_COST
828
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
829
            this.shipmentLogsiticsCost = iprot.readDouble();
830
            setShipmentLogsiticsCostIsSet(true);
831
          } else { 
832
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
833
          }
834
          break;
835
        case 6: // SHIPMENT_COD_COLLECTION_CHARGES
836
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
837
            this.shipmentCodCollectionCharges = iprot.readDouble();
838
            setShipmentCodCollectionChargesIsSet(true);
839
          } else { 
840
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
841
          }
842
          break;
843
        case 7: // CREATED_AT
844
          if (field.type == org.apache.thrift.protocol.TType.I64) {
845
            this.createdAt = iprot.readI64();
846
            setCreatedAtIsSet(true);
847
          } else { 
848
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
849
          }
850
          break;
851
        case 8: // UPDATED_AT
852
          if (field.type == org.apache.thrift.protocol.TType.I64) {
853
            this.updatedAt = iprot.readI64();
854
            setUpdatedAtIsSet(true);
855
          } else { 
856
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
857
          }
858
          break;
20744 kshitij.so 859
        case 9: // PACKAGE_DIMENSIONS
860
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
861
            this.packageDimensions = iprot.readString();
862
          } else { 
863
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
864
          }
865
          break;
19474 manish.sha 866
        default:
867
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
868
      }
869
      iprot.readFieldEnd();
870
    }
871
    iprot.readStructEnd();
872
    validate();
873
  }
874
 
875
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
876
    validate();
877
 
878
    oprot.writeStructBegin(STRUCT_DESC);
879
    if (this.logisticsTransactionId != null) {
880
      oprot.writeFieldBegin(LOGISTICS_TRANSACTION_ID_FIELD_DESC);
881
      oprot.writeString(this.logisticsTransactionId);
882
      oprot.writeFieldEnd();
883
    }
884
    if (this.airwayBillNo != null) {
885
      oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
886
      oprot.writeString(this.airwayBillNo);
887
      oprot.writeFieldEnd();
888
    }
889
    oprot.writeFieldBegin(SHIPMENT_AMOUNT_FIELD_DESC);
890
    oprot.writeDouble(this.shipmentAmount);
891
    oprot.writeFieldEnd();
892
    oprot.writeFieldBegin(SHIPMENT_WEIGHT_FIELD_DESC);
893
    oprot.writeDouble(this.shipmentWeight);
894
    oprot.writeFieldEnd();
895
    oprot.writeFieldBegin(SHIPMENT_LOGSITICS_COST_FIELD_DESC);
896
    oprot.writeDouble(this.shipmentLogsiticsCost);
897
    oprot.writeFieldEnd();
898
    oprot.writeFieldBegin(SHIPMENT_COD_COLLECTION_CHARGES_FIELD_DESC);
899
    oprot.writeDouble(this.shipmentCodCollectionCharges);
900
    oprot.writeFieldEnd();
901
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
902
    oprot.writeI64(this.createdAt);
903
    oprot.writeFieldEnd();
904
    oprot.writeFieldBegin(UPDATED_AT_FIELD_DESC);
905
    oprot.writeI64(this.updatedAt);
906
    oprot.writeFieldEnd();
20744 kshitij.so 907
    if (this.packageDimensions != null) {
908
      oprot.writeFieldBegin(PACKAGE_DIMENSIONS_FIELD_DESC);
909
      oprot.writeString(this.packageDimensions);
910
      oprot.writeFieldEnd();
911
    }
19474 manish.sha 912
    oprot.writeFieldStop();
913
    oprot.writeStructEnd();
914
  }
915
 
916
  @Override
917
  public String toString() {
918
    StringBuilder sb = new StringBuilder("ShipmentLogisticsCostDetail(");
919
    boolean first = true;
920
 
921
    sb.append("logisticsTransactionId:");
922
    if (this.logisticsTransactionId == null) {
923
      sb.append("null");
924
    } else {
925
      sb.append(this.logisticsTransactionId);
926
    }
927
    first = false;
928
    if (!first) sb.append(", ");
929
    sb.append("airwayBillNo:");
930
    if (this.airwayBillNo == null) {
931
      sb.append("null");
932
    } else {
933
      sb.append(this.airwayBillNo);
934
    }
935
    first = false;
936
    if (!first) sb.append(", ");
937
    sb.append("shipmentAmount:");
938
    sb.append(this.shipmentAmount);
939
    first = false;
940
    if (!first) sb.append(", ");
941
    sb.append("shipmentWeight:");
942
    sb.append(this.shipmentWeight);
943
    first = false;
944
    if (!first) sb.append(", ");
945
    sb.append("shipmentLogsiticsCost:");
946
    sb.append(this.shipmentLogsiticsCost);
947
    first = false;
948
    if (!first) sb.append(", ");
949
    sb.append("shipmentCodCollectionCharges:");
950
    sb.append(this.shipmentCodCollectionCharges);
951
    first = false;
952
    if (!first) sb.append(", ");
953
    sb.append("createdAt:");
954
    sb.append(this.createdAt);
955
    first = false;
956
    if (!first) sb.append(", ");
957
    sb.append("updatedAt:");
958
    sb.append(this.updatedAt);
959
    first = false;
20744 kshitij.so 960
    if (!first) sb.append(", ");
961
    sb.append("packageDimensions:");
962
    if (this.packageDimensions == null) {
963
      sb.append("null");
964
    } else {
965
      sb.append(this.packageDimensions);
966
    }
967
    first = false;
19474 manish.sha 968
    sb.append(")");
969
    return sb.toString();
970
  }
971
 
972
  public void validate() throws org.apache.thrift.TException {
973
    // check for required fields
974
  }
975
 
976
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
977
    try {
978
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
979
    } catch (org.apache.thrift.TException te) {
980
      throw new java.io.IOException(te);
981
    }
982
  }
983
 
984
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
985
    try {
986
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
987
      __isset_bit_vector = new BitSet(1);
988
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
989
    } catch (org.apache.thrift.TException te) {
990
      throw new java.io.IOException(te);
991
    }
992
  }
993
 
994
}
995