Subversion Repositories SmartDukaan

Rev

Rev 12696 | Rev 18590 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11890 kshitij.so 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.user;
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 PrivateDealUser implements org.apache.thrift.TBase<PrivateDealUser, PrivateDealUser._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PrivateDealUser");
25
 
26
  private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ADDED_ON_FIELD_DESC = new org.apache.thrift.protocol.TField("addedOn", org.apache.thrift.protocol.TType.I64, (short)2);
28
  private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)3);
12696 amit.gupta 29
  private static final org.apache.thrift.protocol.TField COUNTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("counterId", org.apache.thrift.protocol.TType.I64, (short)4);
30
  private static final org.apache.thrift.protocol.TField TIN_FIELD_DESC = new org.apache.thrift.protocol.TField("tin", org.apache.thrift.protocol.TType.STRING, (short)5);
13146 manish.sha 31
  private static final org.apache.thrift.protocol.TField BULK_SHIPMENT_AMOUNT_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkShipmentAmountLimit", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
11890 kshitij.so 32
 
33
  private long userId; // required
34
  private long addedOn; // required
35
  private boolean isActive; // required
12696 amit.gupta 36
  private long counterId; // required
37
  private String tin; // required
13146 manish.sha 38
  private double bulkShipmentAmountLimit; // required
11890 kshitij.so 39
 
40
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
41
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
42
    USER_ID((short)1, "userId"),
43
    ADDED_ON((short)2, "addedOn"),
12696 amit.gupta 44
    IS_ACTIVE((short)3, "isActive"),
45
    COUNTER_ID((short)4, "counterId"),
13146 manish.sha 46
    TIN((short)5, "tin"),
47
    BULK_SHIPMENT_AMOUNT_LIMIT((short)6, "bulkShipmentAmountLimit");
11890 kshitij.so 48
 
49
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
50
 
51
    static {
52
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
53
        byName.put(field.getFieldName(), field);
54
      }
55
    }
56
 
57
    /**
58
     * Find the _Fields constant that matches fieldId, or null if its not found.
59
     */
60
    public static _Fields findByThriftId(int fieldId) {
61
      switch(fieldId) {
62
        case 1: // USER_ID
63
          return USER_ID;
64
        case 2: // ADDED_ON
65
          return ADDED_ON;
66
        case 3: // IS_ACTIVE
67
          return IS_ACTIVE;
12696 amit.gupta 68
        case 4: // COUNTER_ID
69
          return COUNTER_ID;
70
        case 5: // TIN
71
          return TIN;
13146 manish.sha 72
        case 6: // BULK_SHIPMENT_AMOUNT_LIMIT
73
          return BULK_SHIPMENT_AMOUNT_LIMIT;
11890 kshitij.so 74
        default:
75
          return null;
76
      }
77
    }
78
 
79
    /**
80
     * Find the _Fields constant that matches fieldId, throwing an exception
81
     * if it is not found.
82
     */
83
    public static _Fields findByThriftIdOrThrow(int fieldId) {
84
      _Fields fields = findByThriftId(fieldId);
85
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
86
      return fields;
87
    }
88
 
89
    /**
90
     * Find the _Fields constant that matches name, or null if its not found.
91
     */
92
    public static _Fields findByName(String name) {
93
      return byName.get(name);
94
    }
95
 
96
    private final short _thriftId;
97
    private final String _fieldName;
98
 
99
    _Fields(short thriftId, String fieldName) {
100
      _thriftId = thriftId;
101
      _fieldName = fieldName;
102
    }
103
 
104
    public short getThriftFieldId() {
105
      return _thriftId;
106
    }
107
 
108
    public String getFieldName() {
109
      return _fieldName;
110
    }
111
  }
112
 
113
  // isset id assignments
114
  private static final int __USERID_ISSET_ID = 0;
115
  private static final int __ADDEDON_ISSET_ID = 1;
116
  private static final int __ISACTIVE_ISSET_ID = 2;
12696 amit.gupta 117
  private static final int __COUNTERID_ISSET_ID = 3;
13146 manish.sha 118
  private static final int __BULKSHIPMENTAMOUNTLIMIT_ISSET_ID = 4;
