Subversion Repositories SmartDukaan

Rev

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