Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | 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);
34
 
35
  private String logisticsTransactionId; // required
36
  private String airwayBillNo; // required
37
  private double shipmentAmount; // required
38
  private double shipmentWeight; // required
39
  private double shipmentLogsiticsCost; // required
40
  private double shipmentCodCollectionCharges; // required
41
  private long createdAt; // required
42
  private long updatedAt; // required
43
 
44
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
45
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
46
    LOGISTICS_TRANSACTION_ID((short)1, "logisticsTransactionId"),
47
    AIRWAY_BILL_NO((short)2, "airwayBillNo"),
48
    SHIPMENT_AMOUNT((short)3, "shipmentAmount"),
49
    SHIPMENT_WEIGHT((short)4, "shipmentWeight"),
50
    SHIPMENT_LOGSITICS_COST((short)5, "shipmentLogsiticsCost"),
51
    SHIPMENT_COD_COLLECTION_CHARGES((short)6, "shipmentCodCollectionCharges"),
52
    CREATED_AT((short)7, "createdAt"),
53
    UPDATED_AT((short)8, "updatedAt");
54
 
55
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
56
 
57
    static {
58
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
59
        byName.put(field.getFieldName(), field);
60
      }
61
    }
62
 
63
    /**
64
     * Find the _Fields constant that matches fieldId, or null if its not found.
65
     */
66
    public static _Fields findByThriftId(int fieldId) {
67
      switch(fieldId) {
68
        case 1: // LOGISTICS_TRANSACTION_ID
69
          return LOGISTICS_TRANSACTION_ID;
70
        case 2: // AIRWAY_BILL_NO
71
          return AIRWAY_BILL_NO;
72
        case 3: // SHIPMENT_AMOUNT
73
          return SHIPMENT_AMOUNT;
74
        case 4: // SHIPMENT_WEIGHT
75
          return SHIPMENT_WEIGHT;
76
        case 5: // SHIPMENT_LOGSITICS_COST
77
          return SHIPMENT_LOGSITICS_COST;
78
        case 6: // SHIPMENT_COD_COLLECTION_CHARGES
79
          return SHIPMENT_COD_COLLECTION_CHARGES;
80
        case 7: // CREATED_AT
81
          return CREATED_AT;
82
        case 8: // UPDATED_AT
83
          return UPDATED_AT;
84
        default:
85
          return null;
86
      }
87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches fieldId, throwing an exception
91
     * if it is not found.
92
     */
93
    public static _Fields findByThriftIdOrThrow(int fieldId) {
94
      _Fields fields = findByThriftId(fieldId);
95
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
96
      return fields;
97
    }
98
 
99
    /**
100
     * Find the _Fields constant that matches name, or null if its not found.
101
     */
102
    public static _Fields findByName(String name) {
103
      return byName.get(name);
104
    }
105
 
106
    private final short _thriftId;
107
    private final String _fieldName;
108
 
109
    _Fields(short thriftId, String fieldName) {
110
      _thriftId = thriftId;
111
      _fieldName = fieldName;
112
    }
113
 
114
    public short getThriftFieldId() {
115
      return _thriftId;
116
    }
117
 
118
    public String getFieldName() {
119
      return _fieldName;
120
    }
121
  }
122
 
123
  // isset id assignments
124
  private static final int __SHIPMENTAMOUNT_ISSET_ID = 0;
125
  private static final int __SHIPMENTWEIGHT_ISSET_ID = 1;
126
  private static final int __SHIPMENTLOGSITICSCOST_ISSET_ID = 2;
127
  private static final int __SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID = 3;
128
  private static final int __CREATEDAT_ISSET_ID = 4;
129
  private static final int __UPDATEDAT_ISSET_ID = 5;
130
  private BitSet __isset_bit_vector = new BitSet(6);
131
 