119
  private BitSet __isset_bit_vector = new BitSet(5);
11890 kshitij.so 120
 
121
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
122
  static {
123
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
124
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
126
    tmpMap.put(_Fields.ADDED_ON, new org.apache.thrift.meta_data.FieldMetaData("addedOn", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
128
    tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
12696 amit.gupta 130
    tmpMap.put(_Fields.COUNTER_ID, new org.apache.thrift.meta_data.FieldMetaData("counterId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
132
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
133
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
13146 manish.sha 134
    tmpMap.put(_Fields.BULK_SHIPMENT_AMOUNT_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("bulkShipmentAmountLimit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
135
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
11890 kshitij.so 136
    metaDataMap = Collections.unmodifiableMap(tmpMap);
137
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PrivateDealUser.class, metaDataMap);
138
  }
139
 
140
  public PrivateDealUser() {
141
  }
142
 
143
  public PrivateDealUser(
144
    long userId,
145
    long addedOn,
12696 amit.gupta 146
    boolean isActive,
147
    long counterId,
13146 manish.sha 148
    String tin,
149
    double bulkShipmentAmountLimit)
11890 kshitij.so 150
  {
151
    this();
152
    this.userId = userId;
153
    setUserIdIsSet(true);
154
    this.addedOn = addedOn;
155
    setAddedOnIsSet(true);
156
    this.isActive = isActive;
157
    setIsActiveIsSet(true);
12696 amit.gupta 158
    this.counterId = counterId;
159
    setCounterIdIsSet(true);
160
    this.tin = tin;
13146 manish.sha 161
    this.bulkShipmentAmountLimit = bulkShipmentAmountLimit;
162
    setBulkShipmentAmountLimitIsSet(true);
11890 kshitij.so 163
  }
164
 
165
  /**
166
   * Performs a deep copy on <i>other</i>.
167
   */
168
  public PrivateDealUser(PrivateDealUser other) {
169
    __isset_bit_vector.clear();
170
    __isset_bit_vector.or(other.__isset_bit_vector);
171
    this.userId = other.userId;
172
    this.addedOn = other.addedOn;
173
    this.isActive = other.isActive;
12696 amit.gupta 174
    this.counterId = other.counterId;
175
    if (other.isSetTin()) {
176
      this.tin = other.tin;
177
    }
13146 manish.sha 178
    this.bulkShipmentAmountLimit = other.bulkShipmentAmountLimit;
11890 kshitij.so 179
  }
180
 
181
  public PrivateDealUser deepCopy() {
182
    return new PrivateDealUser(this);
183
  }
184
 
185
  @Override
186
  public void clear() {
187
    setUserIdIsSet(false);
188
    this.userId = 0;
189
    setAddedOnIsSet(false);
190
    this.addedOn = 0;
191
    setIsActiveIsSet(false);
192
    this.isActive = false;
12696 amit.gupta 193
    setCounterIdIsSet(false);
194
    this.counterId = 0;
195
    this.tin = null;
13146 manish.sha 196
    setBulkShipmentAmountLimitIsSet(false);
197
    this.bulkShipmentAmountLimit = 0.0;
11890 kshitij.so 198
  }
199
 
200
  public long getUserId() {
201
    return this.userId;
202
  }
203
 
204
  public void setUserId(long userId) {
205
    this.userId = userId;
206
    setUserIdIsSet(true);
207
  }
208
 
209
  public void unsetUserId() {
210
    __isset_bit_vector.clear(__USERID_ISSET_ID);
211
  }
212
 
213
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
214
  public boolean isSetUserId() {
215
    return __isset_bit_vector.get(__USERID_ISSET_ID);
216
  }
217
 
218
  public void setUserIdIsSet(boolean value) {
219
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
220
  }
221
 
222
  public long getAddedOn() {
223
    return this.addedOn;
224
  }
225
 
226
  public void setAddedOn(long addedOn) {
227
    this.addedOn = addedOn;
228
    setAddedOnIsSet(true);
229
  }
230
 
231
  public void unsetAddedOn() {
232
    __isset_bit_vector.clear(__ADDEDON_ISSET_ID);
233
  }
234
 
235
  /** Returns true if field addedOn is set (has been assigned a value) and false otherwise */
236
  public boolean isSetAddedOn() {
237
    return __isset_bit_vector.get(__ADDEDON_ISSET_ID);
238
  }
239
 
240
  public void setAddedOnIsSet(boolean value) {
241
    __isset_bit_vector.set(__ADDEDON_ISSET_ID, value);
242
  }
243
 
244
  public boolean isIsActive() {
245
    return this.isActive;
246
  }
247
 
248
  public void setIsActive(boolean isActive) {
249
    this.isActive = isActive;
250
    setIsActiveIsSet(true);
251
  }
252
 
253
  public void unsetIsActive() {
254
    __isset_bit_vector.clear(__ISACTIVE_ISSET_ID);
255
  }
256
 
257
  /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
258
  public boolean isSetIsActive() {
259
    return __isset_bit_vector.get(__ISACTIVE_ISSET_ID);
260
  }
261
 
262
  public void setIsActiveIsSet(boolean value) {
263
    __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
264
  }
265
 
12696 amit.gupta 266
  public long getCounterId() {
267
    return this.counterId;
268
  }
269
 
270
  public void setCounterId(long counterId) {
271
    this.counterId = counterId;
272
    setCounterIdIsSet(true);
273
  }
274
 
275
  public void unsetCounterId() {
276
    __isset_bit_vector.clear(__COUNTERID_ISSET_ID);
277
  }
278
 
279
  /** Returns true if field counterId is set (has been assigned a value) and false otherwise */
280
  public boolean isSetCounterId() {
281
    return __isset_bit_vector.get(__COUNTERID_ISSET_ID);
282
  }
283
 
284
  public void setCounterIdIsSet(boolean value) {
285
    __isset_bit_vector.set(__COUNTERID_ISSET_ID, value);
286
  }
287
 
288
  public String getTin() {
289
    return this.tin;
290
  }
291
 
292
  public void setTin(String tin) {
293
    this.tin = tin;
294
  }
295
 
296
  public void unsetTin() {
297
    this.tin = null;
298
  }
299
 
300
  /** Returns true if field tin is set (has been assigned a value) and false otherwise */
301
  public boolean isSetTin() {
302
    return this.tin != null;
303
  }
304
 
305
  public void setTinIsSet(boolean value) {
306
    if (!value) {
307
      this.tin = null;
308
    }
309
  }
310
 
13146 manish.sha 311
  public double getBulkShipmentAmountLimit() {
312
    return this.bulkShipmentAmountLimit;
313
  }
314
 
315
  public void setBulkShipmentAmountLimit(double bulkShipmentAmountLimit) {
316
    this.bulkShipmentAmountLimit = bulkShipmentAmountLimit;
317
    setBulkShipmentAmountLimitIsSet(true);
318
  }
319
 
320
  public void unsetBulkShipmentAmountLimit() {
321
    __isset_bit_vector.clear(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID);
322
  }
323
 
324
  /** Returns true if field bulkShipmentAmountLimit is set (has been assigned a value) and false otherwise */
325
  public boolean isSetBulkShipmentAmountLimit() {
326
    return __isset_bit_vector.get(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID);
327
  }
328
 
329
  public void setBulkShipmentAmountLimitIsSet(boolean value) {
330
    __isset_bit_vector.set(__BULKSHIPMENTAMOUNTLIMIT_ISSET_ID, value);
331
  }
332
 
11890 kshitij.so 333
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
335
    case USER_ID:
336
      if (value == null) {
337
        unsetUserId();
338
      } else {
339
        setUserId((Long)value);
340
      }
341
      break;
342
 
343
    case ADDED_ON:
344
      if (value == null) {
345
        unsetAddedOn();
346
      } else {
347
        setAddedOn((Long)value);
348
      }
349
      break;
350
 
351
    case IS_ACTIVE:
352
      if (value == null) {
353
        unsetIsActive();
354
      } else {
355
        setIsActive((Boolean)value);
356
      }
357
      break;
358
 
12696 amit.gupta 359
    case COUNTER_ID:
360
      if (value == null) {
361
        unsetCounterId();
362
      } else {
363
        setCounterId((Long)value);
364
      }
365
      break;
366
 
367
    case TIN:
368
      if (value == null) {
369
        unsetTin();
370
      } else {
371
        setTin((String)value);
372
      }
373
      break;
374
 
13146 manish.sha 375
    case BULK_SHIPMENT_AMOUNT_LIMIT:
376
      if (value == null) {
377
        unsetBulkShipmentAmountLimit();
378
      } else {
379
        setBulkShipmentAmountLimit((Double)value);
380
      }
381
      break;
382
 
11890 kshitij.so 383
    }
384
  }
385
 
386
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
388
    case USER_ID:
389
      return Long.valueOf(getUserId());
390
 
391
    case ADDED_ON:
392
      return Long.valueOf(getAddedOn());
393
 
394
    case IS_ACTIVE:
395
      return Boolean.valueOf(isIsActive());
396
 
12696 amit.gupta 397
    case COUNTER_ID:
398
      return Long.valueOf(getCounterId());
399
 
400
    case TIN:
401
      return getTin();
402
 
13146 manish.sha 403
    case BULK_SHIPMENT_AMOUNT_LIMIT:
404
      return Double.valueOf(getBulkShipmentAmountLimit());
405
 
11890 kshitij.so 406
    }
407
    throw new IllegalStateException();
408
  }
409
 
410
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
411
  public boolean isSet(_Fields field) {
412
    if (field == null) {
413
      throw new IllegalArgumentException();
414
    }
415
 
416
    switch (field) {
417
    case USER_ID:
418
      return isSetUserId();
419
    case ADDED_ON:
420
      return isSetAddedOn();
421
    case IS_ACTIVE:
422
      return isSetIsActive();
12696 amit.gupta 423
    case COUNTER_ID:
424
      return isSetCounterId();
425
    case TIN:
426
      return isSetTin();
13146 manish.sha 427
    case BULK_SHIPMENT_AMOUNT_LIMIT:
428
      return isSetBulkShipmentAmountLimit();
11890 kshitij.so 429
    }
430
    throw new IllegalStateException();
431
  }
432
 
433
  @Override
434
  public boolean equals(Object that) {
435
    if (that == null)
436
      return false;
437
    if (that instanceof PrivateDealUser)
438
      return this.equals((PrivateDealUser)that);
439
    return false;
440
  }
441
 
442
  public boolean equals(PrivateDealUser that) {
443
    if (that == null)
444
      return false;
445
 
446
    boolean this_present_userId = true;
447
    boolean that_present_userId = true;
448
    if (this_present_userId || that_present_userId) {
449
      if (!(this_present_userId && that_present_userId))
450
        return false;
451
      if (this.userId != that.userId)
452
        return false;
453
    }
454
 
455
    boolean this_present_addedOn = true;
456
    boolean that_present_addedOn = true;
457
    if (this_present_addedOn || that_present_addedOn) {
458
      if (!(this_present_addedOn && that_present_addedOn))
459
        return false;
460
      if (this.addedOn != that.addedOn)
461
        return false;
462
    }
463
 
464
    boolean this_present_isActive = true;
465
    boolean that_present_isActive = true;
466
    if (this_present_isActive || that_present_isActive) {
467
      if (!(this_present_isActive && that_present_isActive))
468
        return false;
469
      if (this.isActive != that.isActive)
470
        return false;
471
    }
472
 
12696 amit.gupta 473
    boolean this_present_counterId = true;
474
    boolean that_present_counterId = true;
475
    if (this_present_counterId || that_present_counterId) {
476
      if (!(this_present_counterId && that_present_counterId))
477
        return false;
478
      if (this.counterId != that.counterId)
479
        return false;
480
    }
481
 
482
    boolean this_present_tin = true && this.isSetTin();
483
    boolean that_present_tin = true && that.isSetTin();
484
    if (this_present_tin || that_present_tin) {
485
      if (!(this_present_tin && that_present_tin))
486
        return false;
487
      if (!this.tin.equals(that.tin))
488
        return false;
489
    }
490
 
13146 manish.sha 491
    boolean this_present_bulkShipmentAmountLimit = true;
492
    boolean that_present_bulkShipmentAmountLimit = true;
493
    if (this_present_bulkShipmentAmountLimit || that_present_bulkShipmentAmountLimit) {
494
      if (!(this_present_bulkShipmentAmountLimit && that_present_bulkShipmentAmountLimit))
495
        return false;
496
      if (this.bulkShipmentAmountLimit != that.bulkShipmentAmountLimit)
497
        return false;
498
    }
499
 
11890 kshitij.so 500
    return true;
501
  }
502
 
503
  @Override
504
  public int hashCode() {
505
    return 0;
506
  }
507
 
508
  public int compareTo(PrivateDealUser other) {
509
    if (!getClass().equals(other.getClass())) {
510
      return getClass().getName().compareTo(other.getClass().getName());
511
    }
512
 
513
    int lastComparison = 0;
514
    PrivateDealUser typedOther = (PrivateDealUser)other;
515
 
516
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
517
    if (lastComparison != 0) {
518
      return lastComparison;
519
    }
520
    if (isSetUserId()) {
521
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
522
      if (lastComparison != 0) {
523
        return lastComparison;
524
      }
525
    }
526
    lastComparison = Boolean.valueOf(isSetAddedOn()).compareTo(typedOther.isSetAddedOn());
527
    if (lastComparison != 0) {
528
      return lastComparison;
529
    }
530
    if (isSetAddedOn()) {
531
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.addedOn, typedOther.addedOn);
532
      if (lastComparison != 0) {
533
        return lastComparison;
534
      }
535
    }
536
    lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(typedOther.isSetIsActive());
537
    if (lastComparison != 0) {
538
      return lastComparison;
539
    }
540
    if (isSetIsActive()) {
541
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
542
      if (lastComparison != 0) {
543
        return lastComparison;
544
      }
545
    }
12696 amit.gupta 546
    lastComparison = Boolean.valueOf(isSetCounterId()).compareTo(typedOther.isSetCounterId());
547
    if (lastComparison != 0) {
548
      return lastComparison;
549
    }
550
    if (isSetCounterId()) {
551
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.counterId, typedOther.counterId);
552
      if (lastComparison != 0) {
553
        return lastComparison;
554
      }
555
    }