132
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
133
  static {
134
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
135
    tmpMap.put(_Fields.LOGISTICS_TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("logisticsTransactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
137
    tmpMap.put(_Fields.AIRWAY_BILL_NO, new org.apache.thrift.meta_data.FieldMetaData("airwayBillNo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
139
    tmpMap.put(_Fields.SHIPMENT_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("shipmentAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
141
    tmpMap.put(_Fields.SHIPMENT_WEIGHT, new org.apache.thrift.meta_data.FieldMetaData("shipmentWeight", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
143
    tmpMap.put(_Fields.SHIPMENT_LOGSITICS_COST, new org.apache.thrift.meta_data.FieldMetaData("shipmentLogsiticsCost", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
145
    tmpMap.put(_Fields.SHIPMENT_COD_COLLECTION_CHARGES, new org.apache.thrift.meta_data.FieldMetaData("shipmentCodCollectionCharges", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
147
    tmpMap.put(_Fields.CREATED_AT, new org.apache.thrift.meta_data.FieldMetaData("createdAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
148
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
149
    tmpMap.put(_Fields.UPDATED_AT, new org.apache.thrift.meta_data.FieldMetaData("updatedAt", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
151
    metaDataMap = Collections.unmodifiableMap(tmpMap);
152
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ShipmentLogisticsCostDetail.class, metaDataMap);
153
  }
154
 
155
  public ShipmentLogisticsCostDetail() {
156
  }
157
 
158
  public ShipmentLogisticsCostDetail(
159
    String logisticsTransactionId,
160
    String airwayBillNo,
161
    double shipmentAmount,
162
    double shipmentWeight,
163
    double shipmentLogsiticsCost,
164
    double shipmentCodCollectionCharges,
165
    long createdAt,
166
    long updatedAt)
167
  {
168
    this();
169
    this.logisticsTransactionId = logisticsTransactionId;
170
    this.airwayBillNo = airwayBillNo;
171
    this.shipmentAmount = shipmentAmount;
172
    setShipmentAmountIsSet(true);
173
    this.shipmentWeight = shipmentWeight;
174
    setShipmentWeightIsSet(true);
175
    this.shipmentLogsiticsCost = shipmentLogsiticsCost;
176
    setShipmentLogsiticsCostIsSet(true);
177
    this.shipmentCodCollectionCharges = shipmentCodCollectionCharges;
178
    setShipmentCodCollectionChargesIsSet(true);
179
    this.createdAt = createdAt;
180
    setCreatedAtIsSet(true);
181
    this.updatedAt = updatedAt;
182
    setUpdatedAtIsSet(true);
183
  }
184
 
185
  /**
186
   * Performs a deep copy on <i>other</i>.
187
   */
188
  public ShipmentLogisticsCostDetail(ShipmentLogisticsCostDetail other) {
189
    __isset_bit_vector.clear();
190
    __isset_bit_vector.or(other.__isset_bit_vector);
191
    if (other.isSetLogisticsTransactionId()) {
192
      this.logisticsTransactionId = other.logisticsTransactionId;
193
    }
194
    if (other.isSetAirwayBillNo()) {
195
      this.airwayBillNo = other.airwayBillNo;
196
    }
197
    this.shipmentAmount = other.shipmentAmount;
198
    this.shipmentWeight = other.shipmentWeight;
199
    this.shipmentLogsiticsCost = other.shipmentLogsiticsCost;
200
    this.shipmentCodCollectionCharges = other.shipmentCodCollectionCharges;
201
    this.createdAt = other.createdAt;
202
    this.updatedAt = other.updatedAt;
203
  }
204
 
205
  public ShipmentLogisticsCostDetail deepCopy() {
206
    return new ShipmentLogisticsCostDetail(this);
207
  }
208
 
209
  @Override
210
  public void clear() {
211
    this.logisticsTransactionId = null;
212
    this.airwayBillNo = null;
213
    setShipmentAmountIsSet(false);
214
    this.shipmentAmount = 0.0;
215
    setShipmentWeightIsSet(false);
216
    this.shipmentWeight = 0.0;
217
    setShipmentLogsiticsCostIsSet(false);
218
    this.shipmentLogsiticsCost = 0.0;
219
    setShipmentCodCollectionChargesIsSet(false);
220
    this.shipmentCodCollectionCharges = 0.0;
221
    setCreatedAtIsSet(false);
222
    this.createdAt = 0;
223
    setUpdatedAtIsSet(false);
224
    this.updatedAt = 0;
225
  }
226
 
227
  public String getLogisticsTransactionId() {
228
    return this.logisticsTransactionId;
229
  }
230
 
231
  public void setLogisticsTransactionId(String logisticsTransactionId) {
232
    this.logisticsTransactionId = logisticsTransactionId;
233
  }
234
 
235
  public void unsetLogisticsTransactionId() {
236
    this.logisticsTransactionId = null;
237
  }
238
 
239
  /** Returns true if field logisticsTransactionId is set (has been assigned a value) and false otherwise */
240
  public boolean isSetLogisticsTransactionId() {
241
    return this.logisticsTransactionId != null;
242
  }
243
 
244
  public void setLogisticsTransactionIdIsSet(boolean value) {
245
    if (!value) {
246
      this.logisticsTransactionId = null;
247
    }
248
  }
249
 
250
  public String getAirwayBillNo() {
251
    return this.airwayBillNo;
252
  }
253
 
254
  public void setAirwayBillNo(String airwayBillNo) {
255
    this.airwayBillNo = airwayBillNo;
256
  }
257
 
258
  public void unsetAirwayBillNo() {
259
    this.airwayBillNo = null;
260
  }
261
 
262
  /** Returns true if field airwayBillNo is set (has been assigned a value) and false otherwise */
263
  public boolean isSetAirwayBillNo() {
264
    return this.airwayBillNo != null;
265
  }
266
 
267
  public void setAirwayBillNoIsSet(boolean value) {
268
    if (!value) {
269
      this.airwayBillNo = null;
270
    }
271
  }
272
 
273
  public double getShipmentAmount() {
274
    return this.shipmentAmount;
275
  }
276
 
277
  public void setShipmentAmount(double shipmentAmount) {
278
    this.shipmentAmount = shipmentAmount;
279
    setShipmentAmountIsSet(true);
280
  }
281
 
282
  public void unsetShipmentAmount() {
283
    __isset_bit_vector.clear(__SHIPMENTAMOUNT_ISSET_ID);
284
  }
285
 
286
  /** Returns true if field shipmentAmount is set (has been assigned a value) and false otherwise */
287
  public boolean isSetShipmentAmount() {
288
    return __isset_bit_vector.get(__SHIPMENTAMOUNT_ISSET_ID);
289
  }
290
 
291
  public void setShipmentAmountIsSet(boolean value) {
292
    __isset_bit_vector.set(__SHIPMENTAMOUNT_ISSET_ID, value);
293
  }
294
 
295
  public double getShipmentWeight() {
296
    return this.shipmentWeight;
297
  }
298
 
299
  public void setShipmentWeight(double shipmentWeight) {
300
    this.shipmentWeight = shipmentWeight;
301
    setShipmentWeightIsSet(true);
302
  }
303
 
304
  public void unsetShipmentWeight() {
305
    __isset_bit_vector.clear(__SHIPMENTWEIGHT_ISSET_ID);
306
  }
307
 
308
  /** Returns true if field shipmentWeight is set (has been assigned a value) and false otherwise */
309
  public boolean isSetShipmentWeight() {
310
    return __isset_bit_vector.get(__SHIPMENTWEIGHT_ISSET_ID);
311
  }
312
 
313
  public void setShipmentWeightIsSet(boolean value) {
314
    __isset_bit_vector.set(__SHIPMENTWEIGHT_ISSET_ID, value);
315
  }
316
 
317
  public double getShipmentLogsiticsCost() {
318
    return this.shipmentLogsiticsCost;
319
  }
320
 
321
  public void setShipmentLogsiticsCost(double shipmentLogsiticsCost) {
322
    this.shipmentLogsiticsCost = shipmentLogsiticsCost;
323
    setShipmentLogsiticsCostIsSet(true);
324
  }
325
 
326
  public void unsetShipmentLogsiticsCost() {
327
    __isset_bit_vector.clear(__SHIPMENTLOGSITICSCOST_ISSET_ID);
328
  }
329
 
330
  /** Returns true if field shipmentLogsiticsCost is set (has been assigned a value) and false otherwise */
331
  public boolean isSetShipmentLogsiticsCost() {
332
    return __isset_bit_vector.get(__SHIPMENTLOGSITICSCOST_ISSET_ID);
333
  }
334
 
335
  public void setShipmentLogsiticsCostIsSet(boolean value) {
336
    __isset_bit_vector.set(__SHIPMENTLOGSITICSCOST_ISSET_ID, value);
337
  }
338
 
339
  public double getShipmentCodCollectionCharges() {
340
    return this.shipmentCodCollectionCharges;
341
  }
342
 
343
  public void setShipmentCodCollectionCharges(double shipmentCodCollectionCharges) {
344
    this.shipmentCodCollectionCharges = shipmentCodCollectionCharges;
345
    setShipmentCodCollectionChargesIsSet(true);
346
  }
347
 
348
  public void unsetShipmentCodCollectionCharges() {
349
    __isset_bit_vector.clear(__SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID);
350
  }
351
 
352
  /** Returns true if field shipmentCodCollectionCharges is set (has been assigned a value) and false otherwise */
353
  public boolean isSetShipmentCodCollectionCharges() {
354
    return __isset_bit_vector.get(__SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID);
355
  }
356
 
357
  public void setShipmentCodCollectionChargesIsSet(boolean value) {
358
    __isset_bit_vector.set(__SHIPMENTCODCOLLECTIONCHARGES_ISSET_ID, value);
359
  }
360
 
361
  public long getCreatedAt() {
362
    return this.createdAt;
363
  }
364
 
365
  public void setCreatedAt(long createdAt) {
366
    this.createdAt = createdAt;
367
    setCreatedAtIsSet(true);
368
  }
369
 
370
  public void unsetCreatedAt() {
371
    __isset_bit_vector.clear(__CREATEDAT_ISSET_ID);
372
  }
373
 
374
  /** Returns true if field createdAt is set (has been assigned a value) and false otherwise */
375
  public boolean isSetCreatedAt() {
376
    return __isset_bit_vector.get(__CREATEDAT_ISSET_ID);
377
  }
378
 
379
  public void setCreatedAtIsSet(boolean value) {
380
    __isset_bit_vector.set(__CREATEDAT_ISSET_ID, value);
381
  }
382
 
383
  public long getUpdatedAt() {
384
    return this.updatedAt;
385
  }
386
 
387
  public void setUpdatedAt(long updatedAt) {
388
    this.updatedAt = updatedAt;
389
    setUpdatedAtIsSet(true);
390
  }
391
 
392
  public void unsetUpdatedAt() {
393
    __isset_bit_vector.clear(__UPDATEDAT_ISSET_ID);
394
  }
395
 
396
  /** Returns true if field updatedAt is set (has been assigned a value) and false otherwise */
397
  public boolean isSetUpdatedAt() {
398
    return __isset_bit_vector.get(__UPDATEDAT_ISSET_ID);
399
  }
400
 
401
  public void setUpdatedAtIsSet(boolean value) {
402
    __isset_bit_vector.set(__UPDATEDAT_ISSET_ID, value);
403
  }
404
 
405
  public void setFieldValue(_Fields field, Object value) {
406
    switch (field) {
407
    case LOGISTICS_TRANSACTION_ID:
408
      if (value == null) {
409
        unsetLogisticsTransactionId();
410
      } else {
411
        setLogisticsTransactionId((String)value);
412
      }
413
      break;
414
 
415
    case AIRWAY_BILL_NO:
416
      if (value == null) {
417
        unsetAirwayBillNo();
418
      } else {
419
        setAirwayBillNo((String)value);
420
      }
421
      break;
422
 
423
    case SHIPMENT_AMOUNT:
424
      if (value == null) {
425
        unsetShipmentAmount();
426
      } else {
427
        setShipmentAmount((Double)value);
428
      }
429
      break;
430
 
431
    case SHIPMENT_WEIGHT:
432
      if (value == null) {
433
        unsetShipmentWeight();
434
      } else {
435
        setShipmentWeight((Double)value);
436
      }
437
      break;
438
 
439
    case SHIPMENT_LOGSITICS_COST:
440
      if (value == null) {
441
        unsetShipmentLogsiticsCost();
442
      } else {
443
        setShipmentLogsiticsCost((Double)value);
444
      }
445
      break;
446
 
447
    case SHIPMENT_COD_COLLECTION_CHARGES:
448
      if (value == null) {
449
        unsetShipmentCodCollectionCharges();
450
      } else {
451
        setShipmentCodCollectionCharges((Double)value);
452
      }
453
      break;
454
 
455
    case CREATED_AT:
456
      if (value == null) {
457
        unsetCreatedAt();
458
      } else {
459
        setCreatedAt((Long)value);
460
      }
461
      break;
462
 
463
    case UPDATED_AT:
464
      if (value == null) {
465
        unsetUpdatedAt();
466
      } else {
467
        setUpdatedAt((Long)value);
468
      }
469
      break;
470
 
471
    }
472
  }
473
 
474
  public Object getFieldValue(_Fields field) {
475
    switch (field) {
476
    case LOGISTICS_TRANSACTION_ID:
477
      return getLogisticsTransactionId();
478
 
479
    case AIRWAY_BILL_NO:
480
      return getAirwayBillNo();
481
 
482
    case SHIPMENT_AMOUNT:
483
      return Double.valueOf(getShipmentAmount());
484
 
485
    case SHIPMENT_WEIGHT:
486
      return Double.valueOf(getShipmentWeight());
487
 
488
    case SHIPMENT_LOGSITICS_COST:
489
      return Double.valueOf(getShipmentLogsiticsCost());
490
 
491
    case SHIPMENT_COD_COLLECTION_CHARGES:
492
      return Double.valueOf(getShipmentCodCollectionCharges());
493
 
494
    case CREATED_AT:
495
      return Long.valueOf(getCreatedAt());
496
 
497
    case UPDATED_AT:
498
      return Long.valueOf(getUpdatedAt());
499
 
500
    }
501
    throw new IllegalStateException();
502
  }
503
 
504
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
505
  public boolean isSet(_Fields field) {
506
    if (field == null) {
507
      throw new IllegalArgumentException();
508
    }
509
 
510
    switch (field) {
511
    case LOGISTICS_TRANSACTION_ID:
512
      return isSetLogisticsTransactionId();
513
    case AIRWAY_BILL_NO:
514
      return isSetAirwayBillNo();
515
    case SHIPMENT_AMOUNT:
516
      return isSetShipmentAmount();
517
    case SHIPMENT_WEIGHT:
518
      return isSetShipmentWeight();
519
    case SHIPMENT_LOGSITICS_COST:
520
      return isSetShipmentLogsiticsCost();
521
    case SHIPMENT_COD_COLLECTION_CHARGES:
522
      return isSetShipmentCodCollectionCharges();
523
    case CREATED_AT:
524
      return isSetCreatedAt();
525
    case UPDATED_AT:
526
      return isSetUpdatedAt();
527
    }
528
    throw new IllegalStateException();
529
  }
530
 
531
  @Override
532
  public boolean equals(Object that) {
533
    if (that == null)
534
      return false;
535
    if (that instanceof ShipmentLogisticsCostDetail)
536
      return this.equals((ShipmentLogisticsCostDetail)that);
537
    return false;
538
  }
539
 
540
  public boolean equals(ShipmentLogisticsCostDetail that) {
541
    if (that == null)
542
      return false;
543
 
544
    boolean this_present_logisticsTransactionId = true && this.isSetLogisticsTransactionId();
545
    boolean that_present_logisticsTransactionId = true && that.isSetLogisticsTransactionId();
546
    if (this_present_logisticsTransactionId || that_present_logisticsTransactionId) {
547
      if (!(this_present_logisticsTransactionId && that_present_logisticsTransactionId))
548
        return false;
549
      if (!this.logisticsTransactionId.equals(that.logisticsTransactionId))
550
        return false;
551
    }
552
 
553
    boolean this_present_airwayBillNo = true && this.isSetAirwayBillNo();
554
    boolean that_present_airwayBillNo = true && that.isSetAirwayBillNo();
555
    if (this_present_airwayBillNo || that_present_airwayBillNo) {
556
      if (!(this_present_airwayBillNo && that_present_airwayBillNo))
557
        return false;
558
      if (!this.airwayBillNo.equals(that.airwayBillNo))
559
        return false;
560
    }
561
 
562
    boolean this_present_shipmentAmount = true;
563
    boolean that_present_shipmentAmount = true;
564
    if (this_present_shipmentAmount || that_present_shipmentAmount) {
565
      if (!(this_present_shipmentAmount && that_present_shipmentAmount))
566
        return false;
567
      if (this.shipmentAmount != that.shipmentAmount)
568
        return false;
569
    }
570
 
571
    boolean this_present_shipmentWeight = true;
572
    boolean that_present_shipmentWeight = true;
573
    if (this_present_shipmentWeight || that_present_shipmentWeight) {
574
      if (!(this_present_shipmentWeight && that_present_shipmentWeight))
575
        return false;
576
      if (this.shipmentWeight != that.shipmentWeight)
577
        return false;
578
    }
579
 
580
    boolean this_present_shipmentLogsiticsCost = true;
581
    boolean that_present_shipmentLogsiticsCost = true;
582
    if (this_present_shipmentLogsiticsCost || that_present_shipmentLogsiticsCost) {
583
      if (!(this_present_shipmentLogsiticsCost && that_present_shipmentLogsiticsCost))
584
        return false;
585
      if (this.shipmentLogsiticsCost != that.shipmentLogsiticsCost)
586
        return false;
587
    }
588
 
589
    boolean this_present_shipmentCodCollectionCharges = true;
590
    boolean that_present_shipmentCodCollectionCharges = true;
591
    if (this_present_shipmentCodCollectionCharges || that_present_shipmentCodCollectionCharges) {
592
      if (!(this_present_shipmentCodCollectionCharges && that_present_shipmentCodCollectionCharges))
593
        return false;
594
      if (this.shipmentCodCollectionCharges != that.shipmentCodCollectionCharges)
595
        return false;
596
    }
597
 
598
    boolean this_present_createdAt = true;
599
    boolean that_present_createdAt = true;
600
    if (this_present_createdAt || that_present_createdAt) {
601
      if (!(this_present_createdAt && that_present_createdAt))
602
        return false;
603
      if (this.createdAt != that.createdAt)
604
        return false;
605
    }
606
 
607
    boolean this_present_updatedAt = true;
608
    boolean that_present_updatedAt = true;
609
    if (this_present_updatedAt || that_present_updatedAt) {
610
      if (!(this_present_updatedAt && that_present_updatedAt))
611
        return false;
612
      if (this.updatedAt != that.updatedAt)
613
        return false;
614
    }
615
 
616
    return true;
617
  }
618
 
619
  @Override
620
  public int hashCode() {
621
    return 0;
622
  }
623
 
624
  public int compareTo(ShipmentLogisticsCostDetail other) {
625
    if (!getClass().equals(other.getClass())) {
626
      return getClass().getName().compareTo(other.getClass().getName());
627
    }
628
 
629
    int lastComparison = 0;
630
    ShipmentLogisticsCostDetail typedOther = (ShipmentLogisticsCostDetail)other;
631
 
632
    lastComparison = Boolean.valueOf(isSetLogisticsTransactionId()).compareTo(typedOther.isSetLogisticsTransactionId());
633
    if (lastComparison != 0) {
634
      return lastComparison;
635
    }
636
    if (isSetLogisticsTransactionId()) {
637
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.logisticsTransactionId, typedOther.logisticsTransactionId);
638
      if (lastComparison != 0) {
639
        return lastComparison;
640
      }
641
    }
642
    lastComparison = Boolean.valueOf(isSetAirwayBillNo()).compareTo(typedOther.isSetAirwayBillNo());
643
    if (lastComparison != 0) {
644
      return lastComparison;
645
    }
646
    if (isSetAirwayBillNo()) {
647
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airwayBillNo, typedOther.airwayBillNo);
648
      if (lastComparison != 0) {
649
        return lastComparison;
650
      }
651
    }
652
    lastComparison = Boolean.valueOf(isSetShipmentAmount()).compareTo(typedOther.isSetShipmentAmount());
653
    if (lastComparison != 0) {
654
      return lastComparison;
655
    }
656
    if (isSetShipmentAmount()) {
657
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentAmount, typedOther.shipmentAmount);
658
      if (lastComparison != 0) {
659
        return lastComparison;
660
      }
661
    }
662
    lastComparison = Boolean.valueOf(isSetShipmentWeight()).compareTo(typedOther.isSetShipmentWeight());
663
    if (lastComparison != 0) {
664
      return lastComparison;
665
    }
666
    if (isSetShipmentWeight()) {
667
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentWeight, typedOther.shipmentWeight);
668
      if (lastComparison != 0) {
669
        return lastComparison;
670
      }
671
    }
672
    lastComparison = Boolean.valueOf(isSetShipmentLogsiticsCost()).compareTo(typedOther.isSetShipmentLogsiticsCost());
673
    if (lastComparison != 0) {
674
      return lastComparison;
675
    }
676
    if (isSetShipmentLogsiticsCost()) {
677
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentLogsiticsCost, typedOther.shipmentLogsiticsCost);
678
      if (lastComparison != 0) {
679
        return lastComparison;
680
      }
681
    }
682
    lastComparison = Boolean.valueOf(isSetShipmentCodCollectionCharges()).compareTo(typedOther.isSetShipmentCodCollectionCharges());
683
    if (lastComparison != 0) {
684
      return lastComparison;
685
    }
686
    if (isSetShipmentCodCollectionCharges()) {
687
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shipmentCodCollectionCharges, typedOther.shipmentCodCollectionCharges);
688
      if (lastComparison != 0) {
689
        return lastComparison;
690
      }
691
    }
692
    lastComparison = Boolean.valueOf(isSetCreatedAt()).compareTo(typedOther.isSetCreatedAt());
693
    if (lastComparison != 0) {
694
      return lastComparison;
695
    }
696
    if (isSetCreatedAt()) {
697
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdAt, typedOther.createdAt);
698
      if (lastComparison != 0) {
699
        return lastComparison;
700
      }
701
    }
702
    lastComparison = Boolean.valueOf(isSetUpdatedAt()).compareTo(typedOther.isSetUpdatedAt());
703
    if (lastComparison != 0) {
704
      return lastComparison;
705
    }
706
    if (isSetUpdatedAt()) {
707
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updatedAt, typedOther.updatedAt);
708
      if (lastComparison != 0) {
709
        return lastComparison;
710
      }
711
    }
712
    return 0;
713
  }
714
 
715
  public _Fields fieldForId(int fieldId) {
716
    return _Fields.findByThriftId(fieldId);
717
  }
718
 
719
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
720
    org.apache.thrift.protocol.TField field;
721
    iprot.readStructBegin();
722
    while (true)
723
    {
724
      field = iprot.readFieldBegin();
725
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
726
        break;
727
      }
728
      switch (field.id) {
729
        case 1: // LOGISTICS_TRANSACTION_ID
730
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
731
            this.logisticsTransactionId = iprot.readString();
732
          } else { 
733
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
734
          }
735
          break;
736
        case 2: // AIRWAY_BILL_NO
737
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
738
            this.airwayBillNo = iprot.readString();
739
          } else { 
740
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
741
          }
742
          break;
743
        case 3: // SHIPMENT_AMOUNT
744
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
745
            this.shipmentAmount = iprot.readDouble();
746
            setShipmentAmountIsSet(true);
747
          } else { 
748
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
749
          }
750
          break;
751
        case 4: // SHIPMENT_WEIGHT
752
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
753
            this.shipmentWeight = iprot.readDouble();
754
            setShipmentWeightIsSet(true);
755
          } else { 
756
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
757
          }
758
          break;
759
        case 5: // SHIPMENT_LOGSITICS_COST
760
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
761
            this.shipmentLogsiticsCost = iprot.readDouble();
762
            setShipmentLogsiticsCostIsSet(true);
763
          } else { 
764
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
765
          }
766
          break;
767
        case 6: // SHIPMENT_COD_COLLECTION_CHARGES
768
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
769
            this.shipmentCodCollectionCharges = iprot.readDouble();
770
            setShipmentCodCollectionChargesIsSet(true);
771
          } else { 
772
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
773
          }
774
          break;
775
        case 7: // CREATED_AT
776
          if (field.type == org.apache.thrift.protocol.TType.I64) {
777
            this.createdAt = iprot.readI64();
778
            setCreatedAtIsSet(true);
779
          } else { 
780
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
781
          }
782
          break;
783
        case 8: // UPDATED_AT
784
          if (field.type == org.apache.thrift.protocol.TType.I64) {
785
            this.updatedAt = iprot.readI64();
786
            setUpdatedAtIsSet(true);
787
          } else { 
788
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
789
          }
790
          break;
791
        default:
792
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
793
      }
794
      iprot.readFieldEnd();
795
    }
796
    iprot.readStructEnd();
797
    validate();
798
  }
799
 
800
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
801
    validate();
802
 
803
    oprot.writeStructBegin(STRUCT_DESC);
804
    if (this.logisticsTransactionId != null) {
805
      oprot.writeFieldBegin(LOGISTICS_TRANSACTION_ID_FIELD_DESC);
806
      oprot.writeString(this.logisticsTransactionId);
807
      oprot.writeFieldEnd();
808
    }
809
    if (this.airwayBillNo != null) {
810
      oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
811
      oprot.writeString(this.airwayBillNo);
812
      oprot.writeFieldEnd();
813
    }
814
    oprot.writeFieldBegin(SHIPMENT_AMOUNT_FIELD_DESC);
815
    oprot.writeDouble(this.shipmentAmount);
816
    oprot.writeFieldEnd();
817
    oprot.writeFieldBegin(SHIPMENT_WEIGHT_FIELD_DESC);
818
    oprot.writeDouble(this.shipmentWeight);
819
    oprot.writeFieldEnd();
820
    oprot.writeFieldBegin(SHIPMENT_LOGSITICS_COST_FIELD_DESC);
821
    oprot.writeDouble(this.shipmentLogsiticsCost);
822
    oprot.writeFieldEnd();
823
    oprot.writeFieldBegin(SHIPMENT_COD_COLLECTION_CHARGES_FIELD_DESC);