556
    lastComparison = Boolean.valueOf(isSetTin()).compareTo(typedOther.isSetTin());
557
    if (lastComparison != 0) {
558
      return lastComparison;
559
    }
560
    if (isSetTin()) {
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
562
      if (lastComparison != 0) {
563
        return lastComparison;
564
      }
565
    }
13146 manish.sha 566
    lastComparison = Boolean.valueOf(isSetBulkShipmentAmountLimit()).compareTo(typedOther.isSetBulkShipmentAmountLimit());
567
    if (lastComparison != 0) {
568
      return lastComparison;
569
    }
570
    if (isSetBulkShipmentAmountLimit()) {
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkShipmentAmountLimit, typedOther.bulkShipmentAmountLimit);
572
      if (lastComparison != 0) {
573
        return lastComparison;
574
      }
575
    }
11890 kshitij.so 576
    return 0;
577
  }
578
 
579
  public _Fields fieldForId(int fieldId) {
580
    return _Fields.findByThriftId(fieldId);
581
  }
582
 
583
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
584
    org.apache.thrift.protocol.TField field;
585
    iprot.readStructBegin();
586
    while (true)
587
    {
588
      field = iprot.readFieldBegin();
589
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
590
        break;
591
      }
592
      switch (field.id) {
593
        case 1: // USER_ID
594
          if (field.type == org.apache.thrift.protocol.TType.I64) {
595
            this.userId = iprot.readI64();
596
            setUserIdIsSet(true);
597
          } else { 
598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
599
          }
600
          break;
601
        case 2: // ADDED_ON
602
          if (field.type == org.apache.thrift.protocol.TType.I64) {
603
            this.addedOn = iprot.readI64();
604
            setAddedOnIsSet(true);
605
          } else { 
606
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
607
          }
608
          break;
609
        case 3: // IS_ACTIVE
610
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
611
            this.isActive = iprot.readBool();
612
            setIsActiveIsSet(true);
613
          } else { 
614
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
615
          }
616
          break;
12696 amit.gupta 617
        case 4: // COUNTER_ID
618
          if (field.type == org.apache.thrift.protocol.TType.I64) {
619
            this.counterId = iprot.readI64();
620
            setCounterIdIsSet(true);
621
          } else { 
622
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
623
          }
624
          break;
625
        case 5: // TIN
626
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
627
            this.tin = iprot.readString();
628
          } else { 
629
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
630
          }
631
          break;
13146 manish.sha 632
        case 6: // BULK_SHIPMENT_AMOUNT_LIMIT
633
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
634
            this.bulkShipmentAmountLimit = iprot.readDouble();
635
            setBulkShipmentAmountLimitIsSet(true);
636
          } else { 
637
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
638
          }
639
          break;
11890 kshitij.so 640
        default:
641
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
642
      }
643
      iprot.readFieldEnd();
644
    }
645
    iprot.readStructEnd();
646
    validate();
647
  }
648
 
649
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
650
    validate();
651
 
652
    oprot.writeStructBegin(STRUCT_DESC);
653
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
654
    oprot.writeI64(this.userId);
655
    oprot.writeFieldEnd();
656
    oprot.writeFieldBegin(ADDED_ON_FIELD_DESC);
657
    oprot.writeI64(this.addedOn);
658
    oprot.writeFieldEnd();