824
    oprot.writeDouble(this.shipmentCodCollectionCharges);
825
    oprot.writeFieldEnd();
826
    oprot.writeFieldBegin(CREATED_AT_FIELD_DESC);
827
    oprot.writeI64(this.createdAt);
828
    oprot.writeFieldEnd();
829
    oprot.writeFieldBegin(UPDATED_AT_FIELD_DESC);
830
    oprot.writeI64(this.updatedAt);
831
    oprot.writeFieldEnd();
832
    oprot.writeFieldStop();
833
    oprot.writeStructEnd();
834
  }
835
 
836
  @Override
837
  public String toString() {
838
    StringBuilder sb = new StringBuilder("ShipmentLogisticsCostDetail(");
839
    boolean first = true;
840
 
841
    sb.append("logisticsTransactionId:");
842
    if (this.logisticsTransactionId == null) {
843
      sb.append("null");
844
    } else {
845
      sb.append(this.logisticsTransactionId);
846
    }
847
    first = false;
848
    if (!first) sb.append(", ");
849
    sb.append("airwayBillNo:");
850
    if (this.airwayBillNo == null) {
851
      sb.append("null");
852
    } else {
853
      sb.append(this.airwayBillNo);
854
    }
855
    first = false;
856
    if (!first) sb.append(", ");
857
    sb.append("shipmentAmount:");
858
    sb.append(this.shipmentAmount);
859
    first = false;
860
    if (!first) sb.append(", ");
861
    sb.append("shipmentWeight:");
862
    sb.append(this.shipmentWeight);
863
    first = false;
864
    if (!first) sb.append(", ");
865
    sb.append("shipmentLogsiticsCost:");
866
    sb.append(this.shipmentLogsiticsCost);
867
    first = false;
868
    if (!first) sb.append(", ");
869
    sb.append("shipmentCodCollectionCharges:");
870
    sb.append(this.shipmentCodCollectionCharges);
871
    first = false;
872
    if (!first) sb.append(", ");
873
    sb.append("createdAt:");
874
    sb.append(this.createdAt);
875
    first = false;
876
    if (!first) sb.append(", ");
877
    sb.append("updatedAt:");
878
    sb.append(this.updatedAt);
879
    first = false;
880
    sb.append(")");
881
    return sb.toString();
882
  }
883
 
884
  public void validate() throws org.apache.thrift.TException {
885
    // check for required fields
886
  }
887
 
888
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
889
    try {
890
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
891
    } catch (org.apache.thrift.TException te) {
892
      throw new java.io.IOException(te);
893
    }
894
  }
895
 
896
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
897
    try {
898
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
899
      __isset_bit_vector = new BitSet(1);
900
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
901
    } catch (org.apache.thrift.TException te) {
902
      throw new java.io.IOException(te);
903
    }
904
  }
905
 
906
}
907