659
    oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
660
    oprot.writeBool(this.isActive);
661
    oprot.writeFieldEnd();
12696 amit.gupta 662
    oprot.writeFieldBegin(COUNTER_ID_FIELD_DESC);
663
    oprot.writeI64(this.counterId);
664
    oprot.writeFieldEnd();
665
    if (this.tin != null) {
666
      oprot.writeFieldBegin(TIN_FIELD_DESC);
667
      oprot.writeString(this.tin);
668
      oprot.writeFieldEnd();
669
    }
13146 manish.sha 670
    oprot.writeFieldBegin(BULK_SHIPMENT_AMOUNT_LIMIT_FIELD_DESC);
671
    oprot.writeDouble(this.bulkShipmentAmountLimit);
672
    oprot.writeFieldEnd();
11890 kshitij.so 673
    oprot.writeFieldStop();
674
    oprot.writeStructEnd();
675
  }
676
 
677
  @Override
678
  public String toString() {
679
    StringBuilder sb = new StringBuilder("PrivateDealUser(");
680
    boolean first = true;
681
 
682
    sb.append("userId:");
683
    sb.append(this.userId);
684
    first = false;
685
    if (!first) sb.append(", ");
686
    sb.append("addedOn:");
687
    sb.append(this.addedOn);
688
    first = false;
689
    if (!first) sb.append(", ");
690
    sb.append("isActive:");
691
    sb.append(this.isActive);
692
    first = false;
12696 amit.gupta 693
    if (!first) sb.append(", ");
694
    sb.append("counterId:");
695
    sb.append(this.counterId);
696
    first = false;
697
    if (!first) sb.append(", ");
698
    sb.append("tin:");
699
    if (this.tin == null) {
700
      sb.append("null");
701
    } else {
702
      sb.append(this.tin);
703
    }
704
    first = false;
13146 manish.sha 705
    if (!first) sb.append(", ");
706
    sb.append("bulkShipmentAmountLimit:");
707
    sb.append(this.bulkShipmentAmountLimit);
708
    first = false;
11890 kshitij.so 709
    sb.append(")");
710
    return sb.toString();
711
  }
712
 
713
  public void validate() throws org.apache.thrift.TException {
714
    // check for required fields
715
  }
716
 
717
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
718
    try {
719
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
720
    } catch (org.apache.thrift.TException te) {
721
      throw new java.io.IOException(te);
722
    }
723
  }
724
 
725
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
726
    try {
727
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
728
      __isset_bit_vector = new BitSet(1);
729
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
730
    } catch (org.apache.thrift.TException te) {
731
      throw new java.io.IOException(te);
732
    }
733
  }
734
 
735
}
736